[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reloading the kernel with kexec before other services start



On 20/11/14 10:00, Mario Castelán Castro wrote:
> Hello.
> 
> I need to reload the same kernel that the machine boots with with kexec,
> in order to specify different kernel parameters. Changing the boot
> loader is unfortunately not an option.
> 
> I'm using Debian Wheezy with sysvinit. I can make a script to kexec the
> kernel just once (avoiding loops), but how should I modify/add the init
> scripts so that on boot, this scripts is loaded before the system
> daemons (to prevent corrupting their files when they're ungratuitously
> terminated)?.
> 
> Modifying /etc/rc2.d is discouraged as far as I can tell, because the
> scripts there get overwritten by update-rc.d.
> 
> Regards and thanks.
> 
> 
Try kexec-tools(?)
https://wiki.debian.org/BootProcessSpeedup#Using_kexec_for_warm_reboots

Or, perhaps, modify /etc/init.d/reboot, possibly something like:-
(as root)
cp /etc/init.d/reboot /usr/local/bin/reboot
cp /usr/local/bin/reboot{,.bak}
nano /usr/local/bin/reboot
modify to suit, then when you want to use kexec cp the modified
/usr/local/bin/reboot to /etc/init.d/reboot and reboot, afterwards cp
/usr/local/bin/reboot.bak to /etc/init.d/reboot





Kind regards



Reply to: