Commit 8f16a86f authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Set MDRAID boot_hint

parent 3bd88fe8
......@@ -87,15 +87,14 @@ class DiskUsageMDRAID(Plugin):
if raid_level:
ili_state.output_callback('Creating MDRAID arrays')
efi_disk = ili_state.install_disks[0]
boot_disk = '/dev/md/0'
root_disk = '/dev/md/1'
mdadm = Mdadm()
# Add all part3 to array
mdadm.create(boot_disk, 1, [get_partition(x, 3) for x in ili_state.install_disks],
output_callback=ili_state.output_callback)
boot_attribs = mdadm.create(boot_disk, 1, [get_partition(x, 3) for x in ili_state.install_disks],
output_callback=ili_state.output_callback)
# Add all part4 partitions to array
mdadm.create(root_disk, raid_level, [get_partition(x, 4) for x in ili_state.install_disks],
output_callback=ili_state.output_callback)
......@@ -111,5 +110,9 @@ class DiskUsageMDRAID(Plugin):
for disk in ili_state.install_disks:
ili_state.add_boot_mbr(disk)
# Set the hint to use to find the boot fs
boot_uuid = boot_attribs['MD_UUID'].replace(':', '')
ili_state.boot_hint = f'mduuid/{boot_uuid}'
# Add mdadm to the base packages
ili_state.add_base_package('mdadm')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment