System

Cannot run commands as sudo

Problem

You receive the following error when trying to sudo run a command:

Warning

<USERNAME> is not in the sudoers file. This incident will be reported

Solution

To add your username to sudoers list, add your username to sudo group:

  1. Open Terminal app and log into root session with:

    su
    
  2. Enter your password once prompted.

  3. Run the following command:

    usermod -a -G sudo username
    

    …where username is your login name (username).

  4. Log out and then log back in.

You can now run commands using sudo.

System upgrade error due to expired certificate

Problem

The system is displaying a “Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification.” error.

Cause

The system date and time may be incorrect.

Solution

Manually adjust the system date and time, making sure the time zone is correct as well.

Fixing a failed/partial system upgrade

Problem 1

The system can boot but GNOME does not start.

Solution

  1. Press Ctrl+Alt+F2 to open another virtual terminal. You will see this screen:

    PureOS GNU/Linux librem14 tty2
    
    librem14 login:
    
  2. Login by entering your username (press Enter afterwards), then enter your password (press Enter to login):

    PureOS GNU/Linux librem14 tty2
    
    librem14 login: pureos
    Password:
    
  3. You are now logged in and you should see something like this:

    PureOS GNU/Linux librem14 tty2
    
    librem14 login: pureos
    Password:
    Last login: Mon Apr  2 19:00:45 CEST 2018 on tty1
    Linux librem14 4.15.0-2-amd64 #1 SMP Debian 4.15.11-1 (2018-03-20) x86_64
    
    The programs included with the PureOS GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    PureOS GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    pureos@librem14:~$
    
  4. Type in the following command and press Enter, then enter your password and press Enter:

    sudo dpkg --configure -a`
    
    PureOS GNU/Linux librem14 tty2
    
    librem14 login: pureos
    Password:
    Last login: Mon Apr  2 19:00:45 CEST 2018 on tty1
    Linux librem14 4.15.0-2-amd64 #1 SMP Debian 4.15.11-1 (2018-03-20) x86_64
    
    The programs included with the PureOS GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    PureOS GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    pureos@librem14:~$ sudo dpkg --configure -a
    [sudo] password for pureos: _
    
  5. When the above command finishes, run the command to upgrade your system again:

    sudo apt update && sudo apt full-upgrade
    
  6. Re-install the pureos-gnome package:

    sudo apt-get install pureos-gnome
    

Problem 2

The system cannot boot at all. Only a black screen is shown after the disk is unlocked.

Solution

  1. Restart your computer, then wait until BIOS/Coreboot messages disappear and immediately press ESC to enter the boot loader menu.

  2. Using the UP and DOWN arrow keys in the keyboard to navigate, select the Advanced Options menu item and press Enter.

  3. Select one of the older kernel options from the list (lower on the list) and press Enter to boot it.

  4. If you manage to boot into graphical interface, open your terminal and run:

    sudo update-initramfs -u
    
  5. Restart the system to see if it will boot normally.

Slow system startup

Problem

The system takes several minutes to start, but eventually it does get to the graphical user interface.

Check

You can check how much time the system exactly needed to start if you run this command in terminal:

systemd-analyze

It will output something like this:

mladen@librem13:~$ systemd-analyze
Startup finished in 3.517s (kernel) + 21.498s (userspace) = 25.015s
graphical.target reached after 21.490s in userspace
mladen@librem13:~$

To see how long each of the services took to start, run:

systemd-analyze blame

which should give:

Terminal output for systemd-analyze blame

Use the UP and DOWN arrow keys on your keyboard to scroll the output. Press the q key to exit the command.

To output this into a text file, use:

systemd-analyze blame > startup.log

which will create a startup.log text file in the directory you are currently in.

Solution

If you see some service took suspiciously longer time to start, you have to search the system logs to see if there is any particular problem. For example, running:

sudo journalctl -x -b -u NetworkManager-wait-online.service

will list logs just for this service, while running:

sudo journalctl -x -b

will allow you to examine all logs for the current boot session to see if there is any particular problem causing the slow system start.

Failed boot

Problem

The system is not booting.. It hangs after successful unlock of the disk encryption, and the Purism logo is displayed. Pressing the ESC key only shows a black screen with cryptsetup (sda5_crypt): set up successfully in the upper left corner.

Cause

This can happen when the system upgrade was interrupted or otherwise unsuccessful. Please see Fixing a failed/partial system upgrade for a solution.

Cryptsetup setting deprecated

Problem

The following warning is displayed in a terminal emulator following a system update:

Warning

Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead.

Solution

  1. Add CRYPTSETUP=y in /etc/cryptsetup-initramfs/conf-hook using the following command:

sudo sh -c 'echo "CRYPTSETUP=y" >> /etc/cryptsetup-initramfs/conf-hook'

Forgotten user password

Problem

You have forgotten your user password.

Solution

Reset your user password.

  1. Boot PureOS in recovery mode.

    Note

    If you are using PureBoot, it is quite simple to enter to a recovery mode. From the main menu, select: OptionsBoot optionsShow OS boot menu → select “recovery” mode to boot (don’t make it default).

    You will be asked to enter your disk password, type it in and press Enter. You will see this text:

    You are in rescue mode. After logging in, type "journalctl -xb" to view
    system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
    to boot into default mode.
    Press Enter for maintenance
    (or press Control-D to continue):
    
  2. Press Enter.

  3. You will get into a terminal session. Type:

    passwd USERNAME
    

    …where USERNAME is your username (NOT your full name). If you forgot your username, type:

    ls /home
    

    …which will show your home folder. Its path contains your username.

  4. Type the new password and press Enter.

  5. Type it again to confirm and press Enter.

  6. Type:

    systemctl reboot
    

    …and press Enter to reboot. Proceed as usual.