kernel update question: do I have to reboot to upgrade to new kernel version in current?
My usual practice is to update in current, then reboot in order to get the new kernel version installed, then run the mkinitrd_command_generator.sh scrpt to get the modules for the generic modules identified, and then reboot again to get to the new version of the generic kernel.
Is there a way to do this "on the fly" without the two reboots? |
You can use the kexec command to switch kernels.
|
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k $NEW_KERNEL_VERSION |
You can make an initrd for any installed kernel by passing it to the script, e.g.:
Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r /boot/vmlinuz-generic) |
You can make the initrd for new kernel while running another kernel version. If you update grub.cfg, install the modules, run mkinitrd with the options to clear the directory /boot/initrd-tree and to use the relevant kernel version, and update the hard disk boot sector (I think) it should be possible to do it in one reboot.
|
I use the new geninitrd command in -current.
1) update via slackpkg 2) as root: geninitrd 3) copy vmlinuz-generic and new initrd.gz to my efi partition 4) reboot This works because when generating an initrd you can actually specify the kernel to create it for as mentioned by marav. The geninitrd script just automates this by detecting the newly installed kernel version even when the old kernel is still running. |
Thanks for the helpful suggestions. I'll start working with them.
|
Quote:
https://www.linux.com/training-tutor...kexec-example/ |
If you use slackpkg to update, do the initial 'slackpkg upgrade-all' without including the generic kernel. Then do a second 'slackpkg upgrade-all' (just need to hit the up arrow key). This way results in the /boot/vmlinuz symlink pointing to the generic kernel rather than the huge kernel. Then make the new initrd and update the bootloader.
|
Quote:
Blacklist kernel-huge. Have an /etc/mkinitrd.conf with my desired settings. "mkinitrd_command_generator.sh -c" can help with this. Do the "slackpkg upgrade-all" cd /boot run "mkinitrd -F -k x.x.x" (-F to use /etc/mkinitrd.conf; -k the kernel version to use.) run lilo reboot done one reboot. |
Quote:
Code:
# slackpkg update Now just copy initrd.gz and kernel-generic -> vmlinuz to /boot/efi/EFI/Slackware/ and reboot. My elilo.conf is simply: Code:
chooser=simple If using lilo, and lilo.conf is configured, just run lilo after mkinitrd then reboot. Specifying the kernel in the mkinitrd command line will enure which version gets grabbed for those that like the have a few laying about. You really don't need much else or need to stuff mkinitrd.conf full of extras for most simple Desktop and Server installations. |
Thanks again for the help to everybody.
|
Quote:
If 'image = /boot/vmlinuz' is set, then the order of upgrade of the generic and huge kernels is important. If 'image = /boot/vmlinuz-generic' or 'image = /boot/vmlinuz-huge' is set, then the kernel type is specified. |
Quote:
|
If you install the generic kernel after the huge kernel, then the /boot/config and /boot/System.map symlinks will point to the generic kernel versions.
|
All times are GMT -5. The time now is 02:48 PM. |