Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Login request in TTY shows 3 times at bootup after migrating from Runit to S6 (Read 1061 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Hello, I've installed Artix with Runit, and then tried to migrate from Runit to S6, my migration was somewhat successful, as it seems that everything after trying to boot up works flawlessly. Though, the problem is that when I boot up, now it asks me to log-in, then screen clears, and asks me to log-in again, then stays for a while, and then sends some weird text about errors opening up some folders in my home directory. After that, it asks for me to log-in the 3rd time, and by then seems completely normal. Attempting to log-in at any of the 2 stages before the 3rd one does not work.

Also, sorry for the wrong category, I've just seen this and thought I should post this here, I'm unaware of how to delete posts or change which category they're in.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #1
Showing up 2 times is actually normal. The very first getty is launched by s6-linux-init. This is used as an emergency fallback in case something goes wrong with s6-rc. During the bootup process, agetty-tty1 gets launched and the early getty in tty1 is brought down. I suspect the 3rd time isn't actually a new getty process but modesetting kicking in or something which clears the screen. If you could post the error messages you see here, it may shed some light. They should be in /run/uncaught-logs/current

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #2
Ah. I see. Here's the logs: https://0x0.st/-pJl.txt

I'd have expected the emergency fallback to be a little bit more seamless, but now it makes much more sense, thank you.

 

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #3
Yeah it's admittedly not the prettiest thing out there, but the fallback has been immensely useful for me when I break something. Perhaps I should change the hostname of the early getty service to make it clearer what it is (user@fallback-getty or something).

As for your log, I see a couple of things. First of all, all of that hdparm output shouldn't be happening. And indeed, checking the script reveals some obvious errors on my part (oops). I just pushed what should be a fixed version to testing/gremlins. The second part appears to be libvirt. Do those directories actually exist on your machine and libvirt is just starting too early? If so, I can just make the service wait until filesystems are mounted and that should resolve those messages. I suppose I should make it wait on modules-load too since it expects the tun module.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #4
Perhaps I should change the hostname of the early getty service to make it clearer what it is (user@fallback-getty or something).

That makes more sense.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #5
Yeah, I mean, it is a bit confusing, and I do know that (though I may be very wrong here) you probably could make it a bit more seamlesss somehow, by making it appear as just one TTY, whether it fails or not, but I'm really unsure. Either way, it isn't too bad right now, I think it's pretty good.

I have added the gremlins repository and gotten the new hdparm-s6 package, so I'll test it out. Regarding libvirt, every directory it thinks doesn't exist *does* exist, except ``/dev/net/tun``.  I believe it does load way too early, as I have my home on another partition. Thank you again.

Anyways, after getting the hdparm-s6 package, then rebooting; I get mostly the same problem but a bit more confusing, but it is describable as generally the same as my first issue. First, it launches what I think is the emergency fallback TTY, then there's a longer-than-normal pause until the 2nd TTY, which my libvirt problems happen in, but also, when I log-in, it just didn't mount my home folder. After logging in, mounting my home directory, I get the 3rd TTY. Which, when I log-in to, everything seems good.
Here are the logs for this boot: https://0x0.st/-pg4.txt

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #6
Probably what I will do is just move the early getty somewhere else like tty7. Normally, it's not something that should be used anyway. It's just in case you do something bad like delete all your s6-rc databases or something terrible like that. I guess I just need to double check to make sure it doesn't mess up sddm/lightdm or something.

According to your logs, hdparm should be good now so I moved that to core. Thanks.

Anyways, after getting the hdparm-s6 package, then rebooting; I get mostly the same problem but a bit more confusing, but it is describable as generally the same as my first issue. First, it launches what I think is the emergency fallback TTY, then there's a longer-than-normal pause until the 2nd TTY, which my libvirt problems happen in, but also, when I log-in, it just didn't mount my home folder. After logging in, mounting my home directory, I get the 3rd TTY. Which, when I log-in to, everything seems good.
Here are the logs for this boot: https://0x0.st/-pg4.txt

Now this part sounds a bit unusual. I think what may be happening here is that your 1st and 2nd TTY are actually the same fallback one. udev settle or something takes a really long time on your machine and you're actually able to login to emergency getty before filesystems are even mounted. This might sound silly but have you tried just waiting a while before logging in? Normally your screen should flicker once or twice after modesetting kicks in and it should be okay to log in then.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #7
Yes, I have tried waiting a while to log-in, and it does pretty good if I do that; my main problem for why I posted this in here though is that I believe having to wait such a long time to log-in/having to wait through 2 TTYs until I have the ability to log-in on the third one is a bit weird.

Anyways, about the libvirt thing, is there any way to fix it so that it loads well? Because some libvirt issues are still showing on the 2nd TTY.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #8
No, you're right it's a bit weird. On my machine, the time between gettys are instant but there's no guarantee it's that quick for everyone. I will move the early/fallback getty in s6-linux-init to tty7 so it's more intuitive.

Anyways, about the libvirt thing, is there any way to fix it so that it loads well? Because some libvirt issues are still showing on the 2nd TTY.

I guess it needs to wait on mount-filesystems. It should get rid of that error. I don't recall libvirt showing any messages like that for myself, but I'll double check that later.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #9
No, you're right it's a bit weird. On my machine, the time between gettys are instant but there's no guarantee it's that quick for everyone. I will move the early/fallback getty in s6-linux-init to tty7 so it's more intuitive.

Maybe the reason is because I'm using an HDD? It's also not really a particularly good one, as there are some dead blocks on it; but it isn't really too corrupted, as it functions pretty well. Though, I do plan on buying a new one, or a solid state drive. Thank you very much for helping.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #10
I reworked the libvirtd service. Now it integrates with s6-log (previously it didn't) so you should see logs at /var/log/libvirtd now (they're pretty noisy). libvirtd itself depends on both modules (so you can autostart tun) and mount-filesystems now. I think that should get rid of those errors for you. The tty thing needs to work its way through our backend since I have to change some alpm hooks and stuff for that.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #11
Alright, thank you very much! Also, one more question, is it favoured for me to create a new thread for other questions regarding s6, or is it alright to ask them in one, if they were just asking how to do things and such?

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #12
Be sure to check the s6 wiki entry if you haven't already. But feel free to make a new thread if it's something else that's not related to this one.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #13
Anyways, it looks like almost everything is fixed (except the log-in TTY appearing 3 times), but this does appear in the 2nd TTY, and I found it in /run/uncaught-logs/current:

Code: [Select]
@4000000060daa5d3334e845e  HDIO_GETGEO failed: Inappropriate ioctl for device

Yes, it's this single line. I'm unsure if it is a fault of your script, or just my hard drive.

Re: Login request in TTY shows 3 times at bootup after migrating from Runit to S6

Reply #14
That appears to be output from hdparm. I'm unsure what it means but double check the args you are passing to that device.