LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > tix
User Name
Password

Notices


Rate this Entry

Using slackpkg to update Slackware 15 (UEFI) and making new kernel bootable

Posted 07-02-2022 at 06:15 PM by tix

Updating slackware UEFI using slackpkg and making the new kernel bootable
--------------------------------------------------------------------------
Assuming you have installed slackware UEFI
--------------------------------------------------------------------------
1) Connect to the internet
2) Change to root user (su)
3) On you slackware installation, goto /etc/slackpkg
4) Edit the mirrors file and select a mirror for slackware 15 (joe mirrors)
5) Run "slackpkg update" to get list of updates
6) Run "slackpkg install-new" to install new packages
7) Run "slackpkg upgrade-all" to upgrade all packages
8) _>optional<_ Run "slackpkg clean-system" to remove any older and uselsess packages -->> **RUN WITH CAUTION AS IT WILL REMOVE ALSO YOUR CUSTOM INSTALLED PACKAGES**
9) In slackware 14.2 and below, you used to run lilo and your lilo boot configuration would be updated automatically but slackware is different as it uses ELILO for booting slackware EUFI
a) goto /boot and copy the vmlinux for your new upgraded kernel to /boot/efi/EFI/Slackware
b) rebuild your initrd using the command "/usr/share/mkinitrd/mkinitrd_command_generator.sh" which should give you the command to generate initrd that you just copy-paste and run! LOL!!!
-> also update /etc/mkinitrd.sh by running the command "/usr/share/mkinitrd/mkinitrd_command_generator.sh > /etc/mkinitrd.conf"
c) copy the newly built initrd to /boot/efi/EFI/Slackware
d) edit the file elilo.conf in /boot/efi/EFI/Slackware
-> change the line "image=vmlinuz" to point to your new vmlinuz
-> change the line "initrd=initrd.gz" to point to your new initrd
e) run eliloconfig
f) reboot!
10) Enjoy!

==================================================================================================== ============================

QUESTION: I have upgraded from kernel 5.15.19 to 5.15.38 and then I run the command "/usr/share/mkinitrd/mkinitrd_command_generator.sh"i get the output
"Modules for kernel 5.15.19 aren't installed."

ANSWER: Check in your /boot/ directory and you should see the kernel image for your new kernel e.g. /boot/vmlinuz-generic-5.15.38
> simply rerun the command but specify the kernel image "/usr/share/mkinitrd/mkinitrd_command_generator.sh /boot/vmlinuz-generic-5.15.38"

OUTPUT:
------------------------------------------------START OF OUTPUT---------------------------------------
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:

mkinitrd -c -k 5.15.38 -f ext4 -r /dev/sda2 -m xhci-pcihci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz
# An entry in 'etc/lilo.conf' for kernel '/boot/vmlinuz-generic-5.15.38' would look like this:
# Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 5.15.38 -f ext4 -r /dev/sda2 -m xhci-pcihci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz'
image = /boot/vmlinuz-generic-5.15.38
initrd = /boot/initrd.gz
root = /dev/sda2
label = 5.15.38
read-only
# Linux bootable partition config ends
------------------------------------------------END OF OUTPUT-----------------------------------------

>>COPY PASTE EXACTLY THE LINE (see above) and paste into command line then run (press enter) to create the init-rd
mkinitrd -c -k 5.15.38 -f ext4 -r /dev/sda2 -m xhci-pcihci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz

Enjoy!
Posted in Uncategorized
Views 5266 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:52 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration