I recently screwed something up and I would like to abort it.
When booting my laptop, Fedora gives few options for previous kernels.
I would like to discard the most recent one which I made mistakes on, and would like to keep the other ones.
Next time I get an update, will it be the one updated on top of the most recent one? I would like it to be on top of a previous version so the mistakes don’t carry to the next updated one.
Is there a way to do this?
For instance, if I have booting options with kernel versions 6.0.0, 6.0.1, 6.0.2, then I would like 6.0.4 to be built on top of 6.0.1, the second most recent one, and not on 6.0.2 which is screwed up.
For the kernel that is messed up you will want to remove the bad args: (as an example ) sudo grubby --remove-args="ro rootflags=subvol=root rd.luks.uuid=luks-bd031a4f-a93d-43d3-b9ad-e9dfafabf824 rhgb quiet" --update-kernel="/boot/vmlinuz-6.0.9-300.fc37.x86_64"
Then check with sudo grubby --info=ALL to make sure the arguments have been removed from the offending kernel.
Then just take the arguments you want from the older kernel and add them to the newer one. sudo grubby --args="ro rootflags=subvol=root rd.luks.uuid=luks-bd031a4f-a93d-43d3-b9ad-e9dfafabf824 rhgb quiet" --update-kernel="/boot/vmlinuz-6.0.9-300.fc37.x86_64"
and check that everything is good with sudo grubby --info=ALL
I didn’t screw up the kernel but I just screwed up the network driver adapter and I had no access to the internet. I noticed that the previous kernel version still had internet so I wanted that to be the one I get to use from now on.
This is mostly true but users need to be aware that the kernel that is actually booted will never be removed by the package manager by design. Thus if the oldest kernel is active then the next oldest will be removed instead.