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

Bill Fink yellowdog-general@lists.terrasoftsolutions.com
Sat Jun 21 23:38:01 2003


On Sat Jun 14 2003, nathan r. hruby wrote:

> On Sat, 14 Jun 2003 rjgoos@ydl.net wrote:
> 
> > Someone has offered me a 400 mHz G4 Power Mac, with monitor, for a great
> > price.
> > 
> > I am curious...can a person attach an external Firewire drive, install
> > YDL 3 on it, and have YDL boot from it?  I know YDL 2 would not boot
> > from an external Firewire drive, but I am not sure about YDL 3.
> 
> I'm pretty sure no, I don't think linux knows how to boot from a FW drive
> yet.  But there isn't anything like a yes or no answer :)  You could
> always get a cheap IDE drive for it and boot from that and then use the
> external drive for stroage.

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



HOWTO Boot PPC Linux From An External FireWire Disk:
--------------------------------------------------------------------------------

	HOWTO Boot PPC Linux From An External FireWire Disk
	---------------------------------------------------

Prerequisites:

	1.  A fairly recent PowerMac that has support for OpenFirmware
	    booting of FireWire disks (if you can't boot MacOS from
	    FireWire then you won't be able to boot Linux either).

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

	3.  Recent Linux IEEE1394 drivers.

	4.  Necessary SCSI drivers such as basic SCSI support
	    (CONFIG_SCSI) and SCSI disk support (CONFIG_BLK_DEV_SD),
	    and any other kernel drivers required for booting such
	    as ext3 filesystem support should be built into the
	    kernel, or else you will have to modify the initial
	    RAM disk (initrd) accordingly.

A sample configuration that was used to verify FireWire booting is
running YellowDog Linux 3.0 with an SMP 2.4.20-ben10 kernel on a
dual 500 MHz G4 and using version 948 of the SVN branches/linux-2.4
tree from:

	http://svn.linux1394.org/

The FireWire disk that was used is a LaCie 80 GB FireWire disk.

The following steps outline the process for enabling booting from
an external FireWire disk:

	 1.  Load the necessary Linux IEEE1394 drivers by:

	     modprobe ieee1394
	     modprobe ohci1394
	     sleep 2
	     modprobe raw1394
	     modprobe sbp2

	     The sleep may be necessary to allow the ohci1394 driver
	     to fully initialize before loading the sbp2 module that
	     recognizes any FireWire disks.

	 2.  If using very recent Linux IEEE1394 drivers, it will
	     be necessary to run:

	     rescan-scsi-bus.sh

	     to attach any FireWire disks to the SCSI subsystem.

	     On the sample configuration this results in the
	     LaCie 80 GB FireWire disk being recognized as sdd.

	     Here is the output of "cat /proc/scsi/scsi":

Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: QUANTUM  Model: XP34550S         Rev: LYK8
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 04 Lun: 00
  Vendor: UMAX     Model: Astra 1220S      Rev: V1.2
  Type:   Scanner                          ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 05 Lun: 00
  Vendor: IOMEGA   Model: ZIP 100          Rev: J.02
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: iomega   Model: jaz 1GB          Rev: J.86
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: ST380021 Model: A                Rev: 3.05
  Type:   Direct-Access                    ANSI SCSI revision: 06

	     The kernel had already identified four SCSI devices before
	     the IEEE1394 sbp2 module was loaded (three disks and a
	     scanner).  The first disk is a 4 GB Quantum XP34550S that
	     becomes sda.  The UMAX Astra 1220S Scanner is not a disk
	     and uses the SCSI generic device driver thus becoming sg1.
	     The second real SCSI disk is an IOMEGA ZIP 100 MB which
	     becomes sdb, while the IOMEGA JAZ 1 GB disk becomes sdc.
	     Finally the last SCSI device listed is the LaCie 80 GB
	     FireWire disk, which as the fourth SCSI disk becomes sdd.
	     Note it is on scsi1 whereas all the real SCSI devices are
	     on scsi0, and also note the listed values for Channel,
	     Id, and LUN.  The sequence "1 0 0 0" will be important
	     later, where the '1' is the '1' in scsi1, the first '0'
	     is the Channel, the second '0' is the Id, and the third '0'
	     is the Lun.

	     Also checkout "cat /proc/bus/ieee1394/devices":

Node[00:1023]  GUID[XXXXXXXXXXXXXXXX]:
  Vendor ID: `LaCie Group SA  ' [0x00d04b]
  Capabilities: 0x0083c0
  Bus Options:
    IRMC(0) CMC(0) ISC(0) BMC(0) PMC(0) GEN(0)
    LSPD(0) MAX_REC(64) CYC_CLK_ACC(255)
  Unit Directory 0:
    Vendor/Model ID: LaCie Group SA   [00d04b] / LaCie 1394 Disk drive LUN 0  [000000]
    Software Specifier ID: 00609e
    Software Version: 010483
    Driver: SBP2 Driver
    Length (in quads): 8
Node[01:1023]  GUID[YYYYYYYYYYYYYYYY]:
  Vendor ID: `Linux OHCI-1394' [0x000000]
  Capabilities: 0x0083c0
  Bus Options:
    IRMC(1) CMC(1) ISC(1) BMC(0) PMC(0) GEN(0)
    LSPD(2) MAX_REC(2048) CYC_CLK_ACC(0)
  Host Node Status:
    Host Driver     : ohci1394
    Nodes connected : 2
    Nodes active    : 2
    SelfIDs received: 2
    Irm ID          : [01:1023]
    BusMgr ID       : [63:1023]
    In Bus Reset    : no
    Root            : yes
    Cycle Master    : yes
    IRM             : yes
    Bus Manager     : no

	     Node[00:1023] is the LaCie 80 GB FireWire disk.  Also
	     make note of its 16 hexadecimal (8 byte) GUID, here
	     just represented as XXXXXXXXXXXXXXXX.

	 3.  Partition the FireWire disk as desired, in this case sdd,
	     but replace sdd with whatever sdX corresponds to your
	     actual hardware configuration.  The LaCie 80 GB FireWire
	     disk was originally formatted with the Apple MacOS
	     Drive Setup utility and then the desired Linux partitions
	     were added with the Linux pdisk utility.  Here is the
	     output of "pdisk -l /dev/sdd" (again replace sdd with
	     your specific equivalent):

Partition map (with 512 byte blocks) on '/dev/sdd'
 #:                type name               length   base      ( size )
 1: Apple_partition_map Apple                  63 @ 1
 2:      Apple_Driver43*Macintosh_SL          128 @ 64
 3:    Apple_Driver_ATA*Macintosh_SL          128 @ 192
 4:      Apple_FWDriver Macintosh_SL          224 @ 320
 5:          Apple_Free Extra                 224 @ 544
 6:           Apple_HFS "extra"          78150000 @ 768       ( 37.3G)
 7:           Apple_HFS "extra2"         25165824 @ 78150768  ( 12.0G)
 8:     Apple_UNIX_SVR2 /                 8388608 @ 103316592 (  4.0G)
 9:     Apple_Bootstrap bootstrap           40960 @ 111705200 ( 20.0M)
10:     Apple_UNIX_SVR2 swap              2056192 @ 111746160 (1004.0M)
11:     Apple_UNIX_SVR2 /home            42499135 @ 113802352 ( 20.3G)

Device block size=512, Number of Blocks=156301487 (74.5G)
DeviceType=0x1, DeviceId=0x1
Drivers-
1:  92 @ 64, type=0x1
2:  97 @ 192, type=0x701

	     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).

	     The LaCie 80 GB FireWire disk was partitioned with four
	     Linux partitions, namely the root partition ("/") on sdd8,
	     the bootstrap partition for yaboot on sdd9, a swap partition
	     on sdd10, and the /home partition on sdd11.  Note the bootstrap
	     partition needs to be created as type Apple_Bootstrap.  These
	     sample partitions will be used throughout the rest of this
	     HOWTO but you should of course replace them with whatever is
	     appropriate for your specific hardware setup and partitioning
	     scheme.

	 4.  Make the root filesystem on the FireWire disk:

	     mkfs /dev/sdd8

	     Replace sdd8 with the actual root partition in your case,
	     where the second 'd' in sdd8 represents which SCSI disk
	     is being referenced and the '8' represents the desired
	     partition for the root partition on that disk.  Make
	     extremely certain you reference the correct SCSI disk
	     and partition as this step will destroy any previously
	     existing data that may have been on that partition.

	     You optionally may want to use the "-t ext3" option to
	     mkfs to create an ext3 filesystem (recommended) or the
	     "-c" option to check the device for bad blocks before
	     building the filesystem (also recommended but somewhat
	     time consuming).

	 5.  Format the bootstrap partition as HFS for yaboot with:

	     hformat /dev/sdd9

	     Again replace sdd9 with the actual partition created
	     for the bootstrap partition and be extra careful to
	     reference the correct SCSI disk and partition.

	 6.  Create the swap partition by:

	     mkswap /dev/sdd10

	     You may also want to use the "-c" option for mkswap to
	     check for bad blocks (recommended).

	     Replace sdd10 with your actual swap partition and be
	     sure to use the correct disk and partition.

	 7.  Optionally create a /home partition with:

	     mkfs /dev/sdd11

	     You may also want to use the "-t ext3" or "-c" options
	     to mkfs.  Change sdd11 to the actual desired partition
	     and make certain it is the correct partition.

	 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

	     If you created the FireWire root filesystem as ext3, then
	     of course change ext2 above to ext3.  If you have this entry
	     in /etc/fstab, then you can mount the FireWire root file
	     system by simply:

	     mount /fw

	     Use the appropriate sdXX for your actual FireWire root
	     filesystem partition instead of the sample sdd8.

	 9.  Copy the root filesystem from the internal hard drive
	     to the FireWire root filesystem using rsync by:

	     rsync -av -x --delete --exclude /.journal --exclude /lost+found --exclude /proc --exclude /fw --exclude /home --exclude /etc/fstab --exclude /etc/yaboot.conf / /fw
	     mkdir /fw/proc

	     The "--delete", "--exclude /etc/fstab", and
	     "--exclude /etc/yaboot.conf" options to rsync aren't
	     really necessary for the initial copy, but the above
	     rsync command can also be used subsequently to keep
	     the FireWire root filesystem synced to the root file
	     system on the internal hard drive.  The "-av" option
	     says to use archive mode which copies the entire file
	     system and to be verbose about it listing every file
	     being deleted, added, or modified.  The "-x" option
	     indicates to rsync to not cross filesystem boundaries,
	     which in this case means to copy only the root filesystem
	     itself and not any other mounted filesystems.  It's
	     also generally a good idea to add the "--dry-run"
	     option to rsync the first time you run the command
	     to make sure it's actually going to do what you expected
	     it to do.  Finally, make certain that the FireWire
	     root filesystem is actually mounted on /fw before
	     running the above rsync command (check with df) so
	     you don't inadvertently scribble on your internal
	     hard disk's root filesystem.

	10.  Create the initial RAM disk (initrd) that will be used
	     to load all the necessary Linux IEEE1394 device drivers
	     during the boot process by:

	     mkinitrd --with=ieee1394 --with=ohci1394 --with=raw1394 --with=sbp2 /boot/initrd-`uname -r`.gz `uname -r`

	     The "--with=" options to mkinitrd specify what kernel
	     modules need to be loaded and their order of loading,
	     and include the necessary Linux IEEE1394 kernel drivers
	     for booting from a FireWire disk, specifically ieee1394,
	     ohci1394, raw1394, and sbp2.  `uname -r` for the sample
	     configuration is 2.4.20-ben10-smp.  This is used to
	     associate the initrd with the version of the running
	     kernel since the kernel modules are tied to that version.

	11.  Uncompress the initrd with:

	     gunzip /boot/initrd-`uname -r`.gz

	12.  Mount the initial RAM disk image using the loop device:

	     mount -o loop /boot/initrd-`uname -r` /mnt

	13.  Edit the /mnt/linuxrc nash script (see "man nash" for
	     details) that is used to prepare for and then mounts
	     the FireWire root filesystem, by performing such tasks
	     as loading all the necessary Linux IEEE1394 kernel
	     drivers.  First, after the "insmod /lib/ohci1394.o"
	     line, add a new line:

		sleep 2

	     This is to allow time for the ohci1394 driver to
	     fully initialize before loading the sbp2 driver.

	     Then, after the "mount -t proc /proc /proc" line,
	     add a new line:

		echo "scsi add-single-device 1 0 0 0" > /proc/scsi/scsi

	     This is the equivalent of running the rescan-scsi-bus.sh
	     script.  The sequence "1 0 0 0" is for the sample hardware
	     configuration and should be changed to reflect your actual
	     hardware configuration.  Remember that these values are
	     extracted from the /proc/scsi/scsi information for the
	     FireWire disk.  Repeated here is the info for the LaCie
	     80 GB FireWire disk:

Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: ST380021 Model: A                Rev: 3.05
  Type:   Direct-Access                    ANSI SCSI revision: 06

	     The "1 0 0 0" sequence is derived from the first line
	     of the info, where the '1' is the '1' in scsi1, and the
	     "0 0 0" is the Channel, Id, and Lun.

	     Here is what the resultant linuxrc nash script looks like:

