DEV Community

Andrey Koppel
Andrey Koppel

Posted on

How I installed GuixSD on DigitalOcean

Hi. Guix a functional package management tool. It can be used either on top of existing Linux distribution or as a part of Guix System Distribution (GuixSD). Which is quite interesting project for many reasons. DigitalOcean is a development cloud (DO for short).

In this post I'm going to share what I did to install GuixSD on DO. I'm very new to Linux thus I got some issues on the way and I'd like to get some help in order to solve them.

DO does not have GuixSD as available distribution. Thus there are two options how to install GuixSD.


Convert existing Linux distribution to GuixSD

However I got some issues on the last steps maybe because the post is from 2017 and things have changed, maybe there is other reason. Another thing is that it requires more knowledge about existing distribution to clean up after conversion. And being a noob in this area I decided to install GuixSD system from scratch.


Install GuixSD on DO from scratch

Reformat system installer

Guix provide a compressed ISO with system installer. DO has an option to upload custom image. It supports various formats but not ISO. Thus the first thing to do is to reformat installer image to a format which DO supports. I had VirtualBox installed already so I used it to convert the image.

# Download GuixSD installer
wget https://ftp.gnu.org/gnu/guix/guix-system-install-1.0.1.x86_64-linux.iso.xz

# Uncompress ISO
xz -d guix-system-install-1.0.1.x86_64-linux.iso.xz

# Convert ISO to VDI
vboxmanage convertfromraw guix-system-install-1.0.1.x86_64-linux.iso guix-system-install-1.0.1.x86_64-linux.vdi

Create DO droplet and install Guix system

Next step is to upload image to DO and create droplet from it.

When creating droplet DO provides /dev/vda as a main disk. DO boots the machine with installer stored in /dev/vda disk. When I followed installation instructions I was unable to reformat /dev/vda due to it being used by the system. I tried to check what part of the system exactly uses it, but could not find. There were no partitions/disks mounted, etc.. So this is one part which I'd like to understand if it's possible to reformat the disk which stores operation system and if yes how can I find out how it's used by the system.

The next thing I tried is to add additional volume and install Guix system on it.

When adding additional volumes DO provides /dev/sdX disks. Following installation instructions I was able to easily install GuixSD on /dev/sda disk. I created 3 partitions one for Bios boot (1M), one for Linux swap (8G) and one for Linux filesystem (the rest). I used bare bone system configuration to initialize GuixSD system.

Booting GuixSD

The next thing was to boot installed GuixSD.

As I understood DO uses /dev/vda as a disk to boot system from. So after previous step I got 2 disks one with installer and one with GuixSD installed. Probably it would be possible to instruct DO to boot from additional volume with GuixSd but that would mean I had to carry installer along the way. What I did is I cloned /dev/sda disk to /dev/vda disk with following command (keep in mind that size of the volume should match the size of the droplet disk).

dd if=/dev/sda of=/dev/vda bs=64M conv=sync,noerror status=progress

After reboot I was able to boot GuixSD from /dev/vda disk.


Conclusion

In the end it was a successful experiment though it felt like a workaround. I would like to know what I missed and if there is an easier way to install clean GuixSD on DO.

Thank you.

Top comments (0)