You are not logged in.

#1 2023-03-01 08:11:03

Firestar
Member
From: Beijing, China
Registered: 2021-07-19
Posts: 116
Website

How to switch different kernels?

I want to switch from linux to linux-mainline

Which should I install and uninstall?

Is linux-mainline-headers necessary?

Should I re-config grub?

grub-mkconfig -o /boot/grub/grub.cfg

This can be added to Archwiki

Last edited by Firestar (2023-03-01 08:13:48)


Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.

Offline

#2 2023-03-01 09:16:38

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

Re: How to switch different kernels?

You can have multiple kernels installed side by side, you do not need to uninstall anything.

linux-mainline-headers is only necessary if you have to compile your own kernel modules, a common candidate is the nvidia module via nvidia-dkms or virtualbox guest modules and so forth.

You will want to reconfigure GRUB after installing the kernel package, note the recent warnings regarding GRUB versions as well and as a safety measure you probably want to reinstall the latest GRUB payload with the corresponding grub-install command

Offline

#3 2023-03-01 15:18:11

Firestar
Member
From: Beijing, China
Registered: 2021-07-19
Posts: 116
Website

Re: How to switch different kernels?

Thanks! So I only need to install packages like:

linux linux-hardened linux-lts linux-mainline

I found that if I do not update grub, it will not find the kernel when booting, and I can only re-install Archlinux

like this

Loading Linux linux …
error: file /vmlinuz-linux not found.
Loading initial ramdisk …
error: you need to load the kernel first.

Last edited by Firestar (2023-03-03 02:13:59)


Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.

Offline

#4 2023-03-01 15:20:24

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

Re: How to switch different kernels?

Firestar wrote:

I found that if I do not update grub, it will not find the kernel when booting

That's right. You'll have to make the BootLoader be aware of changes you're making! wink


<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

#5 2023-03-01 15:32:49

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 134
Website

Re: How to switch different kernels?

and I can only re-install Archlinux

Relax, there's no need to nuke your system if you don't regenerate the grub config.
In the worst case, grub doesn't have a entry for an existing kernel, and you need to chroot in your system to update grub.


I'm just someone. Please use [code] [/code] tags.

Offline

#6 2023-03-01 17:40:05

xerxes_
Member
Registered: 2018-04-29
Posts: 1,061

Re: How to switch different kernels?

and I can only re-install Archlinux

If something goes wrong and grub won't boot system, you can also use "grub rescue":
https://phoenixnap.com/kb/grub-rescue - Fixing Boot Failure: Via Grub Terminal part, but see also from beginning for main concept,
and this is how in Archlinux it is done:
https://wiki.archlinux.org/title/GRUB#U … ue_console
to boot system and reinstall grub, so you don't need to boot from live system.

Last edited by xerxes_ (2023-03-01 17:42:03)

Offline

#7 2023-03-01 17:55:06

loqs
Member
Registered: 2014-03-06
Posts: 18,885

Re: How to switch different kernels?

You are aware linux-mainline is currently slightly behind linux 6.2 vs 6.2.1 until 6.3-rc1 is released.

Offline

Board footer

Powered by FluxBB