Backport the UUID grub fix to bullseye too

This commit is contained in:
Steve McIntyre 2022-11-26 01:45:49 +00:00
parent 6d1fdf2446
commit d99baf29c5
6 changed files with 24 additions and 0 deletions

View File

@ -91,6 +91,8 @@ if [ -d boot$N/grub ] ; then
mv boot$N/grub/* $CDDIR/boot/grub/
rmdir boot$N/grub
change_grub_cfg_uuid $CDDIR
# Stuff the EFI boot files into a FAT filesystem, making it as
# small as possible. We end up re-packing like this in case we're
# making a multi-arch image

View File

@ -90,6 +90,8 @@ if [ -d boot$N/grub ] ; then
mv boot$N/grub/* $CDDIR/boot/grub/
rmdir boot$N/grub
change_grub_cfg_uuid $CDDIR
# Stuff the EFI boot files into a FAT filesystem, making it as
# small as possible. We end up re-packing like this in case we're
# making a multi-arch image

View File

@ -134,6 +134,8 @@ if [ $BOOT_EFI -ne 0 ] ; then
mv boot$N/grub/* $CDDIR/boot/grub/
rmdir boot$N/grub
change_grub_cfg_uuid $CDDIR
# Stuff the EFI boot files into a FAT filesystem, making it as
# small as possible. We end up re-packing like this in case we're
# making a multi-arch image

View File

@ -91,6 +91,8 @@ if [ -d boot$N/grub ] ; then
# small as possible. We end up re-packing like this in case we're
# making a multi-arch image
change_grub_cfg_uuid $CDDIR
# First, work out how many blocks we need
blocks=$(calculate_efi_image_size $CDDIR)

View File

@ -453,6 +453,8 @@ if [ -d boot$N/isolinux/grub ] && [ $BOOT_EFI -ne 0 ] ; then
# small as possible. We end up re-packing like this in case we're
# making a multi-arch image
change_grub_cfg_uuid $CDDIR
# First, work out how many blocks we need
blocks=$(calculate_efi_image_size $CDDIR)

View File

@ -222,3 +222,17 @@ extra_image () {
fi
done
}
change_grub_cfg_uuid () {
CDDIR=$1
# We (used to) look for /.disk/info in grub.cfg to find this
# Debian media once we've booted via EFI. This is not 100%
# reliable - see #1024346 and #1024720 for examples where this
# fails. Instead, let's generate a UUID here and use that as a
# flag file.
UUID=$(uuidgen)
mkdir -p $CDDIR/.disk/id
touch $CDDIR/.disk/id/$UUID
sed -i "/search --file --set=root/s,.disk/info,.disk/id/$UUID," $CDDIR/EFI/debian/grub.cfg
}