https://wiki.ubuntu.com/KernelTeam/Grub2Testing
1、KernelTeam/Grub2Testing(乌邦图内核小组的哥伦布2代的测试说明)
There is a desire always to ship the latest and greatest of any product; boot loaders included. However upgrading a bootloader is at best frightening and
risky. The primary bootloader for x86 platforms is currently grub. That however has not been updated since about 1996 and is getting long in the tooth.
It also does not support newer BIOS forms like EFI and it never will.
There is a replacement for grub, which has been claiming to be the replacement for it for some years (about 6 at least), grub2. Switching to this would
bring support for newer systems, internationalisation, updates and bug fixes etc.
So it's clear we would like to switch the default bootloader to grub2. It makes sense, it's the way forward, why do we not just do it? Well, does grub2
support every single machine out there? All those odd broken machines that grub supports? We do not know. That's where this page comes in.
2、Testing grub2(测试哥伦布2代)
If you are running Jaunty Jackalope or later, grub2 can be installed in parallel with, and as a chainloaded sub-bootloader of, your existing grub
installation. This allows you to boot actually with grub and then select grub2 from the menu. Then you can confirm grub2 works correctly before electing
to switch to it formally.
Even if you are only able to test in chainloaded mode that would give us some information as to the viability of grub2.
3、Before you Test(在测试之前要准备的工作)
Though it is unlikely you will have any issues we would always recommend taking precautions before attempting a bootloader update. It is recommended that
you have an up to date backup of your system before attempting this (you have backups right?). It is also recommended that you have a bootable CD or a
bootable USB disk available should you be unable to boot following the installation.
4、How to Install grub2(怎样安装哥伦布2代)
代码: 全选
sudo apt-get install grub2
This will install grub2 and modify the existing grub boot loader menu allow one to chain load grub2 to allow one to test to see if grub2 works on your
machine. At this stage, the original grub is still the main boot loader and keeps the original boot menu items.
Note: In Jaunty (but not Karmic), there was a bug in the grub2 installer (LP#376879) where it modifies the existing grub configuration incorrectly. If you experience this problem, at the "Chainload into Grub 2" menu item, press 'e' to edit the configuration. Press 'e' a second time to edit the top boot line and change:
(特别说明,如果是在904版本中测试安装哥伦布2代,一定要在安装后,编辑grub.cfg,把引导行的root xxxx改为uuid xxxx)
root xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
to:
uuid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
and press the Enter key after editing this line. Then press 'b' to chainload and boot grub2.
Note: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx is your partition UUID number.
If one can boot from grub2 successfully, one can then install grub2 onto the system as the main boot loader using the command:
代码: 全选
sudo upgrade-from-grub-legacy
If you do not want to install grub2 on your machine but you do want to see if it works with your BIOS, an alternative test is as follows:
* Download the bzip2 compressed image bootable-grub2-2.5GB.img.bz2
from http://people.ubuntu.com/~cking/grub2-b ... GB.img.bz2
* Uncompress it:
代码: 全选
bunzip2 bootable-grub2-2.5GB.img.bz2
* Copy the image to the drive (assuming it appears as block device /dev/sdb, do the following):
代码: 全选
sudo dd if=bootable-grub2-2.5GB.img of=/dev/sdb
* Boot your machine with this image. If it boots OK, add your hardware to the list below. Note: This image boots from an ext3 partition.
6、Editing(编辑配置文件)
代码: 全选
sudo nano /boot/grub/grub.cfg
代码: 全选
sudo apt-get install leafpad #如果现有系统上没有leafpad可以顺手装一个,瞬间下载,立马装好可用
代码: 全选
sudo leafpad /boot/grub/grub.cfg