You are not logged in.

#1 2019-06-02 19:14:26

Orionis
Member
Registered: 2018-01-19
Posts: 27

How to build ArchISO with LTS kernel?

I have to create an ArchISO with ZFS included to troubleshoot a recently migrated system that hangs on trying to import its volumes.

The linux kernel that the ArchISO builder installs is the latest in the repo, which the precompiled ZFS packages don't support yet. I could try the dkms route, but I would rather build an ISO with the LTS kernel.

For now, I've accomplished this by including the linux-lts package in the packages-file and editing the build script to use vmlinuz-lts instead of vmlinuz. It works, with a few fails on loading modules. I consider that a "dirty" solution however, and wonder if perhaps there is already a supported means to create an LTS ArchISO instead of a standard kernel version.

Offline

#2 2019-06-05 12:11:52

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,586

Re: How to build ArchISO with LTS kernel?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-06-06 11:35:38

Orionis
Member
Registered: 2018-01-19
Posts: 27

Re: How to build ArchISO with LTS kernel?

Thanks for the reply.

This looks like what to do if one wants to alter a pre-existing build, by unpacking it and altering it. The archiso page gives an easy but semi-official way to just rebuild the ISO with changes. If your link is the official method, I'll stick with my little build.sh hack, it's a lot easier. I was kind of hoping there was a switch (or someone that created an unofficial build script) that enabled the lts kernel instead of the linux kernel. It seems like a good idea for the official arch iso anyways. I'm guessing they use the cutting-edge kernel to support the most recent hardware.

Offline

#4 2019-06-06 11:40:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,459

Re: How to build ArchISO with LTS kernel?

Why do you feel your way is a hack? I suspect that's just what the maintainers would do were they to use LTS kernel for the iso.

Offline

#5 2019-06-06 12:02:34

Orionis
Member
Registered: 2018-01-19
Posts: 27

Re: How to build ArchISO with LTS kernel?

Well, the build-script copies the vmlinuz kernel file to the boot parttition before building the img file. I just edited two lines to get it to copy vmlinuz-lts instead. The linux-kernel is still downloaded and installed onto the chrooted environment, but since the script only uses one kernel, it is ignored. That's what I would call a hack. An official way would be to create a build script that accepted a -lts switch that downloaded and installed the lts kernel instead of the standard kernel. It would likely add about 10-20 extra lines of code. I'm not entirely certain, my shell-scripting skills aren't up to par (except for pwsh). If it's too much work to prevent the download of the linux kernel, it's fine to leave it in as far as I'm concerned. I just want to avoid having to remember to edit the build script every time the archiso package updates.

Offline

#6 2021-05-07 20:44:38

lenhuppe
Member
From: New Hampshire
Registered: 2018-12-10
Posts: 97
Website

Re: How to build ArchISO with LTS kernel?

Orionis wrote:

I have to create an ArchISO with ZFS included to troubleshoot a recently migrated system that hangs on trying to import its volumes.

The linux kernel that the ArchISO builder installs is the latest in the repo, which the precompiled ZFS packages don't support yet. I could try the dkms route, but I would rather build an ISO with the LTS kernel.

For now, I've accomplished this by including the linux-lts package in the packages-file and editing the build script to use vmlinuz-lts instead of vmlinuz. It works, with a few fails on loading modules. I consider that a "dirty" solution however, and wonder if perhaps there is already a supported means to create an LTS ArchISO instead of a standard kernel version.

I am also needing to build an Arch Linux ISO which will boot into the LTS kernel. It looks like you have gotten farther than I have. Are you willing to share what you have figured out?

Offline

#7 2021-05-08 04:15:06

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: How to build ArchISO with LTS kernel?

lenhuppe wrote:

I am also needing to build an Arch Linux ISO which will boot into the LTS kernel. It looks like you have gotten farther than I have. Are you willing to share what you have figured out?

With the current Archiso you can boot into any 'single' kernel you like, there is no need to install 'Linux' at all.
Carefully read the Archiso wiki again, the answer is in that short page.
If you walk into problems better open a new thread and link to this one, this one is quite old!

Offline

#8 2021-05-14 22:28:45

jakalof
Member
Registered: 2020-05-15
Posts: 2

Re: How to build ArchISO with LTS kernel?

Yes -- this is an old thread -- but awhile back I had the same question.  It comes up because you are not aware of how the complete installation process plays out. Initially you don't create or download the LTS kernel -- rather you install it with pacman later on in the process.  Initially, you are booting up from the installation media with a non LTS kernel for purposes of configuring and setting up your installation.


