You are not logged in.
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=GRUBgrub-mkconfig -o /boot/grub/grub.cfgAfter 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
By reading the wiki...
https://wiki.archlinux.org/index.php/GR … menu_entry
Offline
By reading the wiki...
https://wiki.archlinux.org/index.php/GR … menu_entry
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
Read the wiki...
https://wiki.archlinux.org/index.php/GR … le_submenu
Offline
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
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
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.cfgNote 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 ![]()
Offline
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
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=0Then enter the number in /etc/default/grub
GRUB_DEFAULT=0Then update grub:
sudo grub-mkconfig -o /boot/grub/grub.cfgLast edited by Cavsfan (2020-06-16 22:05:45)
Offline