# luks.bootcd2disk.conf.src - source for luks.bootcd2disk.conf
### conf.src conf.start
# vim: set filetype=sh :
#        file: luks.bootcd2disk.conf
#   copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2001-2020)
#     license: GNU General Public License, version 3
# description: luks.bootcd2disk.conf - example config for bootcd2disk with
#              luks and bios boot
#
# Disk:            +----DISK0-----------------------+
# Partition:       DISK0P1  DISK0P2  DISK0P3  DISK0P4
# Luks:                              LUKSswap LUKSroot
# Usage:           efi      /boot    swap     /
#
### conf.src bootcd_mount()
bootcd_mount()
{
  bootcd_global DISK0P1 DISK0P2
  mount /dev/mapper/LUKSroot $1
  mkdir -p $1/boot; mount $DISK0P2 $1/boot
  mkdir -p $1/boot/efi; mount $DISK0P1 $1/boot/efi
}
### conf.src bootcd_umount()
bootcd_umount()
{
  umount $1/boot/efi
  umount $1/boot
  umount $1
}
### conf.src EXT4FS
EXT4FS="DISK0P2
/dev/mapper/LUKSroot"
### conf.src FSTAB
FSTAB="\
/dev/mapper/LUKSroot / ext4 defaults,errors=remount-ro 0 1
UUID=UUID!DISK0P2 /boot ext4 defaults,errors=remount-ro 0 1
UUID=UUID!DISK0P1 /boot/efi vfat defaults,errors=remount-ro 0 1
/dev/mapper/LUKSswap none swap sw 0 0"
### conf.src LUKS
LUKS="LUKSroot DISK0P4 none luks
LUKSswap DISK0P3 /dev/urandom swap,cipher=aes-xts-plain64,size=256"
### conf.src SFDISK#
SFDISK0="unit: sectors
2048,$((512*2048)),U
,$((200*2048)),L
,$((1024*2048)),S
,+,L;" # start=1MB, efi=512MB, boot=200MB, swap=1GB, rest
### conf.src VFAT
VFAT="DISK0P1"
### conf.src SWAP
SWAP="/dev/mapper/LUKSswap"
### conf.src conf.end
