You are not logged in.

#1 2018-03-06 17:10:30

Astral Axiom
Member
Registered: 2018-03-06
Posts: 27

[SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

I would like to switch to the linux-lts kernal to minimize things breaking with updates, but cannot seem to find very good instructions on how to do that with systemd-boot.  It is very easy when booting with grub, but I chose not to use grub this time as I was unhappy with the boot process with grub and thus wiped the drive and reinstalled using systemd-boot instead.  I am also curious about the linux-hardened kernal, is it more likely have broken systems upon updating than the linux-lts kernel.

Thanks so much:)

Last edited by Astral Axiom (2018-03-07 04:27:04)


"There are times when you get hit upon, try hard but you cannot give
Other times you'd gladly part with what you need to live
Don't waste the breath to save your face when you have done your best
When even more is asked of you, fate will decide the rest."  -Robert Hunter- {Built to Last}

Offline

#2 2018-03-06 17:24:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Please don't cut and paste the same preface into all your posts. We don't need to read all about your academic pursuits every time you open a thread.

Secondly, there is no point being fearful of breakage. It is pretty rare now and learning how to work with it when it does happen is part of the Arch ethos.

Thirdly, what exactly is it you don't understand about the documentation: https://wiki.archlinux.org/index.php/Sy … ot_entries


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-03-06 17:28:11

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

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

If the system does not boot chroot in from live media and downgrade the relevant package(s).
If the system is broken to the point you can not chroot in Pacman#Pacman_crashes_during_an_upgrade adjusting the instructions accordingly.

Offline

#4 2018-03-06 17:57:06

Astral Axiom
Member
Registered: 2018-03-06
Posts: 27

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Thank you both for the links.  I have looked over that Systemd-boot page before, but I did not see any explicit instructions on switching to a newly downloaded kernel. 

Do you recommend not switching to lts then?  Isn't it pointless to use the latest kernel on an older system like mine since the latest features are mostly focused on the latest hardware, or have I misunderstood that?

Last edited by Astral Axiom (2018-03-07 04:31:45)


"There are times when you get hit upon, try hard but you cannot give
Other times you'd gladly part with what you need to live
Don't waste the breath to save your face when you have done your best
When even more is asked of you, fate will decide the rest."  -Robert Hunter- {Built to Last}

Offline

#5 2018-03-06 18:03:56

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

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

What difference do you believe there is between creating the entry for linux which you should have already done and creating an entry for linux-lts or any other kernel?

$ cat /usr/share/systemd/bootctl/arch.conf
## This is just an example config file.
## Please edit the paths and kernel parameters according to your system.

title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=PARTUUID=XXXX rootfstype=XXXX add_efi_memmap

Offline

#6 2018-03-06 18:12:23

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

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Astral Axiom wrote:

Isn't it pointless to use the latest kernel on an older system like mine since the latest features are mostly focused on the latest hardware, or have I misunderstood that?

Yes by volume of commits and lines of code changed https://lkml.org/lkml/2018/1/28/173  but there are many new features with each release even if they may not be noticeable https://kernelnewbies.org/Linux_4.15
Edit:
Sorry double post

Last edited by loqs (2018-03-06 18:13:09)

Offline

#7 2018-03-06 18:51:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

How did you install Arch and configure your boot loader originally?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2018-03-06 19:37:43

Astral Axiom
Member
Registered: 2018-03-06
Posts: 27

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Ok, I get it.  I would simply change the line "initrd  /initramfs-linux.img" to "initrd  /initramfs-linux-lts.img" right?  I thought that may be the way to do it, but wanted to be sure since I am totally new to this and I was not completely understanding the ArchWiki.

Do I also change the line "linux   /vmlinuz-linux" to "linux   /vmlinuz-linux-lts"? 

Silly question: How do I mark these threads [Solved]?  I do not see the option anywhere.


"There are times when you get hit upon, try hard but you cannot give
Other times you'd gladly part with what you need to live
Don't waste the breath to save your face when you have done your best
When even more is asked of you, fate will decide the rest."  -Robert Hunter- {Built to Last}

Offline

#9 2018-03-06 19:42:47

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

1) Yes, you must change the kernel ( `vmlinuz-linux${customname}` ) at the same time as the initramfs ( `initramfs-linux${customname}.img` and `initramfs-linux${customname}-fallback.img` )

2) You edit the first post in the thread, and modify the thread title.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#10 2018-03-07 00:32:25

Astral Axiom
Member
Registered: 2018-03-06
Posts: 27

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Thanks so much for all the helpful info, one last confirmation on this and I can mark this solved for real.

so this is the contents of my "/boot/loader/entries/arch.conf" file:

title Arch Linux
linux vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=XXXXXXXX rw quiet loglevel=3 vga=current rd.systemd.show_status=auto rd.udev.log_priority=3 nowatchdog