#!/bin/nash

echo "Loading ieee1394.o module"
insmod /lib/ieee1394.o
echo "Loading ohci1394.o module"
insmod /lib/ohci1394.o
sleep 2
echo "Loading raw1394.o module"
insmod /lib/raw1394.o
echo "Loading sbp2.o module"
insmod /lib/sbp2.o
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo "scsi add-single-device 1 0 0 0" > /proc/scsi/scsi
echo Creating block devices
mkdevices /dev
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc

	14.  Unmount the initial RAM disk:

	     umount /mnt

	15.  Re-compress the initial RAM disk (initrd):

	     gzip /boot/initrd-`uname -r`

	16.  Copy the compressed initial RAM disk to the /boot
	     directory of the FireWire disk's root filesystem:

	     cp /boot/initrd-`uname -r`.gz /fw/boot

	17.  Create the /etc/fstab file for the FireWire disk's
	     root filesystem.  It's probably a good idea to use
	     the current /etc/fstab as a starting point:

	     cp /etc/fstab /fw/etc

	     Then edit /fw/etc/fstab to reflect the new locations
	     of the root, swap, and home partitions on the FireWire
	     disk.  Here are the entries for these partitions that
	     reflect the sample partitioning scheme used for the
	     LaCie 80 GB FireWire disk:

