Quote:
Originally Posted by ganjaplanet
I am running slackware-current, kernel-generic-5.4.84
I want to install the new kernel-generic-5.10.1 but after previous lockup during boot, i want to keep my 5.4.84 installed as well. As i'm using slackpkg to install/remove packages, what is the correct way to force it to NOT upgrade kernrl-related packages but offer them for installation? Now i am not even able to run `slackpkg install kernel-generic-5.10.1` as it is a candidate for upgrade. It is simply not show in the listCheers
|
I keep at least two kernels versions installed and can boot to generic (default), huge and the last working kernel. There are other ways to this. This is how I would accomplish what you want.
You did not mention what boot system you use. I use lilo, elilo can be similarly configured, not familiar enough with grub to comment on that. I also do not know what you currently have installed.so I will go with the 5.4.84 kernel. I am going to guess that the huge kernel is NOT installed. I am writing this for slackpkg installed only.
I am going to guess you would want to go with the latest 5.10.2 kernel instead of the 5.10.1 kernel.
Note: I wrote this for slackware64-current, then realized you stated slackware-current. So I modified this for slackware-current, so be forewarned I might have missed something as far a details go. The procedure should be good.
The contents of the /boot directory as guessed.
Code:
System.map -> System.map-generic-smp-5.4.84-smp
System.map-generic-5.4.84
System.map-generic-smp-5.4.84-smp
config -> config-generic-smp-5.4.84-smp
config-generic-5.4.84
config-generic-smp-5.4.84-smp
initrd-tree/
initrd.gz
vmlinuz -> vmlinuz-generic-smp-5.4.84-smp
vmlinuz-generic -> vmlinuz-generic-5.4.84
vmlinuz-generic-5.4.84
vmlinuz-generic-smp > vmlinuz-generic-smp-5.4.84-smp
vmlinuz-generic-smp-5.4.84-smp
The kernel packages must be blacklisted. Noted that kernel-headers is included.
Code:
kernel-generic
kernel-huge
kernel-modules
kernel-source
kernel-headers
This is how I would setup /etc/lilo.conf, applicable sections only. This takes advantage of how kernel-generic is installed so you won't have to make changes with any 5.10.x updates to lilo.conf
Code:
### Global options
default=Generic-5.4.84
## kernel images ##
# Generic 5.10.x kernel
image=/boot/vmlinuz-generic-smp
initrd=/boot/initrd.gz
label=Generic-5.10.x
# Generic 5.4.84 kernel
image=/boot/vmlinuz-5.4.84
initrd=/boot/initrd-5.4.84.gz
label=Generic-5.4.84
Next edit /etc/slackpkg/blacklist to comment out the kernel packages
except for kernel-huge, then run.
Code:
/boot# slackpkg download kernel-generic kernel-modules kernel-source kernel-headers
Now edit /etc/slackpkg/blacklist to uncomment the kernel packages to blacklist them again.
The next step is to install the updated kernel packages.
Code:
/boot# installpkg /var/cache/packages/slackware64/*/*.txz
Then clear the slackpkg cache
Code:
/boot# rm /var/cache/packages/slackware64/*/*
Now create symlinks for the 5.4.84 generic kernel to match what we are using in lilo.conf
Code:
/boot# ln -s config-generic-smp-5.4.84-smp config-5.4.84
/boot# ln -s System.map-generic-smp-5.4.84-smp System.map-5.4.84
/boot# ln -s vmlinuz-generic-smp-5.4.84-smp vmlinuz-5.4.84
Now that the symlinks are done, run makeinitrd, first for the 5.4.84 kernel, then the 5.10.2 kernel.
Note: I use an /etc/mkinitrd.conf file for my setting for mkinitrd.
Code:
/boot# mkinitrd -F -k 5.4.84-smp -s initrd-tree-5.4.84 -o initrd-5.4.84.gz
/boot# mkinitrd -F -k 5.10.2-smp
Run lilo
The /boot directory should show as follows (kernel applicable only parts), order may be different.
Code:
System.map -> System.map-generic-smp-5.10.2-smp
System.map-generic-5.10.2
System.map-generic-smp-5.10.2-smp
System.map-generic-5.4.84
System.map-generic-smp-5.4.84-smp
System.map-5.4.84 > System.map-generic-smp-5.4.84-smp
config -> config-generic-smp-5.10.2-smp
config-generic-5.10.2
config-generic-smp-5.10.2-smp
config-generic-5.4.84
config-generic-smp-5.4.84-smp
config-5.4.84 > config-generic-smp-5.4.84-smp
initrd-tree/
initrd.gz
initrd-tree-5.4.84/
initrd-5.4.84.gz
vmlinuz -> vmlinuz-generic-smp-5.10.2-smp
vmlinuz-generic -> vmlinuz-generic-5.10.2
vmlinuz-generic-5.10.2
vmlinuz-generic-smp > vmlinuz-generic-smp-5.10.2-smp
vmlinuz-generic-smp-5.10.2-smp
vmlinuz-generic-5.4.84
vmlinuz-generic-smp-5.4.84-smp
vmlinuz-5.4.84 > vmlinuz-generic-smp-5.4.84-smp
To upgrade to a newer 5.10.x kernel for example 5.10.2 to 5.10.3, you need to remove the old one first. If you don't then 5.10.1 will remain installed.
Code:
/boot# removepkg /var/lib/pkgtools/packages/kernel*-5.10.2-*
Comment out the kernel entries in blacklist and run.
Code:
/boot# slackpkg download kernel-generic kernel-modules kernel-source kernel-headers
Uncomment the kernel entries in blacklist.
Install the updated kernel
Code:
/boot# installpkg /var/cache/packages/slackware64/*/*.txz
Clear the slackpkg cache
Code:
/boot# rm /var/cache/packages/slackware64/*/*
Run mkinitrd (reminder I use /etc/mkinitrd.conf for my settings).
Code:
/boot# mkinitrd -F -k 5.10.3-smp
Run lilo
No need to do anything with the 5.4.48-smp kernel as it already setup.
If interested I can post my procure for upgrade my kernels on this system. This is the /boot directory applicable files. I use slackware64-current and have slackpkg+ installed.
Code:
System.map -> System.map-generic-5.10.2
System.map-generic-5.10.1
System.map-generic-5.10.2
System.map-huge-5.10.2
System.map-working -> System.map-generic-5.10.1
config -> config-generic-5.10.2.x64
config-generic-5.10.1.x64
config-generic-5.10.2.x64
config-huge-5.10.2.x64
config-working -> config-generic-5.10.1.x64
initrd-tree/
initrd-tree-working/
initrd-working.gz
initrd.gz
vmlinuz -> vmlinuz-generic-5.10.2
vmlinuz-generic -> vmlinuz-generic-5.10.2
vmlinuz-generic-5.10.1
vmlinuz-generic-5.10.2
vmlinuz-huge -> vmlinuz-huge-5.10.2
vmlinuz-huge-5.10.2
vmlinuz-working -> vmlinuz-generic-5.10.1