File: backup.bootcd2disk.conf.src

package info (click to toggle)
bootcd 6.9.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 520 kB
  • sloc: sh: 1,940; makefile: 49
file content (53 lines) | stat: -rw-r--r-- 1,608 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# backup.bootcd2disk.conf.src - source for backup.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: backup.bootcd2disk.conf - example config for backup script
# that does:
#   - create a bootable encrypted disk
#
# 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 SWAP
SWAP="/dev/mapper/LUKSswap"
### conf.src VFAT
VFAT="DISK0P1"
### conf.src conf.end