Alpine Linux

Notes and observations for setting up and maintaining systems.

3.16 Desktop setup

With the release of 3.16.0 came new tools, setup-desktop and setup-user, which prepare the system to be used graphically and by a non-root user. I noticed some weirdness the first time I tried, so I'm documenting my efforts to reproduce here in an attempt to aid eventual bug reports.

Sony Vaio VGN-P11Z/Q

Main page for this device

This was the machine I first attempted this on, and where I noticed some issues. This machine is a 32-bit-only Intel Atom Z520 system, with an InsydeH2O “UEFI Ready BIOS”, with 2GB of RAM. I used the alpine-3.16.0-extended-x86.iso image.

From boot, I ran setup-alpine as root, and did the following:

  • Set keymap to gb gb-intl
  • Set the hostname
  • Set wlan0 as my interface
    • It was here that I noticed it didn't request my WiFi password after I'd input my SSID, so once it set up wpa_supplicant, I exited and reconfigured wpa_supplicant.conf, replacing key_mgmt=“NONE” with psk=“my psk”. I then restarted setup, choosing none instead of configuring an interface.
  • Declined to do any manual network configuration
  • Set the root password
  • Set the timezone to Europe/London
  • Declined to set a proxy
  • Set the APK mirror to the first in the list, dl-cdn.alpinelinux.org
  • Set up a user with username maff, accepting the default full name of maff, with a password, no SSH key
  • Selected openssh as the SSH server
  • Selected sda as the disk to use as sys, and confirming when prompted that I'd like to wipe the drive

After installation completed, I rebooted.

On first boot of the installed system, I logged in as root and immediately ran setup-desktop. I selected xfce and rebooted once it was complete.

After rebooting and being presented with the lightdm login screen, I attempted to log in as the unprivileged user maff I had created, however the X server simply exited and restarted, and I was again presented with the login screen.

I switched to tty1 and began tailing all available log files, then switched back to tty7 and attempted a login again. Switching back to tty1, I discovered two things:

  • Linux Kernel releases after 5.9 no longer support fbcon/vgacon scrolling via shift-page{up,down}, because apparently there's never in the modern world a case where you'd have access only to a framebuffer or VGA console and need to view many lines of text on screen within a very minimal system. I guess Linux from Scratch just got harder. I worked around this careless decision by piping my tail command into less, which worked but scrolling one single line up or down took a full calendar second to happen.
  • /lib/security/pam_elogind.so failed to be loaded, and so the login fails.
    • This later turned out not to be the problem, although I feel as though elogind being configured in lightdm but not installed is probably a bug in and of itself.

I installed elogind after verifying that package was the source for the missing file, and attempted to log in again, however I found logins were still failing. At this point, I noticed that the session was starting, and errors were to be logged to an .xsession-errors file, but find / -name .xsession-errors turned up bupkis. I assumed this file might simply have a discriminator at the end of the name after the X server exits, so I went to look in /home/maff to see, but lo, /home was barren.

I created /home/maff and set ownership on it correctly, then attempted to log in graphically again, and this time I was able to.

QEMU VM with i686 processor, 2GB Memory, 8GB HDD, no UEFI, booting alpine-3.16.0-standard-x86.iso

Following the exact sequence of events as above, I replicated all issues I observed on the Vaio, with the exception of WiFi because I wasn't in the mood to emulate a wifi adaptor.

This time around, I created /home/maff before attempting to install elogind, and found that logins succeed without elogind being installed. I'm not sure what purpose elogind actually serves in this case, but an error is still logged about it, so either the setup-desktop script should install elogind, or lightdm should not be configured to load it.

QEMU VM with x64 processor, 2GB Memory, 8GB HDD, UEFI, booting alpine-3.16.0-standard-x86_64.iso

I followed the exact same steps again, however this time I noticed that after specifying that I wanted to use /dev/sda as a 'sys' volume, the error /sbin/setup-disk: line 1599: [ -z: not found was printed. Installation nonetheless completed without issue.

I observed that again I couldn't log in, and I again created the /home/maff directory without installing elogind, confirming that it worked.

QEMU VM with i686 processor, 2GB Memory, 8GB HDD, no UEFI, booting alpine-3.16.0-extended-x86.iso

This process was identical to using the 'standard' ISO, including all observed issues.

QEMU VM with x64 processor, 2GB Memory, 8GB HDD, UEFI, booting alpine-3.16.0-extended-x86_64.iso

This process was identical to using the 'standard' ISO, including all observed issues.

3.16 Bug reports

setup-user does not create user's home directory

setup-desktop does not install elogind (possibly intentional, but..)

setup-disk syntax error on line 1599 when booted via UEFI (looking at the code I don't actually see why it's a syntax error but the specific error is that it's trying to execute [ -z as a command, so maybe there's a weird unicode space or something)

Navigation
  • Home