You are not logged in.

#1 2024-07-17 16:44:02

Gabachin
Member
Registered: 2022-05-06
Posts: 105

Confusing error when trying to fix a no-boot with chroot

I am running an XPS 15 i7 9th gen, wayfire/waybar, sddm on top of vanilla arch. I let three weeks go by without updating, so when I finally did, when I tried to log in with sddm, I got looped back to the login screen. I could not interrupt boot to get into a tty. So I booted an arch iso. mounted the partitions, and chrooted into my system. I updated the system, resintalled the kernel (zen), but alas, the problem persisted. I then did another chroot, with the idea of reinstalling wayfire. But the package is not in extra, and I can not build it from source, because I am root and am not allowed to run the appropiate commands. When I tried to install from the AUR, (using paru), I got a warning not to issue commands as root, which I ignored. When I then tried to install wayfire (or even wayfire-git) from the AUR, I got this message:

system has not been booted with systemd as init system (pid 1 can't operate)

I tried to RTFM, google around, but none of what I read seemed to relate to my issue.

I ended up installing hyprland with pacman, which executed fine. I then was able to boot hyprland when I rebooted my system, from which I reinstalled wayfire and then another reboot into wayfire worked.

My question is: what is the above error telling me? As far as I know, the iso was booted with systemd, and my system itself also boots with systemd.

Offline

#2 2024-07-17 16:59:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: Confusing error when trying to fix a no-boot with chroot

You can't use certain systemd commands within a chroot because your chrooted system does not have access to the systemd instance of the ISO. and when chrooting you aren't actually properly running a systemd session (of your installed system). The main issue that will have is that you can't run systemctl based enable/start commands directly. https://wiki.archlinux.org/title/Chroot#Usage -- note the note box.

FWIW the better approach instead of most of the things you did would be to simply boot into a multi-user.target and reinstall/rebuild wayfire from there.

Last edited by V1del (2024-07-17 17:00:15)

Offline

#3 2024-07-17 17:29:22

Gabachin
Member
Registered: 2022-05-06
Posts: 105

Re: Confusing error when trying to fix a no-boot with chroot

Makes sense. So I guess I did not RTFM closely enough!

To boot into the multi-user target, I would press 'e' when the grub boot menu appears and add a '3' to the linux line. But if the chrooted system does not have access to the target, how would this help? Or does multi-user mean that the chrooted system would also be recognized? In any case I am booting with systemd, not grub so what would the procedure be?

Last edited by Gabachin (2024-07-17 17:33:14)

Offline

#4 2024-07-17 18:42:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: Confusing error when trying to fix a no-boot with chroot

You'd not boot the ISO but your actual installation, but you'd bypass SDDM (or in fact if you get to SDDM use Ctrl+Alt+F2,F3... to switch to a VT so you can log into the TTY of your actual system.)  I doubt the old runlevels work still, the "proper" systemd way would be

systemd.unit=multi-user.target

-- see https://wiki.archlinux.org/title/Kernel_parameters for different ways depending on the bootloader.

Offline

#5 2024-07-17 18:49:40

Gabachin
Member
Registered: 2022-05-06
Posts: 105

Re: Confusing error when trying to fix a no-boot with chroot

Yes I tried that at first. Before the first chroot. But I could not get a tty before the sddm screen appeared nor after . That was my original issue. If I could have logged in from a tty I would know what to do. So assuming I cannot get to a tty, how would I solve the problem with the error I got in the chroot? Thanks for helping...

Last edited by Gabachin (2024-07-17 18:59:33)

Offline

#6 2024-07-17 19:05:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: Confusing error when trying to fix a no-boot with chroot

If the error was limited to wayfire I'd assume it to not have been generally fatal and a simple reboot should've allowed you to resume (this will have been about enabling some service, which will already be the case on the actual system). For properly building you could've su'ed to your own user after the chroot. But I don't see how wayfire would be related here... in which exact context did you get that message?

But really try switching to multi-user.target next time, potentially coupled with nomodeset that should get you to a TTY in most cases, you potentially depending on the GPU setup can't properly get to a VT depending on how SDDM inits the framebuffer. But that still sounds weird, what GPU do you have and in what way did switching VT not work? Do you have a custom agetty/login script that tries to launch something graphical regardless?

It's a bit weird and generally useless to try and surmise about the cause of  a situation you are not able to reproduce anymore.

Offline

#7 2024-07-17 19:39:02

Gabachin
Member
Registered: 2022-05-06
Posts: 105

Re: Confusing error when trying to fix a no-boot with chroot

I believe the problem was indeed wayfire. The flow was as follows: 1). I had forgotten to update. 2). So there were 350 updates to install when I did a pacman -Syu && paru -Syu. 3). on reboot, I got a loop to sddm. 4). I tried to ctl+alt+fn_ to get into a tty. No luck. 5). I chrooted as described above and updated the system, and reinstalled the kernel. Trying to access the AUR, I got the systemd error (which you explained). 6). pacman was working for me in the chroot, so I installed hyprland, 7). I booted into hyprland, and reinstalled wayfire (from source). 8). I rebooted into wayfire without issue.

"But really try switching to multi-user.target next time, potentially coupled with nomodeset that should get you to a TTY in most cases," Yes, this makes sense.

"Do you have a custom agetty/login script that tries to launch something graphical regardless?" No...at least, I do not think so. It is a plain sddm no frills.

"For properly building you could've su'ed to your own user after the chroot." It never ocurred to me to do this. But it makes sense!

Last edited by Gabachin (2024-07-17 19:53:22)

Offline

Board footer

Powered by FluxBB