From Fedora Project Wiki

< Features

Revision as of 08:16, 10 July 2009 by Ngompa (talk | contribs) (Initial creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Important.png
Comments and Explanations
The page source contains comments providing guidance to fill out each section. They are invisible when viewing this page. To read it, choose the "edit" link.


Feature Name

Switch to GRUB 2 for the default bootloader in Fedora 12 for new/clean installs

Summary

Fedora (and Red Hat before it) have been maintaining a fork of GRUB Legacy (GNU GRUB 0.9x) because upstream switched to development of GRUB 2. Maintaining a single distro fork is unacceptable when Fedora's policy is to work with upstream.

Owner

  • email: <ngompa13 {%} gmail {*} com>

Current status

  • Targeted release: Fedora 12
  • Last updated: July 10, 2009
  • Percentage of completion: 0%


Detailed Description

Back in 1996, GRUB development for GNU GRUB 0.9x basically stopped, and research & development began for GRUB 2. In 2009, with looming advent of a change in hard disks from 512 byte sectors to 4096 byte sectors by next year (which will mess up most existing boot loaders), and with Ubuntu even choosing to start testing for GRUB 2, Fedora should look into switching to GRUB 2 for new installs rather than GRUB Legacy

Benefit to Fedora

GRUB 2 is being actively developed, so work from Fedora to fix bugs or improve GRUB 2 would be able to be pushed back upstream.

  • Supports a wider array of filesystems to read from, in particular NTFS, ext4, and HFS+.
  • Supports EFI GPT, standard PC, Macintosh, Amiga, Sun, and BSD partition maps
  • Supports booting from PCs, Mac/PPC, SPARC, Mac/x86, OLPC/x86, and coreboot/x86.
  • Supports chainloading, linux, multiboot, and BSD boot on PCs, and linux on Macs.
  • Graphical menu support is available along with UTF-8.
  • Supports command history in normal mode
  • It is modular and supports module loading
  • It is scriptable

Scope

The work needed to make this feature ready for Fedora 12 release will depend on initial testing.

How To Test

GRUB 2 needs to be tested on regular PCs both 32-bit and 64-bit, as well as Mac/PPC and Mac/Intel computers.

To test for this feature initially, no packages really need to be installed. This initial testing is done to determine the scope of work needed to get this feature ready for Fedora 12.

Here are the steps for initial testing:

1. Grab the source code and compile it. Make note of the revision. Note: There are two branches of the source code that Fedora should test, with the expectation of them to be merged soon.

Branch 1: GRUB 2 mainline To grab GRUB 2 mainline source code, run:

svn co svn://svn.savannah.gnu.org/grub/grub2/

Branch 2: GRUB 2 + gfxmenu (Similar to mainline, except includes graphical menu) To grab GRUB 2 + gfxmenu source code, run:

bzr branch http://grub.gibibit.com/bzr/gfxmenu

2. Install it

The core image of GRUB 2 is also a Multiboot kernel, so you can load GRUB 2 by GRUB Legacy:

grub> root (hd0,0)

grub> kernel /boot/grub/core.img

grub> boot

You can generate core.img with grub-install (GRUB 2) by following way:

grub-install --grub-setup=/bin/true /dev/sda Change /dev/sda to match your device.


Note: This will not install GRUB 2 (core.img) to your MBR. Instead it executes /bin/true for installation which does not do the actual installation. It will prepare core.img and copy necessary files to /boot/grub folder.

After this you can use grub-mkconfig (or it's alias update-grub) to generate /boot/grub/grub.cfg.

grub-mkconfig -o /boot/grub/grub.cfg

If you built from the gfxmenu branch, then set up a theme to use.

Grab some pre-made themes at http://grub.gibibit.com/Themes

Important.png
Very Important Note
The method of testing is subject to change depending on correctness of the procedure.


User Experience

If the regular GRUB mainline branch is used, users should expect a very similar experience to using GRUB Legacy. If the GRUB branch that includes the gfxmenu code is used, then either a similar experience to using GRUB Legacy or a new experience with themes used could be expected.

Examples of themes are at http://grub.gibibit.com/Themes

Dependencies

As far as I can tell, none, insofar RPMs. However, I would like to see the gfxmenu code used in GRUB 2 for Fedora. Colin D. Bennett, the writer of the gfxmenu code, hopes that within the next few weeks, the code would be merged into the mainline.

Contingency Plan

None necessary, if this falls through, then revert to using GRUB Legacy.

Documentation

Release Notes

  • Fedora now uses GRUB 2 for clean installs. With GRUB 2, there have been changes in how to configure GRUB. For more information, look at the GRUB Wiki

Comments and Discussion