Changing kernel

Can anyone sum up how to change kernel?

super duper confused

I cannot seem to replay to this thread.. but thanks tbj for your reply.
Problem is, I cannot access the boot menu. it never shows up when rebooting.
i have tried everything you have surgested to-date with no result saddly.

nope, no menu. same with ESC, and Holdinding it down and stuff- I have tried lots

well, I have tried to look myself. I would really appreciate if someone could work with me to fix this. being muted is a bit of a pain for that mind

sigh when first making this post I had done lots of research and trying to fix it myself. Just it seems like if I say the wrong thing you get MORE upset than if I just say nothing at all. thats the impression I get from these forms. Yes, I have read the "is garuda friendly to newbies" post...

do I explain my situation as I see it? do I explain in terms of what I tried to fix, in assumption you know how it was before?
do I try to filter out explaining changies that I dont think would affect the issue?

The problem, as is the fix ,im sure, is I do not know how to change my kernel. The Boot menu would be great to have- I dont have one. Either I fix that then change kernel, or do it though the comandline(dont know how to do)

worst part: I am not using a kernel (!from what I can tell!) and all I can do on my pc is use a terminal as its booting (again, I didnt say this because id get a slur of rage to my ignorence)

1 Like

Try pressing the shift key repeatedly as you're booting. Also try the delete key.

You likely cannot reply because you have made a lot of posts today. New users are limited to what they can post by the forum software.The forums spam filters kick in if a new user is posting a lot of content shortly after registering. I wish the spam filters would limit the spam that is currently coming to my inbox via PM's. :smiley:

Your post was moved to the 4xx category by another mod because it originally had very little info and was an issue that you can generally search for yourself.

3 Likes

This has been moved back to #issues-assistance:newbies . The forum doesn't intend to be antagonistic towards new users, but we have to protect the time of people helping by insisting that posts contain a reasonable level of information as a starting point.

6 Likes

Try not to get frustrated there's a steep learning curve for those not used to an Arch based distro.

To install an alternate kernel you can use the terminal:

sudo pacman -Syu linux linux-headers

Or:

sudo pacman -Syu linux-zen linux-zen headers

Or:

sudo pacman -Syu linux-lts linux-lts headers
2 Likes

thank you.

I the install by doing exactly that:

sudo pacman -Syu linux-zen linux-zen headers

after doing that, I done

sudo vim /etc/default/grub

(properly saved and such, not to worry)

and put a "-1" on "GRUB_TIMEOUT=-1" as shown in the gnu grub manual and arch wiki.

(i did this because i noticed never seeing the grub menu, assuming it was a delibrite choice of the garuda devs to make boot faster. So i i done this to make sure i was able to select the kernel when i booted. clearly: that little plan did not work)

i reloaded the config file, then shut down.

right now, it seems that the install went ok, in that I am on the zen kernel. But literally everything else is not ok, and all i want to do is make it the defualt kernal again. No need to use the snapshots and what not- everything is saved and happy and I am happy enough navigating my filesystem though this low-level terminal im in. There must be a way of chanigng kernel back to the default one

1 Like

The issue you are probably experiencing is that grub currently doesn't support selecting the kernel automatically with the btrfs file system. Whether that is a bug, or just hasn't been fully implemented yet I can't say for sure, but it's not currently working with the btrfs file system. That is not a Garuda issue it is a grub bug/limitation.

Generally grub will boot you into whatever it considers the most recent Linux kernel version. Sadly to avoid this you either need to manually select your kernel at boot or remove the others it has a preference to boot into.

Unless something has changed recently this is my understanding of how grub is handling btrfs based systems ATM.

If anyone else has information on how to successfully set alternate kernels at boot with Grub please pipe in. Perhaps things have changed with regards to grub and btrfs. It would be nice if there has been recent improvements because this is definitely a pain with using grub with btrfs.

oh i see. interesting.

I have not done anything else to do with kernels, so it stands to reason if zen is deleted, default will take its place and the world will be happy..?

how can i delete zen whilst using it?

i couldnt made sense of the results i got from this, but, i do get a message saying "error: sparse file not allowed".

i am sort of hoping now that if i can delete zen, then reboot (assuming it does not crash) it will boot normaly

This error is in regards to the bug/limitation of grub with trying to set options in its configuration file that it does not support with btrfs. The error isn't really a big deal, as it shouldn't cause problems. If you install the linux-mainline kernel grub will likely boot into it as it is the most recent of any kernel releases (experimental). Then I guess you can delete other kernels. Not sure which kernel you are hoping to run. Zen is a great kernel and may be switching back to it as the default.

If you check the pacman documentation on the Archwiki it will explain all of Pacman's options for you. Or you can simply run the following command which explains its removal/uninstall options:

pacman -R --help

Got to go to a dentist apt now, no more time for this ATM. Good luck.

2 Likes

aaaand it works :slight_smile: i removed with -Rsn and had to change my config for grub a little. managed in the end and it looks ok.

defo not easy doing this head on :woozy_face:

2 Likes

Using a non-btrfs /boot partition would make grub use environment variables AFAIK.

1 Like

Yes I'm aware of that workaround, and if I was doing a fresh install I'd probably go that route. However, I don't think that's a very good thing to suggest to new users once the system is already installed. Changing the partition setup post install really isn't that newbie friendly.