/dev/sdd8               /                       ext2      defaults        1  1
/dev/sdd10              swap                    swap      defaults        0  0
/dev/sdd11              /home                   ext2      defaults        1  2

	     Of course if you created the root and /home partitions
	     as ext3, then change ext2 above to ext3.  The above
	     reflects that the root ("/") partition is on sdd8,
	     swap is on sdd10, and /home is on sdd11.  Change sdd8,
	     sdd10, and sdd11 to match your actual SCSI disk hardware
	     configuration and FireWire disk partitioning scheme.

	18.  Find out the OpenFirmware path of the FireWire disk.
	     There are several ways of doing this.  One of the easiest
	     is by doing a find on the /proc/device-tree from Linux:

	     find /proc/device-tree -name disk@\* | grep firewire

	     On the sample hardware configuration this results in
	     the following:

/proc/device-tree/pci@f2000000/pci-bridge@d/firewire@a/node@XXXXXXXXXXXXXXXX/sbp-2@c000/disk@0

	     Removing the "/proc/device-tree" gives the OpenFirmware
	     path of the sample FireWire disk, namely:

	     /pci@f2000000/pci-bridge@d/firewire@a/node@XXXXXXXXXXXXXXXX/sbp-2@c000/disk@0

	     The XXXXXXXXXXXXXXXX is the GUID of the FireWire disk, and
	     should match the GUID given in the output of
	     "cat /proc/bus/ieee1394/devices".  This OpenFirmware
	     path can actually be abbreviated somewhat to:

	     /pci@f2000000/@d/firewire@a/node@XXXXXXXXXXXXXXXX/sbp-2/disk@0

	     Furthermore, if there is only one FireWire disk, it is not
	     necessary to specify the GUID, and the OpenFirmware path
	     can be further abbreviated to:

	     /pci@f2000000/@d/firewire@a/node/sbp-2/disk@0

	     OpenFirmware also has certain predefined device aliases
	     which can further simplify the OpenFirmware path.  On the
	     sample hardware configuration, there is a device alias
	     called fwx which can be seen by:

	     cat /proc/device-tree/aliases/fwx ; echo

	     which outputs:

	     /pci@f2000000/@d/firewire@a

	     Thus by substitution of the fwx alias, the OpenFirmware
	     path of the FireWire disk can be reduced to:

	     fwx/node/sbp-2/disk@0

	     This generic form may not be applicable on all PowerMacs,
	     in which case you will need to use one of the longer
	     forms of the OpenFirmware path for the FireWire disk
	     that is applicable to your specific hardware configuration.

	     Another way of determining the OpenFirmware path of the
	     FireWire disk is via OpenFirmware itself.  There are
	     two ways of booting into OpenFirmware when powering
	     up your PowerMac.  First, if you specified "enableofboot"
	     in /etc/yaboot.conf before running ybin, when the first
	     ofboot.b menu is displayed during the boot process,
	     where you can select what you want to boot such as Linux
	     (by entering an 'l') or MacOS (by entering an 'm'), you
	     will also be able to drop back to OpenFirmware by entering
	     an 'o'.  The other way to boot into OpenFirmware is to
	     hold down the four keys Command (Clover), Option, 'O',
	     and 'F' while powering up the system.

	     Once booted into OpenFirmware, you can get an OpenFirmware
	     device tree representation by entering the command:

	     dev / ls

	     Then just look for the section related to firewire.

	     You can also find out what OpenFirmware device aliases
	     exist by entering:

	     devalias

	     It is also possible to define your own device aliases
	     using the devalias command and use of the nvramrc.
	     This can also be accomplished in Linux by use of the
	     nvsetenv command.

	19.  Create an entry in /etc/yaboot.conf for booting from
	     the FireWire disk.  It should look something like:

