Upgrading Kernel on live USB

Post Reply
rmcg
Posts: 11
Joined: 05 Aug 2020 09:07

Upgrading Kernel on live USB

Post by rmcg »

I run a number of Slackel 7.3 64 bit openbox live usbs on older machines in classes I teach as the hardware is pathetically slow with other OS's is it worth upgrading the Kernel? Perhaps not needed but if I wanted to do so can it be done easily?
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: Upgrading Kernel on live USB

Post by djemos »

Upgrading the kernel will not offer anything since hardware is working fine. Also this may break usb and cannot boot if it will not be done correctly. A new kernel module have to been created and a new initrd. There is a script in the live usb and iso image in boot folder. Kernel upgrades happen too fast in slackware current. I stopped to do this it is not worth.
I suggest to not upgrade. Of course for educational purposes can make tests using just one live usb.
The script is make_new_kernel_module.sh and the make_new_kernel_generic_module.sh script to use the generic kernel.
From a slackel 7.3 openbox system installed in a hard disk and upgraded also to latest kernel, plug in the live usb,
copy the script to ~/ folder on hard disk and run

Code: Select all

sudo sh make_new_kernel_module.sh
rmcg
Posts: 11
Joined: 05 Aug 2020 09:07

Re: Upgrading Kernel on live USB

Post by rmcg »

Thank you Djemos for the info greatly appreciated.
rmcg
Posts: 11
Joined: 05 Aug 2020 09:07

Re: Upgrading Kernel on live USB

Post by rmcg »

kernel_upgrade_live_usb.png
kernel_upgrade_live_usb.png (37.44 KiB) Viewed 7210 times
Had a go at upgrading a live usb kernel the script worked great:-) Would you usually run the make_new_kernel_module.sh script? If so when would you bother with the make_new_kernel_generic_module.sh script?
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: Upgrading Kernel on live USB

Post by djemos »

Yes. Usually run the make_new_kernel_module.sh script.
If you want to use the generic kernel instead of huge kernel then can use the make_new_kernel_generic_module.sh script to upgrade to generic kernel.
It is an alternative.
Generic kernel is not used in live iso.
rmcg
Posts: 11
Joined: 05 Aug 2020 09:07

Re: Upgrading Kernel on live USB

Post by rmcg »

Can kernel firmware get updated using this method? As you mentioned earlier it is probably not necessary with a live usb to upgrade kernel software or software in general as the live usb will eventually start to run out of storage.
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: Upgrading Kernel on live USB

Post by djemos »

No.
kernel-firmware package is in packages-core module. Besides it is not necessary and not provide anything good to upgrade kernel-firmware and also packages-core includes a lot of packages which need to download and reinstalled and a lot of them will have been upgraded in slackware current tree it will break the iso image. It is like to recreate the live iso. And also take a lot of time.
Upgrade kernel-firmware can be done i suppose using persistent file or folder but i have not done it. I do not know if it will make the live usb unusable. In this case can boot without persistence and usb will work. Or can recreate the persistent file.

This is a live usb it is not a real installation. Even using persistence cannot upgrade everything like in a real installation. Because of limitation:
1. If usb is vfat formatted the persistent file can be up to 2GB
2. If usb is ext3 formatted the persistent file can be up to the free size of usb.
3. There is also a third method to format usb in ext3 and use the free size of usb not a persistent file but a folder automatically created booting with persistent option from menus. More details in README_INSTALL_ON_USB.TXT file in boot folder of the iso. In this option encryption cannot be used.
So can choose what is useful for you. Make tests.

Note that as persistent file is getting filled, speed will be slow. There are too many links created in memory. This will be obvious when running firefox with a lot of tabs and libreoffice as well, programs that need a lot of memory.
All these shown easy to write and explain but took hours and hours, months of developing. :)
rmcg
Posts: 11
Joined: 05 Aug 2020 09:07

Re: Upgrading Kernel on live USB

Post by rmcg »

Thank you for the information, very helpful:-)
Post Reply