Grubs really aren't very attractive...

Tom Horsley horsley1953 at
Sat Apr 21 05:14:28 UTC 2012

I've just spend most of an evening getting a stand alone
GRUB2 partition to work (if you can call it that) and
I consider myself lucky I managed that much :-).

Here's the fascinating fruit of my labors - a grub.cfg
that can multi boot fedora 16, fedora 17, and memtest:

set default="0"
set timeout=10

menuentry "Boot Fedora 16" {
    set root='hd0,msdos3'
    chainloader +1

menuentry "Boot Fedora 17" {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    multiboot /boot/grub2/i386-pc/core.img

menuentry "Boot Memtest" {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    linux16 /memtest/memtest86+-4.20.bin

This is using the grub2 that ships with fedora 17 Beta.

Note that the word "kernel" doesn't appear anywhere.
With the latest grub2 improvements, you apparently
must tell it what kind of kernel, so there are
different commands like linux, linux16, multiboot,

Also note that fedora 16 doesn't use multiboot.
It simply refused to work on the fedora 16 partition.
Apparently the f16 grub2 isn't compatible with
the multiboot standard they run on and on about
in the info file without ever actually managing
to say what the heck it is :-). So I'm still
chainloading to boot fedora 16.

I previously had grub1 installed in the MBR.

To get grub2 (after various failed attempts),
the magic seemed to be:

rsync -a /boot/grub2/ /mainboot/grub2/

That gets all the modules and wot-not copied into
the /mainboot partition I'm using as a stand alone

I don't know if the following is actually necessary,
but it didn't work right till I did it this way.
(The disk is sdb at this point because sda was the
live USB stick I needed to use after breaking
the boot with previous install attempts :-).

mv /boot /origboot
mv /mainboot /boot
grub2-install /dev/sdb1
mv /boot /mainboot
mv /origboot /boot

edit /mainboot/grub2/ and fix
the sdb names to say sda (which is what the
disk will be when booting without the USB stick).

And that's how I got a stand alone grub2 partition
fixed up to boot multiple versions of linux.

Simple :-).

More information about the test mailing list