Thanks for the suggestion though @petsam. Hopefully, they'll fix this behaviour so that's not necessary before btrfs is deprecated. :crazy_face:

2 Likes

This is the most frustating experience. I have tried everything, including Garuda's grub editor to "save" your last selection (I am using btrfs) which doesn't work and throws up the error the OP stated. I had to restore my grub and even then the error persist. The way to get rid of it, run the following after removing all the "save" options;

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

So, I am trying to run the latest kernel 5.15 (not zen) and I have lts also installed for "emergency" purposes. It keeps defaulting to lts on boot, unless I manually select a kernel each time. I have even tried removing lts, rebooting and reinstalling thinking it would then default behind the main 5.15 kernel, NOPE! It keeps selecting lts by default. :man_shrugging:

Not to belittle your frustration Rodney, because I've been there. I'm only on my cell ATM, so I can't check my notes, but I and others have worked through this issue. The workarounds have been posted a fair number of times on the forum.

To the best of my recollection the workaround involves editing the grub config file then deleting and reinstalling the kernels in the order you wish to use them. In other words delete all kernels but the one you desire to boot into, and then install other kernels you wish to use as a backup/alternate.

OK, I just located and old post of mine on this topic with far greater details for you:

Others may have used a different method, but there definitely are workarounds for this issue posted on the forum.

Good luck.

4 Likes

Thanks @tbg , yes, I have done this. I probably didn't communicate it well above. One hand was squeezing my stress ball. So, that didn't work.

However, I will try your solution post in a few. I too have fixed this in the past (at least I think, fuzzy) I just couldn't find anything on it re the web. I will give this a go, thanks again.

2 Likes

btw ... if you want a different kernel as default with btrfs, you can use something like this:

GRUB_DEFAULT="gnulinux-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4>gnulinux-linux-xanmod-tt-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4"

you can see here, I am using linux-xanmod-tt , it will always be the default, no matter the updates and installations !

put that line on /etc/default/grub, and check your /boot/grub/grub.cfg to know the proper text to put there.

1 Like

I replied on the post you linked by accident, but it is probably for the best.

Here is what I wrote;

'GRUB_DEFAULT' is the number entry in the menu selection. For example, above you originally had me use "2" which defaulted to the menu option for Snapper/restores/backups. I switched it to "1" and updated grub, then it defaulted to the "advanced" menu options, which is kind of what I want, except....

I followed your instructions using

sudo mhwd-kernel -r linux-zen

To remove all the kernels except the one I wanted, rebooted, etc.

Adding back the 'linux-lts' for backup using;

sudo mhwd-kernel -i linux-lts

...did not work. After prompting me for my root password, it would just freeze. I even rebooted, thinking something is stuck preventing this. Nope. I ended up just using;

sudo pacman -S linux-lts

Which in the end, after a reboot, defaulted the to the wrong (linux-lts) kernel.

I will read through the rest of your posts now.

I looked in '/boot/grub/grub.cfg` but I do not see anything that resembles a kernel like your example above. :man_shrugging:

GRUB (or grub-mkconfig) sorts installed kernels alphabetically, which means grub-default=0 will always pick the first one in that order. For whatever reason, - is sorted first so if you have linux, linux-lts, and linux-zen installed then you end up with:

  1. linux-lts
  2. linux-zen
  3. linux

as the menu order.

I don't think there's a patch for GRUB to enable the grub-default=SAVED boot entry option on btrfs, so I wonder whether a separate ext4 /boot might be something to look at... though it would make the default partition layout more complicated...

its in the menuentry lines:

for example:
submenu 'Opções avançadas para Garuda Linux' $menuentry_id_option 'gnulinux-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4' {

becomes "gnulinux-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4"

and

menuentry 'Garuda Linux, com Linux linux-xanmod-tt' --class garuda --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-xanmod-tt-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4'

becomes "gnulinux-linux-xanmod-tt-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4"

so: "gnulinux-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4>gnulinux-linux-xanmod-tt-advanced-591fcf70-cdd4-45c4-a160-3f1f56b5a8a4"

meaning "submenu-entry>xanmod-entry" ( notice the ">" in the middle, if its toproot menu entry, doesn't need that, being only the xanmod-entry )

1 Like

If Garuda wasn't using the fancy style grub menu where it hides all the other kernels under "advanced", then this would work. However, instead of "0" or "1" applying to the kernel, in Garuda's fancy grub menu, it selects the headers instead, "advanced", "restore".

I don't think there's a patch for GRUB to enable the grub-default=SAVED boot entry option on btrfs, so I wonder whether a separate ext4 /boot might be something to look at... though it would make the default partition layout more complicated...

From my findings, this is correct on both items, there is no patch for using the "saved" option for btrfs. There was mention of using /home or I guess as you mentioned /boot as a work-around, but looking at the process it was complicated.

I think this is a kind of an issue for using btrfs. It doesn't seem to go in any sort of order. I had the mainstream kernel 5.15 and it kept defaulting to the older 5.10 lts. :man_shrugging: I am thinking about switching my laptop to a distro that uses ext4 where I can control the grub menu, maybe RebornOS (still uses ext4) and add chaotic-aur repos. I am a distro-tester for EnOS and I know they are switching to btrfs.

1 Like