UEFI Booting on disks other than /dev/sda using custom images

Some time ago when booting a “custom” image which was CentOS7, I had to create a curtin config to create the filesystem.

In that config I had to specify the boot device as a variable from MAAS, this was the only way to ensure the correct disk was used.

At the time of that setup, we were using BIOS boot. It works fine for that.

Now we are trying to explore using UEFI boot, and we run into an issue where curtin wipes out /dev/(bootdisk)1 during its partition creation, effectively wiping out the /dev/(bootdisk)1 that MAAS created for /boot/efi

How do I adjust my curtin_userdata_custom to accommodate both UEFI booting and Legacy/BIOS booting?

Current Config:

storage:
version: 1
config:
- id: bootdisk
type: disk
ptable: msdos
model: HARDDISK
path: /dev/{{node.get_boot_disk().name}}
name: main_disk
wipe: superblock
grub_device: true
- id: bootdisk_part1
type: partition
number: 1
size: 500M
device: bootdisk
flag: boot
- id: bootdisk_part2
type: partition
number: 2
size: 32G
device: bootdisk
- id: bootdisk_part1_format_boot
type: format
fstype: ext4
volume: bootdisk_part1
- id: bootdisk_part2_format_root
type: format
fstype: ext4
volume: bootdisk_part2
- id: bootdisk_part2_mount-root
type: mount
path: /
device: bootdisk_part2_format_root
- id: bootdisk_part1_mount-boot
type: mount
path: /boot

I had thought about using “preserve” to avoid over-writing an existing /dev/(bootdisk)1 parition, but then it will still mount it as /boot instead of /boot/efi

I also considered offsetting my paritions so that /boot is /dev/(bootdisk)2 and / is /dev/(bootdisk)/3

Looking for a solution

As of MAAS 2.5 storage configuration is supported for both CentOS and RHEL. What I suspect is happening is that the storage layout stored in the MAAS database is overwriting the one in your preseed. Please try configuring your CentOS storage layout using the UI or API and remove the configuration from the preseed.

1 Like

Confirmed! Thank you!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.