tinkerbell / actions

Suite of Tinkerbell Actions for use in Tinkerbell Workflows
Apache License 2.0
27 stars 42 forks source link

Action kexec hardcodes grub.cfg location #142

Open ttwd80 opened 2 weeks ago

ttwd80 commented 2 weeks ago

The grub.cfg file lives in /boot/grub/grub.cfg. This will work without an issue when grub.cfg is in the / filesystem (as the case for Ubuntu 22.04 cloud image). However with Ubuntu 24.04, the grub.cfg file lives in /grub/grub.cfg in

BLOCK_DEVICE: {{ formatPartition ( index .Hardware.Disks 0 ) 16 }}

I manged to specify these values:

BLOCK_DEVICE: {{ formatPartition ( index .Hardware.Disks 0 ) 16 }}
KERNEL_PATH: vmlinuz
INITRD_PATH: initrd.img

and it boots until it says Boot arguments must include a root= parameter.

Expected Behaviour

When the /boot directory is mounted and not part of the / filesystem, allow an extra parameter for the location. When /dev/sda16 is mounted as /boot, we can have an extra parameter that defaults to /boot/grub/grub.cfg but could be changed to /grub/grub.cfg. Maybe something like GRUB_CFG_PATH?

Current Behaviour

After specifying the BLOCK_DEVICE for the /boot directory, the assumption is that the /boot/grub/grub.cfg file lives relative to /.

Possible Solution

Steps to Reproduce (for bugs)

Use Ubuntu 24.04 cloud image from https://cloud-images.ubuntu.com/daily/server/noble/current/

Context

Unable to use Ubuntu 24.04 cloud image because it mounts /boot on a different partition. This is not an issue with Ubuntu 22.04 as the /boot directory is not on a partition on its own.

Your Environment