[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Having Grub2 use UUID instead of (hd0,1)?



* Tom H <tomh0665@gmail.com> [2009 Dec 28 22:19 -0600]:

I just did an update on the laptop and I get the following output from
aptitude when upgrading the Grub2 packages:

Setting up grub-common (1.98~20100101-1) ...
Installing new version of config file /etc/grub.d/00_header ...
Setting up grub-pc (1.98~20100101-1) ...
/usr/sbin/grub-probe: error: cannot stat `/dev/hda'
Invalid device `/dev/hda':
Try ``/usr/sbin/grub-setup --help'' for more information.
Generating grub.cfg ...

It the finds the splash image and the kernels on the various partitions
correctly.

Checking device.map, I see that it has not changed since Dec 28 when I
last created it (see one of my previous mails to this list) and
grub.cfg has the various "set root=(hd0,x)" lines set correctly.

> Please back up your device.map and run "grub-mkdevicemap". If it
> doesn't re-create a proper device.map, you should file a bug. A
> "(/dev/sda,1)   /dev/sda1" line is definitely wrong. AFAIK,
> "grub-mkdevicemap" should return (for example)
> <start>
> (hd0)   /dev/sda
> (hd1)   /dev/sdb
> ...
> <end>
> No partitions and no system device within the parenthesis of the grub device.

I just ran `grub-makedevicemap' and it recreated /boot/grub/device.map
which contains the single line:

(hdo)   /dev/sda


Which is that same as the previous copy I generated on Dec 28 and is
correct for the running kernel which has a `df' output that lists
'/dev/sda1' as '/' and '/dev/sda6' as '/home' which is correct.  Since
my kernel stanzas use UUID the Sidux and Debian kernels can call the
partitions whatever they want (with a Debian kernel the partitions will
be named '/dev/hda1' and '/dev/hda6'.

What is puzzling is the error reported upon the Grub2 upgrade.  Where
did it come up with '/dev/hda' given that all disk identifiers with
the running kernel as of the update are of '/dev/sd*'?

As of now my laptop appears to be updating and booting correctly.  My
issue may have been related to an outdated '/boot/grub/device.map'
after I started using the Sidux kernels.  Should I switch back to a
Debian kernel and update Grub2, then the process will probably fail
unless the device.map file contains "(hd0)   /dev/hda".

Here is a corner case where it would be nice if the device.map file
could point to a UUID, but since those seem to exist only on a
partition level, it's likely not possible since I'm installing Grub to
the MBR.  Another alternative would be for the Debian kernels to treat
all disks as /dev/sd* as do a lot of other distributions.

HNY,

- Nate >>

-- 

"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

Ham radio, Linux, bikes, and more: http://n0nb.us/index.html


Reply to: