[PLUG] how to force a reboot with no working rootfs?

Jason R. Martin nsxfreddy at gmail.com
Thu May 4 04:56:12 UTC 2006


On 03 May 2006 11:11:07 -0700, Russell Senior <seniorr at aracnet.com> wrote:
> >>>>> "Jason" == Jason R Martin <nsxfreddy at gmail.com> writes:
>
> Jason> I'd go with the sysrq route, read sysrq.txt from the kernel
> Jason> Documentation directory.  You should be able to enable the
> Jason> sysrq stuff in /proc/sys/kernel/sysrq (assuming it was turned
> Jason> on in your kernel build) and trigger lots of interesting
> Jason> things, including the reboot, by writing the values from the
> Jason> file to /proc/sysrq-trigger.
>
> Interesting, but unfortunately /proc/sysrq-trigger isn't present on
> the existing image's kernel.  I'd have to build a custom kernel for
> the device and install it in limited space.  Probably easier to
> arrange access to the power supply.

Maybe you need a statically-linked version of
shutdown/halt/reboot/whatever?  Or you could write your own little
thing to call the syscall directly.  Or build a static-linked version
of busybox with just the shutdown/halt/reboot/whatever turned on.

Or if you're able to build out-of-tree kernel modules for that kernel,
I seem to recall the RedHat remote crash dump server source comes with
a test kernel module that just causes the system to panic as soon as
it is loaded.  Combined with the automatic reboot on panic option that
should work.  Not recommended for production environments.

Random ideas.  I spend too much time in front of computers.

Jason "for some reason man pages on my Mac won't tell me anything
about Linux syscalls" Martin



More information about the PLUG mailing list