You are not logged in.

#1 2023-08-18 20:47:45

vikramr
Member
Registered: 2009-09-22
Posts: 45

[SOLVED] backup kernel images

How do I keep one or preferably 2 previous kernels and have them as an option during boot up time ? I had an issue during a system upgrade and couldn't boot. I couldn't find a previous one under advance options. I fixed my system by booting into arch install, chroot and did a upgrade but would like to have an option to use alternate kernels.

Last edited by vikramr (2023-08-20 21:34:23)

Offline

#2 2023-08-18 21:13:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,194

Re: [SOLVED] backup kernel images

Write a pre-transaction hook that moves the relevant module dirs and vmlinuz-linux images to a new name, generates a new mkinitcpio.preset and then have something that sporadically/on boot/on kernel update removes older versions.

Not impossible but not exactly trivial, the simpler and easier approach would be to install an alternate kernel outright (e.g. linux-lts, linux-zen) potentially adding those to IgnorePkg and manually updating them sporadically so you have an older version to fall back on in case the main update goes awry.

Offline

#3 2023-08-18 22:03:47

yochananmarqos
Member
Registered: 2020-02-05
Posts: 219

Re: [SOLVED] backup kernel images

@V1del: It sounds like you're describing exactly what kernel-modules-hook in the extra repo does.

Offline

#4 2023-08-19 00:41:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,194

Re: [SOLVED] backup kernel images

You'd have to expand that to still keep an initramfs you can actually boot into but one could use that as a base for that yes.

Offline

#5 2023-08-20 21:17:50

vikramr
Member
Registered: 2009-09-22
Posts: 45

Re: [SOLVED] backup kernel images

thanks. Looks like linux-lts is what I need.

Last edited by vikramr (2023-08-20 21:33:35)

Offline

Board footer

Powered by FluxBB