Grub Grief aGain

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Tue Jul 20 11:08:37 UTC 2010


Goh Lip wrote:
> On 07/20/2010 04:37 AM, Rashkae wrote:
>> Dave Howorth wrote:

Goh Lip, Rashkae, thanks for your help!

>>> 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
>>> }
> 
>> This is rather strange.  You say you ran grub-update, but those entries
>> do not look like auto-generated entries that I'm familiar with from
>> grub2.  The search directive is missing, for one, and the default kernel
>> options are completely different.

The search directive is missing because I previously edited
grub-mkconfig_lib because I encountered a grub bug as explained here:

<http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search>

And the system has been working since that change.

The options probably look strange because it's using by-id instead of
UUIDs. I think that's because that's what's in the device.map:

(hd1)   /dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310828
(hd5)   /dev/disk/by-id/ata-ST31500341AS_9VS3BBQ7
(hd0)   /dev/disk/by-id/ata-Hitachi_HDS721050CLA362_JP1540HN25EWEP
(hd2)   /dev/disk/by-id/ata-ST31500341AS_9VS39AK8
(hd4)   /dev/disk/by-id/scsi-3600050e0e812cc005649000090490000
(hd6)   /dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASYA878047
(hd3)   /dev/disk/by-id/ata-WDC_WD1503FYYS-01T8B0_WD-WMAUR0310430

That file was generated by openSUSE and I copied it across and use it
(a) because the one Ubuntu grub2 generated was wrong and (b) IMHO, the
device IDs are a more sane technique than UUIDs (but i know that's a
matter of opinion)

In any case the system has been fine with that for a while and it hasn't
changed, so I'm not hugely inclined to think it may be my current problem.

>> Have you, by any chance, modified the files in /etc/grub.d to create a
>> custom boot menu, perhaps following some instructions from someone?

So I confess to changing some things, but my answer to this specific
question is NO SIR :) They are as when they were installed.

> Ah, looks like Dave has set the no-UUID in the default/grub.d, and 
> perhaps he needs to do that because suse uses disk-by-id instead. So 
> he's having trouble because bios may start with different numbering 
> system each time it boots, so it may not be (hd1,1) and it won't boot.
> And chainloading may also 'run'. I mean booting won't run, numbering 
> runs. (English is sure funny)
> 
> Dave, you may want to run this instead....
> 
> linux (hd1,1)/boot/vmlinuz-2.6.31-12-0.2-desktop root=/dev/sdb1 ro
> initrd (hd1,1)/boot/initrd-2.6.31.12-0.2-desktop
> boot
> 
> 
> *BUT* before you do that, please check at grub prompt
> search -f /boot/vmlinuz-2.6.31-12-0.2-desktop
> 
> If it gives you hd1,1, then proceed, bit if it gives say, hd2,1, then 
> change above (hd1,1) to (hd2,1) BUT /dev/sdb1 remains unchanged.

I'd love to do that but there's that bug in search again. It returns no
results :(

Fortunately, I can use ls to get enough information.

ls (hd1,1) tells me that the partition is labelled pad1 (which is a name
I use for small empty partitions at the front of disks containing LVM
partitions)

ls (hd2,1) tells me that the partition is labelled opensuse-11.2 (you
can guess what that is). It claims (by-id) that the disk is a Seagate.
It also says the UUID is dcfdbc....

So at least I now know why it isn't booting openSUSE. The next question
is how to fix it.

Now I *know* that the opensuse partition is on a WD disk, so it seems to
me that something within grub is significantly broken.

I'm tempted to upgrade Ubuntu from karmic to lucid. Will that upgrade
the grub? And is this the right command sequence for a server:

 sudo apt-get install update-manager-core
 sudo do-release-upgrade

Thanks, Dave






PS FWIW, my /etc/default/grub looks like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=10
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"





More information about the ubuntu-users mailing list