With the EOMA68 Crowd Supply campaign underway, and having pledged for a couple of micro-desktop systems, I'm inspired to look at operating systems again. I'm interested in systems that aren't based on the Linux kernel, but I'm not sure how far I want to roam away from the classic GNU user-space experience. I don't know if any systems I find will run on the A20 CPU card; in any case, I want to explore alternatives to Linux on the x86-based hardware I already have. The first operating system I'm going to try is GNU/Hurd.
One relatively easy route to having a GNU/Hurd system is to install Debian
GNU/Hurd – not on an ARM-based platform, but on one of my existing
x86 hardware platforms. In preparation for that, I've been trying to get up and
running with the images from
Debian. I had a few false
starts with these, being able to create disk images that would boot up in
kvm but which appeared to have incorrectly configured keys for the apt
repositories. In the end, I stepped back and tried to install something from
same site as the repositories, reasoning that it wouldn't make sense to
have an installer that couldn't access its own repositories.
Update: The netinst.iso dated 2016-08-24 21:08 from Samuel Thibault's site worked fine. Note that the md5sum of the file corresponds to the entry for debian-sid-hurd-i386-NETINST-1.iso in the MD5SUMS file.
After a couple of attempts to do this which were fine in kvm, but which wouldn't fit nicely onto the removeable media I have, I finally settled on the following recipe for creating a working bootable image:
qemu-img create hurd-install.qemu 14.9G wget http://ftp.ports.debian.org/debian-ports-cd/hurd-i386/current/debian-hurd-2015-i386-NETINST-1.iso sha1sum debian-hurd-2015-i386-NETINST-1.iso # Check the hash of this against those listed on this page. kvm -m 1024M -drive file=hurd-install.qemu,cache=writeback -cdrom debian-hurd-2015-i386-NETINST-1.iso -boot d -net user -net nic
We first create a raw disk image which will fit in both the 16 GB Compact Flash and micro-SD cards I use for booting GNU/Hurd on my old laptop. We then fetch the bootable CD-ROM image used for installation and check it against one or more of the hashes published on the Debian ports site. (Ideally, we would get the hashes from somewhere with a https URL.) Finally, we boot up a virtual machine with the empty hard drive image and installer CD-ROM image, plenty of RAM, and network access.
In the virtual machine, I chose the textual installer. When partitioning the disk, I allocated about 6 GB for the system in a primary partition and about 1 GB for swap in a logical partition, leaving the rest for other operating systems. I only installed the suggested sets of packages, deferring the choice of desktop environment until later. When the installer finished, I let it reboot into the boot menu where I chose to boot from the hard drive so that I could check things and further configure the system.
If everything goes to plan, the system should boot to a login prompt. I logged in as root then immediately set about reconfiguring the apt sources and keyrings, beginning with some changes to the sources list:
In this file, I changed the final two lines to refer to the packages on the same site as the installer:
deb http://ftp.ports.debian.org/debian-ports unreleased main deb-src http://ftp.ports.debian.org/debian-ports unreleased main
Then, I updated the keyrings used to verify the packages:
wget https://www.ports.debian.org/archive_2016.key dpkg -r debian-ports-archive-keyring apt-key add archive_2016.key apt-get update
I found this to be necessary because the packages are signed with a key that is newer than the key in the supplied debian-ports-archive-keyring package. Although I think this should have worked with the disk images produced by other installers I found, I didn't manage to resolve the issue with the signing key, but at least it works with the image produced by this installer.
I configured one or two more things, like sshd, so that I can potentially run the laptop without a monitor. At the moment, I use a D-SUB cable to display the video output using the same monitor as my desktop machine but this means switching between the two outputs when switching systems, which is a bit tiresome.
As explained in my previous article, I needed to copy the disk image onto two separate items of removeable media. Fortunately, in my case, this was done using the same command since each device was mounted in turn and appeared as /dev/sdb. If you do this, make sure that the media you are installing the disk image on is actually this device and change the following command accordingly.
# Make sure that /dev/sdb is the media you want to install on: dd if=hurd-install.qemu of=/dev/sdb bs=1M eject sdb
It's important to cleanly eject removeable devices. If anything, it prevents the annoying situation where the disk needs to be checked at boot time, requiring manual intervention.
Finally, I plugged the CompactFlash card into its adapter and the USB micro-SD adapter into one of the USB ports on my laptop and turned it on. This generally works, booting to a login prompt as it does with kvm, but sometimes the laptop isn't happy about the USB device. It's especially unhappy if I try to boot with a USB keyboard attached while it boots from the USB adapter. Still, once booted, it means I have a real GNU/Hurd machine to play with at last!
Category: Free Software
Copyright © 2016 David Boddie
Published: 2016-08-08 21:15:37 UTC
Last updated: 2016-10-14 11:14:08 UTC