0

I tried to install Ubuntu server 22.04 (even with the latest daily version 24.04) using the autoinstall process, to get a bootable raid 1 configuration, using two 2TB m2 disks.

The process keeps crashing at the point where it needs to install grub on the EFI partition.

I have tried different configurations for creating the raid, using both disks and partitions as devices, but to no avail, it fails to make the raid bootable.

So the question for you guys is:, how can I set up my storage to have a bootable raid 1 configuration? I guess someone has already positively addressed this problem...

The storage section I am using, with all my attempts, is as follows:

#cloud-config
autoinstall:
  version: 1
storage:
    grub:
      reorder_uefi: false
    config:
    # Partition table of two disks
    # - { type: disk, ptable: gpt, path: /dev/nvme0n1, wipe: superblock, preserve: false, name: '', grub_device: true, id: disk-nvme0n1 }
    # - { type: disk, ptable: gpt, path: /dev/nvme1n1, wipe: superblock, preserve: false, name: '', grub_device: true, id: disk-nvme1n1 }
    - { type: disk, ptable: gpt, path: /dev/nvme0n1, wipe: superblock, preserve: false, name: '', id: disk-nvme0n1 }
    - { type: disk, ptable: gpt, path: /dev/nvme1n1, wipe: superblock, preserve: false, name: '', id: disk-nvme1n1 }
    - { type: partition, device: disk-nvme0n1, size: 1024MB, wipe: superblock, flag: 'boot',partition_type: EF00, preserve: false,  grub_device: true, id: part-grub }
    #- { type: partition, device: disk-nvme0n1, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part-swap }
    - { type: partition, device: disk-nvme0n1, size: 256GB, wipe: superblock, preserve: false,  id: part-home }
    - { type: partition, device: disk-nvme0n1, size: -1, wipe: superblock, preserve: false,  id: part-data }
    #
    - { type: partition, device: disk-nvme1n1, size: 1024MB, wipe: superblock, preserve: false,  grub_device: false, id: part2-grub }
    #- { type: partition, device: disk-nvme1n1, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part2-swap }
    - { type: partition, device: disk-nvme1n1, size: 256GB, wipe: superblock, preserve: false,  id: part2-home }
    - { type: partition, device: disk-nvme1n1, size: -1, wipe: superblock, preserve: false,  id: part2-data }
    #
    #- { type: raid, name: md0, raidlevel: 1, devices: [ part-grub, part2-grub ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-grub }
    #- { type: raid, name: md1, raidlevel: 1, devices: [ part-swap, part2-swap ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-swap }
    - { type: raid, name: md2, raidlevel: 1, devices: [ part-home, part2-home ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-home }
    - { type: raid, name: md3, raidlevel: 1, devices: [ part-data, part2-data ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-data }
    #- { type: raid, name: md0, raidlevel: 1, devices: [ disk-nvme0n1, disk-nvme1n1 ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid }
    #- { type: partition, device: disk-raid, flag: bios_grub, id: part-grub, number: 1, preserve: false,  size: 1MB }
    # - { type: partition, device: disk-raid, size: 1024MB, wipe: superblock, flag: 'bios_grub', preserve: false,  grub_device: true, id: part-grub }
    #- { type: partition, device: disk-raid, size: 1024MB, wipe: superblock, flag: 'boot',partition_type: EF00, preserve: false,  grub_device: true, id: part-grub }
    #- { type: partition, device: disk-raid, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part-swap }
    #- { type: partition, device: disk-raid, size: 256GB, wipe: superblock, preserve: false,  id: part-home }
    #- { type: partition, device: disk-raid, size: -1, wipe: superblock, preserve: false,  id: part-data }
    #- { type: partition, device: disk-raid-grub, size: 1024MB, wipe: superblock, flag: 'boot',partition_type: EF00, preserve: false,  grub_device: true, id: part-raid-grub }
    #- { type: partition, device: disk-raid-grub, size: 1024MB, wipe: superblock, flag: 'boot', preserve: false,  grub_device: true, id: part-raid-grub }
    #- { type: partition, device: disk-raid-swap, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part-raid-swap }
    - { type: partition, device: disk-raid-home, size: 256GB, wipe: superblock, preserve: false,  id: part-raid-home }
    - { type: partition, device: disk-raid-data, size: -1, wipe: superblock, preserve: false,  id: part-raid-data }
    #
    - { type: format, volume: part-grub, fstype: fat32, preserve: false, id: format-grub }
    # { type: format, volume: part2-grub, fstype: fat32, preserve: false, id: format2-grub }
    #- { type: format, volume: part-raid-swap, fstype: swap, preserve: false, id: format-swap }
    - { type: format, volume: part-raid-home, fstype: btrfs, preserve: false, id: format-home }
    - { type: format, volume: part-raid-data, fstype: btrfs, preserve: false, id: format-data }
    - { type: mount, path: '/boot/efi', device: format-grub, id: mount-grub }
    #- { type: mount, path: '/boot/efi', device: format2-grub, id: mount2-grub }
    #- { type: mount, path: '', device: format-swap, id: mount-swap }
    - { type: mount, path: '/', device: format-home, id: mount-home }
    - { type: mount, path: '/data', device: format-data, id: mount-data }

    # - { type: raid, name: md1, raidlevel: 1, devices: [ part-swap, part2-swap ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, id: raid-swap }
    # - { type: partition, device: raid-swap, size: 32GB, wipe: superblock, flag: 'swap', number: 2, preserve: false, id: part-raid-swap }
    # - { type: format, volume: part-raid-swap, fstype: swap, preserve:false, id:format-swap }
    # - { ptable: gpt, path: /dev/nvme1n1, wipe: superblock-recursive, preserve: false, name: '', grub_device: true, type: disk, id: disk-nvme1n1 }
    # - { device: disk-nvme1n1, flag: bios_grub, id: partition-1, number: 1, preserve: false, size: 1048576, type: partition }
    # - { device: disk-nvme1n1, size: 1024M, wipe: superblock, flag: boot, number: 2, preserve: false, grub_device: true, type: partition, id: partition-3 }
    # - { device: disk-nvme1n1, size: 32G, wipe: superblock, flag: '', number: 3, preserve: false, grub_device: false, type: partition, id: partition-5 }
    # - { device: disk-nvme1n1, size: 256G, wipe: superblock, flag: '', number: 4, preserve: false, grub_device: false, type: partition, id: partition-7 }
    #- { name: md0, raidlevel: raid1, devices: [ partition-2, partition-3 ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, type: raid, id: raid-0 }
    #- { device: raid-0, size: 1024M, wipe: superblock, flag: 'boot', number: 1, preserve: false, grub_device: true, type: partition, id: partition-8 }
    #- { fstype: fat32, volume: partition-8, preserve: false, type: format, id: format-3 }
    
    # - { name: md1, raidlevel: raid1, devices: [ partition-4, partition-5 ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, type: raid, id: raid-1 }
    # - { device: raid-1, size: 32G, wipe: superblock, flag: swap, number: 2, preserve: false, grub_device: false, type: format, id: partition-9}
    # - { fstype: swap, volume: partition-9, preserve: false, type: format, id: format-4 }
    # - { type: mount, path: '', device: format-4, id: mount-3 }
    # - { name: md2, raidlevel: raid1, devices: [ partition-6, partition-7 ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, type: raid, id: raid-2 }
    # - { device: raid-2, size: 256G, wipe: superblock, flag: '', number: 3, preserve: false, grub_device: false, type: partition, id: partition-10 }
    # - { fstype: btrfs, volume: partition-10, preserve: false, type: format, id: format-5 }
    # - { path: /, device: format-5, type: mount, id: mount-4 }

0

You must log in to answer this question.

Browse other questions tagged .