Add the ability to specify custom location for grub.cfg.
Why is this needed
Ubuntu 24.04 cloud image mounts the /boot partition. The default /boot/grub/grub.cfg location is invalid when we mount the partition. The location when there is a /boot partition is grub/grub.cfg.
Test case 1 - Drop-in change with jammy. No GRUBCFG_PATH. I was able to ssh into tink@192.168.56.43.
Test case 2 - Drop-in change with noble. No GRUBCFG_PATH. I was NOT able to ssh into tink@192.168.56.43. Expected to fail as noble uses a /boot partition.
Test case 3 - Drop-in change with noble. The value for GRUBCFG_PATH was set to grub/grub.cfg. The value for BLOCK_DEVICE was set to {{ formatPartition ( index .Hardware.Disks 0 ) 16 }}. I was able to ssh into tink@192.168.56.43.
How are existing users impacted? What migration steps/scripts do we need?
It uses the default value of boot/grub/grub.cfg for GRUBCFG_PATH if not specified. Existing users are not impacted.
Checklist:
I have:
[X] updated the documentation and/or roadmap (if required)
Description
Add the ability to specify custom location for
grub.cfg
.Why is this needed
Ubuntu 24.04 cloud image mounts the
/boot
partition. The default/boot/grub/grub.cfg
location is invalid when we mount the partition. The location when there is a/boot
partition isgrub/grub.cfg
.Fixes: #142
How Has This Been Tested?
jammy
. NoGRUBCFG_PATH
. I was able to ssh intotink@192.168.56.43
.noble
. NoGRUBCFG_PATH
. I was NOT able to ssh intotink@192.168.56.43
. Expected to fail asnoble
uses a/boot
partition.noble
. The value forGRUBCFG_PATH
was set togrub/grub.cfg
. The value forBLOCK_DEVICE
was set to{{ formatPartition ( index .Hardware.Disks 0 ) 16 }}
. I was able to ssh intotink@192.168.56.43
.How are existing users impacted? What migration steps/scripts do we need?
It uses the default value of
boot/grub/grub.cfg
forGRUBCFG_PATH
if not specified. Existing users are not impacted.Checklist:
I have:
More info on Ubuntu 24.04 cloud image partition - https://bugs.launchpad.net/cloud-images/+bug/2072929