This is a guide that tells people how to take an existing Hurd distro vm running
on qemu and flash it to a spare SSD.  One can then insert the SSD and be running
the Hurd.  It's sooo easy we should document it!
---
 hurd/running/Guix.mdwn           |  5 +++
 hurd/running/debian.mdwn         |  4 ++
 hurd/running/flash_qemu_img.mdwn | 66 ++++++++++++++++++++++++++++++++
 hurd/running/qemu.mdwn           |  5 +++
 4 files changed, 80 insertions(+)
 create mode 100644 hurd/running/flash_qemu_img.mdwn

diff --git a/hurd/running/Guix.mdwn b/hurd/running/Guix.mdwn
index 30b7b62a..36c1ceda 100644
--- a/hurd/running/Guix.mdwn
+++ b/hurd/running/Guix.mdwn
@@ -6,6 +6,11 @@ GNU/Hurd support has been integrated in Guix.
 # QEMU Image
 [[!inline pages=hurd/running/Guix/qemu_image raw=yes feeds=no]]
 
+---
+# Flash qemu image to disk
+
+You can install the Hurd to bare metal via flashing a working [[qemu 
image|hurd/running/flash_qemu_img]].
+
 ---
 # Documentation
 
diff --git a/hurd/running/debian.mdwn b/hurd/running/debian.mdwn
index e28d7ed4..9599c1d4 100644
--- a/hurd/running/debian.mdwn
+++ b/hurd/running/debian.mdwn
@@ -22,6 +22,10 @@ As of late 2025 installation may require larger amount of 
RAM (≥ 2 GB) due to
 # <a id="crossinstall">CrossInstall</a>
 It is possible to install a Debian GNU/Hurd system on a spare partition from 
an existing Debian GNU/Linux installation. We call this [[CrossInstall]].
 
+---
+# Flash qemu image to disk
+You can install the Hurd to bare metal via flashing a working [[qemu 
image|hurd/running/flash_qemu_img]].
+
 ---
 # Contributing
 - [[Porting]] — Helping with porting packages
diff --git a/hurd/running/flash_qemu_img.mdwn b/hurd/running/flash_qemu_img.mdwn
new file mode 100644
index 00000000..057826f3
--- /dev/null
+++ b/hurd/running/flash_qemu_img.mdwn
@@ -0,0 +1,66 @@
+[[!meta copyright="Copyright © 2026 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="Installing the Hurd from a Qemu Image"]]
+
+# Installing the Hurd from a Qemu Image
+
+Perhaps the easiest method of installing the Hurd on [[real 
hardware|faq/drivers]] is to use a GNU/Linux machine
+to download a [[qemu 
image|https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/]] (or [[64 bit 
image|https://cdimage.debian.org/cdimage/ports/latest/hurd-amd64/]]), run it 
via [[hurd/running/qemu]], update the distribution, install the
+packages you want, and
+[[configure your hurd to your 
liking|https://www.debian.org/ports/hurd/hurd-install]], and finally flash the 
image directly to your SSD.  Please note that as of Feb 2026, the 64 bit image 
uses [[hurd/rump/rumpdisk]] by default and supports only SSDs, while the 32 bit 
image does not support SSDs.
+
+#### Flashing a qemu hurd image to an SSD or HDD
+
+The first step is to find your spare SSD's device name. You'll need to attach 
your spare SSD to your GNU/Linux machine via USB to SATA dongle. StarTech 
dongles are a good choice.  Once you are plugged in run this command.
+
+    $ lsblk
+    NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
+    sda             8:0    0  74.5G  0 disk
+    ├─sda1          8:1    0     2M  0 part
+    └─sda2          8:2    0  74.5G  0 part
+      └─cryptroot 253:0    0  74.5G  0 crypt /gnu/store
+                                             /
+    sdb             8:16   0 953.9G  0 disk
+    └─sdb4          8:20   0 953.9G  0 part
+
+Normally `/dev/sda` and `/dev/sdaN` is GNU/Linux's SSD and `/dev/sdb` is your 
blank SSD.  In the above example, Guix System is my `sda` and `sdb` is my spare 
SSD. To double check your spare SSD's device name, run the above command with 
your SATA dongle not plugged in and with it plugged in.  Once you have your 
spare SSD's device name, flash your hurd image to it. Here's the command that 
worked for me:
+
+    # dd if=debian-hurd*.img of=/dev/sdb bs=1m status=progress
+
+Note do not write `/dev/sdb1`.  Write it as `/dev/sdb`.  The vm image already 
contains the partitions.
+
+#### Expand your hurd filesystem partitions.
+
+    $ lsblk | grep sdb
+    NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
+    sdb             8:16   0 238.5G  0 disk
+    ├─sdb1          8:17   0   953M  0 part
+    ├─sdb2          8:18   0     1K  0 part
+    └─sdb5          8:21   0     4G  0 part
+
+Sweet!  Flashing was successful! You cannot really tell here, but my Hurd 
partitions are `sdb1` swap, `sdb2` extended, `sdb5` ext2.  We need to expand 
the `sdb2` and `sdb5` and resize the filesystem to take up all available space. 
 That's easily achieved via:
+
+    # parted /dev/sdb
+    (parted) resizepart 2 100%
+    (parted) resizepart 5 100%
+    (parted) quit
+    # resize2fs /dev/sdb5
+    $ echo new let's check out work!
+    $ lsblk | grep sdb
+    NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
+    sdb             8:16   0 238.5G  0 disk
+    ├─sdb1          8:17   0   953M  0 part
+    ├─sdb2          8:18   0     1K  0 part
+    └─sdb5          8:21   0 237.5G  0 part
+
+It looks like our ext2 filesystem has expanded to about 240G.  Now we can 
unplug our SATA dongle, install the SSD to the Hurd machine and boot!
+
diff --git a/hurd/running/qemu.mdwn b/hurd/running/qemu.mdwn
index c56292c8..b6cfbc70 100644
--- a/hurd/running/qemu.mdwn
+++ b/hurd/running/qemu.mdwn
@@ -433,6 +433,11 @@ Note that, contrary to [[GRUB]]'s configuration file, you 
don't specify
 "`argv[0]`" here, and it's fortunate that neither ext2fs nor exec need a comma
 on their command line...
 
+---
+# Flashing your qemu image to real hardware
+
+If you have a working Hurd distribution running on qemu, then you can [[flash 
that image to a spare SSD|hurd/running/flash_qemu_img]].  You could then 
install that spare SSD to a [[machine that can run the Hurd|faq/drivers]].  
This is an easy way to install the Hurd on real hardware.
+
 ---
 # Related Links
 
-- 
2.52.0


Reply via email to