update-grub help
Tom H
tomh0665 at gmail.com
Wed May 26 18:24:09 UTC 2010
On Wed, May 26, 2010 at 11:14 AM, Goh Lip <g.lip at gmx.com> wrote:
> On 05/26/2010 10:10 PM, Dave Howorth wrote:
>
>>
>> So I tried to boot from the revised grub.cfg and it failed with "error:
>> no such device" so I've commented out lines in
>> /usr/lib/grub/grub-mkconfig_lib so as not to generate search lines in
>> grub.cfg as described in
>> http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search
>>
>> But it still doesn't work. It now says "you need to load the kernel
>> first" and my googling hasn't answered that yet. The relevant stanza in
>> grub.cfg is:
>>
>> ### BEGIN /etc/grub.d/30_os-prober ###
>> menuentry "Desktop -- openSUSE 11.2 - 2.6.31.5-0.1 (on /dev/sdf1)" {
>> insmod ext2
>> set root=(hd5,1)
>> linux /boot/vmlinuz-2.6.31.5-0.1-desktop
>> root=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-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.5-0.1-desktop
>> }
>
>
> Dave, assuming you're not using encrypted or raid, at grub menu, go to
> grub prompt (enter 'c')
> type and note each output..
>
> grub> ls (hd5,1) [write carefully uuid no (do you use label for this?)]
> grub> search -f /boot/vmlinuz-2.6.31.5-0.1-desktop [gives you hd5,1 ?]
> grub> search -f /boot/initrd-2.6.31.5-0.1-desktop [gives you hd5,1 ?]
>
> If yes to above, proceed......
>
> use either *one* of the following
>
> grub> search --no-floppy --fs-uuid --set xxxxxxxxxxxxxxxx
> grub> search --no-floppy --label --set xxxx
>
> then either *one* of the following
> grub> linux /boot/vmlinuz-2.6.31.5-0.1-desktop root=UUID=xxxxxxxxxxx ro
> grub> linux /boot/vmlinuz-2.6.31.5-0.1-desktop root=LABEL=xxxx ro
>
> then....
> grub> initrd /boot/initrd-2.6.31.5-0.1-desktop
> grub> boot
Goh: I have never used Suse/OpenSuse, but it looks like they use the
by-id symlinks and the entries in Ubuntu's grub.cfg must have been
picked up from OpenSuse's menu.lst (or grub.conf if it uses RHEL
terminology).
Dave: I assume that OpenSuse uses grub1 so you might need to change
"set root=(hd5,1)" to "set root=(hd5,2)" to adjust for the change in
partition numbering between grub1 and grub2. The output of
bootinfoscript would be helpful in this respect.
You can also boot into Ubuntu to do what Gog is suggesting above by
edit /etc/grub.d/40_custom to add your OpenSuse install (and using
copy-and-paste for the uuids!).
$ cat 40_...
#!/bin/sh
cat <<EOF
menuentry "OpenSuse custom" {
set root=(hd5,1) or set root=(hd5,2)
linux /boot/vmlinuz-2.6.31.5-0.1-desktop root=UUID=xxxxxxxxxxx ro
initrd /boot/initrd-2.6.31.5-0.1-desktop
}
Or using OpenSuse's disk id way
(you might be able to use "root=ID=ata..." but
"root=/dev/disk/by-id/ata..." should work)
$ cat 40_...
#!/bin/sh
cat <<EOF
menuentry "OpenSuse custom" {
set root=(hd5,1) or set root=(hd5,2)
root=/dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part1 ro
initrd /boot/initrd-2.6.31.5-0.1-desktop
}
More information about the ubuntu-users
mailing list