You are not logged in.

#1 2014-08-26 09:52:53

Markus.N2
Member
From: Germany
Registered: 2013-08-22
Posts: 106

How can I configure a slightly different initrd for lts kernel ?

Hi,

Because of the uas problem with my external usb3 harddisk (see uas problem in linux 3.15.1, need advice on the problem), I needed to add a quirk file: /etc/modprobe.d/ignore_uas.conf

It works fine with the standard kernel, but with the lts kernel, it causes systemd-modules-load.service to fail. I think it is because the lts kernel does not know this quirk.

Is there an elegant way to make mkinitcpio ignore this file for the lts initrd by configuration ?
I really do not want to remove / re-add this file every time one of the kernels is updated. Or when both kernels are updated at once, I do not want to remove it, create the lts initrd once more manually, then re-add it ...

Thanks and Regards,
Markus

Offline

#2 2014-08-26 10:04:29

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How can I configure a slightly different initrd for lts kernel ?

If it's just the initramfs image you're concerned about, write separate config files for each kernel and specify them in the corresponding *.preset file in /etc/mkinitcpio.d/ .

Can I ask why you need to use both kernels?

Offline

#3 2014-08-26 11:01:23

Markus.N2
Member
From: Germany
Registered: 2013-08-22
Posts: 106

Re: How can I configure a slightly different initrd for lts kernel ?

I need the lts kernel as a fallback when an update of the standard kernel makes the system unbootable. And I already needed it once ...

Offline

#4 2014-08-26 12:00:14

Markus.N2
Member
From: Germany
Registered: 2013-08-22
Posts: 106

Re: How can I configure a slightly different initrd for lts kernel ?

OK, back to topic :-)

I just did a bit of research about /etc/mkinitcpio.d/ (indeed, I already have two .preset files), but I could not find any information about excluding files from /etc.
Maybe I should have asked about how to exclude files in general.

What I found out is that the files from /etc/modprobe.d are added by /usr/lib/initcpio/install/modconf.
My current idea is to copy it to /usr/lib/initcpio/install/modconf-lts and change it a bit.

But here comes the next problem: For this solution, I would need tow different hooks lists for the standard and the lts kernel. But te hooks list is configured in the global /etc/mkinitcpio.conf, not in the preset files.

Offline

#5 2014-08-26 13:26:49

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: How can I configure a slightly different initrd for lts kernel ?

Markus.N2 wrote:

But te hooks list is configured in the global /etc/mkinitcpio.conf, not in the preset files.

But the conf file is specified in the preset file:

$ cat /etc/mkinitcpio.d/linux.preset
# mkinitcpio preset file for the 'linux' package

ALL_config="/etc/mkinitcpio.conf"
...

So in linux.preset you set ALL_config to /etc/mkinitcpio.conf (or whatever really) and in linux-lts.preset you set ALL_config to something else.

Last edited by alphaniner (2014-08-26 13:30:46)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2014-08-26 13:49:35

Markus.N2
Member
From: Germany
Registered: 2013-08-22
Posts: 106

Re: How can I configure a slightly different initrd for lts kernel ?

alphaniner wrote:

But the conf file is specified in the preset file

Ooops, how could I overlook that ?!?

OK, I think I can work woth that, although duplicating (and keeping in sync) two complete mkinitcpio.conf's will be a bit long-winded.

Thanks.

Offline

Board footer

Powered by FluxBB