个人工具

“UbuntuHelp:BootText/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
Increase resolution
第8行: 第8行:
  
 
==  Increase resolution ==
 
==  Increase resolution ==
Edit /boot/grub/menu.lst
+
编辑 /boot/grub/menu.lst
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo gedit /boot/grub/menu.lst
 
gksudo gedit /boot/grub/menu.lst
 
</nowiki></pre>
 
</nowiki></pre>
  
Add <code><nowiki>vga=792</nowiki></code> to your default boot option.
+
<code><nowiki>vga=792</nowiki></code> 加到默认的启动菜单中.
 
+
例如:
Example:
+
 
<pre><nowiki>
 
<pre><nowiki>
 
titleUbuntu, kernel 2.6.10-5-k7 Default  
 
titleUbuntu, kernel 2.6.10-5-k7 Default  

2007年5月17日 (四) 20:08的版本


本文不是给您启动图像或教您隐藏启动文字,只是让启动画面更好看.

Increase resolution

编辑 /boot/grub/menu.lst

gksudo gedit /boot/grub/menu.lst

vga=792 加到默认的启动菜单中. 例如:

titleUbuntu, kernel 2.6.10-5-k7 Default 
root(hd0,0)
kernel/vmlinuz root=/dev/hde6 ro quiet splash vga=792
initrd/initrd.img
savedefault
boot

Colorize "[ ok ]"

NOTE : does not work with 5.10 Breezy. Use solution given there. (ed. 28/12/2005)

We make the "[ ok ]" during bootup green

  • Edit /lib/lsb/init-functions
gksudo gedit /lib/lsb/init-functions
  • Find the log_end_msg () function, all the way at the bottom of the file and add GREEN=`$TPUT setaf 2` below RED=`$TPUT setaf 1`
  • Change echo "$UP$END[ ok ]" to echo "$UP$END[ ${GREEN}ok${NORMAL} ]"

The function should look like this:

log_end_msg () {

[ -z "$1" ] && return 1

TPUT=/usr/bin/tput
EXPR=/usr/bin/expr
if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then
COLS=`$TPUT cols`
if [ -n "$COLS" ]; then
COL=`$EXPR $COLS - 7`
else
COL=73
fi

UP=`$TPUT cuu1`
END=`$TPUT hpa $COL`
START=`$TPUT hpa 0`
RED=`$TPUT setaf 1`
GREEN=`$TPUT setaf 2`
NORMAL=`$TPUT op`
if [ $1 -eq 0 ]; then
echo "$UP$END[ ${GREEN}ok${NORMAL} ]"
else
echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"
fi
else
if [ $1 -eq 0 ]; then
echo "   ...done."
else
echo "   ...fail!"
fi
fi
return $1
}


Finalize

Reboot, and your resolution should be increased. Your [ ok ] messages should now be green.

Credits: dudinatrix