image=fwx/node/sbp-2/disk@0:8,/boot/vmlinux
	label=linux-fw
	initrd=/boot/initrd-2.4.20-ben10-smp.gz
	root=/dev/sdd8

	     The "image=" line specifies the location of the vmlinux
	     Linux kernel on the FireWire disk, which in the sample
	     case is in the /boot directory on partition 8 of the
	     FireWire disk referenced by the OpenFirmware path
	     "fwx/node/sbp-2/disk@0".  You should change the partition
	     number and OpenFirmware path (if necessary) to reflect
	     your actual hardware configuration and partitioning
	     scheme.  The "label=" entry specifies what to enter
	     at the yaboot menu to boot from the FireWire disk,
	     which in this case is "linux-fw".  The "initrd=" entry
	     indicates to use the compressed initial RAM disk image
	     that was created earlier.  You should replace the
	     "2.4.20-ben10-smp" portion of the filename with the
	     output of "uname -r".  The "root=" entry specifies
	     the location of the FireWire root filesystem.  The
	     sample sdd8 should be replaced with the actual SCSI
	     disk partition that matches your FireWire SCSI disk
	     name and partitioning scheme.

	     If you normally specify any additional yaboot image
	     parameters such as "novideo" or "append=" (for example
	     to specify the video resolution), just add these after
	     the "root=" entry.

	     Copy the /etc/yaboot.conf to the FireWire disk's
	     root filesystem:

	     cp /etc/yaboot.conf /fw/etc

	20.  Run ybin to update the bootstrap partition of the
	     internal hard disk by executing:

	     ybin -v

	21.  You're finally ready to boot using the kernel, root
	     filesystem, and swap on the FireWire disk.  Simply
	     reboot by:

	     reboot

	     At the initial ofboot.b menu, select Linux by entering
	     an 'l', and then at the yaboot menu enter "linux-fw"
	     to select booting from the FireWire disk.

	22.  At this point, if all went well, you should now be
	     running Linux from your FireWire disk (one simple
	     check is to use df to verify that the root filesystem
	     is now on the FireWire disk and "swapon -s" to verify
	     swap is on the FireWire disk).

	23.  Actually at this point you're still not booting totally
	     from the FireWire disk.  While the Linux kernel, the
	     root filesystem, and swap are all being used off the
	     FireWire disk, the initial bootstrap partition being
	     used for yaboot is still the one from the internal
	     hard drive.

	     To change this it is necessary to edit the /etc/yaboot.conf
	     file on the FireWire disk root filesystem, which you
	     should now be booted into.  Make the following changes
	     to /etc/yaboot.conf:

	     First, find the "boot=" line that specifies the location
	     of the bootstrap partition, and change it to reference
	     the bootstrap partition for yaboot on the FireWire disk,
	     such as:

	     boot=/dev/sdd9

	     Change sdd9 to reflect the SCSI disk name for your
	     FireWire disk and which partition on your FireWire
	     disk contains the bootstrap partition.

	     Since yaboot will not be able to figure out the
	     OpenFirmware path of the FireWire disk bootstrap
	     partition, you will need to add an "ofboot=" line
	     after the "boot=" line, which should be similar
	     to the following:

	     ofboot=fwx/node/sbp-2/disk@0:9

	     Again you will need to change the trailing '9' to
	     specify what actual partition on your FireWire disk
	     contains the bootstrap partition for yaboot.  If
	     the device alias fwx is not available on your system,
	     you may have to use the longer, more explicit form
	     of the OpenFirmware path for the FireWire disk.
	     And if you have more than one FireWire disk, you
	     may have to explicitly specify node@XXXXXXXXXXXXXXXX,
	     where XXXXXXXXXXXXXXXX is the GUID of the FireWire
	     disk, instead of just using the shorthand "node".

	     Next find the "device=" line and change it to correspond
	     to the OpenFirmware path of your FireWire disk.  It
	     should look something like this:

	     device=fwx/node/sbp-2/disk@0:

	     The same comments regarding the "ofboot=" line also
	     apply here.

	     Then find the "partition=" line and modify it to point
	     to the partition on the FireWire disk that contains
	     the Linux kernel images, namely the FireWire disk's
	     root filesystem.  For example:

	     partition=8

	     Change the '8' to be the appropriate partition number
	     for the root filesystem on your FireWire disk.

	     Now find the "image=/boot/vmlinux" section, and modify
	     it to look similar to the following:

