Grub & UUIDs

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
alcoheca
Posts: 28
Joined: Fri Mar 04, 2011 12:25 pm
Location: Glasgow

Grub & UUIDs

Post by alcoheca »

I've got a niggling issue with my setup (Ubuntu maverick running on internal USB stick replacing wifi card).

Despite using UUID in my grub.cfg, GRUB always tries to load the kernel from my external harddisk which is attached via the external USB port. I thouht this was because of the "set root=(hd0,1)" line in my grub.cfg so I added a fallback with the other option. Sadly neither work, and the joggler only boots from the USB stick when the hard disk is unplugged..

This is my grub.cfg if anyone can spot anything obviously stupid about it let me know!

Code: Select all

set timeout=2
set default=0
set fallback=1
menuentry "Ubuntu 10.10 (Maverick) - 2.6.34.7joggler3" {
    set root=(hd0,1)
    linux /vmlinuz-2.6.34.7joggler3 root=UUID=827bb11e-011c-484e-9875-597f6a400b88 acpi=force ro quiet
    initrd /initrd.img-2.6.34.7joggler3
}
menuentry "Ubuntu 10.10 (Maverick) - 2.6.34.7joggler3 - fallback" {
    set root=(hd1,1)
    linux /vmlinuz-2.6.34.7joggler3 root=UUID=827bb11e-011c-484e-9875-597f6a400b88 acpi=force ro quiet
    initrd /initrd.img-2.6.34.7joggler3
}
The UUID shown here is for the /dev/sda3 partition which is where Ubuntu resides..
alcoheca
Posts: 28
Joined: Fri Mar 04, 2011 12:25 pm
Location: Glasgow

Re: Grub & UUIDs

Post by alcoheca »

fixed it!
forgot to post this, grub doesn't like UUIDs, but works with labels instead

Code: Select all

set timeout=0
menuentry "Ubuntu Server (10.04.3 LTS) - 2.6.38.4joggler1" {
    search --label --no-floppy --set=root linux-root
    search --label --no-floppy --set=grub_boot linux-boot

    linux ($grub_boot)/vmlinuz-2.6.38.4joggler1 root=/dev/disk/by-label/linux-root intel_idle.max_cstate=2 ro quiet
    initrd ($grub_boot)/initrd.img-2.6.38.4joggler1
}
Post Reply