Grub: Error 21, Selected disk does not exist

Tobias Gasser lfs at ebp-gasser.ch
Fri Feb 27 00:25:39 PST 2009


Michael schrieb:
> I'm going through Linux From Scratch v6.4, and I'm on Chapter 8.4.  Currently, I'm running Linux completely off of an external hard drive, while I'm also building my Linux From Scatch build onto a seperate partition on that disk.  The laptop already has one hard drive in it, but I'm not really touching it.
> 
> Here's what happens:
> 
> grub> root (hd0,4)
> 
> Error 21: Selected disk does not exist
> 
> As I said, we're on the external hard drive, sda.  I'm not really sure what sda2 is, so I've just sorta been ignoring it.  sda5 is the LFS build, while sda6 is the host system.  I'm completely ignoring sdb1.

your kernel seems to see the usb-disk first, the builtin disk second. 
thus after booting you have sdA external and sdB internal.

don't assume /dev/sda=(hd0) and /sev/sdb=(hd1)!!

simple trick to check how grub maps your drives:
in the grub console type "root (hd0," and now the TAB key. grub shows 
all partitions on hd0. now repeat with "root (hd1,"+TAB to see hd1.

compare the output with what you get from "fdisk -l".

i guess, you'll see you have to use "root (hd1,4)" to specify your 
external disk.

probably your current kernel has builtin support for IDE/ATA only, 
loading SATA drivers as modules, but AFTER usb support. thus your 
external usb disk is recognised first, the SATA second.

i'd try to fix that first! it's more conveniant to have builtin before 
external devices.


tobias




More information about the lfs-support mailing list