[TriLUG] [eee] post-install, grub OK from external stick but not from internal SSD

Tom Roche Tom_Roche at pobox.com
Thu Apr 24 01:00:06 EDT 2008


Joseph Mack Wed Apr 23 13:50:10 EDT 2008
 >>> o /dev/sda doesn't have a valid boot sector.

 >>> when you boot to /dev/sda (any way you like), re-run grub-install
 >>> telling it to install on the hard disk.

Tom Roche Wed, 23 Apr 2008
 >> How to do that? /dev/sda* are there, but I get

 >> $ sudo grub-install /dev/sda
 >> grep: /boot/grub/partition.map: no such file or directory

Joseph Mack Wed Apr 23 17:30:19 EDT 2008
 > you must have a market enhanced grub-install. Mine doesn't have
 > partition.map and partition.map is not mentioned in the man page. I
 > do have a device.map file. If you have a device.map file, look in
 > there for BIOS names for drives.

/home/user> ls -al /boot/grub/
total 192
drwxr-xr-x 2 root root   4096 2008-04-23 15:43 ./
drwxr-xr-x 4 root root   4096 2008-04-23 14:19 ../
-rw-r--r-- 1 root root     66 2007-05-23 11:59 device.map
-rw-r--r-- 1 root root   7520 2008-04-23 15:43 e2fs_stage1_5
-rw-r--r-- 1 root root   7392 2008-04-23 15:43 fat_stage1_5
lrwxrwxrwx 1 root root      8 2007-12-11 13:50 grub.conf -> menu.lst
-rw-r--r-- 1 root root   8160 2008-04-23 15:43 jfs_stage1_5
-rw-r--r-- 1 root root    673 2008-04-23 14:19 menu.lst
-rw-r--r-- 1 root root   6816 2008-04-23 15:43 minix_stage1_5
-rw-r--r-- 1 root root   9248 2008-04-23 15:43 reiserfs_stage1_5
-rw-r--r-- 1 root root    512 2008-04-23 15:43 stage1
-rw-r--r-- 1 root root 107144 2008-04-23 15:43 stage2
-rw-r--r-- 1 root root   8840 2008-04-23 15:43 xfs_stage1_5
/home/user> cat /boot/grub/device.map
#
# Configured by Xandros Configuration system.
#

(hd0) /dev/sda

 > Previously you had it booting from the hard disk; now you
 > have it booting from the stick. All that's needed is to
 > figure out how to choose between the two :-)

So why isn't that simple ?-) This is how things are, empirically:

0 some settings:

* BIOS boot order=[CD, HDD=internal SSD, "removable dev"]

* SSD's /boot/grub/menu.lst has

title Normal Boot
         root (hd0,0)
         kernel /boot/vmlinuz-2.6.21.4-eeepc quiet rw vga=785 irqpoll 
root=/dev/sda1
         initrd /boot/initramfs-eeepc.img

   and no stanzas for booting from USB.

* stick's /boot/grub/menu.lst has

title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.22-14-generic 
root=UUID=45037d5d-b0f4-4d19-b00c-4f4aebc84a02 ro quiet splash
initrd          /boot/initrd.img-2.6.22-14-generic
quiet

   and

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title           Normal Boot (on /dev/sda1)
root            (hd1,0)
kernel          /boot/vmlinuz-2.6.21.4-eeepc quiet rw vga=785 irqpoll 
root=/dev/sda1
initrd          /boot/initramfs-eeepc.img
savedefault
boot

1 Shutdown, remove stick, power up, allow BIOS to choose from where to
   boot. Result: no grub menu, just

GRUB Loading stage1.5.
GRUB loading, please wait...
Error 21

   and a blinking cursor, no response to keyboard.

 > you can have nonsense for the root and the kernel will boot fine.
 > It's only when the kernel tries to mount root that the kernel will
 > panic. This happens a fair way into the boot so it's easy to
 > differentiate booting the kernel and not being about to mount root.

   Since there are no messages about anything, I'm assuming it cannot
   boot, no? In any case, it is certainly hosed :-(

2 Shutdown, insert stick, power up, allow BIOS to choose to boot from
   where to boot. Result: grub menu! from which I choose first/default
   item, corresponding to stanza=

title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.22-14-generic 
root=UUID=45037d5d-b0f4-4d19-b00c-4f4aebc84a02 ro quiet splash
initrd          /boot/initrd.img-2.6.22-14-generic
quiet

   Result: Error 15, kicking me back to the grub menu.

3 grub-edit that stanza, change root -> (hd1,0), hit 'b' to boot.
   Result: eee boots to the eeeXubuntu on the stick.

4 Shutdown, check that stick is still inserted, power up, allow BIOS to
   choose to boot from where to boot. Result: grub menu! from which I
   choose item corresponding to stanza=

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title           Normal Boot (on /dev/sda1)
root            (hd1,0)
kernel          /boot/vmlinuz-2.6.21.4-eeepc quiet rw vga=785 irqpoll 
root=/dev/sda1
initrd          /boot/initramfs-eeepc.img
savedefault
boot

   Result: Error 15, kicking me back to the grub menu.

5 grub-edit that stanza, change root -> (hd0,0), hit 'b' to boot.
   Result: eee boots to the eeeXandros on the SSD.

So what do I need to do in order to enable the following:

* Shutdown, remove stick, power up, allow BIOS to choose from where to
   boot. Result: grub menu, with default stanza="normal boot" from SSD
   that actually works

??? Your assistance is appreciated, Tom Roche <Tom_Roche at pobox.com>



More information about the TriLUG mailing list