Applying manjaro update from TTY

Applying update from TTY. Thought it might be worth sharing.

1. Save and close all application.
2. Logout [Eg. In KDE press Ctrl + Alt + Del and then click logout]
3. Press Ctrl + alt + F2 and switch to TTY2. You can also try Ctrl + alt + F3 for TTY3 if required.
4. Login on TTY2
5. Run nmtui (Ncurses based network manager gui to connect to Lan / Wifi.)
6. Run sudo pacman-mirrors -f 5 (Update mirrorlist with 5 fastest up to date mirrors)
7. Run sudo pacman -Syyuw (First only download all packages to manage breaking change during package installation)
8. Run sudo pacman -Syu
9. Done with update, Run systemctl reboot

I never use force or assume “yes” to conflicts. whenever in doubt prefer searching for solution on manjaro forum

Credits : @snake2903 for step 6. Updating mirrorlist with fastest 5 up to date mirrors.

Original post

Also Read

12 Likes

As I already wrote in another thread, the best way to do an update in TTY is to boot into multi-user mode, by appending either a “3” or systemd.unit=multi-user.target to the kernel line.
Or, if you’ve already booted, type systemctl isolate multi-user.target.

Reason: by pressing Ctrl+Alt+F2 you switch to a TTY, but X (and the login manager) is still running in the background, so I fail to see the point of the first 4 steps. 5-9 are okay.

3 Likes

A noob question… Do I need to run this command as sudo?
:slight_smile:

I don’t think it’s necessary, at least on KDE, a window should pop up asking you for the password. If it doesn’t work, then yes, use sudo.

1 Like

OK, the next huge update I will do it correctly. Until now I used to do it from my session, but now I see that I was doing it wrong.

Thank you for the tip!! :grinning:

Remember that on some systems, networking (especially Wifi) doesn’t work in multi-user mode, it needs to be manually set up with nmtui as described in the first post.
But you can predownload the updates with pacman -Syuw, and then go to multi-user mode to do the actual update.

4 Likes

Yes, those are the steps that I’ve noted in my personal notes of Manjaro:

1.- From login screen enter to TTY2 and run the following commands.
2.- nmtui (and connect to my wifi)
3.- sudo pacman-mirrors -g
4.- sudo pacman -Syuw
5.- systemctl isolate multi-user.target (maybe I need sudo)
6.- sudo pacman -Syu
7.- systemctl reboot

I think that they are correct, aren’t they?
:slight_smile:

PD: @torvic After reading again your previous post I’ve rewritted my guide.

I’d say:

  1. sudo pacman-mirrors -g
  2. sudo pacman -Syuw
  3. systemctl isolate multi-user.target
  4. sudo pacman -Su
  5. reboot
2 Likes

Pointed in my notes, thank you very much!! :grinning:

I fail to see the point of the first 4 steps

Thanks for highlighting this.

the best way to do an update in TTY is to boot into multi-user mode, by appending either a “3” or systemd.unit=multi-user.target to the kernel line.

I shall rewrite First 4 points with steps to boot into multi user mode as suggested.

Switching to multi user mode from GUI by system isolation will not allow WIFI access. Only ethernet works.
Correct approach wud be to edit kernel command line and boot into multi user mode. This way user can connect to ethernet and WiFI and perform an update.

Given that I am upgrading over WiFI connection. There is one drawback to steps quoted above by @torvic ; when ever mesa is updated, which is a two step update process.

First only manjaro-system, arch keyring and manjaro keyring package is available as update which is downloaded with sudo pacman -Syuw and then we wud execute systemctl isolate multi-user.target henceforth upon login into TTY WIFI connection is lost and user can only connect to ethernet link. User with Wifi only will now end up with no internet.

If i run pacman -Su manjaro-system, arch keyring and manjaro keyring packags are installed wherein symlinks are deleted and then complete package update list is generated again.

Now new mesa package must be downloaded and applied but since we were downloading over wifi connection which is not available anymore due to systemctl isolate multi-user.target user wud have a broken system without GUI / X window System itself upon restart since partial upgrade was performed.

2 Likes

That’s right, but then you have to keep in mind that you don’t NEED to run the upgrade in multi-user target. That procedure dates back to the time where Arch recommended its users to update in pure terminal.
I did the last stable update in a Konsole in KDE. Not really a need to go through the lengths described here. Just don’t forget to reboot.

Regarding the “split” updates: You could also just do the first part of the update (manjaro-system, keyrings) in X, then download the rest and update in multi-user target.
As you said in your first post, you can always use nmtui/nmcli to configure your WiFi in that mode.

For split updates R u suggesting to logout and switch to TTY with Ctrl + alt + F2 for first part of the update (manjaro-system, keyrings) and continue remaining updates in konsole (GUI) (which i doubt wud work since symlinks for mesa are already deleted in first part so switching back to SDDM and login might not work.)

IMHO

Split updates involving mesa require upgrade in pure terminal only and user must complete the entire upgrade. For this as u suggested user must edit the kernel boot parameters in Grub menu and append/add either a “3” or systemd.unit=multi-user.target to the kernel line.

General upgrades which do not require mesa update if desired cud be done by logout and switching to TTY as explained in First Post on this thread.

No, that’s not what I meant :slight_smile:
I just wanted to say that it is not strictly necessary to do large Manjaro updates in TTY; I applied the recent, large update for the stable repo on two computers (KDE) just by running pacman -Syu in Konsole, then reboot.

As for the split updates, I haven’t done this recently, because it’s not recommended as you correctly wrote. It was just an idea I had how it could be done.

Forum kindly sponsored by Bytemark