BootText

参与到Ubuntu的翻译中来
回复
头像
oneleaf
论坛管理员
帖子: 10218
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 102 次

BootText

#1

帖子 oneleaf » 2005-07-22 14:15

This will not give you a splash image or hide the boot text. It will only make it look better.
Increase resolution

Edit /boot/grub/menu.lst

sudo gedit /boot/grub/menu.lst

Add vga=792 to your default boot option.

Example:

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 ]"

We make the "[ ok ]" during bootup green

*

Edit /lib/lsb/init-functions

sudo 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 () {

# If no arguments were passed, return
[ -z "$1" ] && return 1

# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
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.

https://wiki.ubuntu.com/BootText
当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
yonsan
帖子: 887
注册时间: 2005-07-01 18:56
来自: 广州市
送出感谢: 0
接收感谢: 3 次

#2

帖子 yonsan » 2005-07-22 15:20

This will not give you a splash image or hide the boot text. It will only make it look better.
这篇文章不是向你提供(grub引导过程中)生动的背景图象或者隐藏boot文本信息(的解决办法),它只为了让你的grub启动菜单更好看点.

Increase resolution
提高分辨率

Edit /boot/grub/menu.lst
编辑/boot/grub/menu.lst文件
sudo gedit /boot/grub/menu.lst

Add vga=792 to your default boot option.
向你的引导菜单默认选项中添加 vga=792


Example:
例如:

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 ]"
使"[ok]"彩色显示

We make the "[ ok ]" during bootup green
我们将"[ok]"在引导过程中设置显示为绿色.

Edit /lib/lsb/init-functions
编辑/lib/lsb/init-functions文件

sudo 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`
找查整个init-functions文件,直到找到log_end_msg()函数,在RED=`$TPUT setaf 1`下添加GREEN=`$TPUT setaf 2`

Change echo "$UP$END[ ok ]" to echo "$UP$END[ ${GREEN}ok${NORMAL} ]"
找到echo "$UP$END[ ok ]" 并改为echo "$UP$END[ ${GREEN}ok${NORMAL} ]"

The function should look like this:
使log_end_msg () 看起来像以下样子:
log_end_msg () {

# If no arguments were passed, return
[ -z "$1" ] && return 1

# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
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.
重启,(你会看到)分辨率应该提高了,"[ok]信息变成显示为绿色了!

https://wiki.ubuntu.com/BootText
I will be back!
头像
oneleaf
论坛管理员
帖子: 10218
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 102 次

#3

帖子 oneleaf » 2005-07-23 22:41

当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
millenniumdark
论坛版主
帖子: 4160
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
送出感谢: 43 次
接收感谢: 9 次
联系:

#4

帖子 millenniumdark » 2006-07-31 0:49

这篇好像过时了
回复

回到 “软件和文档翻译”