图形化的GRUB (简体中文)

From ArchWiki

Jump to: navigation, search


i18n
English
简体中文


Contents

简介

本程序是在当前Arch仓库中的GRUB包的基础上修改而来,添加了闪屏图像(作为背景图)支持。


这个补丁并非官方的GRUB团队维护和支持,并且仅适用于GRUB 0.9x系列。该补丁被很多发行版所采用,比如Fedora/红帽、SuSE、Gentoo、MEPIS以及其他的一些版本。我使用的这个补丁基于Fedora Core 3所提供的SRPM包修改而来,对应最新的vanilla GRUB版本。

在安装完成后,你将会看到如下图所示的GRUB屏幕: http://www.mundolink.net/users/mariov/images/arch-grub-096.png


为了满足特殊的需求,那些喜欢旧的闪屏图像的可以选择旧的。 http://www.mundolink.net/users/mariov/images/arch-grub.png

New: In addition to the standard package, a new alternate one is available for those who follow the Reiser4FShowto steps and want a grub package with both reiserfs4 and splashimage.

安装前言

Pre Install Notes

  1. Make a copy of your menu.lst for backup. It is not replaced by the installation steps below, unless you remove your current grub package.
  2. We are dealing with your boot system info, so there is a small chance that things can be screw up. But I haven't got any issue.
  3. If want to compile the package with the old splash image, or your custom splash image instead of the current one, you need to edit the PKGBUILD and change the md5sum assigned to splash.xpm.gz.
  4. The alternate package with reiser4 requires libaal, reiser4progs, and a reiser4 patched kernel. Those are not on Arch repos, you can get them and read about all the process involved on Reiser4FShowto, or grab my updated PKGBUILDs:libaal, and reiser4progs.
  5. Be sure not to upgrade grub via pacman after following this guide, as the version used in this guide is older than the current version available via pacman. You can set pacman to ignore any grub upgrades by editing your pacman.conf accordingly.

安装

注意: Reiser 包没有更新since reiser patch need to be rediffed. Files changed for 0.97-1: PKGBUILD, menu.lst.

注意 grub-gfx 可以在 community仓库中找到,所以你只需编辑 menu.lst 然后添加闪屏文件到/boot目录即可。


1. 下载并保存下列文件到 /var/abs/local目录下:


2. 编译构建包:

# makepkg  


3. 安装包:

# pacman -U grub-0.97-1.pkg.tar.gz 


4. 编辑menu.lst在操作系统列表前任何地方添加下面的闪屏设置部分:

splashimage /boot/grub/splash.xpm.gz

比如说:

# general configuration:
timeout   5
default   0
splashimage /boot/grub/splash.xpm.gz

重要提示: 从grub 0.96-4起,闪屏图像位置改为 /boot/grub/splash.xpm.gz而不是/grub/splash.xpm.gz。老用户需要修改一下路径。

实际上,你应该把 splashimage /path/to/your/image.xpm{.gz} 和grub的根引导分区联系起来。
如果你有单独的/boot分区:
splashimage /grub/splash.xpm.gz
否则:
splashimage /boot/grub/splash.xpm.gz
错误的路径会导致grub黑屏挂起,并且没有任何提示和光标:-(

5. 将新的 grub引导图像安装到 /boot目录。(将x改成你的驱动器编号 (比如hda):

# install-grub /dev/hdx (or sdx)

6. 当你的系统需要双重启动并且主引导设备是NTLDR时 - 记住更新你的引导文件(dd if=/dev/hdx of=/linux.bin bs=512 count=1)然后复制到你的NTFS引导分区中,如果你不知道是不是,跳过即可。

问题解决

黑屏有菜单

Stages 可能没有更新,重新运行install-grub (你的/boot分区或者MBR所在分区)。然后使用 checksplash.sh脚本以检测你的stage2 是否支持闪屏图像.

黑屏无菜单或者未正确显示

检查splashimage设置是否有误。如果你有单独的/boot分区,改成splashimage /grub/splash.xpm.gz试试看。同时也检查下splash.xpm.gz是否在grub目录下。

常见问题解答

1. 我可以使用个性化的GRUB图像吗?

当然可以,不过图像要满足一下要求:分辨率640x480;色深14位;用gzip压缩成xpm格式。

2. 修改闪屏需要重编译或者安装GRUB吗?

任何时间你都可以使用任意的闪屏图像,在首次安装后你不需要再次编译他,只需要用新的闪屏图像替换掉 splash.xpm.gz 即可,或者是编辑 menu.lst 修改闪屏路径就可以了

3. 我现在使用的是lilo,我可以用GRUB取代他吗?

当然可以。 不过应该从Arch系统中获取你的分区信息,而不是从grub中(当然也不是 lilo.conf中),然后填入menu.lst。因此在安装完软件包后,你需要编辑 menu.lst 添加你的引导设备和内核镜像配置信息。这类问题在本向导的范围之外,如果你遇到这样的问题,首先请确保软件库里当前的标准GRUB能够正常运行,然后再更新这些软件包。更多信息或配置范例请参考 GRUB(简体中文)Gentoo手册 - 配置引导器.

4. 什么地方可以获取更多的闪屏他图像?

GNU Grub 闪屏图像制作指南 - General Grub bootsplash info and sample images.
checksplash.sh - 检测你的stage2(内核镜像)是否支持闪屏图像。

5. 我希望试试你的软件包,但不知道如何编译他

很简单,先下载 预编译包 ,然后按照第3~5步安装他就可以了。

最新版本

当前没有内容。

愿望列表

I will investigate the patch used by SuSE/Novell. It is a new modified one that allows for a greater resolution (not just 640x480) and more fancy stuff like menus. But that will means a heavy modified grub install, and thus completely sure it will not be accepted on Arch repos, and please don't ask when it will be done.


修订记录

2005-05-16 升级到 0.97
2005-03-02 添加新的PKGBUILD以支持reiser4以及相关的GRUB补丁。
2005-02-27 PKGBUILD 0.96-4, 通过添加一个启动连接修复闪屏图像路径的问题。
2005-02-26 修复一些文档的步骤。
2005-02-04 为那些怀旧的朋友提供旧的闪屏图像。
2005-02-03 PKGBUILD 0.96-3, 移除gzip的依赖。闪屏图像直接从$startdir获取,取代以前从$statdir/src解压。并且提供预编译好了的包。 (常见问题 4).
2005-02-02 升级到 GRUB 0.96,重新制作了补丁。新的闪屏基于tpowa的 KDE 3.4 墙纸制作。
2005-01-09 添加了自动重配置的部分以解决补丁添加的新文件的编译问题。 更新了 FAQ.
2005-01-06 发布首个基于GRUB 0.95的PKGBUILD。


——————

希望你喜欢!

Original by darkcoder
WIKI作者: Romashka; WIKI翻译: Athurg

Personal tools