[TriLUG] booting an external disk with grub 0.97

Joseph Mack NA3T via TriLUG trilug at trilug.org
Mon Apr 20 21:38:24 EDT 2015


(I thought this would be easy...)

I have a disk which boots and runs just fine attached to the SATA bus of a 
computer.

I now want to take it out and use it to boot a laptop (which the owner doesn't 
want me to open as it's under warrantee) as an external disk. For the moment I'm 
using one of my own laptops for the testing. The partitioning on the internal 
disk and external disk are the same, but the partitions sizes and kernels are 
different, so I can differentiate the disks at the grub prompt, but looking for 
the kernels.

The external disk, now on the usb bus, is recognised by the bios and the grub 
menu from the external disk comes up.

According to the docs, the external disk is hd0 and the internal disk is hd1 
(because you told it to boot first from the usb bus). I can confirm this because 
the kernels on the internal disk and external disk are different and I can use 
the grub command line to check which disk they're on.

Here my menu.lst lines

root (hd0,2)
kernel /boot/bzImage-3.5.3 root=/dev/sda3

(don't need an initrd)

device.map is
(hd0) /dev/sda
(hd1) /dev/sdb

all fine so far.

I boot and the machine boots off the 3.5.3 kernel on the external disk (as I 
expect), and then mounts the internal disk (which I don't want), which also has 
an /dev/sda3, as the root partition. There are no 3.5.3 modules on the internal 
disk, but the machine continues to boot through to login. After login, I find 
I'm running on the 3.5.3 kernel, which only exists on the external disk, but 
I've got the filesystem from the internal disk.

What I don't understand is how the kernel mounted the internal disk as 
/dev/sda3, when the internel disk is (hd1) /dev/sdb.

If I change the kernel line above to root=/dev/sdb3, the boot crashes with
"cannot mount root partition, available partitions are /dev/sda1... /dev/sda7".
So I can only use /dev/sda3 as the root partition here; it's not like I get a 
choice.

I've tried hiding the internal disk with

hide (hd1,2)

and I've tried remapping
map (hd0) (hd1)
map (hd1) (hd0)

without effect.

Does anyone know if I should be able to boot an external disk with grub 0.97?

Thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) austintek (dot) com - azimuthal equidistant
map generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!


More information about the TriLUG mailing list