It is likely that this guide is incomplete and/or out of date, so here are some links to otehr Instalation guides, which should help you getting a working system.
First of all, you want an x86 system with at least a 100MHz processor and 32MB RAM, a working CD-ROM drive, an ATA hard drive at least 2GB in size, and a PCI network card. If you have more than 768 MB RAM you will need to pass the kernel an option to restrict the memory usage, or things will break.
The guide here uses a Debian net install CD. You can download one from [Network install from a minimal CD].
At the time of writing, the best way of getting the Hurd to work on your computer is to use a Debian GNU/Linux installation to bootstrap your Hurd installation. Start off booting from the Debian Net Install CD, and installing Debian. Set up your hard drive partitions in roughly this manner (an 8GB hard drive is used as an example, adjust suiting your hard drive sizes. You can make the Hurd and linux partitions as small as 1GB and still have a fully working system):
20MB ext2 /boot 1.5GB ext2 / 512MB swapfs swap 5GB unpartitioned Hurd will go here
Some BIOSes will fail to boot an operating system if the start of the root partition is more than 1GB from the start of the hard drive. If you have such a system you will have to shrink your Linux installation to only a few hundred magabytes, which is easily managable.
Also you may experience problems gettign the CD-ROM to boot, in which case you want to try the [sbootmgr.dsk image from slackware].
When the installer asks you what packages you want to install stick with the default set - it will get you a solid working Linux system to fall back on should Hurd ever fail.
This will install the program you will use to get the Hurd packages onto the hard drive. To make sure you are running the latest version edit /etc/apt/sources.list to replace stable with testing, and comment out the security updates line. Then run
# apt-get update # apt-get dist-upgrade # apt-get install crosshurd
Since the gnuab mirror may be down edit /etc/crosshurd/sources.list/gnu to include the following lines:
deb http://superunprivileged.org/debian unreleased main deb http://debian.duckcorp.org/unstable/binary-hurd-i386/ ./ deb-src http://debian.duckcorp.org/unstable/source/ ./
As of 2006-06-26:
Next, you want somewhere for the packages to go. Use a program like cfdisk to create a partition in the free space at the end of the drive, but do not create a filesystem on it.
# mke2fs -o hurd -b 4096 /dev/DEVICE
In the case of the example, the device is hda4. '-o hurd' sets the owner of the partition to be hurd, and '-b 4096' sets the block size to the only size currently supported by the ext2 driver.
Next you want to mount the newly created partition and run crosshurd from it.
# mkdir /gnu # mount -t ext2 /dev/DEVICE /gnu # cd /gnu # crosshurd
Chose the target directory to be /gnu , the target system to be gnu , and leave the target CPU at i486.
You should see lots of progress lines come up, downloading and extracting packages from the Internet. If you have problems ask #hurd on freenode for help.
Before you reboot into your Hurd installation you need to tell Grub where to find the new OS. This is where you need to be familiar with how different partition naming schemes work. Linux names partitions hda1, hda2, hdb1, hdb2. Grub calls the partitions (hd0,0), (hd0,1), (hd1,0), (hd1,1). Hurd calls partitions hd0s1, hd0s2, hd1s1, hd1s2.
NOTE: if you have more than 768MB RAM (and realistically more than 512MB) it is a good idea to pass uppermem=524288 between root and kernel command. This will restrict the amout of RAM Hurd uses to a level the Hurd can cope with.
Add the following to your /etc/grub/menu.lst adjusting for your partition:
title GNU (kernel GNUmach 1.3) - Single User
root (hd0,3)
kernel /boot/gnumach.gz root=device:hd0s4 -s
module /hurd/ext2fs.static \
--multiboot-command-line=${kernel-command-line} \
--host-priv-port=${host-port} \
--device-master-port=${device-port} \
--exec-server-task=${exec-task} \
-T typed ${root} $(task-create) $(task-resume)
module /lib/ld.so.1 /hurd/exec $(exec-task=task-create)
title GNU (kernel GNUmach 1.3)
root (hd0,3)
kernel /boot/gnumach.gz root=device:hd0s4
module /hurd/ext2fs.static \
--multiboot-command-line=${kernel-command-line} \
--host-priv-port=${host-port} \
--device-master-port=${device-port} \
--exec-server-task=${exec-task} \
-T typed ${root} $(task-create) $(task-resume)
module /lib/ld.so.1 /hurd/exec $(exec-task=task-create)
Now you are ready to reboot.
# reboot
As your system comes up again, boot into single user mode. Once there enter the following into the command prompt you see:
# export TERM=mach # ./native-install # reboot
The script will run, spewing out some errors. They are perfeclty normal. Reboot again into single user mode. Now you will want to turn on swap. The Hurd can happily use Linux swap partition for swapping, and this is what we will do. Once again, adjsut for the partitions you have.
/hurd/mach-defpager cd /dev ./MAKEDEV hd0s3 swapon /dev/hd0s3 cd /
Now repeat the exersise we did last time, by running the following again:
# export TERM=mach # ./native-install
The second time the script will take longer to run. If you see any failures run the script a few more times. If running it again soes not reduce errors any more ask #hug or ##hurd on freenode for help.
Next, you will want to set up your fstab, so filesystems automount at boot, by excecuting the following:
# cd /dev # ./MAKEDEV hd0s3 hd0s4 # echo "/dev/hd0s4 / ext2 rw 0 1" > /etc/fstab # echo "/dev/hd0s3 none swap sw 0 0" >> /etc/fstab
The installation is now complete. You can now reboot into multi-user mode.
Now is a good time to get the system to a usable state.
Most network cards can be started by entering the following:
# devprobe eth0
If detected successfully, devprobe will print 'eth0'. Next do the following, adjusting for your own network:
# settrans -fgap /servers/socket/2 /hurd/pfinet \ -i eth0 -a 192.168.0.5 -g 192.168.0.1 -m 255.255.255.0
You will also want to edit your /etc/resolv.conf file to include your dns server thus:
nameserver 212.142.14.49
With networking, you can install packages.
# apt-get update # apt-get install wget vim
(or your favourite editor).
To get ssh working you need a random device. Since the Hurd does not come with one you will either have to move some binary file in its place and pretend it is random, or, better, install a random device by running the following:
# cd && mkdir tmp && cd tmp # wget http://kilobug.free.fr/hurd/random-64.tar.gz # tar xvfz random-64.tar.gz # cp random/random /hurd/
# settrans -c /dev/random /hurd/random \ --seed-file /var/run/random-seed --secure # settrans -c /dev/urandom /hurd/random \ --seed-file /var/run/urandom-seed --fast # chmod 0644 /dev/random /dev/urandom # apt-get install openssh-client openssh-server
This will also start the ssh server, but currently there is a bug with privilege separation. If you want to be able to log in as a non-root user, edit /etc/ssh/sshd_config, and change the line:
UsePrivilegeSeparation yes
to
UsePrivilegeSeparation no
and run
# /etc/init.d/ssh restart
The Hurd console is a program that provides the command line interface (like ttys) to the user. Start it by running the following:
# echo "console -d vga -d pc_kbd --repeat=kbd -d pc_mouse --repeat=mouse -c /dev/vcs" > \ /root/start-cons # chmod +x /root/start-cons # /root/start-cons login root # cd /dev # ln -s cons/kbd . # ln -s cons/mouse .
To get X working, enter the following commands:
# apt-get install x-window-system-core xfce4 # dpkg-reconfigure xserver-xfree86
Then you need to edit your etc/X11/XF86Config-4 file and make sure the mouse section looks like this:
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/mouse" Option "Protocol" "osmouse" EndSection
Section "InputDevice" Identifier "Generic Mouse" Driver "mouse" Option "SendCoreEvents" "true" Option "Device" "/dev/mouse" Option "Protocol" "osmouse" EndSection
In order to be able to click and drag with the mouse you may also want to disable Emulate3Buttons and ZAxisMapping in the mice.This will cause speedo to crash
The Hurd does not use ld.so.conf, it is necessary to add the following to /etc/profile to be sure that the libraries are found:
LD_LIBRARY_PATH=/X11R6/lib:$LD_LIBRARY_PATH
To start X make sure you are in console, and then run startx. To get a good performance out of the X server you may need to tweak the video driver you are using, the resolution, and the colour depth. Using "vesa" video driver with resolution "1024x768" and colour depth "16" usually works well. If xfce runs too slowly you may want to try something lighter, like fluxbox.
# apt-get install libldap2 libsasl2 apache2
This will instal all ndded packages to run apache2 on the Hurd. The server root is found in /var/www.
Keeping your clock synchronised is very useful.
# apt-get install ntp
To get the CD-ROM to work do this:
# mkdir /cdrom # cd /dev # ./MAKEDEV hdX # settrans -p /cdrom /hurd/iso9660fs /dev/hdX
where hdX is your CD-ROM drive. you can see what hdX is your cdrom drive using cat /dev/klog > log (don't forget to redirect the output : you can only read it once).