so am I understanding correctly, to switch to linux-hardened or lts I simply download the kernel and then edit this file in this way:

title Arch Linux
linux vmlinuz-linux-lts                 (or "linux vmlinuz-linux-hardened")
initrd /intel-ucode.img
initrd /initramfs-linux-lts.img      (or "initrd /initramfs-linux-hardened.img")
options root=PARTUUID=XXXXXXXX rw quiet loglevel=3 vga=current rd.systemd.show_status=auto rd.udev.log_priority=3 nowatchdog

does the fallback.img need to be in this file too?    ("initramfs-linux-fallback.img" and it would be edited in the same way)


"There are times when you get hit upon, try hard but you cannot give
Other times you'd gladly part with what you need to live
Don't waste the breath to save your face when you have done your best
When even more is asked of you, fate will decide the rest."  -Robert Hunter- {Built to Last}

Offline

#11 2018-03-07 00:41:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,350

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

You can create new files, they all will lead to a distinct entry being generated, where you can choose which to boot.

Offline

#12 2018-03-07 00:53:35

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Well, the fallback would be in arch-hardened-fallback.conf with "title Arch Linux hardened, fallback image".

The ${customname}-fallback initramfs images go together with the main vmlinuz${customname} kernel, in case initramfs module autodetection fails, and you generally do not need those additional bootloader entries at all, so creating an arch-hardened-fallback.conf using the fallback is entirely optional.

Last edited by eschwartz (2018-03-07 00:54:18)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#13 2018-03-07 01:38:21

Astral Axiom
Member
Registered: 2018-03-06
Posts: 27

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

great, so without the fallback the edit is correct and that is all I need to do is download the kernel and make the edit?

like this:
title Arch Linux
linux vmlinuz-linux-lts                 
initrd /intel-ucode.img
initrd /initramfs-linux-lts.img     
options root=PARTUUID=XXXXXXXX rw quiet loglevel=3 vga=current rd.systemd.show_status=auto rd.udev.log_priority=3 nowatchdog


"There are times when you get hit upon, try hard but you cannot give
Other times you'd gladly part with what you need to live
Don't waste the breath to save your face when you have done your best
When even more is asked of you, fate will decide the rest."  -Robert Hunter- {Built to Last}

Offline

#14 2018-03-07 01:54:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code


And, rather than expecting to have your hand held, why not just try it yourself? You can always boot into the vanilla kernel if it doesn't work. Help vampirism is discouraged here.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#15 2018-03-07 04:08:33

Astral Axiom
Member
Registered: 2018-03-06
Posts: 27

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

Got it figured out and am running linux-lts kernel now.

For anyone reading this who is searching for the answer in an attempt to not have to post questions here is what I did to switch to the lts kernel:

After downloading the lts kernel and headers with "sudo pacman -S linux-lts" and "sudo pacman -S linux-lts-headers" just edit "/boot/loader/entries/arch.conf" by adding "-lts" to these two lines :


linux vmlinuz-linux-lts                 
initrd /initramfs-linux-lts.img     

I also edited the title line to:   title Arch Linux - LTS

I then rebooted and ran the "uname -r" command and saw that I was successfully running the linux-lts kernel:)

and now I am off to learn how to use code tags

Thanks so much for all the help everyone, I hope to help too when I gain more experience:)

Last edited by Astral Axiom (2018-03-07 04:34:04)


"There are times when you get hit upon, try hard but you cannot give
Other times you'd gladly part with what you need to live
Don't waste the breath to save your face when you have done your best
When even more is asked of you, fate will decide the rest."  -Robert Hunter- {Built to Last}

Offline

#16 2018-03-08 13:47:59

Rickrock
Member
From: The Netherlands
Registered: 2014-11-23
Posts: 46

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

You could also do what I have done, make 2 entries.
One with the lts-  and one with the newest kernel.

If one should fail you can pick the other from boot. (On the other hand, this has never been necessary...)

Offline

#17 2018-03-08 17:54:46

Astral Axiom
Member
Registered: 2018-03-06
Posts: 27

Re: [SOLVED] Switching to linux-lts or linux-hardened with systemd-boot

I am planning to go back and do that, I didn't because when I looked at /boot/loader/loader.conf it has "default" set as a string of numbers instead of just saying "default arch".  I think that must be the numerical location of the file as opposed to the name of the file, I do not fully understand it yet and if it is done incorrectly I will not be able to boot into my system.  I most likely will make a new file for the newest kernel once I feel a little more confident about it.  My desktop is newer hardware so I will most likely run the latest kernel when I install on it, I currently still use KDE Neon on the desktop.


"There are times when you get hit upon, try hard but you cannot give
Other times you'd gladly part with what you need to live
Don't waste the breath to save your face when you have done your best
When even more is asked of you, fate will decide the rest."  -Robert Hunter- {Built to Last}

Offline

Board footer

Powered by FluxBB