# md.bootcd2disk.conf.src - source for md.bootcd2disk.conf
### conf.src conf.start
# vim: set filetype=sh :
#        file: md.bootcd2disk.conf
#   copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2001-2020)
#     license: GNU General Public License, version 3
# description: md.bootcd2disk.conf - example config for bootcd2disk with
#              MD devices aka Linux Software RAID
#
# Example for 3 disks, md and bios boot:
#
# +--------DISK0--------+ +--------DISK1--------+ +--------DISK2--------+
# DISK0P1 DISK0P2 DISK0P3 DISK1P1 DISK1P2 DISK1P3 DISK2P1 DISK2P2 DISK2P3
# BIOS    EFI     |                       |                       |
# boot    system  |                       |                       |
#                 +--raid5----------------+-----------------------+
#                   raid5p1  raid5p2
# BIOS    EFI       swap     /
# boot    system
### conf.src bootcd_mount()
bootcd_mount()
{
  bootcd_global DISK0P2
  mount /dev/md/raid5p2 $1
  mkdir -p $1/boot/efi
  mount $DISK0P2 $1/boot/efi
}
### conf.src bootcd_umount()
bootcd_umount()
{
  umount $1/boot/efi
  umount $1
}
### conf.src DISK#
DISK0="auto"
DISK1="auto"
DISK2="auto"
DISK3="/dev/md/raid5"
### conf.src EFIBOOT
EFIBOOT="bios"
### conf.src EXT4FS
EXT4FS="\
/dev/md/raid5p2"
### conf.src FSTAB
FSTAB="\
DISK0P2      /boot/efi vfat defaults,errors=remount-ro 0 1
/dev/md/raid5p2 /         ext4 defaults,errors=remount-ro 0 1
/dev/md/raid5p1 none      swap sw 0 0"
### conf.src MD
MD="raid5 5 DISK0P3 DISK1P3 DISK2P3"
### conf.src ORDER
ORDER="parti md parti"
### conf.src SFDISK#
# P1 = BIOS boot = 100 MB
# P2 = EFI system = 512 MB
# P3 = P3 = raid = all unused
SFDISK0="label: gpt
unit: sectors
,$(expr 100 \* 2048),21686148-6449-6E6F-744E-656564454649
,$(expr 100 \* 2048),L
,+,R;"
SFDISK1="$SFDISK0"
SFDISK2="$SFDISK0"
# P1 = SWAP = 100 MB
# P2 = / = all unused
SFDISK3="unit: sectors
,$(expr 100 \* 2048),S
,+,L;"
### conf.src SWAP
SWAP="/dev/md/raid5p1"
### conf.src VFAT
VFAT="DISK0P2"
### conf.src conf.end
