mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-12 03:11:40 +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
a5e27120c0
commit
a75cbf210b
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -2,6 +2,9 @@ livecd-rootfs (2.466) UNRELEASED; urgency=medium
|
|||||||
|
|
||||||
* Factor out grub-related diversions and use them consistently, so we
|
* Factor out grub-related diversions and use them consistently, so we
|
||||||
don't end up with wrong os-probe output in our grub.cfg.
|
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.
|
||||||
|
|
||||||
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 04 Oct 2017 22:31:40 -0700
|
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 04 Oct 2017 22:31:40 -0700
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ replace_grub_root_with_label() {
|
|||||||
|
|
||||||
# If boot by partuuid has been requested, don't override.
|
# If boot by partuuid has been requested, don't override.
|
||||||
if [ -f $CHROOT_ROOT/etc/default/grub.d/40-partuuid ] && \
|
if [ -f $CHROOT_ROOT/etc/default/grub.d/40-partuuid ] && \
|
||||||
grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub.d/40-partuuid; then
|
grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub.d/40-partuuid.cfg; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
sed -i -e "s,root=[^ ]\+,root=LABEL=${fs_label}," \
|
sed -i -e "s,root=[^ ]\+,root=LABEL=${fs_label}," \
|
||||||
|
@ -124,7 +124,7 @@ if [ "${should_install_grub}" -eq 1 ]; then
|
|||||||
if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then
|
if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then
|
||||||
echo "partuuid found for root device; forcing it in Grub"
|
echo "partuuid found for root device; forcing it in Grub"
|
||||||
mkdir -p mountpoint/etc/default/grub.d
|
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
|
divert_grub mountpoint
|
||||||
chroot mountpoint update-grub
|
chroot mountpoint update-grub
|
||||||
undivert_grub mountpoint
|
undivert_grub mountpoint
|
||||||
|
@ -67,7 +67,7 @@ install_grub() {
|
|||||||
# and 033-disk-image-uefi.binary. We want to fix this to not
|
# and 033-disk-image-uefi.binary. We want to fix this to not
|
||||||
# have initramfs-tools installed at all on these images.
|
# have initramfs-tools installed at all on these images.
|
||||||
echo "partuuid found for root device; omitting initrd"
|
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
|
fi
|
||||||
|
|
||||||
chroot mountpoint apt-get -y update
|
chroot mountpoint apt-get -y update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user