[lug] debugging workstation issue
D. Stimits
stimits at comcast.net
Fri Apr 10 10:16:23 MDT 2020
> On April 10, 2020 at 9:46 AM Davide Del Vento <davide.del.vento at gmail.com> wrote:
>
> Not sure I understand this suggestion.
>
> When/how could I get to the GRUB command line? At boot I certainly can, but the problem is way past that point, i.e. when running (or right before starting) the GUI.
> Or do you mean at the NEXT boot after the hang? How that would be different than looking at journalctl as Zan suggested?
>
I always add GRUB delay so it is easy (I multi-boot and set up a 120 second delay for myself), but in theory if you hold down the shift key as GRUB loads it will drop you into a GRUB command line. I think it is the "e" key which begins edit. From the GRUB editor you will need to find the kernel argument line, add a space and append " systemd.unit=multi-user.target". Tokens must not have spaces, and the delimiter between tokens is a space.
Whatever edit you make is only for that boot, so making a mistake isn't really a problem. In a systemd type init (most newer distros) the GUI would be forced with " systemd.unit=graphical.target", and this is the indirect default so it wouldn't really change anything for you, but you'd be using " systemd.unit=multi-user.target" to avoid GUI. I'd also recommend removing the kernel command line " quiet" argument (I actually edit this out of my GRUB permanent config), and if you have a splash screen, e.g., Fedora uses " splash", then you could remove the splash to see more debug information during boot (I also permanently remove the "splash" token, but editing GRUB command line through the editor is only a temp edit). All kinds of useful kernel command lines are available, e.g., you could force fsck with " fsck.mode=force". Or you could blacklist a kernel module to test (e.g., I blacklist Nouveau and use the NVIDIA driver instead). Temporarily disabling USB autosuspend is sometimes useful as well, e.g., " usbcore.autosuspend=-1".
A list of some of the interesting command lines you can experiment with (each driver can have its own parameters, so this URL is just a main subset):
https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html
Tokens not understood are simply ignored.
The trick is that you have to find the kernel command line...which is easy if you've seen it just once (just examine " cat /proc/cmdline" to get an idea). That line is very long sometimes and might wrap, but it has to be a single line...you don't use the "enter key" in the GRUB editor to continue as this would just split the line. I think it is CTRL-x to execute (there should be a cheat sheet at the bottom of the menu) once you are satisfied with your edit.
This would be prior to a hang to see if the system is stable without the GUI. Or if GUI just doesn't work, you could get to command line without the GUI ever attempting to load. The "journalctl" is useful from here if the GUI is crashing or unstable.
If you had booted normally, and then ran "sudo systemctl isolate multi-user.target", then this would switch to console mode for most systems in a way similar to the GRUB command line, but the GRUB command line never loads GUI code.
> Thanks for keeping up with ideas!
> Davide
>
> On Fri, Apr 10, 2020 at 9:32 AM D. Stimits < stimits at comcast.net mailto:stimits at comcast.net > wrote:
>
> > > If you can get to the GRUB command line, then you could tell it to just boot to non-graphical mode and perhaps it would work better. Even if this does not work better, then I would expect you'd be able to see more of the boot log. Depending on which flavor and release of Linux you use, the following appended to the kernel command line might do this for you:
> > systemd.unit=multi-user.target
> >
> > Even if this doesn't work, then I'd expect it is at least some debug info.
> > _______________________________________________
> > Web Page: http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> > Join us on IRC:http://irc.hackingsociety.org port=6667 channel=#hackingsociety
> >
> > > _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20200410/07659730/attachment.html>
More information about the LUG
mailing list