mklive.sh: run grub-mkstandalone via xbps-uchroot(8) to avoid host issues.
This commit is contained in:
parent
ef81fb90f8
commit
ca3a146bbb
10
mklive.sh.in
10
mklive.sh.in
@ -186,14 +186,16 @@ generate_grub_efi_boot() {
|
|||||||
LOOP_DEVICE="$(losetup --show --find ${GRUB_DIR}/efiboot.img)"
|
LOOP_DEVICE="$(losetup --show --find ${GRUB_DIR}/efiboot.img)"
|
||||||
mount -o rw,flush -t vfat "${LOOP_DEVICE}" "${GRUB_EFI_TMPDIR}" >>$LOGFILE 2>&1
|
mount -o rw,flush -t vfat "${LOOP_DEVICE}" "${GRUB_EFI_TMPDIR}" >>$LOGFILE 2>&1
|
||||||
|
|
||||||
cd $IMAGEDIR
|
cp -a $IMAGEDIR/boot $VOIDHOSTDIR
|
||||||
mkdir -p "${GRUB_EFI_TMPDIR}/EFI/boot/"
|
xbps-uchroot $VOIDHOSTDIR grub-mkstandalone --directory="/usr/lib/grub/x86_64-efi" \
|
||||||
grub-mkstandalone --directory="$VOIDHOSTDIR/usr/lib/grub/x86_64-efi" \
|
|
||||||
--format="x86_64-efi" \
|
--format="x86_64-efi" \
|
||||||
--compression="xz" --output="${GRUB_EFI_TMPDIR}/EFI/boot/bootx64.efi" \
|
--compression="xz" --output="/tmp/bootx64.efi" \
|
||||||
"boot/grub/grub.cfg" >>$LOGFILE 2>&1
|
"boot/grub/grub.cfg" >>$LOGFILE 2>&1
|
||||||
umount "$GRUB_EFI_TMPDIR"
|
umount "$GRUB_EFI_TMPDIR"
|
||||||
losetup --detach "${LOOP_DEVICE}"
|
losetup --detach "${LOOP_DEVICE}"
|
||||||
|
cd $IMAGEDIR
|
||||||
|
mkdir -p ${GRUB_EFI_TMPDIR}/EFI/boot
|
||||||
|
cp -f $VOIDHOSTDIR/tmp/bootx64.efi ${GRUB_EFI_TMPDIR}/EFI/boot/
|
||||||
rm -rf $GRUB_EFI_TMPDIR
|
rm -rf $GRUB_EFI_TMPDIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user