You are not logged in.

#1 2024-01-11 17:37:32

558 jakobsson
Member
From: Sweden
Registered: 2010-01-19
Posts: 31

[SOLVED-worked]Remove linux kernel, keep the lts kernel

I have an working Arch dual boot install. Using reFIND as boot manager. All works fine, excepts when  pacman -Syu installs a lts-kernel that’s never than the normal kernel. There is an old thread about that. In those situations I have to guess which lines in the reFIND menu that actually works. The default option freezes the computer and I need to use the power switch.

Is it enough to do as this?

1. Remove

pacman -Rs linux 

2. After that rewrite refind_conf from this:

 
"Boot with standard options"  "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-linux.img"
"Boot to single-user mode"    "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap single"
"Boot with minimal options"   "ro root=UUID=0c55c21d-ae01-426d-843b-03c8fd594c08"
"Boot using lts kernel"  "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap sysrq_always_enabled=1 initrd=intel-ucode.img initrd=initramfs-linux-lts.img"

to this

 
"Boot lts kernel with standard options"  "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-linux-lts.img"
"Boot to single-user mode"    "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap single"
"Boot with minimal options"   "ro root=UUID=0c55c21d-ae01-426d-843b-03c8fd594c08"
"Boot using lts-fallback"  "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap sysrq_always_enabled=1 initrd=intel-ucode.img initrd=initramfs-linux-lts-fallback.img"

I am unsure about running some of the scripts that comes with reFINd. The mkrl.conf seems unnecessary to run, the refind_x64.efi is already present in the ESP. How about the refind_install script, seems also unnecessary?

Last edited by 558 jakobsson (2024-01-12 18:27:45)

Offline

#2 2024-01-11 20:30:42

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

Re: [SOLVED-worked]Remove linux kernel, keep the lts kernel

Will likely work, but reading your original "problem", smells like you didn't setup the extra_linux_versions config that should allow Refind's autodetection to do things correctly: https://wiki.archlinux.org/title/REFInd … _by_rEFInd

Offline

#3 2024-01-11 20:38:11

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: [SOLVED-worked]Remove linux kernel, keep the lts kernel

558 jakobsson wrote:

to this

"Boot lts kernel with standard options"  "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-linux-lts.img"
"Boot to single-user mode"    "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap single"
"Boot with minimal options"   "ro root=UUID=0c55c21d-ae01-426d-843b-03c8fd594c08"
"Boot using lts-fallback"  "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap sysrq_always_enabled=1 initrd=intel-ucode.img initrd=initramfs-linux-lts-fallback.img"

That's seems good for linux-lts.
Actually, there's no real needs for using *scripts: rEFInd is correctly installed and working, since your computer's UEFI Firmware loads it on boot.


Sorry, maybe I'm misunderstanding your needs, but why would you need removing one kernel (or another)?

558 jakobsson wrote:

excepts when  pacman -Syu installs a lts-kernel that’s never than the normal kernel. There is an old thread about that. In those situations I have to guess which lines in the reFIND menu that actually works

Were you using %v for the initrd= part?

If you include a %v string in the options set, the detected kernel version will be substituted. This is intended for cases in which you have multiple initrd files and you want to have separate boot options for each one; you would then explicitly include an option like initrd=myinitrd-%v.img. A second line in refind_linux.conf might then reference initrd=other-initrd-%v.img; one option in rEFInd will then launch the kernel with initrd=myinitrd-5.5.0.img and the other will pass initrd=other-initrd-5.5.0.img, if the kernel's version string is 5.5.0.



http://www.rodsbooks.com/refind/linux.html#efistub

Last edited by d.ALT (2024-01-11 20:39:02)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#4 2024-01-12 16:25:39

558 jakobsson
Member
From: Sweden
Registered: 2010-01-19
Posts: 31

Re: [SOLVED-worked]Remove linux kernel, keep the lts kernel

V1del wrote:

Will likely work, but reading your original "problem", smells like you didn't setup the extra_linux_versions config that should allow Refind's autodetection to do things correctly: https://wiki.archlinux.org/title/REFInd … _by_rEFInd

Thanks for your input, I think av have that setting correct.
From my refind.conf

 
# Default is no extra version strings
extra_kernel_version_strings linux-lts,linux

Offline

#5 2024-01-12 17:09:29

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

Re: [SOLVED-worked]Remove linux kernel, keep the lts kernel

Then you'd use

"Boot with standard options"  "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-%v.img"
"Boot to single-user mode"    "root=PARTUUID=01a4f584-65b2-4163-ad2f-666e7edd71e9 rw add_efi_memmap single  initrd=intel-ucode.img initrd=initramfs-%v.img"

as your config and refind should create relevantly distinct entries.

Offline

Board footer

Powered by FluxBB