On Sat, 3 Apr 1999, Stefan Cars wrote: > The user guide at pic.sel.cam.ac.uk doesn't seem to work. Is there anyone > that has that and could mail it to me ?
That should be pick.sel.cam.ac.uk, but i've just been emailed by some prat who's fiddle with the power cables, so I don't quite know when things will be working again (sigh). I've attached the file. Matthew -- Elen sila lumenn' omentielvo Steward of the Cambridge Tolkien Society Selwyn College Computer Support http://www.cam.ac.uk/CambUniv/Societies/tolkien/ http://pick.sel.cam.ac.uk/ Debian GNU/Hurd - love at first byte
<html> <head> <title>The easy guide to installing Hurd on a Linux box</title> <meta name="description" content="A step-by-step guide to installing Hurd on a linux box, assuming NO prior knowledge"> <meta name="keywords" content="Hurd, Linux, hurd, linux, Debian, debian, install"> <meta name="author" content="Matthew Vernon"> </head> <body bgcolor="ffffff" text="000000" link="000099" alink="009900" vlink="990000"> <center><font color="aa0000"><h1>The easy guide to installing Hurd on a Linux box.</h1></font> <img src="hurd.jpg" alt="Hurd logo"><br clear=all></center> <p> <h3>Official site: <a href="http://pick.sel.cam.ac.uk/~mcv21/hurd.html">http://pick.sel.cam.ac.uk/~mcv21/hurd.html</a></h3><br> Debian GNU/Hurd is constantly under development, so this guide changes often. The mirror on www.gnu.org is updated weekly, so you may wish to check the official site. <p> <h3>Legal Stuff</h3><br> This document is Copyright © 1999 Matthew Vernon.<br> This document is free; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the license, or (at your option) any later version.<br> This document is distributed in the hope that it will be useful, but <em>without any warranty</em>; without even the implied warranty of <em>merchantability</em> or <em>fitness for a particular purpose</em>. See the GNU General Public License for more details.<br> Should you be lacking a copy of this, look at <a href="http://www.gnu.org/copyleft/gpl.html">www.gnu.org/copyleft/gpl.html</a>. <p> <h3>Introduction</h3><br> 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. <p><a name="1"><h3>First - Understand Hurd partition names</h3></a><br> Hurd uses different partition names to Linux, and this can be confusing. IDE hard disks are numbered in order, beginning from <code>hd0</code>. Note that the second IDE drive will always be <code>hd1</code>, 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.<p> Linux-style partitions are always called <code>s</code><var>n</var>, where <var>n</var> is the partition number, so the first partition on the second SCSI device will be <code>sd1s1</code>, the third partition on the second IDE drive will be <code>hd1s3</code>, and so on.<p> GRUB (the Hurd bootloader) uses a different partition naming system: it calls partitions <code>(hd<var>N</var>,<var>n</var>)</code>, 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 <code>(hd1,2)</code> (<code>(hd1,2)</code> could refer to the first SCSI drive if you only have one IDE drive, or it could refer to the second IDE drive). <p><h3>Second - Make a partition</h3><br> Use cfdisk or fdisk for this. Use a decent size partition (I would recommend 500MB, as this will leave you lots of room), and set the type to <em>Linux native (83)</em>. This is important - setting it to the Hurd type will mean it will not work. You may make a swap partition too if you wish, or use your Linux one (in which case you need to modify your boot scripts, but I have no idea which ones to change). Make sure you have the latest stable e2fsprogs, then make a Hurd-owned ext2 filesystem on the partition e.g.:<p> <code>mke2fs -o hurd /dev/hdb1</code><p> <h3>Third - Get that Hurd!</h3><br> This has all changed now. There are some nice new Debian packages which make the hurd oh so much better. Here are the packages you need: <b> <ul> <li>base-files <li>base-passwd <li>bash <li>debianutils <li>diff <li>dpkg <li>fileutils <li>findutils <li>gnumach <li>grep <li>gzip <li>hostname <li>hurd <li>less <li>libc <li>libncurses <li>libreadlineg <li>locales <li>mawk <li>ncurses-bin <li>perl <li>perl-base <li>sed <li>shellutils <li>tar <li>textutils <li>timezones </b></ul> I include no version numbers, because Hurd development is moving at such a pace that it is impractical to keep trying to update this. Instead, here are the likely places you'll get those .debs: <dl> <dt><a href="ftp://ftp.debian.org/pub/debian/dists/sid/main/binary-hurd-i386;type=d"> ftp.debian.org/pub/debian/dists/sid/main/binary-hurd-i386</a><dd>This is where the officially released .debs will be. Most of the above will be in section base. <dt><a href="ftp://alpha.gnu.org/pub/gnu/hurd;type=d"> alpha.gnu.org/pub/gnu/hurd</a><dd> This is where the rest of the .debs will be found - look in the Debian and contrib subdirectories. </dl> Note that you are probably better off using your local mirror of the above servers, which may well be on your nearest Sunsite, under /pub/Mirrors.<br> You also need some scripts, which are available on alpha.gnu.org: <ul> <li><a href="ftp://alpha.gnu.org/pub/gnu/hurd/contrib/marcus/cross-install.Z">alpha.gnu.org/pub/gnu/hurd/contrib/marcus/cross-install.Z</a> <li><a href="ftp://alpha.gnu.org/pub/gnu/hurd/contrib/marcus/native-install.Z">alpha.gnu.org/pub/gnu/hurd/contrib/marcus/native-install.Z</a> <li><a href="ftp://alpha.gnu.org/pub/gnu/hurd/contrib/marcus/dpkg-hurd.Z">alpha.gnu.org/pub/gnu/hurd/contrib/marcus/dpkg-hurd.Z</a> </ul> <p> There is an alternative, which is to grab a large .tar.gz of the basic packages from <a href="ftp://alpha.gnu.org/pub/gnu/hurd/contrib/marcus/gnu-19990104.tar.gz">alpha.gnu.org/pub/gnu/hurd/contrib/marcus/gnu-19990104.tar.gz</a>. Whichever you use is largely a matter of preference: I prefer using the individual files, but YMMV.<p> You also need GRUB, the GRand Unified Bootloader. Grab the image from <a href="ftp://ftp.gnu.org/pub/gnu/gnu-0.2/grub-boot.image.Z">ftp.gnu.org/pub/gnu/gnu-0.2/grub-boot.image.Z</a> and uncompress it:<br> <code> uncompress grub-boot.image.Z<br> </code> Then write this to a clean and new floppy:<br> <code> dd if=grub-boot.image of=/dev/fd0 bs=512<br> </code> <h3>Fourth - To link, or not to link?</h3><br> Hurd philosophy is to make <code>/usr</code> a symlink to <code>/</code>. During porting, it has been discovered that this causes minor problems in a few packages, so some people suggested we should use the old unix-style way of having <code>/usr</code> a separate directory. This caused some of the install scripts to break. I have fixed those bugs, so you are free to choose whichever you want. All Debian GNU/Hurd packages should work fine whether you have the symlink or not. I personally would recommend going with the Hurd philosophy, and there are no outstanding bugs anymore in this regard (well, there is a small glitch in /bin/vi, but I don't use that :) ). Should, however, you decide to ignore Hurd philosophy, and keep /usr as a separate directory, then cross-install will deal with this for you. <h3>Fifth - Cross-install the hurd</h3><br> The instructions that follow apply if you are using the individual .debs. If you are using the large tarball, follow the instructions <a href="#tarball">at the end of this section</a>.<br> Put all those .debs and scripts in the same directory, cd to that directory, and make sure the scripts are executable: <br><code>chmod +x cross-install<br> chmod +x native-install<br> chmod +x dpkg-hurd<br></code> 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:<br><code> mount /dev/hdb1 /gnu<br> ./cross-install /gnu</code><br> This may take a little time.<p> <h4><a name="tarball">Using the large tarball</a></h4><br> Untar the tarball onto your hurd partition:<br><code> tar -zxvf /path/to/tarball /gnu<br> </code> Then you have to recreate the device files, due to a bug in the tarball:<br><code> cd /gnu/dev <br> rm * <br> ln -s ../sbin/MAKEDEV /gnu/dev/MAKEDEV <br> </code> <p> <h3>Sixth - The single-user boot</h3><br> Unmount the Hurd filesystem, and reboot with the GRUB floppy in the drive. When you reach a menu asking you to select one of five options, hit <code>c</code> to get to a command prompt. You now bring the machine up by hand :<br> <code> root=(hd1,0) </code><br> Where this is the GRUB name of your <em>root</em> partition. If GRUB says it has found an ext2 filesystem then this has worked. If not, check the partition type, and that you entered the partition correctly. The next command is:<br> <code> kernel=/boot/gnumach root=hd1s1 -s </code> <br> This time, use the Hurd name of your <em>root</em> filesystem. The <code>-s</code> flag tells Hurd to boot single-user. If this works, you get a line about ELF object code. Then type:<br> <code> module=/boot/serverboot </code> <br> This is a Mach executable that loads the servers needed to run the rest of Hurd. Finally, boot it:<br> <code> boot </code> <br> Mach now starts its general boot process. Note that it doesn't support IRQ sharing, so you may find a conflict (especially with serial ports) that didn't occur with Linux. If this is the case, changing the offending port's IRQ or disabling it should work. Eventually, you will get a prompt. Now finish the basic install process, using the native-install script: <code><br> ./native-install </code><br> If this gives <code>setttrans</code> errors, then you forgot to specify the -o hurd option to mke2fs. Run the <code>e2os</code> 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 by hand later. <p> <h3>Seventh - Make devices, and more configuration</h3><br> Every time you enter single-user mode, you have to type:<br> <code> export TERM=mach </code><br> to use the mach terminal information. Do that now. Next you need to make some devices:<br> <code> cd /dev <br> ./MAKEDEV foo bar baz <br> </code><br> Important ones to remember are: the Hurd names of your root and swap partitions and the floppy drive (probably <code>fd0</code>). 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:<br> <code> settrans /servers/socket/2 \ <br> /hurd/pfinet --interface=eth0 --address=NN.NN.NN.NN \ <br> --gateway=GG.GG.GG.GG --netmask=MM.MM.MM.MM <br> </code><br> These should all be numerical IP addresses. The values to insert will be found on your Linux box in <code>/etc/init.d/network</code>. 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 <code>/dev/hda4</code>, then mount it in <code>/Linux</code> thus:<br> <code> cd / <br> mkdir /linux <br> settrans /linux /hurd/ext2fs /dev/hd0s4 <br> ln -s /linux/home /home<br> </code> The last line makes <code>/home</code> a symlink to <code>/linux/home</code>. The <code>/hurd/ext2fs</code> 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 <code>-r</code> argument <em>after</em> the filesystem type, and to make the settrans transient (like a Linux mount), supply the <code>-a</code> argument directly after settrans. To remove a settrans, type <code>settrans /mnt</code> without any further arguments.<p> Now issue the reboot command, and go back to linux:<br> <code> /sbin/reboot </code><p> <h3>Eighth - Final preparations</h3> <p> First copy across <code>/etc/resolv.conf</code>:<br><code> cp /etc/resolv.conf /gnu/etc/resolv.conf</code><p> Then you need an un-shadowed password file and group file, as Hurd doesn't support shadow passwords yet:<br> <code> shadowconfig off<br> cp /etc/passwd /gnu/etc/passwd <br> shadowconfig on<br> cp /etc/group /gnu/etc/group<br> </code><br> <p> Then copy <code>/etc/securetty</code> across:<br> <code>cp /etc/securetty /gnu/etc/securetty</code><p> Then edit the menu provided by the GRUB floppy, which is in the file <code>/floppy/boot/grub/menu.lst</code>. You need to change the single-user and multi-user options to those you used earlier (remembering the <code>-s</code> flag for the single-user boot option). That's it! Just reboot, and select the multi-user menu option from the boot floppy.<p> <h3>Ninth - Mailing lists</h3><br> There are three Hurd mailing lists:<dl> <dt><a href="mailto:[email protected]">[email protected]</a> <dd>The mailing list for the Debian GNU/Hurd project. I recommend this to everyone, especially those interested in porting things to GNU/Hurd, and using their Hurd box for anything useful. Send a message with subscribe as the subject to <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> to subscribe. <dt><a href="mailto:[email protected]">[email protected]</a> <dd>The mailing list for people involved with the Hurd project. There are quite a few cross-posts to debian-hurd, but this list is probably of interest to everyone. Send a message with subscribe as the subject to <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> to subscribe. <dt><a href="mailto:[email protected]">[email protected]</a> <dd>The mailing list for reporting hurd bugs (as opposed to those in debian hurd packages).Send a message with subscribe as the subject to <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> to subscribe. </dl><p> <h3>Tenth - To conclude</h3><br> I hope this has been helpful. I'm sorry it's so long, but I've tried to make everything simple by explaining everything step by step.<p> Have Fun! <address> Matthew Vernon, <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>,<br> <a href="http://pick.sel.cam.ac.uk">http://pick.sel.cam.ac.uk</a> </address> </body> </html> <!-- LocalWords: linux ln -->