image=/boot/vmlinux
	label=linux
	initrd=/boot/initrd-2.4.20-ben10-smp.gz
	root=/dev/sdd8

	     The "image=" line simply specifies the normal
	     Linux kernel located at /boot/vmlinux.  The "label="
	     entry specifies what needs to be entered at the
	     yaboot menu to boot this kernel, and the value of
	     "linux" is usually also the default when no explicit
	     value is entered within the timeout period.  The
	     "initrd=" entry provides the location of the initial
	     RAM disk image.  Replace the string "2.4.20-ben10-smp"
	     with whatever the output of "uname -r" is on your
	     system.  The "root=" entry indicates the location
	     of the root filesystem on the FireWire disk.  Change
	     sdd8 to reflect the SCSI disk name of your FireWire
	     disk and the actual location of the root filesystem
	     on it.

	     If you normally have any additional image parameters
	     such as "novideo" or "append=", just add them after
	     the "root=" entry.

	     To simplify the process of switching back to booting
	     from the internal hard disk, it is recommended that
	     you add an "image=" section similar to the following
	     to your /etc/yaboot.conf file:

image=hd:14,/boot/vmlinux
	label=linux-hd
	root=/dev/hda14

	     The "image=" line specifies the location of the
	     Linux kernel at /boot/vmlinux on the internal hard
	     drive.  Change the "14" to the partition number of
	     the root filesystem on the internal hard drive
	     (you may also need to change the "hd" device alias
	     if it is not appropriate for your actual hardware
	     configuration).  The "label=" entry of "linux-hd"
	     provides a simple way to have yaboot boot from the
	     internal hard drive.  The "root=" entry indicates
	     what partition is the root filesystem on the internal
	     hard drive.  Change hda14 to be the actual partition
	     name of your internal hard drive's root filesystem.

	     Once again, add any other image parameters you normally
	     specify such as "novideo" or "append=" after the
	     "root=" entry.

	24.  Run ybin to update the bootstrap partition for
	     yaboot by running:

	     ybin -v

	25.  You're now ready to boot totally from your FireWire
	     disk, completely independent of your internal hard
	     drive.  Reboot your system by:

	     reboot

	     At the initial ofboot.b menu enter 'l' to boot Linux.
	     Then at the yaboot menu, just enter "linux".  Or if
	     you have the normal yaboot defaults, you don't have
	     to enter anything, and your system will now boot
	     Linux from your external FireWire disk.

	26.  At this point, you should be completely set, running
	     Linux from your FireWire disk.  A few simple checks
	     to make are running df, "swapon -s", and
	     "nvsetenv | grep boot".  In theory, you should
	     even be able to disconnect your internal hard drive
	     if you wished, and everything should continue to
	     work just fine using just your external FireWire
	     disk.

	27.  If you want to switch back to booting from your
	     internal hard drive, simply reboot your system with:

	     reboot

	     At the initial ofboot.b menu enter 'l' to boot Linux.
	     Then simply enter linux-hd at the yaboot menu to boot
	     from your internal hard drive.

	     Once your system is booted from your internal hard
	     drive, login and run:

	     ybin -v

	     This will cause the bootstrap partition of your internal
	     hard drive to be used instead of the bootstrap partition
	     of your FireWire disk for subsequent boots, causing your
	     system to once again boot by default from your internal
	     hard drive.

	28.  If you want to take your FireWire disk to another
	     PowerMac system, even one that doesn't have Linux
	     installed on it, you should be able to boot Linux
	     from your external FireWire disk by simply doing the
	     following:

	     Boot into OpenFirmware by holding down the four keys
	     Command (Clover), Option, 'O', and 'F' during the
	     powerup boot sequence.

	     Define the boot-device to be the OpenFirmware path of
	     the ofboot.b OpenFirmware script on your external
	     FireWire drive by entering something similar to the
	     following:

	     setenv boot-device fwx/node/sbp-2/disk@0:9,\\:tbxi

	     Change the '9' above to be the actual partition number
	     of the bootstrap partition for yaboot on your FireWire
	     disk.  If the fwx device alias is not suitable on the
	     target system, you may need to give the longer, more
	     explicit form of the OpenFirmware path of the FireWire
	     disk on the target system, which may very well be
	     different from system to system.  You may also need
	     to use the more explicit "node@XXXXXXXXXXXXXXXX" form,
	     where "XXXXXXXXXXXXXXXX" is the GUID of your FireWire
	     disk, instead of the simple shorthand "node".

	     Remember that you can examine the OpenFirmware device
	     tree with:

	     dev / ls

	     And that you can check what OpenFirmware device aliases
	     exist by:

	     devalias

	     All you should have to do now is enter:

	     reset-all

	     This should bring up the ofboot.b menu.  Just enter 'l'
	     to boot Linux.  Then at the yaboot menu just enter 'linux'.
	     Assuming your kernel is compatible with the hardware of
	     the target system, the system should now boot into Linux
	     from your external FireWire drive.

	29.  For further information, consult the man pages for
	     boot, yaboot, yaboot.conf, ybin, mkinitrd, nash, pdisk,
	     mkfs, hformat, mkswap, and rsync.

	30.  Enjoy!  :-)

						-Bill Fink
						 6/22/03