Phil Howard <[EMAIL PROTECTED]> writes:

> On Wed, Oct 18, 2006 at 09:48:32PM -0600, Eric W. Biederman wrote:
>
> | > One of my concerns is getting the currently running system shutdown
> | > OK and then invoking the new kernel.  It looks like I need to have
> | > the "kexec" program installed on the partition I'm going to have
> | > mounted R/O at that time, or copied into ramfs or tmpfs if I don't
> | > have a partition mounted.  Then I would put "/sbin/kexec -e" in
> | > the /etc/inittab file in pace of "/sbin/reboot -f"?
> | 
> | Yes.  I unfortunately never got a patch into /sbin/reboot.
>
> What does /sbin/reboot need to do differently?

It would be nice if it supported a flag say -e that would do
what kexec -e does.  Most of that code was copied from /sbin/reboot
actually.

> | /sbin/reboot -f is not recommended, for normal use.
> | 
> | The reason it is a two syscall sequence is so you can load the image
> | do a clean shutdown and then switch.
>
> That makes sense.  But why is a new shutdown call needed?  Why not
> hook into the part of the kernel responsuble for doing a reboot, and
> if there is a kernel loaded that is complete and sane, just execute
> it right then.

Just a policy control thing.  

At this point you can test /sys/kernel/kexec_loaded and make the decision
if you want to switch to a new kernel yourself.

So in practice the reboot scripts just need to call /sbin/kexec -e.

Eric

_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to