grub - wierd problem !

dave selby dave6502 at googlemail.com
Sat May 26 22:38:10 UTC 2007


I have fiesty fawn installed on an external HDD which I use as a
'mobile machine' to do development on.

I plug it into my work XP laptop, re-boot, hello dev system, I plug it
into my wifes machine, reboot, hello dev system  ...

I plug it into my desktop machine (also an ubuntu machine - edgy this
time) - reboot and grub error 21 selected disk does not exist. I have
been hacking at this for a couple of days and in a nutshell this is
what I do not understand ...

I boot my machine into edgy. I enter grub and check what grub sees
using find ...

grub>

grub> find /boot/grub/menu.lst
 (hd0,0)
 (hd1,0)
 (hd2,0)

grub>

OK so far, hd0 & hd1 are a software raid array and hd2 is my external
USB HDD (incidentally the system does not see hd3 unless sudo grub ?)

So I amend my edgy menu.lst and add an entry to boot my external USB HDD


title		Dev System ext USB HDD
root		(hd2,0)
kernel		/boot/vmlinuz-2.6.20-15-generic
root=UUID=020f96ed-4b49-4287-b3a6-309a782abbb4 ro quiet splash
initrd		/boot/initrd.img-2.6.20-15-generic
quiet
savedefault

reboot and I get error 21, selected disk does not exist. I use find to
see what grub sees & I get

grub> find /boot/grub/menu.lst
 (hd0,0)
 (hd1,0)

grub>

ie my external HDD has disappeared ! so I booted back into edgy & ...

dave at dave-comp:/boot/grub$ sudo fdisk -l
Password:

Disk /dev/hda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       19087   153316296   fd  Linux RAID autodetect
/dev/hda2           19088       20023     7518420    5  Extended
/dev/hda5           19088       20023     7518388+  fd  Linux RAID autodetect

Disk /dev/hdc: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1       19087   153316296   fd  Linux RAID autodetect
/dev/hdc2           19088       20023     7518420    5  Extended
/dev/hdc5           19088       20023     7518388+  fd  Linux RAID autodetect

Disk /dev/md0: 156.9 GB, 156995813376 bytes
2 heads, 4 sectors/track, 38329056 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 7698 MB, 7698710528 bytes
2 heads, 4 sectors/track, 1879568 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        9240    74220268+  83  Linux
/dev/sda2            9241        9483     1951897+  82  Linux swap / Solaris
/dev/sda3            9484        9729     1975995    b  W95 FAT32
dave at dave-comp:/boot/grub$

and .........

grub> find /boot/grub/menu.lst
 (hd0,0)
 (hd1,0)
 (hd2,0)

grub>

ie my external HDD is back again.

Any ideas anyone - I have been hacking at this for two days straight.

Cheers

Dave

PS my /boot/grub/devices.map used to be

dave at dave-comp:/boot/grub$ cat /boot/grub/device.map
(hd0)   /dev/hda
(hd1)   /dev/hdc

dave at dave-comp:/boot/grub$

So I modified it to read ...

dave at dave-comp:/boot/grub$ cat /boot/grub/device.map
(hd0)   /dev/hda
(hd1)   /dev/hdc
(hd2)   /dev/sda

dave at dave-comp:/boot/grub$







-- 

The unavoidable price of reliability is simplicity.

-- C.A.R. Hoare




More information about the ubuntu-users mailing list