Grub Grief aGain

Tom H tomh0665 at gmail.com
Tue Jul 20 17:55:45 UTC 2010


On Tue, Jul 20, 2010 at 7:08 AM, Dave Howorth
<dhoworth at mrc-lmb.cam.ac.uk> wrote:
> Goh Lip wrote:
>> On 07/20/2010 04:37 AM, Rashkae wrote:
>>> Dave Howorth wrote:
>
>>>> menuentry "Desktop -- openSUSE 11.2 - 2.6.31.12-0.2 (on /dev/sdb1)" {
>>>>          insmod ext2
>>>>          set root=(hd1,1)
>>>>          linux /boot/vmlinuz-2.6.31.12-0.2-desktop
>>>> root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
>>>> resume=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part2
>>>> splash=silent quiet showopts vga=0x31a
>>>>          initrd /boot/initrd-2.6.31.12-0.2-desktop
>>>> }

Assuming that
/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
is the OpenSUSE "/" and that the OpenSUSE "/boot" is a directory on
"/" and not a partition mount point.

Assuming that
vmlinuz-2.6.31.12-0.2-desktop
and
initrd-2.6.31.12-0.2-desktop
are the respective vmlinuz and initrd of the OpenSUSE install.

Assuming that
/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
has an ext2/ext3/ext4 filesystem.

Run
ls -l /dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
to find out to what /dev/sdXY it is a symlink

Run
blkid -c /dev/null /dev/sdXY
(where XY are the values obtained by the "ls -l..." above) to get the uuid of
/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1

Edit
/etc/grub.d/40_custom
to turn it into:
<start 40_custom>
#!/bin/sh
cat << EOF
menuentry "OpenSuse 40_custom" {
insmod ext2
search --fs-uuid --set=root
[uuid_of_/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1]
without "[" and ']"
linux /boot/vmlinuz-2.6.31.12-0.2-desktop
root=/dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828-part1
ro
initrd /boot/initrd-2.6.31.12-0.2-desktop
}
EOF
<end 40_custom>
without the "<start...>" and "<end...>" lines and without the "without..." line.

Run
update-grub

Reboot and choose the "OpenSuse 40_custom" menu entry and let us know
what happens...




More information about the ubuntu-users mailing list