Page 1 of 1

X doesn't always start on boot

Posted: 2022/12/31 20:44:38
by Munguanaweza
Hi,
I'm new to CentOS, and I installed CentOS without a hitch. Now when I have installed updates and try to reboot the computer, the operating system says it is gone into emergency mode maybe three out of 4 times, and won't start graphic mode. It presents a text mode superuser prompt. It won't come out of this on it's own, but if I type "reboot" it obediently does that and starts the loop all over again. I have tried to type "startx" or "runlevel5" or other such commands without the quotation marks at the prompt but can't bring up graphical mode.
Any ideas as what to do?

Thanks!

Re: X doesn't always start on boot

Posted: 2023/01/01 14:26:14
by TrevorH
You would have to say more about emergency mode and why it got there. There will be log messages on the screen telling you why - you may need to scroll backwards using Shift-PgUp to see them.

Re: X doesn't always start on boot

Posted: 2023/01/01 20:36:11
by Munguanaweza
Hi,
It seems that I misread the forum heading when I posted the first post. I missed that this is for CentOS7, I have installed CentOS stream 9. So I'll need your advice to correct this first mistake.

As regards your question of how I got to the emergency mode, I just boot the computer and somewhere along the way to graphic-land I presume a bit of lazy software intermittently isn't doing it's job. Here is what the message on the screen says:

[OK] Reached target Switch Root.
Starting Switch Root...
[FAILED] Failed to start Switch Root.
See 'Systemctl status initrd-switch-root-service' for details.
Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

:/#

That superuser prompt is where the message ends, and before I post anything else I think this will give you an idea what you can more specifically direct me to include in my next post.
Thanks

Re: X doesn't always start on boot

Posted: 2023/01/02 02:25:32
by TrevorH
I've moved the topic to the Stream forum.

Did you run the suggested commands? Something is broken during boot and it will have been logged. You need to read the logs to find out what it was that broke.

Re: X doesn't always start on boot

Posted: 2023/01/05 03:54:33
by Munguanaweza
Hi,
I had viewed the journal logs before I posted to the forum requesting assistance. I couldn't find anything other than what I posted in the repeat of the message I received on boot and copied in my post to the forum. That was that the failure to start Switch Root was the issue.

I decided to reinstall the complete operating system. It seems to boot correctly now without the problem I had previously described in this thread. Previously when I installed updates they would present in terminal form on the boot up screen, now they update in graphic form with a progress line that grows horizontally across the screen. So I assume that something went wrong in writing the operating system software to root during the initial installation that is now rectified since I have reinstalled the operating system.

Regards

Re: X doesn't always start on boot

Posted: 2023/01/24 03:37:14
by Munguanaweza
Hi,
I want to update my previous post, where I reported that I reinstalled CentOS Stream 9, and it seemed to be working normally. I have since updated the Cent OS system that I reinstalled after not using it for a few weeks, and now it has the same problem that I originally posted about before I reinstalled CentOS. Approximately 3 out of 4 times that I boot the system it will only boot to emergency mode in text format, and won't boot to normal graphics. My experience has been that when CentOS is updated, the system breaks.

On this forum is there a usual way to post the journal log somewhere so that someone with more knowledge than I might look them over and advise me how to fix this issue?

Thanks

Re: X doesn't always start on boot

Posted: 2023/01/24 12:22:06
by TrevorH
You just post it as part of the thread. You can wrap it in [quote][/quote] or [code][/code] tags to preserve formatting. Or, f it's too big, you can use paste.centos.org but be aware that it has a maximum lifetime of 24h so you would need to post it there, link to it here and hope that someone looks within the 24h expiry time.

The usual reason for entering emergency mode is that something listed in /etc/fstab is not accessible or cannot be mounted. If you have added non-standard things to fstab and they are not accessible at boot time then you will end up in emergency mode. For example, adding a removeable drive and then removing it, or adding a network based filesystem and then booting with the network cable unplugged...