At a very high level the process goes like this:

Create the image using the installation wiki and do initial boot and proceed with configuring system.  As part of that configuration process you will be installing a bunch of packages using pacman -- including the kernel of your choice (which is LTS for you).   At some point you will boot the system up using the LTS kernel for the first time -- not from your initial installation media but from your computer hd.

Offline

#9 2021-05-14 23:56:00

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: How to build ArchISO with LTS kernel?

@jakalov, it's nice of you to chime in :-) but this thread has nothing to do with installing.
There could be a plethora of reasons why he needs an ISO booting from the LTS kernel, he didn't tell us but I bet he, like the previous users that reacted are creating this ISO, a ZFS troubleshoot medium!

Offline

#10 2021-05-15 01:01:42

lenhuppe
Member
From: New Hampshire
Registered: 2018-12-10
Posts: 97
Website

Re: How to build ArchISO with LTS kernel?

qinohe wrote:

@jakalov, it's nice of you to chime in :-) but this thread has nothing to do with installing.
There could be a plethora of reasons why he needs an ISO booting from the LTS kernel, he didn't tell us but I bet he, like the previous users that reacted are creating this ISO, a ZFS troubleshoot medium!

I need to create an Arch ISO with OpenZFS running. I cannot currently do that because the latest Linux kernel is not compatible with the latest OpenZFS. There is no option to tell mkarchiso to use the LTS kernel which will work fine with the latest OpenZFS. If someone can show me how that is done I would be grateful. I have tried hacking it but with no success. All things considered Arch Linux running the LTS kernel on OpenZFS are ideal for my application.

Any advice is appreciated

Last edited by lenhuppe (2021-05-15 01:18:23)

Offline

#11 2021-05-15 01:24:56

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: How to build ArchISO with LTS kernel?

Teh reason I said the answer is in the wiki is, it is though may be a bit hidden..
It's actually not that hard, in your packages,conf remove linux and add linux-lts.
I used syslinux, so now add linux-lts.preset to mkinitcpio.d.
In 'syslinux' dir adlust 'archiso_sys-linux.cfg' to use your linux-lts kernel.
You can remove anything related to the linux kernel here!
Don't remove packages other than linux in packages.conf - that is important.(unless you know ...etc.)
Build the ISO and you should be done and booting into linux-lts

Anything related to ZFS you should figure out on your own! ;-)

edit: BTW. if you have problems building the ISO all together than open a new thread, I'm willing to help but not by hijacking this thread;)

Last edited by qinohe (2021-05-15 02:02:04)

Offline

#12 2021-05-15 08:03:41

Orionis
Member
Registered: 2018-01-19
Posts: 27

Re: How to build ArchISO with LTS kernel?

I did indeed have the same issue of OpenZFS not supporting the latest kernel while needing it as my troubleshooting and installation medium. Unfortunately it's been so long ago that I don't remember what I did exactly. Normally I keep a detailed log of the SSH output but it appears I didn't do so in this case unfortunately.

I have to say I'm a bit disappointed that after years the option to choose between standard or LTS kernel is still not a default option.

Hopefully @qinohe's instructions do what you need it to do.

EDIT: For the record, I think I simply edited the mkarchiso file. But looking at it (and the wiki page) now, it would seem it will copy all installed kernels, so in theory it should work as long as you select the right kernel in your boot loader.

Last edited by Orionis (2021-05-15 11:16:58)

Offline

#13 2021-05-15 14:05:27

nl6720
Wiki Admin
Registered: 2016-07-02
Posts: 315

Re: How to build ArchISO with LTS kernel?

qinohe wrote:

Don't remove packages other than linux in packages.conf - that is important.(unless you know ...etc.)

You will want remove broadcom-wl package too, otherwise you'll still pull in the linux package.

Offline

#14 2021-05-15 15:37:45

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: How to build ArchISO with LTS kernel?

nl6720 wrote:

You will want remove broadcom-wl package too, otherwise you'll still pull in the linux package.

Yep you're right forgot to mention it, sorry!

@Orionis, ha the OP;) for sure it works...

What do you mean by 'after years the option to choose between standard or LTS kernel is still not a default option'??
The releng files is just a framework, you make it what you like it to be, there is no default, unless you find the releng files default, they could have been empty too!

Though, like I said it's plain simple, if there is some interest I could make a screen-cast.

Offline

Board footer

Powered by FluxBB