[clug] grub boot problems

Rodney Peters rodneyp at pcug.org.au
Mon Aug 4 12:38:50 GMT 2008

Some BIOS appear to re-number drives starting from the boot drive.  It may well be that the automatically generated menu.lst is correct and boot commands should be relative to (hd0).  Amending the device.map file appears to have no effect in this circumstance.
Many distro don't have an option to set other than sda as the GRUB boot device.  In order to work around that you need to boot, via HDD to achieve appropriate device mapping, to the GRUB> prompt.  Note that booting from CD or floppy at this stage may give different drive mapping and erroneous results.
Then tab complete your way through the boot process, to boot from any distro on a HDD.  Next run GRUB from a booted distribution and again use tab completion of the "device (hd" command to figure out how GRUB numbers the drives.  Then re-run the GRUB setup on whichever drive maps to sdc.
It does not matter whether sdc is recognised as (hd0), (hd1) or (hd2) as long as it has control of the boot process. 
You may then need to amend menu.lst to make root, kernel & initrd commands  relative to whatever (hdn) actually contains the desired files.


 On Monday 04 August 2008 18:58:24 linux-request at lists.samba.org wrote:
> From: Paul <mylists at wilsononline.id.au>
>  To: CLUG List <linux at lists.samba.org>
> I have been using Linux for some years but my experience seems to fail me
> here
> I'm migrating my O/S + data to a new SATA drive and I have set my BIOS Boot
> priority for my new drive as top.
> I assumed I set my grub root command to boot off this drive as per
> device.map which is here: (note I want to boot (hd2)
> (hd0)   /dev/sda
> (hd1)   /dev/sdb
> (hd2)   /dev/sdc
> ~
> Initially I tried
> root (hd2,1)
> but I got  Error 22: partition not valid
> Arrggg.
> here is Partition table for /dev/sdc (root is part#2) I hope
> GNU Parted 1.8.6
> Using /dev/sdc
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted) p
> Model: ATA SAMSUNG HD501LJ (scsi)
> Disk /dev/sdc: 500GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
> Number  Start   End     Size    Type     File system  Flags
>   1      32.3kB  107MB   107MB   primary  ext3         boot
>   2      107MB   21.6GB  21.5GB  primary  ext3
>   3      21.6GB  23.7GB  2147MB  primary  linux-swap
>   4      23.7GB  500GB   476GB   primary  ext3
> menu.lst
> splashimage=(hd0,1)/boot/grub/splash.xpm.gz
> hiddenmenu
> title Fedora ( new
>          root (hd0,1)
>          kernel /boot/vmlinuz- ro root=LABEL=/ rhgb quiet
>          initrd /boot/initrd-

More information about the linux mailing list