You are not logged in.

#1 2020-06-15 16:29:43

sp9z
Member
Registered: 2020-06-15
Posts: 10

[Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux

Hey,
I recently set up GRUB when only linux was installed on my system with these commands:

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

After some time, I installed linux-lts additionaly to the linux kernel. I regenerated the configuration of GRUB with the command above. Now, everytime I boot Arch Linux with the "Arch Linux" entry in the GRUB menu, it boots linux-lts instead of linux. How can I change this so it boots linux?

grub version: 2:2.04-7
efibootmgr version: 17-1
linux version: 5.7.2.arch1-1
linux-lts version: 5.4.46-1

(everything up to date)

Last edited by sp9z (2020-06-15 18:21:31)

Offline

#2 2020-06-15 16:37:19

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-06-15 16:45:55

sp9z
Member
Registered: 2020-06-15
Posts: 10

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux

Slithery wrote:

Thank you, did not find that. My bad. Marked as solved.

Edit: No, that does not fix my issue or did I misunderstood it?

In the main menu, I have two entries:

a) Arch Linux
b) Advanced options for Arch Linux

In the "Advanced options for Arch Linux" menu, the linux kernel is the third entry.

So in etc/default/grub, I would change it like this and regenerate the GRUB config afterwards:

GRUB_DEFAULT="1>2"

But that is not what I want.

What I want is the following:

If I select the "Arch Linux" entry in the main menu, it should boot linux instead of linux-lts.

Last edited by sp9z (2020-06-15 17:01:53)

Offline

#4 2020-06-15 17:26:54

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2020-06-15 17:50:21

sp9z
Member
Registered: 2020-06-15
Posts: 10

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux

Still not what I want to achieve. Does this change the kernel the "Arch Linux" entry boots? Does not look like it. It just removes the sub menus and moves their content in the main menu.

Last edited by sp9z (2020-06-15 18:05:04)

Offline

#6 2020-06-15 18:12:33

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux

You can simply edit the grub.cfg file and edit the existing entries or move move the entries around to whatever you like. You will lose your edits if you ever run grub-mkconfig again, but on Arch you should not need to run grub-mkconfig again (Arch does not do this for every kernel update like some other distros). Some people never run grub-mkconfig, instead manually generating the grub.cfg file from the start.

https://wiki.archlinux.org/index.php/Us … om_scratch
https://wiki.archlinux.org/index.php/Ta … e_grub.cfg
https://wiki.archlinux.org/index.php/GR … m_grub.cfg

Note that the wiki entries also tell you how to avoid losing your changes even if you do run grub-mkconfig again, but you really should not need to do this.

Offline

#7 2020-06-15 18:21:15

sp9z
Member
Registered: 2020-06-15
Posts: 10

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux

2ManyDogs wrote:

You can simply edit the grub.cfg file and edit the existing entries or move move the entries around to whatever you like. You will lose your edits if you ever run grub-mkconfig again, but on Arch you should not need to run grub-mkconfig again (Arch does not do this for every kernel update like some other distros). Some people never run grub-mkconfig, instead manually generating the grub.cfg file from the start.

https://wiki.archlinux.org/index.php/Us … om_scratch
https://wiki.archlinux.org/index.php/Ta … e_grub.cfg
https://wiki.archlinux.org/index.php/GR … m_grub.cfg

Note that the wiki entries also tell you how to avoid losing your changes even if you do run grub-mkconfig again, but you really should not need to do this.

Thanks! Now I can finally mark the thread as solved smile

Offline

#8 2020-06-15 18:22:41

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux

Great. I'd recommend making a backup copy of grub.cfg before you edit it, but that's kind of a given when editing system files.

Offline

#9 2020-06-16 22:03:59

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [Solved]Arch Linux entry in GRUB boots with linux-lts instead of linux

To get a list of the grub menuentries enter this

grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "{" -f1 | nl --starting-line-number=0

Then enter the number in /etc/default/grub

GRUB_DEFAULT=0

Then update grub:

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

Last edited by Cavsfan (2020-06-16 22:05:45)

Offline

Board footer

Powered by FluxBB