init run level 7



I read somewhere once, a few years ago, that init actually could support run
levels 7, 8 and 9, but that nothing had ever been standardized for these
levels. Now I actually have a use for one of them. The question is, can it
actually be done as run level 7? Or if not as 7, what about using another
run level like 5?

The objective is to configure a clean system shutdown and reboot through the
kexec kernel reload method, instead of the usual reboot. If you are not
familiar with kexec, it is a facility to allow a kernel image to be loaded
into the kernel that is now running, such that a special reboot call will
end the current kernel and initiate the running of the kernel in the new
image that was pre-loaded. A clean shutdown and unmounting of filesystems
is still needed before the new kernel is started. The obvious clean way to
do this is have init run the last step to trigger the kernel reload after
all the system shutdown has completed.

So maybe run level 7 can be used. Or maybe not.

If 7 cannot be used, what about using run level 5? Is there anything inside
init that would make it handle run level 5 differently if it were configured
just like run level 6, except for the final step?

I plan to set up a system to boot in partition 1 and start up ssh daemons.
It would also start up a timer process that will wait about 3 minutes then
if a special flag has not been set (probably a file in /etc) it will proceed
to boot a new kernel image with a different root filesystem and start up a
full server. The idea here is to have a window of opportunity on a reboot
to access the system remotely and perform maintenance, including rebuilding
the main system's root filesystem. It would also be a more safe way to
reload a new kernel that might not work, as long as there is some means to
do a hardware reset to get out of a failed one (e.g. one of those web
controlled power strips).

OK ... now I need to anticipate off direction responses I might get and head
these off before someone wastes a lot of posting time trying to suggest
these things. I already know about pivot_root() and in fact use it
extensively. But pivot_root() does not work well with an already up system
(it works great much earlier in time). And that doesn't deal with a broken
kernel being tested (that might hang on hardware only the remote server
has). Running the main server under some kind of virtualization might be an
option, but that's not the aspect I am exploring right now. I'm not sure
that virtualization would really do the complete job, but I will look at it
at some point in the future. I've also considered, and dismissed, the idea
of just starting a production system under chroot. The kexec facility looks
the most promising, so that is why I am exploiring the init run level issue
right now to see just how viable kexec will be. So please don't waste my
time with diversions (that often happen on Usenet).

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2006-11-07-1719@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • v2.6.25-4569-gb69d398: Section mismatch in reference from the function uniq_ioapic_id() to t
    ... Section mismatch detected in this mornings build of kernel v2.6.25-4569-gb69d398. ... The function uniq_ioapic_idreferences ... This is often because uniq_ioapic_id lacks a __init ... CHK include/linux/utsrelease.h ...
    (Linux-Kernel)
  • Re: mdadm -A (1.7.0) segfaults; md raid device not started on boot
    ... How does the kernel know to load the raid module when I invoke mdadm, ... init init/main.c:689 ... PCI: PCI BIOS revision 2.10 entry at 0xfd9cc, ... ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ...
    (comp.os.linux.setup)
  • Re: FC1 va nVidia Latest Driver
    ... You can type init 3 in any terminal window. ... There are times when the nvidia driver does not unload because it is ... still registered one way or another in the kernel. ... recover is a reboot into init 3 and not start the x server. ...
    (Fedora)
  • Re: boot/repair floppy or CD
    ... The information you put in lilo.conf is used by lilo when you run lilo. ... the other runs without any kernel, ... kernel proper is booted, the root file system mounted, and "init" reads /etc/inittab, and finds instructions to run the script /etc/rc.d/rc.sysinit. ...
    (comp.os.linux.misc)
  • Cyclades TS800 Firmware Upgrade
    ... Linux NET4.0 for Linux 2.2 ... inode bitma6 ... Freeing unused kernel memory: 32k init ... Kernel panic: No init found. ...
    (linux.redhat)