Saturday, September 02, 2006

Silent system: No beeping boot0 and console

Beeping can be stressful. Starting computer emits couple of beeps, some of them can be avoided. In fact computer working as router/gateway don't need to inform everyone that it is starting. The first beep we will deactivate, appears when boot0 loads. Let's look into one interesting file /usr/src/sys/boot/i386/boot0/boot0.S. There are two key lines of code:
204: movb $ASCII_BEL,%al # Signal
205: callw putchr # beep

We can remove them without any fear that something will gone wrong.
Next compile the source using make command:
# make
In order Copy the 512 byte long file (boot0) to /boot
And install on disk using boot0cfg as follows:
# boot0cfg -Bv -b /boot/boot0 /dev/ad0
Where ad0 means disk where the changed bootloader will be installed.
boot0cfg manual warns about problems with geom when installing on mounted drive, I didn't have such problems and I don't have to temporarily disable this geom feature as described in manual.

Next beeping thing in FreeBSD is console. Personally I don't like when it beeps, so I removed this feature permanently.
Let's add one line in /etc/rc.conf:
allscreens_kbdflags="-b off"
Next time system is started console will not beep anymore. We can disable beeping temporarily by using this command:
# kbdcontrol -b off

Labels: , ,

0 Comments:

Post a Comment

<< Home