debian-forge-composer/tools
Tomas Hozza a9ecf5a839 image-info: cover situation when /boot is on a separate partition
Some images with ESP, e.g. the `rhel-ec2-aarch64`, have the `/boot` on
a separate partition. `image-info` currently produces traceback on such
images, e.g.:

Traceback (most recent call last):
  File "/home/thozza/devel/osbuild-composer/./tools/image-info", line 1997, in <module>
    main()
  File "/home/thozza/devel/osbuild-composer/./tools/image-info", line 1991, in main
    report = analyse_image(target)
  File "/home/thozza/devel/osbuild-composer/./tools/image-info", line 1863, in analyse_image
    append_partitions(report, device, loctl)
  File "/home/thozza/devel/osbuild-composer/./tools/image-info", line 1849, in append_partitions
    append_filesystem(report, tree)
  File "/home/thozza/devel/osbuild-composer/./tools/image-info", line 1809, in append_filesystem
    with open(f"{tree}/grub2/grubenv") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp3i__6m1w/grub2/grubenv'

The reason is that `grub2/grubenv` on the `/boot` partition is a symlink
to `../efi/EFI/redhat/grubenv`. However the `efi` directory on the
`/boot` partition is empty and the ESP must be mounted to it for the
expected path to exist.

Modify `image-info` to mount the ESP to `efi` directory if it exists on
the inspected partition.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-15 11:32:17 +02:00
..
deploy tools: Add script to generate all test cases in VMs 2021-02-01 10:22:28 +01:00
test-case-generators test/fedora33: use rpmrepo instead of kernel mirrors 2021-07-14 12:05:45 +02:00
clouddot_build_deploy.sh tools: add delpoy script for clouddot 2020-12-22 15:27:39 +01:00
define-compose-url.sh ci: add slack notfications 2021-07-12 11:21:01 +03:00
deploy-openstack tools: add deploy-openstack 2020-10-20 15:43:30 +02:00
deploy-qemu tools/deploy-qemu: use sys.exit instead of exit 2021-06-22 14:45:54 +02:00
gen-certs.sh tools: Add internal container names to certs 2021-01-30 13:20:11 +00:00
gen-user-data tools/gen-user-data: don't depend on python3-pyyaml 2020-11-24 13:08:44 +01:00
image-info image-info: cover situation when /boot is on a separate partition 2021-07-15 11:32:17 +02:00
koji-compose.py test: use DISTRO_CODE to select tests case 2021-03-26 14:05:20 +00:00
libvirt_test.sh tests: fix journalctl killing once again 2021-06-10 07:40:36 +02:00
prepare-source.sh bump minimum go version to 1.15 2021-07-07 17:26:18 +01:00
provision.sh tests: Copy over test repos for RHEL point releases 2021-07-12 08:58:42 +02:00
run-koji-container.sh tools: move to new utility-container builds 2021-02-23 09:47:17 +01:00
update-distgit.py docs: document the release process 2021-07-14 12:11:35 +02:00