FS#68173 - [archiso] Cannot stat initramfs

Attached to Project: Arch Linux
Opened by Xuanrui Qi (xuanrui) - Friday, 09 October 2020, 21:12 GMT
Last edited by David Runge (dvzrv) - Thursday, 03 December 2020, 18:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I get this error while trying to build archiso:

[mkarchiso] INFO: Done! Packages installed successfully.
[mkarchiso] INFO: Copying /etc/skel/* to user homes...
[mkarchiso] INFO: Done!
[mkarchiso] INFO: Running customize_airootfs.sh in '/home/xuanrui/archiso/work/x86_64/airootfs' chroot...
[mkarchiso] WARNING: customize_airootfs.sh is deprecated! Support for it will be removed in a future archiso version.
==> WARNING: /home/xuanrui/archiso/work/x86_64/airootfs is not a mountpoint. This may have undesirable side effects.
Generating locales...
en_US.UTF-8... done
Generation complete.
[mkarchiso] INFO: Done! customize_airootfs.sh run successfully.
[mkarchiso] INFO: Creating a list of installed packages on live-enviroment...
[mkarchiso] INFO: Done!
[mkarchiso] INFO: Setting up SYSLINUX for BIOS booting from a disk...
[mkarchiso] INFO: Preparing kernel and intramfs for the ISO 9660 file system...
install: cannot stat '/home/xuanrui/archiso/work/x86_64/airootfs/boot/initramfs-*.img': No such file or directory
This task depends upon

Closed by  David Runge (dvzrv)
Thursday, 03 December 2020, 18:29 GMT
Reason for closing:  No response
Comment by Xuanrui Qi (xuanrui) - Friday, 09 October 2020, 21:13 GMT
This might be related to the fact that I have dracut installed and am using dracut for initramfs building. I do have mkinitcpio, though...
Comment by David Runge (dvzrv) - Friday, 09 October 2020, 22:36 GMT
@xuanrui: Thanks for the report.

Please read the bug reporting guidelines [1] before submitting a bug.
Note: You are not trying to build archiso, but a profile using the archiso package.

The following information is missing for a useful bug report:

* which version of archiso you are using
* what exact commands you are using to invoke mkarchiso
* the sources for any custom profile that you are building

It does not matter whether you are using dracut or mkinitcpio on your host system (at least it should not!).
mkarchiso calls mkinitcpio not on your host system, but in a chroot environment (the one that will be used on the image).

[1] https://wiki.archlinux.org/index.php/Bug_reporting_guidelines
Comment by Xuanrui Qi (xuanrui) - Saturday, 10 October 2020, 20:41 GMT
I'm using the latest version of archiso in extra (v48, that is), and according to the instructions given on the Wiki:

sudo mkarchiso -v -w work -o out /usr/share/archiso/configs/releng/

It doesn't really matter if I change the profile because I can't build the unmodified profile with the exact same error. I tried to add a few packages to the profile and of course that didn't help either.
Comment by David Runge (dvzrv) - Sunday, 11 October 2020, 07:46 GMT
@xuanrui: Please make sure to upgrade your system. The current version of archiso is 48.1.

Running `sudo mkarchiso -v /usr/share/archiso/configs/releng` locally (you can omit the `-w work -o out` because mkarchiso will use the current working directory anyways) I get a working iso.

I can not reproduce the above behavior, which seems to imply that files are not being created when triggering mkinitcpio in the chroot (in which case mkarchiso should fail before getting to this step).
As this likely happens further up, please attach a full log of the build:

`sudo mkarchiso -v /usr/share/archiso/configs/releng |tee mkarchiso.log`
Comment by Xuanrui Qi (xuanrui) - Sunday, 11 October 2020, 08:57 GMT
I do have the latest archiso, it was a typo:

xuanrui@xuanrui-desktop:~ % pacman -Q archiso
archiso 48.1-1

The full log is attached.
Comment by David Runge (dvzrv) - Sunday, 11 October 2020, 09:19 GMT
@xuanrui: Thanks for the update.

The log output is not from a call to mkarchiso with the verbose flag `-v`.
Please attach one using the verbose flag. Thanks!
Comment by Xuanrui Qi (xuanrui) - Sunday, 11 October 2020, 09:20 GMT
I did attach the -v flag:

xuanrui@xuanrui-desktop:~ % sudo mkarchiso -v /usr/share/archiso/configs/releng | tee mkarchiso.log
[sudo] password for xuanrui:
[mkarchiso] INFO: mkarchiso configuration settings
[mkarchiso] INFO: Architecture: x86_64
[mkarchiso] INFO: Working directory: work
[mkarchiso] INFO: Installation directory: arch
[mkarchiso] INFO: Output directory: out
[mkarchiso] INFO: GPG key: None
[mkarchiso] INFO: Profile: /usr/share/archiso/configs/releng
[mkarchiso] INFO: Pacman configuration file: /usr/share/archiso/configs/releng/pacman.conf
[mkarchiso] INFO: Image file name: archlinux-2020.10.11-x86_64.iso
[mkarchiso] INFO: ISO volume label: ARCH_202010
[mkarchiso] INFO: ISO publisher: Arch Linux <https://www.archlinux.org>
[mkarchiso] INFO: ISO application: Arch Linux Live/Rescue CD
[mkarchiso] INFO: Boot modes: bios.syslinux.mbr bios.syslinux.eltorito uefi-x64.systemd-boot.esp uefi-x64.systemd-boot.eltorito
[mkarchiso] INFO: Packages: amd-ucode arch-install-scripts b43-fwcutter base bind-tools broadcom-wl btrfs-progs clonezilla crda darkhttpd ddrescue dhclient dhcpcd diffutils dmraid dnsmasq dosfstools edk2-shell efibootmgr ethtool exfatprogs f2fs-tools fsarchiver gnu-netcat gpm gptfdisk grml-zsh-config haveged hdparm intel-ucode ipw2100-fw ipw2200-fw irssi iwd jfsutils kitty-terminfo lftp linux linux-atm linux-firmware lsscsi lvm2 lynx man-db man-pages mc mdadm memtest86+ mkinitcpio mkinitcpio-archiso mkinitcpio-nfs-utils mtools nano nbd ndisc6 nfs-utils nilfs-utils nmap ntfs-3g nvme-cli openconnect openssh openvpn partclone parted partimage ppp pptpclient reflector reiserfsprogs rp-pppoe rsync rxvt-unicode-terminfo sdparm sg3_utils smartmontools sudo syslinux systemd-resolvconf tcpdump terminus-font termite-terminfo testdisk usb_modeswitch usbutils vim vpnc wireless-regdb wireless_tools wpa_supplicant wvdial xfsprogs xl2tpd zsh

[mkarchiso] INFO: Setting up SYSLINUX for BIOS booting from a disk...
[mkarchiso] INFO: Preparing kernel and intramfs for the ISO 9660 file system...
install: cannot stat 'work/x86_64/airootfs/boot/initramfs-*.img': No such file or directory
Comment by David Runge (dvzrv) - Sunday, 11 October 2020, 09:32 GMT
You'll need to clear your work directory before doing this. Sorry, I should have mentioned this.
We'll require the output of the entire thing. When the work directory exists mkarchiso will only do the steps that have not been done yet.
Comment by Xuanrui Qi (xuanrui) - Sunday, 11 October 2020, 09:33 GMT
Sure, cleaned work/
Comment by David Runge (dvzrv) - Sunday, 11 October 2020, 17:33 GMT
@xuanrui: What do you have in /etc/pacman.d/hooks/? Do you disable the mkinitcpio provided hooks by symlinks to /dev/null [1]? Do you have any custom hooks there? If so, please share them.

Note:
The disabling of the mkinitcpio hooks on your host system would trump the hooks in the chroot system due to  FS#49347  et. al.

Could you try the following please and report with a log file again?
Copy the releng profile and modify the included pacman.conf to set `HookDir` to `/usr/lib/libalpm/hooks/`. Then run mkarchiso against that profile.

[1] https://wiki.archlinux.org/index.php/Dracut#Generate_a_new_initramfs_on_kernel_upgrade
Comment by Xuanrui Qi (xuanrui) - Sunday, 11 October 2020, 18:38 GMT
Okay, that fixed it. Thanks!
Maybe it should deserve a line of documentation on the Wiki...
Comment by David Runge (dvzrv) - Monday, 12 October 2020, 08:48 GMT
Yes, this is still not clearly defined behavior due to the state of integration.

Would you have time for yet another test?
Could you uninstall mkinitcpio and run mkarchiso again against the profile with the modified HookDir (as mentioned earlier)? Also make sure to start fresh there.
(Make sure to backup any configuration modification you did for mkinitcpio integration - you can reinstall mkinitcpio after the test!).

I just want to ensure that the mkinitcpio pacman hooks on the host can be absent for this to work.
Comment by David Runge (dvzrv) - Friday, 23 October 2020, 21:58 GMT
@xuanrui: Would you mind testing this merge [1] request towards archiso?

If you run mkarchiso from the local cloned repository on that branch you should be able to build the releng profile in /usr/share/archiso/configs/releng out-of-the-box.

[1] https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/87
Comment by David Runge (dvzrv) - Wednesday, 18 November 2020, 09:43 GMT
@xuanrui: Please verify whether you are now able to build the image without any further modifications:

```
sudo mkarchiso -v /usr/share/archiso/configs/releng/
```

Loading...