sobota 11. dubna 2009

Ubuntu verbose boot

I read many manuals how to set up splash screen during boot. However I would prefer verbose mode to see actual boot status. If you are using grub as a loader then edit /boot/grub/menu.lst.

title Ubuntu 8.10, kernel 2.6.27-11-generic
uuid 31e024bc-8ee3-42ec-b58c-4955e93cfcd6
kernel /boot/vmlinuz-2.6.27-11-generic root=UUID=31e024bc-8ee3-42ec-b58c-4955e93cfcd6 ro quiet splash
initrd /boot/initrd.img-2.6.27-11-generic
quiet


If you remove the parts in bold, you will boot without splash screen. Quiet in "kernel" line and at last line is same.

You also might want to change appearance of grub. I am using green grub which you can define by this line in grub:

color green/black light-green/black

Now you should have colorized grub and boot without splash screen. Some distributions also use green [OK] and red [FAIL] or [!!] in output. You need to edit function log_end_msg () in /etc/lsb-base-logging.sh.


log_end_msg () {
if [ -z "$1" ]; then
return 1
fi

if log_use_usplash; then
if [ "$1" -eq 0 ]; then
usplash_write "SUCCESS OK" || true
else
usplash_write "FAILURE failed" || true
fi
fi

log_to_console log_end_msg "$@"

if [ "$COL" ] && [ -x "$TPUT" ]; then
printf "\r"
NORMAL=`$TPUT op`
GREEN=`$TPUT setaf 2`
RED=`$TPUT setaf 1`
$TPUT hpa $COL
if [ "$1" -eq 0 ]; then
echo '['
echo " ${RED}OK${NORMAL} "
echo ']'
else
printf '['
echo " ${RED}!!${NORMAL} "
echo ']'
fi
else
if [ "$1" -eq 0 ]; then
echo " ...done."
else
echo " ...fail!"
fi
fi
return $1
}


Žádné komentáře:

Okomentovat