10
How to run GNU Guix/Hurd in qemu - Lemmy
lemmy.mlAll you need is the qemu package and virtualization enabled in your bios or uefi
for this guide. This guide is for those who want to run GNU Guix/Hurd without
using the Guix package manager or system. - Note GNU Guix is a very hungry
system because of its reproducible features. - Don’t expect this guide to work
perfectly. 1. Download the latest Guix System image from
https://guix.gnu.org/en/download/latest/
[https://guix.gnu.org/en/download/latest/]. 2. Convert the downloaded QCOW2
image into a raw disk image using qemu-img: qemu-img convert -O raw
/path/to/source.qcow2 /path/to/output.img (Replace /path/to/ with the desired
directory paths on your system.) 3. Resize the image to the amount of disk space
as desired. For example: qemu-img resize hurd-system.img 40G 4. Mount the image
and resize the main partition as desired. The gnome disks tool can be used for
this process, or any kind of partitioning software that supports raw images.
Resize the main partition to, as an example 30gb, and write your changes. 5.
Convert the image back to QCOW2 to save space on your computer(You wouldn’t want
a 40gb file laying around, would you?) qemu-img convert -O qcow2
/path/to/source.img /path/to/output.qcow2 (Replace /path/to/ with the desired
directory paths on your system.) 6. Virtualize it in qemu. Since this image is
32bit, we will use qemu-system-i386. In addition we will use 8G as 8gb of
memory, you can use 4G for 4gb of memory, but it will be much slower.
qemu-system-i386 -m 8G -smp 4 -enable-kvm -drive
file=hurdt.qcow2,format=qcow2,cache=writeback -net nic,model=rtl8139 -net user
7. Your setup is complete, but I will include this as a bonus step. When you are
at the login page just do login root and enter with no password. Edit: Do not
try to guix pull. During my tests, it was extremely slow, and the system crashes
when you are compiling something big like gcc. Even if you set the max jobs to
1, it still crashed in one of my tests. GNU Guix integrates well with the Hurd
so you can find documentation here
[https://guix.gnu.org/manual/1.5.0/en/html_node/index.html]


@provectus The easiest option to create a Hurd image with Guix is by running ‘guix system image -t hurd64-qcow2 config.scm’, where ‘config.scm’ contains an OS configuration for the Hurd 👇
https://guix.gnu.org/manual/devel/en/html/_node/Invoking-guix-system.html#index-image_002c-creating-disk-images
This cross-compiles the entire image contents, so you have to restrict yourself to packages that can be cross-built. A good starting point is:
https://codeberg.org/guix/guix/src/branch/master/gnu/system/examples/bare-hurd64.tmpl
The goal of this guide is for those who want to use GNU Guix/Hurd without using GNU Guix/Linux or the Guix package manager. I will try to add your info, though. Thanks.
@provectus Oh yes, that makes total sense, sorry for the misguided suggestion.
No problem at all. I edited the post just to prevent confusion. :-)