mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-04-21 16:11:24 +00:00
Fix the force-partuuid handling to create the file under
/etc/default/grub.d/ with a .cfg extension as grub expects; it's unclear how this ever worked without.
This commit is contained in:
parent
b66cc28507
commit
b2fba90356
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -34,6 +34,9 @@ livecd-rootfs (2.408.19) xenial; urgency=medium
|
||||
bug that should be fixed in tzdata.
|
||||
* Factor out grub-related diversions and use them consistently, so we
|
||||
don't end up with wrong os-probe output in our grub.cfg.
|
||||
* Fix the force-partuuid handling to create the file under
|
||||
/etc/default/grub.d/ with a .cfg extension as grub expects; it's unclear
|
||||
how this ever worked without.
|
||||
|
||||
[ Balint Reczey ]
|
||||
* Mount using --make-rslave to ensure safe unmounts for rbind mounts
|
||||
|
@ -274,8 +274,9 @@ replace_grub_root_with_label() {
|
||||
CHROOT_ROOT="$1"
|
||||
|
||||
# If boot by partuuid has been requested, don't override.
|
||||
if [ -f $CHROOT_ROOT/etc/default/grub.d/40-partuuid ] && \
|
||||
grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub.d/40-partuuid; then
|
||||
if [ -f $CHROOT_ROOT/etc/default/grub.d/40-force-partuuid.cfg ] && \
|
||||
grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub.d/40-force-partuuid.cfg
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \
|
||||
|
@ -119,7 +119,7 @@ if [ "${should_install_grub}" -eq 1 ]; then
|
||||
if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then
|
||||
echo "partuuid found for root device; forcing it in Grub"
|
||||
mkdir -p mountpoint/etc/default/grub.d
|
||||
echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid
|
||||
echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid.cfg
|
||||
divert_grub mountpoint
|
||||
chroot mountpoint update-grub
|
||||
undivert_grub mountpoint
|
||||
|
@ -66,7 +66,7 @@ install_grub() {
|
||||
# and 033-disk-image-uefi.binary. We want to fix this to not
|
||||
# have initramfs-tools installed at all on these images.
|
||||
echo "partuuid found for root device; omitting initrd"
|
||||
echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid
|
||||
echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid.cfg
|
||||
fi
|
||||
|
||||
chroot mountpoint apt-get -y update
|
||||
|
Loading…
x
Reference in New Issue
Block a user