[vox-tech] install with /usr on external HD
Jonathan Stickel
vox-tech@lists.lugod.org
Sun, 04 Jan 2004 19:43:44 -0800
I'd like to share how I've recently installed Linux on a laptop with
/usr, /opt, and /home mounted on an external Firewire drive. This was
necessary because of the extremely limited space on the dual boot
internal drive of the laptop.
The distribution is Gentoo, but I'm sure the concepts will work with
most distributions. During the install you must have the external drive
attached and visible. Firewire drives show as scsi devices (e.g.
/dev/sda). I installed /, swap, and /boot as separate partitions on the
internal drive (hda), and /usr, /opt, and /home as separate partitions
on the external drive (sda). I put them all as standard entries in
/etc/fstab.
I made sure that all the firewire support I needed was compiled in the
kernel, or as modules. The key step is bringing up the firewire drive
early in the boot sequence. With Gentoo, you can have arbitrary kernel
modules loaded early in the boot sequence, which I did with ieee1394,
ohci1394, and spb2. Then I had the script "rescan-scsi-bus.sh"
(http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh) run from within
the /etc/init.d/checkfs and /etc/init.d/localmount scripts. This scans
and detects the firewire drive before fsck or mounting is attempted.
rescan-scsi-bus.sh needs the executables seq, tail, and pr. I moved
these from /usr/bin to /bin since /usr/bin isn't initially available.
Once the firewire drive is detected, the partitions can be fscked and
mounted as normal!
I tried to create a separte /etc/init.d script to scan for the firewire
drive, but I was unable to make it run early enough (i.e. before checkfs
and localmount). Anyway, hacking checkfs and localmount works just fine.
Maybe this helps someone. I remember seeing interest about doing
something like this in the past.
Regards,
Jonathan