chroot_add_mount sys "$1/sys" -t sysfs -o nosuid,noexec,nodev,ro &&
in the pacstrap script, it works! I don't know why, and would like to ask if it's a bug.
The error when booting the .img generated with unmodified pacstrap is:
BdsDxe: failed to load Boot0001 "UEFI QEMU DVD-ROM QM00003 " from PciRoot(0x0)/Pci(0x1,0x1)/Ata(Secondary,Master,0x0): Not Found
BdsDxe: loading Boot0002 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x4,0x0)
BdsDxe: starting Boot0002 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x4,0x0)
:: running early hook [udev]
Starting version 245.7-1-arch
:: running hook [udev]
:: Triggering uevents...
Waiting 10 seconds for device /dev/disk/by-uuid/2502edd9-28c7-4848-8b89-b6a8a9e65d8e ...
ERROR: device 'UUID=2502edd9-28c7-4848-8b89-b6a8a9e65d8e' not found. Skipping fsck.
:: mounting 'UUID=2502edd9-28c7-4848-8b89-b6a8a9e65d8e' on real root
mount: /new_root: can't find UUID=2502edd9-28c7-4848-8b89-b6a8a9e65d8e.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#
For more background and how exactly to generate the error see this post:
https://bbs.archlinux.org/viewtopic.php?id=257951
Today I discovered that it boots fine if I use the modified pacstrap, although during pacstrap itself this error is thrown:
-> Running build hook: [autodetect]
==> ERROR: /sys does not appear to be mounted. Unable to use autodetection
The error is clear, since I uncommented the line in pacstrap which mounts sys. But why does the image boot now?
That's why I think the autodetect may be broken if using loop devices.
Is there a better way to install to img files, or should I file a bug? I don't even know against what. Pacman?
Thanks for your help!
]]>