[opensuse-factory] starting a shell right before reboot with systemd
I just booted from the partition with current Factory to the partition with 13.2. Somehow systemd deciced to start a fsck on all partitions. Before it once again wastes a few hours next time this happens it would be nice to detect the culprit. What is the easiest way to start a shell right before reboot, and another one right before the root filesystem is mounted? I guess the latter is a cmdline option for dracut, and the former requires a special service file. In the old days I would have done that with halt.local. Olaf -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Le vendredi 06 février 2015 à 12:42 +0100, Olaf Hering a écrit :
I just booted from the partition with current Factory to the partition with 13.2. Somehow systemd deciced to start a fsck on all partitions.
Before it once again wastes a few hours next time this happens it would be nice to detect the culprit.
What is the easiest way to start a shell right before reboot, and another one right before the root filesystem is mounted? I guess the latter is a cmdline option for dracut, and the former requires a special service file.
In the old days I would have done that with halt.local.
I would use a service file like this (untested): [Unit] DefaultDependencies=No After=shutdown.target Before=final.target [Service] Environment=HOME=/root WorkingDirectory=/root StandardInput=tty-force StandardOutput=inherit StandardError=inherit KillMode=process IgnoreSIGPIPE=no SendSIGHUP=yes ExecStart=/usr/sbin/sulogin Type=oneshot [Install] WantedBy=halt.target -- Frederic Crozat Project Manager Enterprise Desktop SUSE -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Feb 06, Frederic Crozat wrote:
I would use a service file like this (untested):
This did not work. Maybe something from their wiki will help: http://freedesktop.org/wiki/Software/systemd/Debugging/ Olaf -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
В Fri, 6 Feb 2015 13:13:57 +0100 Olaf Hering <olaf@aepfle.de> пишет:
On Fri, Feb 06, Frederic Crozat wrote:
I would use a service file like this (untested):
This did not work.
Did you enable it? It is exactly how halt.local does it, so I find it quite strange if it did not work.
Maybe something from their wiki will help: http://freedesktop.org/wiki/Software/systemd/Debugging/
Olaf
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Le vendredi 06 février 2015 à 12:42 +0100, Olaf Hering a écrit :
I just booted from the partition with current Factory to the partition with 13.2. Somehow systemd deciced to start a fsck on all partitions.
Before it once again wastes a few hours next time this happens it would be nice to detect the culprit.
What is the easiest way to start a shell right before reboot, and another one right before the root filesystem is mounted? I guess the latter is a cmdline option for dracut, and the former requires a special service file.
In the old days I would have done that with halt.local.
BTW, halt.local should still work ;) -- Frederic Crozat Project Manager Enterprise Desktop SUSE -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Feb 06, Frederic Crozat wrote:
Le vendredi 06 février 2015 à 12:42 +0100, Olaf Hering a écrit :
In the old days I would have done that with halt.local. BTW, halt.local should still work ;)
It exists, but appending "bash" does nothing … anymore. I will try the suggested service file. Olaf -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Freitag, 6. Februar 2015, 13:05:20 schrieb Olaf Hering:
On Fri, Feb 06, Frederic Crozat wrote:
Le vendredi 06 février 2015 à 12:42 +0100, Olaf Hering a écrit :
In the old days I would have done that with halt.local.
BTW, halt.local should still work ;)
It exists, but appending "bash" does nothing … anymore. I will try the suggested service file.
Olaf Hello Olaf,
perhaps halt.local does not have a tty anymore. So You can't see, what bash wants from You. Try something like bash < /dev/tty0 > /dev/tty0 2>&1 Regards Emil -- Registered Linux User since 19940320 ---------------------------------------------------------- Emil Stephan, Albersloher Weg 571A, 48167 Münster, Germany Accelerate Windows: 9.80665 m/sec^2 would be adequate -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Feb 06, Emil Stephan wrote:
perhaps halt.local does not have a tty anymore. So You can't see, what bash wants from You. Try something like bash < /dev/tty0 > /dev/tty0 2>&1
Thanks, thats what I figured out myself using tty7. Per default halt.local has no tty. And indeed, the filesystems are cleanly unmounted before reboot. I will dump my findings from the shell started by dracut to bug#916571. Olaf -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
El 06/02/15 a las 08:42, Olaf Hering escribió:
I just booted from the partition with current Factory to the partition with 13.2. Somehow systemd deciced to start a fsck on all partitions.
Before it once again wastes a few hours next time this happens it would be nice to detect the culprit.
What is the easiest way to start a shell right before reboot,
Nope, nope.. it is the other way around.. you need a shell that starts early and stays up till late shutdown...the debug-shell service... and
another one right before the root filesystem is mounted? I guess the latter is a cmdline option for dracut, and the former requires a special service file.
boot with : rd.break={cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup} drop to a shell on defined breakpoint -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Cristian Rodríguez wrote:
Nope, nope.. it is the other way around.. you need a shell that starts early and stays up till late shutdown...the debug-shell service... boot with : rd.break={cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup} drop to a shell on defined breakpoint
Where do you configure what shell it starts or does it always use bash? Or...*shivering*... has systmd started the development of it's own shell to replace the other shells? -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (6)
-
Andrei Borzenkov
-
Cristian Rodríguez
-
Emil Stephan
-
Frederic Crozat
-
L.A. Walsh
-
Olaf Hering