The aim of this document is to enable anyone with a Linux installation, a bit of time and some hard disk space to install Hurd and get it working multi-user with the minimum of effort. I have written this because I found the documentation confusing when I tried to install Hurd, and it took some perseverance to get it working. Hopefully this will make your life easier. If you are not running Debian GNU/Linux, then you will need to get hold of a copy of dpkg (the debian package manager), since cross-install relies on it, or use the large tarball installation method. Dpkg for non-Debian systems is available at any Debian mirror:
hd0. Note that the second IDE drive will always be
hd1, regardless of whether it is a slave or a second
master. SCSI drives are also numbered in the same way, in absolute
order (so not necessarily the drive ID): they will always be sd0, sd1,
and so on regardless of whether the two drives are SCSI id 4 and 5 or
whatever.
Linux-style partitions are always called sn,
where n is the partition number, so the first partition on
the second SCSI device will be sd1s1, the third partition
on the second IDE drive will be hd1s3, and so on.
GRUB (the Hurd bootloader) uses a different partition naming system:
it calls partitions (hdN,n), but
this time the disk number and partition number are both zero indexed,
and the disks run in order, all the IDE disks first, and the SCSI ones
second. This time, the third partition on the second IDE drive will be
(hd1,2) ((hd1,2) could refer to the first
SCSI drive if you only have one IDE drive, or it could refer to the
second IDE drive).
mke2fs -o hurd /dev/hdb1
There is an alternative, which is to grab a large .tar.gz of the basic packages from alpha.gnu.org/pub/gnu/hurd/contrib/marcus/gnu-lastest.tar.gz. Whichever you use is largely a matter of preference: I prefer using the individual files, but YMMV.
You also need GRUB, the GRand Unified Bootloader. Grab the image from
alpha.gnu.org/gnu/hurd/contrib/marcus/grub-floppy-19991023.gz.
Then write it to a clean and new floppy:
gunzip grub-floppy-19991023.gz
dd if=grub-floppy-19991023 of=/dev/fd0 bs=512
chmod +x cross-install
chmod +x native-install
chmod +x dpkg-hurd
Edit cross-install, using your editor of choice, and change the
hostname to the name of your machine.
Then mount the Hurd partition and run cross-install:
mount /dev/hdb1 /gnu
./cross-install /gnu
tar -zxvpf --same-owner /path/to/tarball /gnu
c to get to a command prompt. You now bring the
machine up by hand :
root=(hd1,0)
kernel=/boot/gnumach root=hd1s1 -s
-s flag tells Hurd to boot single-user. If this works,
you get a line about ELF object code. Then type:
module=/boot/serverboot
boot
./native-install
setttrans errors, then you forgot to
specify the -o hurd option to mke2fs. Run the e2os script
under Linux to fix this. Note that the cross-install script will no
longer install more than a minimal set of packages (to prevent dpkg
choking on errors), so you will need to install any other packages
using the Debian packaging system later.
export TERM=mach
cd /dev
./MAKEDEV foo bar baz
fd0) can be added manually. It is
important to note that you need to make devices for the drives
themselves as well as any partitions on those drives you wish to
use. Next, you need to set up the network. Native-install sets up
/servers/socket/2 with no parameters now, so you have to make this go
away before you can configure the network:
settrans /servers/socket/2 --goaway
settrans -fg /servers/socket/2 \
/hurd/pfinet --interface=eth0 --address=NN.NN.NN.NN \
--gateway=GG.GG.GG.GG --netmask=MM.MM.MM.MM
/etc/init.d/network.
Now, if you want to boot multiuser, you'll want your users to have
the same home directory on both Linux and Hurd, won't you? So you need
to mount the Linux partition. Hurd mounts are permanent between boots,
which is really useful. For example, if your Linux partition is
/dev/hda4, then mount it in /Linux thus:
cd /
settrans -c /linux /hurd/ext2fs /dev/hd0s4
ln -s /linux/home /home
The last line makes /home a symlink to
/linux/home. The /hurd/ext2fs tells Hurd
it's an ext2 format partition. You can mount (non-transiently) nfs
partitions in this way too. To make the filesystem read-only, give the
-r argument after the filesystem type, and to
make the settrans transient (like a Linux mount), supply the
-a argument directly after settrans. To remove a
settrans, type settrans /mnt without any further
arguments. To change the status after setting the translator, you can call
fsysopts /linux with the appropriate options.
Now issue the reboot command, and go back to linux:
/sbin/reboot
/floppy/boot/grub/menu.lst. You need to change the
single-user and multi-user options to those you used earlier
(remembering the -s flag for the single-user boot
option). That's it! Just reboot, and select the multi-user menu option
from the boot floppy.
Have Fun!
Matthew Vernon, matthew@debian.org,