Backport the UUID grub fix to bullseye too
This commit is contained in:
parent
6d1fdf2446
commit
d99baf29c5
|
@ -91,6 +91,8 @@ if [ -d boot$N/grub ] ; then
|
||||||
mv boot$N/grub/* $CDDIR/boot/grub/
|
mv boot$N/grub/* $CDDIR/boot/grub/
|
||||||
rmdir boot$N/grub
|
rmdir boot$N/grub
|
||||||
|
|
||||||
|
change_grub_cfg_uuid $CDDIR
|
||||||
|
|
||||||
# Stuff the EFI boot files into a FAT filesystem, making it as
|
# 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
|
# small as possible. We end up re-packing like this in case we're
|
||||||
# making a multi-arch image
|
# making a multi-arch image
|
||||||
|
|
|
@ -90,6 +90,8 @@ if [ -d boot$N/grub ] ; then
|
||||||
mv boot$N/grub/* $CDDIR/boot/grub/
|
mv boot$N/grub/* $CDDIR/boot/grub/
|
||||||
rmdir boot$N/grub
|
rmdir boot$N/grub
|
||||||
|
|
||||||
|
change_grub_cfg_uuid $CDDIR
|
||||||
|
|
||||||
# Stuff the EFI boot files into a FAT filesystem, making it as
|
# 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
|
# small as possible. We end up re-packing like this in case we're
|
||||||
# making a multi-arch image
|
# making a multi-arch image
|
||||||
|
|
|
@ -134,6 +134,8 @@ if [ $BOOT_EFI -ne 0 ] ; then
|
||||||
mv boot$N/grub/* $CDDIR/boot/grub/
|
mv boot$N/grub/* $CDDIR/boot/grub/
|
||||||
rmdir boot$N/grub
|
rmdir boot$N/grub
|
||||||
|
|
||||||
|
change_grub_cfg_uuid $CDDIR
|
||||||
|
|
||||||
# Stuff the EFI boot files into a FAT filesystem, making it as
|
# 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
|
# small as possible. We end up re-packing like this in case we're
|
||||||
# making a multi-arch image
|
# making a multi-arch image
|
||||||
|
|
|
@ -91,6 +91,8 @@ if [ -d boot$N/grub ] ; then
|
||||||
# small as possible. We end up re-packing like this in case we're
|
# small as possible. We end up re-packing like this in case we're
|
||||||
# making a multi-arch image
|
# making a multi-arch image
|
||||||
|
|
||||||
|
change_grub_cfg_uuid $CDDIR
|
||||||
|
|
||||||
# First, work out how many blocks we need
|
# First, work out how many blocks we need
|
||||||
blocks=$(calculate_efi_image_size $CDDIR)
|
blocks=$(calculate_efi_image_size $CDDIR)
|
||||||
|
|
||||||
|
|
|
@ -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
|
# small as possible. We end up re-packing like this in case we're
|
||||||
# making a multi-arch image
|
# making a multi-arch image
|
||||||
|
|
||||||
|
change_grub_cfg_uuid $CDDIR
|
||||||
|
|
||||||
# First, work out how many blocks we need
|
# First, work out how many blocks we need
|
||||||
blocks=$(calculate_efi_image_size $CDDIR)
|
blocks=$(calculate_efi_image_size $CDDIR)
|
||||||
|
|
||||||
|
|
|
@ -222,3 +222,17 @@ extra_image () {
|
||||||
fi
|
fi
|
||||||
done
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue