GuixSD

An experience with the GNU operating system

For real-time support from the community, you can connect to the #guix channel on irc.freenode.net. There you can get help about anything related to both the Guix System Distribution and GNU Guix.

How I installed GuixSD on an hp ProBook 6460b (requiring a Wireless USB Adapter for GNU/Linux-libre)

This document is under GNU Free Documentation License. Indeed, the following handbook borrows a number of procedures from the official documentation.

Copyright (C) 2018 Hubert Lombard.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 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''.

https://www.gnu.org/software/guix/manual/html_node/GNU-Free-Documentation-License.html

Monday, February 19th 2018

I succeeded the (classic) installation of GuixSD on a Laptop hp ProBook 6460b (without worrying about GPT or EFI).

At first, I have downloaded GuixSD, the GNU Guix Software Distribution:

https://www.gnu.org/software/guix/download/

Boot from 'guixsd-install-0.14.0.x86_64-linux.iso' DVD burning.

Sources manual:

https://www.gnu.org/software/guix/manual/html_node/Preparing-for-Installation.html#Preparing-for-Installation

The installation image uses the US qwerty keyboard layout. If I want to change it, I can use the loadkeys command. For example, the following command selects the fr keyboard layout:

# loadkeys fr

I will not address the issue of Wi-Fi here, since my card does not have a free firmware. To have Wi-Fi, see below:

https://www.gnu.org/software/guix/manual/html_node/Preparing-for-Installation.html#Networking

My wifi card requires the use of a non-free firmware (Broadcom Limited BCM4313 802.11bgn Wireless Network Adapter).

Decide to order a usb wifi card Technoethical N150 Mini Wireless USB Adapter for GNU/Linux-libre at:

https://tehnoetic.com/adapters/tehnoetic-wireless-adapter-gnu-linux-libre-tet-n150

In the meantime, I run the following command see what my network interfaces are called:

# ifconfig -a

Wired interfaces have a name starting with ‘e’; for example, the interface corresponding to the first on-board Ethernet controller is called ‘eno1’.

# ifconfig enp0s25 up

At this point, I need to acquire an IP address. On a network where IP addresses are automatically assigned via DHCP, I can run:

# dhclient -v enp0s25

Try to ping a server to see if networking is up and running:

# ping -c 3 gnu.org
PING gnu.org (208.118.235.148): 56 data bytes
64 bytes from 208.118.235.148: icmp_seq=0 ttl=51 time=138.917 ms
64 bytes from 208.118.235.148: icmp_seq=1 ttl=51 time=139.388 ms
64 bytes from 208.118.235.148: icmp_seq=2 ttl=51 time=138.998 ms
--- gnu.org ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 138.917/139.101/139.388/0.206 ms

Disk Partitioning

GPT or EFI: The tests I have done in virtual machines have not been very conclusive, I do not know too much about the subject. If you want to use GPT or EFI, please refer to the documentation:

https://www.gnu.org/software/guix/manual/html_node/Preparing-for-Installation.html#Disk-Partitioning

In my case, knowing that I will not have to worry about this question, here we go:

# cfdisk
Device     Boot     Start     End         Sectors    Size   Id Type
/dev/sda1            2048    479995903   479993856  228.9G  83 Linux
/dev/sda2       479995904    488397167     8401264      4G  82 Linux swap

(At this point, I did not think about the partition bootable * option). Concerning your own installation, it's better to enable the boot option now, (in my case, it should have been on /dev/sda1).

Preferably, assigning file systems a label so that I can easily and reliably refer to them in file-system declarations (see File Systems). This is typically done using the -L option of mkfs.ext4 and related commands. So, assuming the target root partition lives at /dev/sda1, a file system with the label my-root can be created with:

# mkfs.ext4 -L my-root /dev/sda1

Mount the target file system under /mnt with a command like (again, assuming my-root is the label of the root file system):

# mount LABEL=my-root /mnt

Assuming I have one swap partition on /dev/sda2, I ran:


# mkswap /dev/sda2
# swapon /dev/sda2

Proceeding with the Installation

With the target partitions ready and the target root mounted on /mnt, I'm ready to go. First:

# herd start cow-store /mnt

This makes /gnu/store copy-on-write, such that packages added to it during the installation phase are written to the target disk on /mnt rather than kept in memory. This is necessary because the first phase of the guix system init command (see below) entails downloads or builds to /gnu/store which, initially, is an in-memory file system.

Creating the System configuration directory:

# mkdir /mnt/etc

Creating the next (empty for now) configuration file:

# touch /etc/configuration/perso.scm

Note: you can also edit an existing file already in /etc/configuration (for example 'desktop.scm', or 'bare-bones.scm' and modify it as you wish.)

To adapt the configuration of the computer to my needs, I use vi, knowing only this one:

# vi /etc/configuration/perso.scm
_____________________________________________________________

;; This is an operating system configuration template
;; for a "desktop" setup, without full-blown desktop
;; environments. "host-name" is my own laptop.

(use-modules (gnu) (gnu system nss))
(use-service-modules desktop)
(use-package-modules bootloaders certs ratpoison suckless wm)

(operating-system
  (host-name "lxx-xxx-xx-xx-xxx-xxx-xx6")
  (timezone "Europe/Paris")
  (locale "en_US.utf8")

  ;; Assuming /dev/sda is the target hard disk, and "my-root" is
  ;; the label of the target root file system.
  (bootloader (grub-configuration (target "/dev/sda")))
  (file-systems (cons (file-system
                       (device "my-root")
                       (title 'label)
                       (mount-point "/")
                       (type "ext4"))
                      %base-file-systems))

  (swap-devices '("/dev/sda2"))

  (users (cons (user-account
                (name "hubert")
                (comment "Cathy's brother")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/hubert"))
               %base-user-accounts))

  ;; Add a bunch of window managers; we can choose one at
  ;; the log-in screen with F1.
  (packages (cons* ratpoison i3-wm i3status dmenu ;window managers
                   nss-certs                      ;for HTTPS access
                   %base-packages))

  ;; Use the "desktop" services, which include the X11
  ;; log-in service, networking with Wicd, and more.
  (services %desktop-services)

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))
____________________________________________________________________

Copy of this file renamed 'config.scm' to '/mnt/etc'

# cp /etc/configuration/perso.scm /mnt/etc/config.scm

Once I am done preparing the configuration file, the new system must be initialized (remember that the target root file system is mounted under /mnt):

# guix system init /mnt/etc/config.scm /mnt

This copies all the necessary files and installs GRUB on /dev/sda, unless you pass the --no-bootloader option. For more information, see Invoking guix system.

This command may trigger downloads or builds of missing packages, which can take some time.

It seemed to be going well, though:

"Some deprecated features have been used...

There were also 3 ou 4 "collision encountered"

.......no-login
                                               .......ifconfig

A dozen lines concerning X11, desktop, keyboard...etc.

....................................................................
file not found................................./X11/................
file not found...................................../desktop.........
....................................................................

Copy on /mnt [#####################################################]

Installation is finished, I can...

# reboot

After the reboot, a message like this: "No Operating System installed, please install on hard disk"

I managed to get started thanks to superdisk grub2 that I had burned to a CD \o/

https://www.supergrubdisk.org/category/download/supergrub2diskdownload/

After inserting the superdisk grub2 CD, I ended up finding the existence of this line:

gnu linux-libre

I validated and GuixSD started \(^o^)/

It looks like superdisk grub2 has restored grub...? (i've also made toggle bootable flag with cfdisk, a detail passed unnoticed during the partitioning step).

It looks like it now :

# cfdisk
Device     Boot     Start     End         Sectors    Size   Id Type
/dev/sda1    *       2048    479995903   479993856  228.9G  83 Linux
/dev/sda2       479995904    488397167     8401264      4G  82 Linux swap

Startup is now autonomous; I do not know whether to say thank you Superdisk grub2 or cfdisk for this restore boot, anyway the installation is a success.

Ctrl-Alt-F2 to switch to console. root is empty. After giving a password to me (for me the end user),

# passwd hubert
New password:
Retype new password:
passwd: password updated successfully

...the user that I am can now log-in with my user account.

Choice 'i3': a minimal desktop. the mouse is OK.

Choice 'ratpoison' : "can't logging in..." No mouse, nothing...

From console, Alt-F7 is used to switch to X11.

Ctrl-Alt-F2 and go for exploration!

A field of possibilities finally seems to be unveiled ;)

To see the next about installing xfce, GNOME, ssh and more:

https://www.hubert-lombard.website/GuixSD/html/user-session-configs.html

Copyright (C) 2018 Hubert Lombard.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 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''.

https://www.gnu.org/software/guix/manual/html_node/GNU-Free-Documentation-License.html