You are not logged in.

#1 2021-01-28 20:47:53

Mula
Member
Registered: 2020-08-24
Posts: 3

Problem with grub.cfg initrd order

Greetings everyone,
I had some problems with boot partition on my linux so I had to delete the boot folder and make it again. Everything works fine now but I'm running into a strange problem with initrd parameters order.

Earlier I never had this problem so I really dont know what is happening.

I have a Lenovo Thinkbook 15IIL which doesn't have native support for its touchpad. Six months ago I found a solution which required modification of dsdt.dsl script. I followed the instructions and everything worked fine. Now in my boot folder there is a acpi_fixed.cpio file and my grub config points to it:

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_o>
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod fat
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  0815-6565
        else
          search --no-floppy --fs-uuid --set=root 0815-6565
        fi
        echo    'Loading Linux linux ...'
        linux   /vmlinuz-linux root=UUID=12fdf77d-be25-46f0-9237-2b5b3e83721b rw net.ifnames>
        echo    'Loading initial ramdisk ...'
        initrd  /acpi_fixed.cpio /initramfs-linux.img <- this line
}

initrd  /initramfs-linux.img /acpi_fixed.cpio <- this works

Before the boot issue everything worked normally, but after this (and after repeating the same touchpad fix procedure multiple times) nothing seemed to work. Acpi script wasn't loading or wasn't responding. Finally after hours of experimenting I figured out that if i reorder parameters of initrd (acpi and linux img) that it works as expected.

The problem is that every time i run mkconfig the order gets switched back to original and then the acpi_fixed script fails to load (or it probably loads but touchpad doesn't work). Earlier I didn't have this problem so I don't know what would be the solution. Should I manually reorder them every time I make the config, or is there something that i'm doing wrong.

Last edited by Mula (2021-01-28 20:53:30)

Offline

#2 2021-01-29 00:38:21

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: Problem with grub.cfg initrd order

You could try switching to systemd-boot you know

Offline

#3 2021-01-29 01:55:45

ArleCamille
Member
Registered: 2021-01-28
Posts: 10

Re: Problem with grub.cfg initrd order

As a temporary fix, try changing the subject initramfs file's name into something like:

z-acpi-fixed.img

or

initramfs-linux-acpi-fix.cpio

......or whatever that falls alphabecially later than in initramfs-linux.img. I suspect grub-mkconfig sees files in the alphabetical order s. t. it doesn't recognize the files which should actually be loaded later.

I will investigate the issue and return with a better fix later.

EDIT: honestly, though, I think the ultimate solution would be not running grub-mkconfig that often. grub-mkconfig is definitely not something which has to be run for each update of GRUB.

Last edited by ArleCamille (2021-01-29 03:37:56)

Offline

#4 2021-01-29 15:26:35

Mula
Member
Registered: 2020-08-24
Posts: 3

Re: Problem with grub.cfg initrd order

ArleCamille wrote:

As a temporary fix, try changing the subject initramfs file's name into something like:

z-acpi-fixed.img

or

initramfs-linux-acpi-fix.cpio

......or whatever that falls alphabecially later than in initramfs-linux.img. I suspect grub-mkconfig sees files in the alphabetical order s. t. it doesn't recognize the files which should actually be loaded later.

I will investigate the issue and return with a better fix later.

EDIT: honestly, though, I think the ultimate solution would be not running grub-mkconfig that often. grub-mkconfig is definitely not something which has to be run for each update of GRUB.

Yes you are right, I usually don't touch mkconfig, all I have to do now is to configure dual boot and I'll probably leave it alone. I was just confused why does the order matter. My best guest would be that everything initialzied before the linux image would't get ignored because it's loaded before it so I might do some testings just for curiosity. You answer to append a letter should do the trick.

Thank you

Last edited by Mula (2021-01-29 15:27:29)

Offline

#5 2021-01-29 17:19:25

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Problem with grub.cfg initrd order

You can use the GRUB_EARLY_INITRD_LINUX_CUSTOM key in /etc/default/grub, see https://www.gnu.org/software/grub/manua … figuration for more on this.


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB