Welcome, Guest. Please login or register.
Did you miss your activation email?
2020/11/28, 17:11:48


Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: when the system does not boot...  (Read 6480 times)

0 Members and 1 Guest are viewing this topic.

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.451
when the system does not boot...
« on: 2014/05/10, 23:00:41 »
Siduction/Debian has a rescue tool that is not very well known. It comes with systemd and is called debug-shell.service. It allows you to open a rescue shell on tty 9 if you have problems with booting your system. The service file is preinstalled, but not activated. So to be able to use it in case you need it, you should activate it now:
Code: [Select]
systemctl enable debug-shell.serviceThe system will set a symbolic link:
Code: [Select]
ln -s '/lib/systemd/system/debug-shell.service' '/etc/systemd/system/'
Now you can at any time open a shell with CTL ALT 9 and try to debug what is wrong by checking the status of services, reading logs, looking for stuck jobs with systemctl list-jobs etc. As long as GRUB starts, you can also add
Code: [Select]
debug-shell.service to the kernel boot line.


Offline ReinerS

  • User
  • Posts: 977
Re: when the system does not boot...
« Reply #1 on: 2014/05/10, 23:11:20 »
Great, I will surely give it a try.


slackware => SuSE => kanotix => sidux => aptosid  => siduction

Online GoinEasy9

  • User
  • Posts: 473
Re: when the system does not boot...
« Reply #2 on: 2014/05/11, 00:11:42 »
Wow, this is interesting, nice feature.
Linux Counter number 348347

Offline musca

  • Global Moderator
  • User
  • *****
  • Posts: 725
  • sid, fly high!
Re: when the system does not boot...
« Reply #3 on: 2014/05/21, 15:43:42 »
Hello devil, GoinEasy9
yes, interesting, but the 'debug-shell.service' parameter set in grub's kernel cmdline doesn't give me the shell.

I learned from der_bud that  ''  enters maintenance mode.
While on it you can also add 'systemd.show_status=true' for traditional [ok] or [failed] messages.

So one can enable the debug-shell in maintenance mode:
Code: [Select]
mount -o remount,rw /
systemctl enable debug-shell.service
mount -o remount,ro /

« Last Edit: 2014/05/21, 15:53:26 by musca »
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.058
    • Land of the Buckeye
Re: when the system does not boot...
« Reply #4 on: 2014/05/21, 20:03:58 »
This is interesting -- I just enabled it.

Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO, 2@WD1003FZEX in BTRFS

Offline mylo

  • User
  • Posts: 922
Re: when the system does not boot...
« Reply #5 on: 2014/05/21, 22:10:08 »
yes, good to know and beter to have in case.
Regards mylo
____________________________________________ ____
"Die gefährlichste aller Weltanschauungen ist die Weltanschauung der Leute,
welche die Welt nicht angeschaut haben."               Alexander von Humboldt

Offline der_bud

  • User
  • Posts: 956
  • member
Re: when the system does not boot...
« Reply #6 on: 2014/05/22, 07:35:34 »
Please let me add a warning to all of this. It really is a nice feature to add this debug-shell when you have plans to investigate something on your system, then do as devil described. In case of emergency or boot problems, you can activate it like musca posted. But please consider to disable that shell again when you are done with testing it, otherwise your system has on tty9 an always enabled root shell without password, which might be considered as a vulnerability.

Quote from: :
"Warning: Use this shell only for debugging! Do not forget to disable systemd-debug-shell.service after you've finished debugging your boot problems. Leaving the root shell always available would be a security risk."

On that site is a lot more interesting stuff to read about bootproblems, debugging systemd, and and such.
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.