help-grub
[Top][All Lists]
Advanced

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

RE: difference in recognizing the drives on boot and in running OS ?


From: Lentes, Bernd
Subject: RE: difference in recognizing the drives on boot and in running OS ?
Date: Mon, 17 Oct 2011 13:28:44 +0200

Barry Jackson wrote:
>
> On 07/10/11 00:20, Lentes, Bernd wrote:
> > Hi,
> >
> > i have a sles 10 box not booting. Grub says error 22,
> which, afaik means that it doesn't find a partition. / and
> /boot reside on /dev/sdc2. Device.map says sdc is hd2 in GRUB
> notation. I changed the root entries in menu.lst to hd2,1. I
> ran (in a GRUB shell in the running OS) root (hd2,1) and
> setup (hd2). Everything went fine. But when i try to reboot,
> i get error 22. Is there a possible difference between GRUB
> recognizing the drives during boot, and later on in a running
> OS ? Is there a way to find out how GRUB assigns the drives
> on boot, maybe using the GRUB command-line which is available
> during boot up ?
> >
> > Thanks.
>
> Yes, in grub legacy you can use the "find" command to locate a unique
> file in the partition.
> For example at the grub prompt:-
> grub> find /boot/grub/menu.lst
> ...would return all the partitions with that path available.
> If SUSE has a /etc/suse-release, then that may a good one to
> search for.
> I'm not conversant with SUSE.
>
> All the commands normally in menu.lst can be entered
> individually at the
> grub prompt, and tab completion is available e.g. :-
> grub> root (<TAB>
> will list all the drives and partitions that grub can see.
>
> To boot from the prompt all that is normally needed is :-
> grub> root (hdx,y)
> grub> kernel /boot/vmlinuz
> grub> initrd /boot/initrd.img
> grub> boot
>
> I hope that helps,
> Barry


Yes, that helped a lot.
I found out that it is definitely possible that GRUB during boot recognizes the 
drives differently than GRUB running in Linux:

================================================================

pc53082:/mnt/nas/Home/ehemalige_2 # cat /boot/grub/device.map

(hd2)   /dev/disk/by-id/scsi-SATA_Hitachi_HDS7210_JP0330HM169Z7P
(hd1)   /dev/disk/by-id/scsi-SATA_HDT722516DLA380_VDB71ATCDYKB9W
(fd0)   /dev/fd0
(hd0)   /dev/disk/by-id/scsi-SATA_Hitachi_HDS7216_PVB300Z2REGMYF


pc53082:/mnt/nas/Home/ehemalige_2 # cat /boot/grub/menu.lst

...
title SUSE Linux Enterprise Server 10 - 2.6.16.60-0.89.1
    root (hd1,1)
    kernel /boot/vmlinuz-2.6.16.60-0.89.1-smp 
root=/dev/disk/by-id/scsi-SATA_HDT722516DLA380_VDB71ATCDYKB9W-part2 vga=0x31a 
resume=/dev/disk/by-id/scsi-SATA_HDT722516DLA380_VDB71ATCDYKB9W-part1 
splash=verbose  showopts
    initrd /boot/initrd-2.6.16.60-0.89.1-smp


pc53082:/mnt/nas/Home/ehemalige_2 # cat /etc/fstab

/dev/disk/by-id/scsi-SATA_HDT722516DLA380_VDB71ATCDYKB9W-part2 /                
    ext3       acl,user_xattr        1 1
/dev/disk/by-id/scsi-SATA_Hitachi_HDS7216_PVB300Z2REGMYF-part1 /windows/C       
    ntfs       ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDS7216_PVB300Z2REGMYF-part5 /windows/D       
    ntfs       ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/disk/by-id/scsi-SATA_HDT722516DLA380_VDB71ATCDYKB9W-part1 swap             
    swap       defaults              0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDS7210_JP0330HM169Z7P-part1 /sdb1            
     ext3       defaults              0 0
# /dev/disk/by-id/scsi-SATA_Hitachi_HDS7216_PVB300Z2REGM9F-part1 /sdb1          
      ext3       acl,user_xattr        1 1


pc53082:/mnt/nas/Home/ehemalige_2 # mount

/dev/sdc2 on / type ext3 (rw,acl,user_xattr)
/dev/sda1 on /windows/C type ntfs 
(ro,noexec,nosuid,nodev,gid=100,umask=0002,nls=utf8)
/dev/sda5 on /windows/D type ntfs 
(ro,noexec,nosuid,nodev,gid=100,umask=0002,nls=utf8)
/dev/sdb1 on /sdb1 type ext3 (rw)

================================================================

You see that hd2 corresponds to sdb, hd1 corresponds to sdc and hd0 to sda.
It seems that GRUB during boot recognizes that disks in the order in which they 
are recorded in the BIOS in the boot order.
Maybe EDD would solve the problem, if it is implemented 
(http://lwn.net/Articles/9042/).


Bernd

Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess und Dr. Nikolaus Blum
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671

reply via email to

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