Re: 1.6 and /dev/reload
Gunther Nikl <gni <at> gecko.de>
2003-07-03 07:52:36 GMT
> > I modified kernel_reload_write() to handle ELF kernels and now I have
> > a functional /dev/reload again. I removed the aout stuff since it does
> > not make any sense on an ELF system, IMO.
> Now that it is working for recent systems, maybe this is a good time to
> ask: What does it do? I have a general idea (is it right?) that it allows
> one to reboot a new kernel without rebooting the whole system from the
Almost. You can't reboot any kernel: the "new" kernel must be very
similiar to your currently running kernel. I don't know why thats
important (there is a check in locore.s/kernel_reload). Another
shortcoming is that chipmem is used during reboot. Your kernel must
be smaller than chipmem size. And I forgot to say, that loading symbols
isn't supported. Doing that was already hard with a.out kernels and it
looks like its nearly impossible for ELF kernels. /dev/reload is a pipe
device and loading symbols would require seeking.
> > The new code isn't finished yet, some tweaks are still to be done. I
> > would like to get rid of the chipmem requirement. Is this possible?
> > Another thought is, to only allow reboot if the machine is in single
> > user mode.
> (Forgive my ignorance; I'm guessing) Wouldn't it be better to use
> /dev/reload with reboot so that reboot with a flag can bring the
> system into single user mode, then use /dev/reload?
A "normal" reboot doesn't directly reboot into a new kernel, it transfers