commit: 9f20a1656c37b0c4d9fcb2505e2e80b9aa8d8a8b
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 12 16:42:49 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Oct 12 16:42:49 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9f20a165
Really install grub
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
targets/support/create-qcow2.sh | 18 ++++++++----------
targets/support/qcow2-grub-install.sh | 5 ++---
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/targets/support/create-qcow2.sh b/targets/support/create-qcow2.sh
index dfc1309a..06e1ec39 100755
--- a/targets/support/create-qcow2.sh
+++ b/targets/support/create-qcow2.sh
@@ -43,10 +43,10 @@ qcow2die() {
echo "Something went wrong. Cleaning up..."
# here we just ignore errors
- umount "${mymountpoint}/proc"
- umount "${mymountpoint}/sys"
- umount "${mymountpoint}/dev"
- umount "${mymountpoint}/run"
+ umount -R "${mymountpoint}/proc"
+ umount -R "${mymountpoint}/sys"
+ umount -R "${mymountpoint}/dev"
+ umount -R "${mymountpoint}/run"
umount "${mydevice}p1"
umount "${mydevice}p2"
@@ -85,10 +85,10 @@ exec_in_qcow2() {
rm -f "${mymountpoint}/tmp/chroot-functions.sh" || qcow2die
# cleanup qcow2 dir
- umount "${mymountpoint}/proc" || qcow2die
- umount "${mymountpoint}/sys" || qcow2die
- umount "${mymountpoint}/dev" || qcow2die
- umount "${mymountpoint}/run" || qcow2die
+ umount -R "${mymountpoint}/proc" || qcow2die
+ umount -R "${mymountpoint}/sys" || qcow2die
+ umount -R "${mymountpoint}/dev" || qcow2die
+ umount -R "${mymountpoint}/run" || qcow2die
}
@@ -138,8 +138,6 @@ echo "Copying files into the mounted directories from
${clst_stage_path}"
cp -a "${clst_stage_path}"/* "${mymountpoint}/" || qcow2die "Could not copy
content into mounted image"
# now we can chroot in and install grub
-#/usr/sbin/grub-install --verbose --no-floppy --efi-directory=/boot
--removable --skip-fs-probe \
-# --no-nvram --no-bootsector --target=x86_64-efi || die "grub-install
failed"
exec_in_qcow2 "${clst_shdir}/support/qcow2-grub-install.sh"
echo "Creating a CONTENTS file ${myqcow2}.CONTENTS"
diff --git a/targets/support/qcow2-grub-install.sh
b/targets/support/qcow2-grub-install.sh
index e1bda92b..31194262 100755
--- a/targets/support/qcow2-grub-install.sh
+++ b/targets/support/qcow2-grub-install.sh
@@ -2,6 +2,5 @@
source /tmp/chroot-functions.sh
-# install the boot loader here
-
-/bin/bash
+# install the boot loader
+grub-install --no-floppy --efi-directory=/boot --removable --skip-fs-probe
--no-nvram --no-bootsector --target=x86_64-efi