View previous topic :: View next topic |
Author |
Message |
sMueggli Guru
Joined: 03 Sep 2022 Posts: 514
|
Posted: Thu Oct 31, 2024 10:06 am Post subject: |
|
|
In which directory are you invoking dracut? From /usr/src/linux? Or from a directory where the "arch" folder does not exist? |
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 464 Location: Nijmegen
|
Posted: Thu Oct 31, 2024 10:36 am Post subject: |
|
|
Looking at the code in dracut, there is some cd'ing going on that I think is the cause of this problem. Though I don't quite understand why I cannot reproduce it on my end, probably I am not hitting the problematic cd before objcopy is run.
Anyway, please test this patch for dracut and let me know if it resolves your problem: https://github.com/dracut-ng/dracut-ng/pull/834 _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400 |
|
Back to top |
|
|
m3101 n00b
Joined: 30 Oct 2024 Posts: 7 Location: Somewhere Under the Rainbow
|
Posted: Thu Oct 31, 2024 6:59 pm Post subject: |
|
|
Quote: | What filesystem are you using? |
Ext4, no fancy LVM/RAID setups.
FAT32 for the EFI partition.
Quote: | In which directory are you invoking dracut? From /usr/src/linux? Or from a directory where the "arch" folder does not exist? |
From /usr/src/linux
Invoking it with $(pwd)/arch instead of just the relative path works, oddly enough.
Will do. _________________ "We are a way for the universe to know itself." - Carl Sagan |
|
Back to top |
|
|
m3101 n00b
Joined: 30 Oct 2024 Posts: 7 Location: Somewhere Under the Rainbow
|
Posted: Thu Oct 31, 2024 7:19 pm Post subject: |
|
|
The new script seems to have fixed the issue!
Running the old one still yields the objcopy error, but the new one, pulled from https://github.com/Nowa-Ammerlaan/dracut-ng/tree/main, runs perfectly and yields a bootable working image for my system.
Parameters:
Code: | dracut --kver XXXX --kernel-image arch/x86/boot/bzImage --uefi --hostonly --fstab --kmoddir XXXX |
Thanks for the agility, there. I'm used to stuff like this taking at the very least, a few weeks. _________________ "We are a way for the universe to know itself." - Carl Sagan |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 514
|
Posted: Fri Nov 01, 2024 9:45 am Post subject: |
|
|
Do /lib/modules/XXXX/vmlinuz or /boot/vmlinuz-XXXX exist? |
|
Back to top |
|
|
m3101 n00b
Joined: 30 Oct 2024 Posts: 7 Location: Somewhere Under the Rainbow
|
Posted: Fri Nov 01, 2024 2:38 pm Post subject: |
|
|
Quote: | Do /lib/modules/XXXX/vmlinuz or /boot/vmlinuz-XXXX exist? |
Nope. Neither of them.
/boot/vmlinuz-XXXX doesn't exist because I'm using /efi as the EFI partition, and I'm building a UKI, so I don't get a separate kernel and initramfs. It's a single .efi file.
Now /lib/modules/XXXX/vmlinuz I don't know about. Why should it be there?
Regardless, the problem is solved with Nowa's patch. It seems to have been an issue within dracut with relative paths. _________________ "We are a way for the universe to know itself." - Carl Sagan |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 514
|
Posted: Fri Nov 01, 2024 2:55 pm Post subject: |
|
|
Because of "man 8 dracut": Code: | --kernel-image <file>
Specifies the kernel image, which to include in the UEFI executable. The default is
/lib/modules/<KERNEL-VERSION>/vmlinuz or /boot/vmlinuz-<KERNEL-VERSION>. |
|
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 464 Location: Nijmegen
|
Posted: Fri Nov 01, 2024 3:12 pm Post subject: |
|
|
m3101 wrote: |
Now /lib/modules/XXXX/vmlinuz I don't know about. Why should it be there?
|
It exists if dist-kernels are used, we put a symlink there because the kernels rpm and deb packages have the kernel installed there and we like to have as much symmetry as possible in our gpkgs. You won't find this symlink for manually managed kernels.
Quote: | The new script seems to have fixed the issue! |
Great! Thanks for testing! This fix has now been merged and will be in dracut 106+. _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400 |
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 464 Location: Nijmegen
|
Posted: Fri Nov 01, 2024 5:14 pm Post subject: |
|
|
Quote: | Great! Thanks for testing! This fix has now been merged and will be in dracut 106+. |
Actually, scratch that, this is quite a big problem so I backported my fix into version 105 which I pushed just now. _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400 |
|
Back to top |
|
|
m3101 n00b
Joined: 30 Oct 2024 Posts: 7 Location: Somewhere Under the Rainbow
|
Posted: Sat Nov 02, 2024 12:47 am Post subject: |
|
|
Quote: | Great! Thanks for testing! This fix has now been merged and will be in dracut 106+. |
Thank you for solving.
Always glad to be of use.
Quote: | Actually, scratch that, this is quite a big problem so I backported my fix into version 105 which I pushed just now. |
Just out of curiosity/laziness (I could check the pull request, but meh): What exactly was the cause/solution? You mentioned "cd"s. Did you somehow keep track of the original working dir? It was an awfully fast fix, if so. _________________ "We are a way for the universe to know itself." - Carl Sagan |
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 464 Location: Nijmegen
|
Posted: Sat Nov 02, 2024 8:42 am Post subject: |
|
|
m3101 wrote: | Just out of curiosity/laziness (I could check the pull request, but meh): What exactly was the cause/solution? You mentioned "cd"s. Did you somehow keep track of the original working dir? It was an awfully fast fix, if so. |
Once I realized the problem was likely one of the calls to cd, the solution became easy. At the beginning of the script we now store the working directory and later when the arguments are handled we use this stored pwd to convert relative paths to absolute paths. _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400 |
|
Back to top |
|
|
|