help-grub
[Top][All Lists]
Advanced

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

Re: grub2 search messes with drive map


From: Jordan Uggla
Subject: Re: grub2 search messes with drive map
Date: Thu, 4 Nov 2010 23:17:28 -0700

On Thu, Nov 4, 2010 at 10:33 PM, John Little <address@hidden> wrote:
> Hi
>
> I've just diagnosed a vexing grub2 problem, and I think there's been a
> change in grub2 behaviour on my Ubuntu 10.4 (Lucid) system. The
> version synaptic reports is "1.98-1ubuntu7".
>
> I have two disks, partitioned as follows:
> /dev/sda1   *     HPFS/NTFS     windows
> /dev/sdb1         Linux         /, including /boot/grub
> /dev/sdb2         Linux swap
> /dev/sdb3         Extended
> /dev/sdb5         Linux         /usr
> /dev/sdb6         Linux         /home
>
> (Note the separate partition for /usr, partly the cause of my trouble.)
>
> I had a simple custom menu entry
> menuentry 'Others' {
>        configfile (hd1,1)/boot/grub/others.cfg
> }
>
> And it used to work fine.  The submenu has various rarely used stuff,
> like memtest and recovery modes.  I didn't try it for some months, and
> today tried to use it; grub pauses, then redisplays its main menu.
>
> *When it starts*, grub sees /dev/sda1 as (hd0,1), and sdb1 as (hd1,1).
>  But, after running
>
> search --no-floppy --fs-uuid --set 91fa2fc6-ac74-4910-8154-63ad3893259d
>
> generated by /etc/grub.d/05_debian_theme, to load a background image
> from /usr/share/images, hd0 and hd1 have been swapped!  hd0 is now
> sdb, and hd1 is sda.
>
> Now the doc for search says by default the variable called root is
> set, but it doesn't mention changing what I might call the drive
> mapping.
>
> I've had to add a search command to my menu entry, to restore sanity.
>
> Have I got this right? Is search supposed to reassign the device numbers?

No, search is not supposed to change device enumeration, and I find it
hard to believe that is actually happening. Could you run "ls -l;
search --no-floppy --fs-uuid --set
91fa2fc6-ac74-4910-8154-63ad3893259d; ls -l" and give the output
(preferably a log from a serial console or a picture of the screen to
rule out typos)?

While it shouldn't change while grub is running, device enumeration is
not reliable between boots so it's better to always search by UUID
instead of using static device numbers.

>
> Regards, John
>
> _______________________________________________
> Help-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-grub
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]