You are not logged in.

#1 2020-05-24 09:34:17

mausy5043
Member
Registered: 2019-03-27
Posts: 21

[Solved] Change default boot loader

Hi,

I want to change the default kernel that is booted to the LTS kernel. I have both kernels installed:

$ pacman -Qe |grep linux
linux 5.6.14.arch1-1
linux-firmware 20200421.78c0348-1
linux-headers 5.6.14.arch1-1
linux-lts 5.4.42-1
linux-lts-docs 5.4.42-1
linux-lts-headers 5.4.42-1

I have created a boot loader entry for both:

$ la /boot/loader/entries/
total 8
-rwxr-xr-x 1 root root 162 Mar 23  2019 arch.conf
-rwxr-xr-x 1 root root 174 May 24 10:29 arch-lts.conf
$ cat /boot/loader/entries/arch.conf
title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
options root=UUID=67c82bd9-c6df-4b26-ac62-d3fc1006e0e5 rw
$ cat /boot/loader/entries/arch-lts.conf
title   Arch Linux LTS (main)
linux   /vmlinuz-linux-lts
initrd  /intel-ucode.img
initrd  /initramfs-linux-lts.img
options root=UUID=67c82bd9-c6df-4b26-ac62-d3fc1006e0e5 rw

I have also updated the `loader.conf` to start the LTS kernel:

$ cat /boot/loader/loader.conf
timeout 5
default arch-lts

When I reboot, I get the "normal" kernel not the LTS. This is confirmed by `bootctl`:

$ bootctl list
Boot Loader Entries:
        title: Arch Linux LTS (main)
           id: arch-lts.conf
       source: /boot/loader/entries/arch-lts.conf
        linux: /vmlinuz-linux-lts
       initrd: /intel-ucode.img
               /initramfs-linux-lts.img
      options: root=UUID=67c82bd9-c6df-4b26-ac62-d3fc1006e0e5 rw

        title: Arch Linux (default)
           id: arch.conf
       source: /boot/loader/entries/arch.conf
        linux: /vmlinuz-linux
       initrd: /intel-ucode.img
               /initramfs-linux.img
      options: root=UUID=67c82bd9-c6df-4b26-ac62-d3fc1006e0e5 rw

        title: Reboot Into Firmware Interface
           id: auto-reboot-to-firmware-setup
       source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f

How do I get the LTS kernel to boot by default?

Last edited by mausy5043 (2020-05-28 18:39:12)

Offline

#2 2020-05-24 10:14:09

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved] Change default boot loader

/boot/loader/loader.conf is ignored if the boot entry or timeout has been changed in the boot menu (ie, if you have pressed the up or down arrow in the boot menu to select another entry), to clear the override use

# bootctl set-default ""

https://wiki.archlinux.org/index.php/Sy … figuration

Offline

#3 2020-05-24 14:10:35

mausy5043
Member
Registered: 2019-03-27
Posts: 21

Re: [Solved] Change default boot loader


I must have read that paragraph tens of times by now. Until you put it in context, I wasn't aware that it actually meant I had to use

bootctl set-default ""

to reset the (fixed) default.


BTW I had already tried

 bootctl set-default "arch-lts"

without success.

Thanks. I'll give it a try.

Last edited by mausy5043 (2020-05-24 14:12:21)

Offline

#4 2020-05-24 14:17:53

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: [Solved] Change default boot loader

You also have to have the '.conf' in the 'default' now, so 'default arch-lts' won't work.

Offline

#5 2020-05-24 15:37:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [Solved] Change default boot loader

Scimmia wrote:

You also have to have the '.conf' in the 'default' now, so 'default arch-lts' won't work.

Since when?  It's working fine for me.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2020-05-24 15:54:20

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

Re: [Solved] Change default boot loader

Please change your topic title to state your actual issue -- you are not talking about changing the default boot loader (maybe you meant "default boot order"?).

Offline

#7 2020-05-25 04:26:09

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: [Solved] Change default boot loader

Trilby wrote:
Scimmia wrote:

You also have to have the '.conf' in the 'default' now, so 'default arch-lts' won't work.

Since when?  It's working fine for me.

Since 245. It probably works for you because you have a default stored in an EFI variable, so the default entry is ignored.

Edit for PR: https://github.com/systemd/systemd/pull … 15d756e719

Last edited by Scimmia (2020-05-25 04:57:17)

Offline

#8 2020-05-25 14:02:35

mausy5043
Member
Registered: 2019-03-27
Posts: 21

Re: [Solved] Change default boot loader

Scimmia wrote:
Trilby wrote:
Scimmia wrote:

You also have to have the '.conf' in the 'default' now, so 'default arch-lts' won't work.

Since when?  It's working fine for me.

Since 245. It probably works for you because you have a default stored in an EFI variable, so the default entry is ignored.

Edit for PR: https://github.com/systemd/systemd/pull … 15d756e719

Well, so much for the wiki.

Offline

#9 2020-05-25 14:07:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: [Solved] Change default boot loader

mausy5043 wrote:

Well, so much for the wiki.

The wiki has the .conf in it. IIRC, I added it myself. No idea what you're talking about.

Offline

#10 2020-05-25 14:35:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [Solved] Change default boot loader

Indeed.  I was just seeking clarification as what is currently in the wiki already matched what Scimmia said.  I was just surprised that my old-style config still works.  But Scimmia's answer to that seems right as I have not done anything to update the default (e.g., no bootctl commands) in some time.

If you mean what the wiki formerly said is no longer correct ... well, yeah, things change over time.

Is your problem resolved, or is there a remaining concern or question?  If it's solved, please edit your first post to prepend [SOLVED] to the title.  If not, please clarify what is yet to be accomplished.

Last edited by Trilby (2020-05-25 14:37:53)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2020-05-25 14:50:27

mausy5043
Member
Registered: 2019-03-27
Posts: 21

Re: [Solved] Change default boot loader

Scimmia wrote:
mausy5043 wrote:

Well, so much for the wiki.

The wiki has the .conf in it. IIRC, I added it myself. No idea what you're talking about.

I stand corrected. I must have overlooked that too. :-\

Offline

Board footer

Powered by FluxBB