Commit a233f61
authored
Allow custom path for grub.cfg (#144)
## 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 is `grub/grub.cfg`.
Fixes: #142
## How Has This Been Tested?
- Tested on code vagrant with libvirt from https://github.com/tinkerbell/playground/blob/main/stack/docs/quickstarts/VAGRANTLVIRT.md
- Test case 1 - Drop-in change with `jammy`. No `GRUBCFG_PATH`. I was able to ssh into `[email protected]`.
- Test case 2 - Drop-in change with `noble`. No `GRUBCFG_PATH`. I was NOT able to ssh into `[email protected]`. 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 `[email protected]`.
## 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)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
More info on Ubuntu 24.04 cloud image partition - https://bugs.launchpad.net/cloud-images/+bug/20729292 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
58 | | - | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
64 | | - | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| |||
0 commit comments