update-grub help

Tom H tomh0665 at gmail.com
Wed May 26 17:50:34 UTC 2010


On Wed, May 26, 2010 at 10:10 AM, Dave Howorth
<dhoworth at mrc-lmb.cam.ac.uk> wrote:
> Goh Lip wrote:
>> Welcome and good to hear that. The 2 most useful grub commands are
>> "update-grub" and "grub-install" You would also get it working by
>> "sudo grub-install /dev/sda"
>> as this 'grand-daddy' command will include "grub-mkdevicemap" and other
>> commands as well. "grub-mkdevicemap" is just more 'surgical'. As Suse is
>> installed after karmic, the mapping does not exist and needs to be created.
>
> I like surgical :) I've had too many near death experiences when grub or
> the hardware or the os or my tired brain misunderstand each other and
> things go awry.
>
> 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
> }

This looks OK; sdf1 should correspond to hd5,1. I assume that sdf1 is
your root partition and sdf2 is your swap partition.

Does "ls -l /dev/disk/by-id/" show that
ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047-part1 is a symlink to sdf1?

I don't see why disabling the search line would make a difference. All
that it is doing is giving hd5,1 a specific uuid. Since you are not
using uuids, it should be superfluous but harmless.

Have you run bootinfoscript?




More information about the ubuntu-users mailing list