How do I do a system upgrade "within a tty"?

faq
upgrade
tty
#1

Sometime, it can happen that Manjaro developers recommend, because of specific circumstances, to do a system upgrade “within a tty.” This guide aims to help you to apply the recommendation successfully and as easily as possible. There are pictures so you can see what it looks like before actually doing it yourself.

What does “within a tty” actually mean?

It means to do the system upgrade in a pure command line interface (CLI), outside of your graphical environment.

How do I do a system upgrade “within a tty”?

In a nutshell

  • CTRL+ALT+F4
  • Log in
  • sudo pacman -Syu
  • systemctl reboot

In detail
The first thing to do is accessing a pure command line interface. The method to use is more or less the same on every Manjaro edition.

  • General: Press CTRL + ALT + F2, F3, F4, F5 or F6.
  • GNOME: Press CTRL + ALT + F3…F6.

(Note: On some laptops, you might have to press the Fn key too.)

If it is done correctly, you should end up in a black screen like this.

1

Enter your credentials (username + password) like if you were in your regular, graphical login screen in order to log in. Once it is done, you should have a prompt.

2

Now, you can use any commands that you want like if you were in a terminal emulator. You may do a system upgrade with the sudo pacman -Syu command (or equivalent, although check in the official announcement beforehand if there’s a particular recommendation from Manjaro developers in that regard).

You may try to return into your graphical session if you want (CTRL + ALT + F7 for most editions, CTRL + ALT + F2 for GNOME), but you might prefer to reboot your system immediately instead. To do so, use the following command: systemctl reboot.

Why such a recommendation?

This recommendation is mentioned in the official announcement. In general, it is a good practice to read the announcement and also the “Known issues and solutions” post in addition before upgrading your system in every case.

This recommendation is issued when there’s a risk that the graphical session crashes during the upgrade. If that happens while you are either using a graphical package manager OR a CLI package manager that has been run in a terminal emulator, it means that the package manager will crash too, thus stopping the upgrade abruptly. A package manager that stops functioning in the middle of a system upgrade is extremely bad, and your system will most likely need to be repaired if it happens to you.

  • You will be in a partial upgrade situation. At best, some unimportant software will stop to work until your system is repaired properly; at worst, it will make your system completely unbootable.
  • It may corrupt your local package database that stores all the information about packages currently installed on your system, which can cause trouble with package management later. (Error: could not open file /var/lib/pacman/local/[…]/desc: No such file or directory)

By doing the system upgrade outside of the graphical session when it is recommended by Manjaro developers, you avoid this particular risk, thus increasing your chances of doing the system upgrade smoothly.

If you want to go further…

…you may want to do change your runlevel in order to reduce the risk even more by switching to a more minimal runlevel that doesn’t launch any graphical session at all. To do so, change your current runlevel with the systemctl isolate multi-user.target command. Once it is done, you can log in and do your system upgrade. For more information, see the following articles: https://wiki.archlinux.org/index.php/Systemd#Targets .

Note that changing your runlevel temporarily is generally simply overkill: just switching to a pure command line interface should be more than enough.

23 Likes
Manjaro crashed mid-update, and now can't access the computer
Best way to update: pamac or in terminal pacman?
Does it matter if I use an older Live USB to install Manjaro?
[Stable Update] 2019-03-29 - Kernels, Gnome, LibreOffice, Mesa, Budgie, Browsers, Qt
Black screen DURING first update on a new install, corrupts everything
Slow Network and high latency
[SOLVED] How to remove cinnamon?
Boot problem
2 fails on Manjaro XFCE boot (failed to start LightDM)
Failed to map image memory on new install
Whats all these warrnings?
[Stable Update i686] 2019-05-12 - BIG update, ICU rebuilds, KDE, LibreOffice
Stuck on Firefox 56.0.1. Please help me update