vkill'blog

“技术本身没有太多价值,掌握了新的思考方式才是真的收获”

使archlinux的grub支持背景图片

20:35 , vkill
默认archlinux的grub是不支持背景图片的,我们需要额外安装grub-gfx包才可以
官方wiki上有详细介绍:
http://wiki.archlinux.org/index.php/Grub-gfx_%28Deutsch%29

下面是学习笔记:

1、修改/etc/pacman.conf,定义使用community仓库,去掉这两行的注释

[root@vkill'host ~]# vi /etc/pacman.conf
......
[community]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist
......

2、备份menu.lst,不过这步不做也可以,安装grub-gfx时会自动做备份的,备份文件为menu.lst.pacsave

[root@vkill'host ~]# cp /boot/grub/menu.lst .

3、安装grub-gfx

[root@vkill'host ~]# pacman -S grub-gfx
::会提示你是否移除grub,我们选y
:: grub-gfx conflicts with grub. Remove grub? [Y/n] y
安装完成后的提示如下:
*********************************************************************
You need to run install-grub /dev/device or grub-install /dev/device
to update grub loader.
Note: Device should be any of these (sda, sdb, hda, hdb, sda1, hda1)
If you are in doubt, see your old grub config file (menu.lst.pacsave)
********************************************************************

4、还原menu.lst

[root@vkill'host ~]# cp /boot/grub/menu.lst.pacsave /boot/grub/menu.lst

5、查看安装好grub-gfx后默认自动安装的xpm

[root@vkill'host ~]# ls /boot/grub/*xpm*
/boot/grub/arch.xpm.gz  /boot/grub/splash.xpm.gz

6、修改menu.lst,在全局参数中添加下面这行,一般添加到default后
注意:这里的*.xpm.gz的位置照你个人情况,如开机出现grub黑屏有可能就是这里的图片位置不对

[root@vkill'host ~]# vi /boot/grub/menu.lst
......
#添加下面这行
splashimage /grub/splash.xpm.gz
......

7、更新grub

[root@vkill'host ~]# grub-install /dev/sda


ok , 重启后就可以看到已经支持背景图片了
Last modified by vkill on2008/08/09 20:37
类别:linux system | Tags: , , , , , , , | 0 条评论, 1358 次阅读
网友评论(0):
发表评论:

Nickname: 
Email:
Site URI: