Hurd Traffic #15 For 14 Sep 1999

By Zack Brown

Do you pine for the nice days of minix-1.1, when men were men and wrote their own device drivers?
Are you without a nice project and just dying to cut your teeth on an OS you can try to modify for your needs?
Are you finding it frustrating when everything works on minix? No more all-nighters to get a nifty program working?
Then this post might be just for you :-)
-- Linus Torvalds, 1991

Table Of Contents


This was a groundbreaking week for the Hurd. Among other things, Marcus Brinkmann created a boot disk, which brings the world one step closer to an easy installation; then, Brent Fulgham got dpkg-ftp working, making system maintanance that much easier as well. The project seems to be nearing, perhaps not stability, but at least tinkerability by the masses. See below for the details.

Mailing List Stats For This Week

We looked at 84 posts in 235K.

There were 28 different contributors. 15 posted more than once. 10 posted last week too.

The top posters of the week were:


1. Keymap Modification
31 Aug 1999 - 6 Sep 1999 (4 posts) Subject: "more convenient way to change keymap"
People: Marcus Brinkmann

Marcus Brinkmann posted a compressed tar file and announced:

attached is a tar file that contains a modified version of Marks keymap change tool and a perl script to use it.

The modified version is called set_key and does not contain any keymap information. It is used this way:


STATE: 0: key pressed without modifiers.
       1: key pressed with shift.
       2:        ...  with ctrl.
       3:        ...  with alt.
       4:        ...  with shift and alt together.

SCANCODE: A byte determining the scan code of the key. Not all values are used. The scan codes start roughly in the upper left corner of thekeyboard and end on the lower right.

VALUE ...: Up to three bytes which determine which ascii sequence should be sent to the console when the key SCANCODE is pressed with modifier STATE.

All numbers can be decimal, hex (0x...) or octal (0...).

To use this tool conveniently, I wrote, a simple perl script which maps symbolic names and ascii characters to SCANCODE and VALUE. The input format for is as follows:


SCANCODE: Is a symbolic name or a number specifying the scan code. See the perl source code for a list of symbolic names. The symbolic names correspond to a qwert* keyboard, mainly us and de. So, for example, there is a symbolic name x for the x key, but no symbolic name y, only us_y and de_z (and vice versa us_z == de_y).

STATE0-4: Is a list of symbolic names corresponding to the above states of the key with scancode SCANCODE. If you want to leave out certain states (not set them at all), use "skip". If you want to clear a certain key, use "nc". Other symbolic names are again listed in the perl code (%value_map). Note that I have not found good names for the delete/backspace key. Use "del" for the "bs" scancode and "delete" for the "del" scan code (at least on a german keyboard...).

You should be able to avoid specifying concrete numbers in the keymap completely. If there are symbols missing, we can add them. There is a whole range of characters above 127 that do not have a symbolic name yet because I am lazy.

Included are two example maps ( for german layout, tested, for us layout, untested). I would be happy to get more layout files from other countries.

To see 8-bit characters, I had to add "set convert-meta off" in etc/inputrc (and press CTRL-X CTRL-R to refresh readline).

I hope this is useful for some people. Please feel free to use the code as a base for a more sophisticated tool. For example, move the parser into the C code and loop over device_set_status for speed increase. Although the whole mach terminal situation is hopefully temporary, european fellow developers will probably feel a bit more comfortable using a native keyboard layout.

As a temporary solution we will probably want to add Kalle's AltGR patch to GNU Mach and make my tool a bit faster and flesh out the problem (choosing consistent symbols, providing more default maps). Then we can include the code in some of the Debian packages.

(I considered porting console-tools package by Debian developer Yann Dirson. This contains so many features that it would be a lot of work to peel out the few features that would work under Mach, so I want to delay this until we have either the linux terminal or some cool native Hurd terminal available).


2. New Network Setup Program
6 Sep 1999 (2 posts) Subject: "Network setup program"
People: Marcus BrinkmannJuli-Manel Merino Vidal

Juli-Manel Merino Vidal posted a perl script to configure the network with settrans, as well as modify the hostname and the DNS.

Marcus Brinkmann added:

someone (I don't remember the name) implemented support for multiple ethernet interfaces and wrote some utilities to configure the route etc, too. However, those are not included in the distribution (but Thomas will investigate it).

For general maintenance, we will probably make use of whatever Debian provides at installation and later. There is a proposal and implementation underway for general configuration of a Dbeian machine, and I will make sure we will have a module for networking under Hurd. Your code may be useful at this stage.


3. Some Explanation Of settrans
6 Sep 1999 - 7 Sep 1999 (10 posts) Subject: "settrans"
Topics: FS: ext2
People: Michael BacarellaMarcus BrinkmannJuli-Manel Merino Vidal

Juli-Manel Merino Vidal asked what settrans was for. Michael Bacarella explained:

A fundamental concept of the Hurd is something known as translators. These are usually Hurd servers that are hung off of filesystem nodes.

Hurd servers could basically do anything, some of which implement filesystems like ext2 and ufs. When you mount a filesystem, you essentially attach the ext2fs translator to a mount point, and telling the translator which partition to use.

The mount command is currently a script which calls settrans with the proper arguements based on the command line supplied.

According to the TODO list, a binary mount is desired.

Elsewhere, Marcus Brinkmann gave a pointer to a doc on translators ( , and added, "Note that settrans does almost nothing. It simply writes a STRING to an INODE. Syntax is "settrans INODE STRING". There are some options that specify what to do if a translator already exists (passive or active), but this is "advanced" usage."


4. Manual: How To Build A Bootdisk For The Hurd
8 Sep 1999 - 9 Sep 1999 (8 posts) Subject: "how to make a boot disk (part I)"
Topics: Bootloaders, FS: ext2
People: Marcus Brinkmann

Marcus Brinkmann posted this detailed explanation:

took me quite a while to figure out, so here is a step by step manual how to build a _boot_ disk.

$ mke2fs -N 32 -o hurd /dev/fd0

-N sets the number of inodes.

If we don't use -N option, the inodes use up too much space and the files won't fit. Of course, if you make the value too small, you won't be able to write all files you want. Anyway, 24 was enough to fit all files, but I want to store some more grub stage 1.5 files, so we try 32. If this is not enough, try higher values. If it is too much, lower it.

$ mount /dev/fd0 /floppy   # or settrans /floppy /hurd/ext2fs /dev/fd0
$ mkdir /floppy/boot
$ cp /boot/gnumach.gz /boot/serverboot.gz /floppy/boot/
$ cat > /floppy/boot/servers.boot
# GNU Mach boot script for Debian GNU/Hurd.  Each line specifies a
# file for serverboot to load (the first word), and actions to be done
# with it.

# First, the bootstrap filesystem.  It needs several ports as arguments,
# as well as the user flags from the boot loader.
/hurd/ext2fs.static.gz --bootflags=${boot-args}
--host-priv-port=${host-port} --device-master-port=${device-port}
+--exec-server-task=${exec-task} -Tbunzip2:device ${root-device}
$(task-create) $(prompt-task-resume)

# Now the exec server; to load the dynamically-linked exec server
# program, we have serverboot in fact load and run, which in
# turn loads and runs /hurd/exec.  This task is created, and its task
# port saved in ${exec-task} to be passed to the fs above, but it is
# left suspended; the fs will resume the exec task once it is ready.
/lib/ /hurd/exec $(exec-task=task-create)


-Tbunzip2:device says we use a compressed root file system on another disk. We wait for this disk to be inserted before loading it via $(prompt-task-resume) instead $(task-resume).

$ mkdir /floppy/hurd /floppy/lib
$ gzip -9c /hurd/ext2fs.static > /floppy/hurd/ext2fs.static.gz
$ gzip -9c /lib/ > /floppy/lib/

Make sure you actually compress the Hurd, and not the Linux one!

$ mkdir /floppy/boot/grub
$ cp /usr/share/grub/i386-pc/stage1 /floppy/boot/grub
$ cp /usr/share/grub/i386-pc/stage2 /floppy/boot/grub
$ cat > /floppy/boot/grub/menu.lst
# This is the amount grub waits before booting the default entry
timeout= 10

# Tell which entry to boot by default.  Note that this is origin zero
# from the beginning of the file.
default= 0

# Note that to GRUB, all hard disks are 'hd' and all floppy disks are 'fd'.
# To Mach, SCSI disks are 'sd' and IDE type disks are 'hd'.  Use
# GRUB names in the 'root' command and prefixing filenames.  Use a
# Mach name as the 'root' arg for the kernel, and whenever running the Hurd.

# Entry 0:
title= Floppy
root= (fd0)
kernel= /boot/gnumach.gz root=fd0
module= /boot/serverboot.gz

The boot disk is almost ready now, but it isn't bootable.

$ umount /floppy  # or settrans /mnt

Insert a new, empty floppy, then:

dd if=/usr/share/grub/i386-pc/stage1 of=/dev/fd0 bs=512 count=1
dd if=/usr/share/grub/i386-pc/stage2 of=/dev/fd0 bs=512 seek=1

Then reboot and boot from this floppy. Insert your Hurd boot floppy again, and enter at the Grub prompt:

install= (fd0)/boot/grub/stage1 (fd0) (fd0)/boot/grub/stage2 0x8000 p

(I know this by heart already :)

Voila. Your Hurd boot disk is ready now.

The trick is of course what to do on the _root_ disk. Create an empty loop file system of approx 6 MB:

$ dd if=/dev/zero of=/tmp/root.fs bs=1024k count=6
$ mke2fs -o hurd /tmp/root.fs
$ mount -o loop /tmp/root.fs /gnu

Now put "stuff" in /gnu. servers, libs, binaries. Don't forget "touch /servers/exec", or it won't boot at all (I think). You can put about 4 MB stuff into it (uncompressed). Then:

$ umount /floppy
$ bzip2 -9 /tmp/root.fs
$ dd if=/tmp/root.fs.bz2 of=/dev/fd0 bs=512

And then insert the root disk when the boot disk asks for it.

Let me know what you put into the root disk to get a working system. There will be a way to minimalize the C library and the Hurd libs, so we can fit a bit more than the above 4 MB. But for now, I would like to now how to get a working system at all. So try to find out what is essential and let me know.

Of course I will soon put up a boot disk on the net. Hold your breath.


5. Lots Of New Packages And Boot Disk
8 Sep 1999 (1 post) Subject: "new packages, new hurd-*.tar.gz, boot disk"
People: Marcus BrinkmannDaniel Burrows

Marcus Brinkmann announced many, many packages either new or updated on the FTP archive. He announced:

the fruits of my work in the last week can be picked. dinstall just told me that the following packages have been installed in the ftp archive. get them while they are hot.

Small updates or recompilation:

  • ae_962-25_hurd-i386.deb
  • base-passwd_2.0.3.4_hurd-i386.deb
  • diff_2.7-19_hurd-i386.deb
  • grep_2.3-4_hurd-i386.deb
  • mawk_1.3.3-2.0_hurd-i386.deb
  • fileutils_4.0-2_hurd-i386.deb
  • sed_3.02-3_hurd-i386.deb
  • slang1-dev_1.2.2-3_hurd-i386.deb
  • slang1-pic_1.2.2-3_hurd-i386.deb
  • slang1_1.2.2-3_hurd-i386.deb

New packages, status unknown:

  • dpkg-mountable_0.8_hurd-i386.deb
  • elvis-tiny_1.4-7_hurd-i386.deb

New package:

  • libwrap0-dev_7.6-1_hurd-i386.deb
  • libwrap0_7.6-1_hurd-i386.deb
  • tcpd_7.6-1_hurd-i386.deb
    * This provides the tcp wrapper and is depended on by new inetutils.

New upstream version:

  • fileutils_4.0-2_hurd-i386.deb
  • grub_0.5.92_hurd-i386.deb
  • shellutils_2.0-1_hurd-i386.deb
  • textutils_2.0-2_hurd-i386.deb
  • tar_1.13.6-1_hurd-i386.deb
  • zlib-bin_1.1.3-4_hurd-i386.deb
  • zlib1g-dev_1.1.3-4_hurd-i386.deb
  • zlib1g_1.1.3-4_hurd-i386.deb
  • comerr-dev_2.0-1.15-1_hurd-i386.deb
  • uuid-dev_1.2-1.15-1_hurd-i386.deb
  • ss-dev_2.0-1.15-1_hurd-i386.deb
  • e2fslibs-dev_1.15-1_hurd-i386.deb
  • e2fsprogs_1.15-1_hurd-i386.deb
  • inetutils_1.3.2-7_hurd-i386.deb
  • syslogd_1.3.2-7_hurd-i386.deb
  • talk-hurd_1.3.2-7_hurd-i386.deb
  • talkd-hurd_1.3.2-7_hurd-i386.deb
  • telnet-hurd_1.3.2-7_hurd-i386.deb
  • telnetd-hurd_1.3.2-7_hurd-i386.deb
    * Now without tcpd, and a Depends: tcpd.
  • libc0.2-dbg_2.1.2-0pre12_hurd-i386.deb
  • libc0.2-dev_2.1.2-0pre12_hurd-i386.deb
  • libc0.2-pic_2.1.2-0pre12_hurd-i386.deb
  • libc0.2-prof_2.1.2-0pre12_hurd-i386.deb
  • libc0.2_2.1.2-0pre12_hurd-i386.deb
  • gconv-modules_2.1.2-0pre12_hurd-i386.deb
    * Lots of bug fixes.
  • hurd_19990907_hurd-i386.deb
  • hurd-dev_19990907_hurd-i386.deb
    * Lots of bug fixes.
    * Compatible with e2fsprogs 1.15
  • gnumach_1.2-2_hurd-i386.deb
  • gnumach-dev_1.2-2_hurd-i386.deb
    * Some bug fixes.
  • debianutils_1.12_hurd-i386.deb
    * support for filenames of arbitrary length (dependency on PATH_MAX removed)
  • binutils-dev_2.
  • binutils-multiarch_2.
  • binutils_2.
    * gperf should work now (hertz() returns 100. It's still a hack).

Someone please move the following files to (I still can't login):

New hurd-19990907.tar.gz file is now available at: (~12MB)

New boot-19990907.disk is available at: (one 3.5" disk)

The new cross-install and native-install will be available as soon as the web pages are regenerated:

  • automatical download of missing files! (by Daniel Burrows)
  • works with the above packages
  • create servers/password (needs to be in the hurd package, though)
  • works with the above packages
  • does not show rreebboooott problem! (I don't think it is fixed, but it is not triggered right after running native-install)

All files are somewhat tested, so I don't expect grave errors. Note that the tsort in textutils is not compatible to the bsd tsort (bug reports are filed). Blame Mark ;)


6. dselect Success!!
9 Sep 1999 - 10 Sep 1999 (8 posts) Subject: "Dselect working"
Topics: FS: FTPFS
People: Brent FulghamThomas Bushnell

Brent Fulgham rebuilt the fileutils package with some extra patches, saying, "The upshot of this is that dpkg-ftp is now functional, so you can automatically update your system over ftp, rather than downloading everything by hand and then installing."

Thomas Bushnell added:

Of course, with my fixes to ftpfs, I just do the following:

settrans -c /ftp /hurd/hostmux /hurd/ftpfs /

and then:

cd /ftp/

and then I can directly dpkg -i without needing to worry further.


7. GRUB Shell Success On Hurd
10 Sep 1999 (2 posts) Subject: "GRUB shell works on Hurd!"
Topics: Bootloaders
People: Pavel RoskinOKUJI Yoshinori

Pavel Roskin posted a patch and announced:

The attached patch against the CVS version of GRUB (it should apply to GRUB-0.5.92 as well) makes it possible to use the GRUB shell on OS'es other than Linux.


  • Only floppy disks are supported
  • All floppy disks are assumed to be 1.44 Mb in size (80 cylinders, 2 heads, 18 sectors)
  • The floppy disk should not be mounted during the installation

I have successfully created a bootable floppy under GNU Hurd (i.e. without rebooting)

OKUJI Yoshinori was happy with this, and said he'd made a few changes to the patch and checked it in to the CVS tree.







We Hope You Enjoy Hurd Traffic

Kernel Traffic is grateful to be developed on a computer donated by Professor Greg Benson and Professor Allan Cruse in the Department of Computer Science at the University of San Francisco. This is the same department that invented FlashMob Computing. Kernel Traffic is hosted by the generous folks at All pages on this site are copyright their original authors, and distributed under the terms of the GNU General Public License, version 2.0.