From 514ccd52de278d8df625cabec0b75d937a79d280 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Sun, 24 Sep 2023 07:49:44 +0700 Subject: [PATCH] some funny --- rustfmt.toml | 2 +- tests/katsudon-arm.yaml | 2 ++ tests/postinst.sh | 24 ++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index 825a7c5..e9c733d 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -5,4 +5,4 @@ match_block_trailing_comma = true use_field_init_shorthand = true use_try_shorthand = true hard_tabs = true -fn_args_layout = "compressed" +fn_args_layout = "Compressed" diff --git a/tests/katsudon-arm.yaml b/tests/katsudon-arm.yaml index 9faa0fd..9580998 100644 --- a/tests/katsudon-arm.yaml +++ b/tests/katsudon-arm.yaml @@ -44,6 +44,8 @@ packages: - grub2-efi-aa64-modules - grub2-efi-aa64-cdboot - grub2-tools + - shim-aa64 + - shim-unsigned-aarch64 disk: diff --git a/tests/postinst.sh b/tests/postinst.sh index 948e036..82ca458 100755 --- a/tests/postinst.sh +++ b/tests/postinst.sh @@ -23,7 +23,7 @@ cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin rm -f /var/lib/systemd/random-seed rm -f /etc/NetworkManager/system-connections/*.nmconnection -dnf -y remove dracut-config-generic +# dnf -y remove dracut-config-generic rm -f /etc/machine-id touch /etc/machine-id @@ -32,7 +32,27 @@ rm -f /var/lib/rpm/__db* echo "Fixing SELinux labels" -fixfiles -vRa restore +# fixfiles -vRa restore + +# todo: move this out of postinst +grub2-mkconfig > /boot/grub2/grub.cfg + +# get /dev/ of /boot +bootdev=$(findmnt -n -o SOURCE /boot) + +# get blkid of /boot +bootid=$(blkid -s UUID -o value $bootdev) + +# heredoc for /dev/disk + +cat << EOF > /boot/efi/EFI/fedora/grub.cfg +search --no-floppy --fs-uuid --set=dev $bootid +set prefix=(\$dev)/grub2 + +export \$prefix +configfile \$prefix/grub.cfg +EOF + # dnf up -y # for downloading keys