Running Guix on the Gluglug X60

Preparation (USB)

      gpg --keyserver \
      --recv-keys "3CE464558A84FDC69DB40CFB090B11993D9AEBB5"
      gpg --verify gnu-usb-install-0.8.i686-linux.xz.sig \
      xz -d gnu-usb-install-0.8.i686-linux.xz
      sudo dd if=gnu-usb-install-0.8.i686-linux of=/dev/sdb

PLEASE NOTE: The above command depends on which virtual device your pendrive is associated with: replace /dev/sdb with the appropriate filename — but remember, we're not talking about mount locations here, but about the virtual device!

Preparation Target System


One of the trickiest bits for the Gluglug here is the use of Grub as BIOS. It means booting from the pendrive requires a little Grub magic.

Luckily it's easy once you know how to do it: Here's the solution:
      for x in (ahci0,*) ; do';
      for x in (usb0,*) ; do';


You'll be dropped to a root prompt (for me the last line was "Service nscd has been started"; hitting return got me the prompt).

Here you can use `parted' and mkfs/mkswap to make your partitions.

I created 3 partitions using parted (root, home and swap), and then used:

      mkfs.ext4 -L root $root/partition
      mkfs.ext4 -L home $home/partition
      mkswap -L swap $swap/partition

You can verify all looks OK using `parted -l' — though it won't show your labels.

      mount -L root /mnt/
      deco start cow-store /mnt

SUGGESTION: I ran into a problem where Guix did not set up my primary user account, with home on the separate home partition, correctly. My hunch is that this is due to me not having mounted the home partition whilst installing Guix further down. You may find you can avoid this problem by mounting your home partition now:

      mkdir /mnt/home
      mount -L home /mnt/home/

On the other hand, this is untested and may blow up your computer — use at your own discretion.

Defining Our New Operating System

We can now define the OS we want to end up with — the nice thing is that this can be an incremental process. We start with a simple config that uses our partitions as intended, and which creates some users.

Once we are running Guix, we can then make further adjustments to the template and activate those using `guix system reconfigure'.

      # Create the etc directory
      mkdir /mnt/etc/
      # copy the template
      cp /etc/configuration-template.scm /mnt/etc/sysconfig.scm
      # use zile (or nano) to edit the template
      zile /mnt/etc/sysconfig.scm

My template looks a little something like this:

;; This is an operating system configuration template.

(use-modules (gnu))

 (host-name "persephone")     ; change to whatever you want
 (timezone "Europe/Brussels") ; change to whatever you want
 (locale "en_GB.UTF-8")       ; change to whatever you want

 ;; In our installation, so far I've assumed sda as the target
 ;; disk. If this is not the case for you, change it!
 (bootloader (grub-configuration (device "/dev/sda")))
 ;; We labeled our partitions, so root is correct, and we simply add
 ;; the others.
 (file-systems (cons (file-system
                      (device "home")
                      (title 'label)
                      (mount-point "/home/")
                      (type "ext4"))
                     (cons (file-system
                            (device "root")
                            (title 'label)
                            (mount-point "/")
                            (type "ext4"))
 ;; We have created a swap partition as part of our partitioning — we
 ;; can list the correct partition here.
 (swap-devices '("/dev/sda2"))

 ;; This is where user accounts are specified.  The "root"
 ;; account is implicit, and is initially created with the
 ;; empty password.
 ;; We can also add our personal account!
 (users (list (user-account
               (name "alex")
               (comment "Primary User")
               (group "users")

               ;; Adding the account to the "wheel" group
               ;; makes it a sudoer.  Adding it to "audio"
               ;; and "video" allows the user to play sound
               ;; and access the webcam.
               (supplementary-groups '("wheel"
                                       "audio" "video"))
               (home-directory "/home/alex")))))

Getting the Network

For me the network devices were not listed under ifconfig, but they are listed under iwconfig — where I can also see the wireless device (though I haven't gotten that to work yet).

My wired device is listed as "enp1s0", so I can use dhclient to bring it up:

      dhclient enp1s0


And then there's the last part: simply run

      guix system init /mnt/etc/sysconfig.scm /mnt

and let Guix do it's thing. It will normally get the vast majority of data from hydra, so depending on your internet connection this may take a while. Alternatively you can disable substitutes, at which point all will be built locally (source packages would still be downloaded, and obviously building locally will take far longer).


Booting into Guix on the X60 with Grub as BIOS is also slightly uncomfortable: you'll get to the boot screen, but from there you'll have to "scan the internal disk for bootloaders" every time (this time you wont have to edit it as we are indeed booting from the internal hard drive).

I'm sure it is possible to setup BIOS Grub to do the right thing, but I haven't gotten around to that yet.

The first boot you'll have to log in as root (without password) — you can then set your primary user's password (`passwd $username'), and the root password.

For me, I was not able to log into my primary user as for some reason it's home directory had not been created. I imagine this is due to the fact that the home partition wasn't mounted at 'home' when Guix was doing it's installation — it is easily fixed by running `mkdir /home/$username' before logging in as the user though.

Next Steps

After installing you will probably want to familiarize yourself with the Guix way of doing things — and no doubt you'll want to change the above system configuration. Study the manual and come up with your tweaks.

Notes / TODO

In no particular order

Creative Commons Licence
This work by Alex Sassmannshausen is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License .