.. _pureos_troubleshooting_system: System ====== .. _pureos_troubleshooting_system_sudo_permissions: Cannot run commands as sudo --------------------------- **Problem** You receive the following error when trying to sudo run a command: .. warning:: 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: #. Open Terminal app and log into root session with: .. code-block:: bash su #. Enter your password once prompted. #. Run the following command: .. code-block:: bash usermod -a -G sudo username ...where ``username`` is your login name (username). #. Log out and then log back in. You can now run commands using ``sudo``. .. _pureos_troubleshooting_system_update_certificate_expired: 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. .. _pureos_troubleshooting_system_upgrade_failure: Fixing a failed/partial system upgrade -------------------------------------- **Problem 1** The system **can** boot but GNOME does not start. **Solution** #. Press ``Ctrl+Alt+F2`` to open another virtual terminal. You will see this screen: .. code-block:: PureOS GNU/Linux librem14 tty2 librem14 login: #. Login by entering your username (press **Enter** afterwards), then enter your password (press **Enter** to login): .. code-block:: PureOS GNU/Linux librem14 tty2 librem14 login: pureos Password: #. You are now logged in and you should see something like this: .. code-block:: 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:~$ #. Type in the following command and press **Enter**, then enter your password and press **Enter**: .. code-block:: bash sudo dpkg --configure -a` .. code-block:: 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: _ #. When the above command finishes, run the :ref:`command to upgrade your system again `: .. code-block:: bash sudo apt update && sudo apt full-upgrade #. Re-install the ``pureos-gnome`` package: .. code-block:: bash 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** #. Restart your computer, then wait until BIOS/Coreboot messages disappear and immediately press **ESC** to enter the boot loader menu. #. Using the UP and DOWN arrow keys in the keyboard to navigate, select the **Advanced Options** menu item and press **Enter**. #. Select one of the older kernel options from the list (lower on the list) and press **Enter** to boot it. #. If you manage to boot into graphical interface, open your terminal and run: .. code-block:: bash sudo update-initramfs -u #. Restart the system to see if it will boot normally. .. _pureos_troubleshooting_system_slow_boot: 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: .. code-block:: bash systemd-analyze It will output something like this: .. code-block:: 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: .. code-block:: bash systemd-analyze blame which should give: .. image:: ../img/sstd2.png :scale: 50% :alt: 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: .. code-block:: bash 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: .. code-block:: bash sudo journalctl -x -b -u NetworkManager-wait-online.service will list logs just for this service, while running: .. code-block:: bash 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. .. _pureos_troubleshooting_system_failed_boot: 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 :ref:`pureos_troubleshooting_system_upgrade_failure` for a solution. .. _pureos_troubleshooting_system_cryptsetup_deprecated: 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** #. Add ``CRYPTSETUP=y`` in ``/etc/cryptsetup-initramfs/conf-hook`` using the following command: .. code-block:: bash sudo sh -c 'echo "CRYPTSETUP=y" >> /etc/cryptsetup-initramfs/conf-hook' .. _pureos_troubleshooting_system_forgotten_passwd: Forgotten user password ----------------------- **Problem** You have forgotten your user password. **Solution** Reset your user password. #. 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: ``Options`` → ``Boot options`` → ``Show 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: .. code-block:: 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): #. Press ``Enter``. #. You will get into a terminal session. Type: .. code-block:: passwd USERNAME ...where ``USERNAME`` is your username (NOT your full name). If you forgot your username, type: .. code-block:: ls /home ...which will show your home folder. Its path contains your username. #. Type the new password and press ``Enter``. #. Type it again to confirm and press ``Enter``. #. Type: .. code-block:: systemctl reboot ...and press ``Enter`` to reboot. Proceed as usual.