File: md.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 (84 lines) | stat: -rw-r--r-- 2,338 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# 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------------+ ... --------+
# DISK0P1 DISK0P2 DISK0P3 DISK0P4 DISK1P1 DISK1P2 DISK1P3 DISK1P4 ...   DISK2P4
# |       |       |       |                               |             |
# |       |       |       |                               |             |
# |       |       |       +--raid5------------------------+------ ... --+
# GPTBIOS |       EFI                raid5p1  raid5p2
# -       ext4    fat                swap     ext4
# -       /boot   /boot/efi          -        /
#
# !!! /boot may be on raid5, but it does not always work !!!
#
### conf.src bootcd_mount()
bootcd_mount()
{
  bootcd_global DISK0P2 DISK0P3
  mount /dev/md/raid5p2 $1
  mkdir -p $1/boot
  mount $DISK0P2 $1/boot
  mkdir -p $1/boot/efi
  mount $DISK0P3 $1/boot/efi
}
### conf.src bootcd_umount()
bootcd_umount()
{
  umount $1/boot/efi
  umount $1/boot
  umount $1
}
### conf.src DISK#
DISK0="auto"
DISK1="auto"
DISK2="auto"
DISK3="/dev/md/raid5"
### conf.src EFIBOOT
EFIBOOT="bios+efi"
### conf.src EXT4FS
EXT4FS="\
DISK0P2
/dev/md/raid5p2"
### conf.src FSTAB
FSTAB="\
DISK0P2      /boot     ext4 defaults,errors=remount-ro 0 1
DISK0P3      /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 DISK0P4 DISK1P4 DISK2P4"
### conf.src ORDER
ORDER="parti md parti"
### conf.src SFDISK#
# P1 = GPTBIOS = 100 MB
# P2 = /boot = 200 MB
# P3 = /boot/efi = 100 MB
# P4 = raid
SFDISK0="label: gpt
unit: sectors
,$(expr 100 \* 2048),21686148-6449-6E6F-744E-656564454649
,$(expr 200 \* 2048),L
,$(expr 100 \* 2048),L
,+,R;"
SFDISK1="$SFDISK0"
SFDISK2="$SFDISK0"
# P1 = SWAP = 100 MB
# P2 = / = all unused
SFDISK3="label: gpt
unit: sectors
,$(expr 100 \* 2048),S
,+,L;"
### conf.src SWAP
SWAP="/dev/md/raid5p1"
### conf.src VFAT
VFAT="DISK0P3"
### conf.src conf.end