Booting from External FireWire Disk [was: Re: Simple 'yes or no' question...]

Tim Seufert yellowdog-general@lists.terrasoftsolutions.com
Sun Jun 22 16:57:00 2003


On Saturday, June 21, 2003, at 10:38  PM, Bill Fink wrote:

> Actually, you can boot Linux from an external FireWire drive if you
> have a recent enough PowerMac that has OpenFirmware support for booting
> from FireWire.  I just wrote up a HOWTO on the process, which I'm
> attaching to this message.

Bill, this is an impressive document.  I salute the amount of effort 
that must've gone into it.  A couple comments / suggestions which 
hopefully may improve it:

> 	2.  A recent Linux distro and kernel, with the kernel built
> 	    having the ieee1394, ohci1394, raw1394, and sbp2 drivers
> 	    configured as modules.

This might be nitpicking but I don't think the raw1394 module is 
actually required for any of this.  It allows userspace programs to 
drive 1394 devices that aren't handled by in-kernel drivers.  Since 
disks are all handled by the sbp2 driver, raw1394 isn't necessary (for 
booting, anyways).

> 	     Using the Apple MacOS Drive Setup utility to originally
> 	     format the FireWire disk may be a necessary step, as the
> 	     ability of OpenFirmware to boot from a FireWire disk may
> 	     depend on a FireWire driver installed on the FireWire
> 	     disk as part of this process (note the "Apple_FWDriver"
> 	     listed above on sdd4).

Actually, those are purely for the benefit of MacOS.  If you don't plan 
to use any partitions on the drive under MacOS, the driver partitions 
aren't needed.  MacOS X doesn't need them, BTW, just 9 and earlier.  
They're an artifact of the fairly arcane disk driver architecture of 
'classic' MacOS.

The only time I've seen an Open Firmware driver installed on a special 
disk partition is with MacOS X RAID volumes.  OF doesn't know about any 
RAID formats so it needs a driver to access them.

> 	 8.  Mount the FireWire root filesystem:
>
> 	     mkdir /fw
> 	     mount /dev/sdd8 /fw
>
> 	     You may want to create an entry in /etc/fstab:
>
> /dev/sdd8               /fw                     ext2      noauto       
>    0  0

OK, so this is the main thing I wanted to give some feedback about.  
With SBP2 disks, it would probably be a very good idea to assign each 
FS a unique volume label and perform all mounting steps by label rather 
than /dev/sdd8 etc.  With label based mounting, the system will 
successfully boot even if you add another Firewire disk and it happens 
to show up as sdd, pushing your root disk to sde.  See the man pages 
for tune2fs and mount for information about creating and using labels.

The one hole in this is that I don't think you can label swap 
partitions.  I don't know what to do about that.

Given the use of labels, the script on the initrd should really run 
rescan-scsi-bus.sh rather than poking at a single device.  I've never 
messed with initrds so I have no idea if the initrd environment is 
complete enough to run a full shell script like that one.

One really nifty thing that is easier with labels is to prepare a Linux 
boot drive with the IDE disk mounted on one of the internal IDE busses, 
then move the disk to an external Firewire enclosure.