summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2021-01-18 20:31:54 -0500
committerAndrew Cady <d@cryptonomic.net>2021-01-18 20:31:54 -0500
commitffc5cf3b57dfc27731bbf4bb9d8bea6646dd35e8 (patch)
tree4adf6052d1bb9f77152921e8c2748eb926146cda
parent459d655a19fd1e59137ec6ca2a158f91a5a2a3cd (diff)
now it be really ficksed
-rw-r--r--partitions/part2.conf2
-rw-r--r--partitions/part8.conf6
-rwxr-xr-xsrc/partvi15
3 files changed, 11 insertions, 12 deletions
diff --git a/partitions/part2.conf b/partitions/part2.conf
index d4a3419..04b15f4 100644
--- a/partitions/part2.conf
+++ b/partitions/part2.conf
@@ -1,4 +1,4 @@
1name=samizdat-grub 1name=samizdat-grub
2type=bios-grub 2type=bios-grub
3allocation=64M 3allocation=1M
4rebuild=always 4rebuild=always
diff --git a/partitions/part8.conf b/partitions/part8.conf
index f0ef2aa..63d44ea 100644
--- a/partitions/part8.conf
+++ b/partitions/part8.conf
@@ -1,4 +1,4 @@
1name=ptable-backup 1name=samizdat-boot
2type=partition-table 2type=boot
3allocation=1M 3allocation=200M
4rebuild=always 4rebuild=always
diff --git a/src/partvi b/src/partvi
index 654c235..268b2de 100755
--- a/src/partvi
+++ b/src/partvi
@@ -98,8 +98,8 @@ build_partition_image()
98 98
99 case "$type" in 99 case "$type" in
100 efi-system-partition) mkfs.fat -F 32 -I "$tmp" || die "mkfs.vfat failed" ;; 100 efi-system-partition) mkfs.fat -F 32 -I "$tmp" || die "mkfs.vfat failed" ;;
101 bios-grub) mkfs.fat -F 32 -I "$tmp" || die "mkfs.vfat failed" ;; 101 bios-grub) ;; # mkfs.fat -F 32 -I "$tmp" || die "mkfs.vfat failed" ;;
102 samizdat-keys) mkfs.btrfs -q "$tmp" || die "mkfs.btrfs failed" ;; 102 boot|samizdat-keys) mkfs.btrfs -q "$tmp" || die "mkfs.btrfs failed" ;;
103 dm-verity-data) 103 dm-verity-data)
104 partuuid=${root_hash:0:32} 104 partuuid=${root_hash:0:32}
105 cp -f -T --reflink "$data_path" "$builddir"/"$partuuid" 105 cp -f -T --reflink "$data_path" "$builddir"/"$partuuid"
@@ -129,7 +129,7 @@ iterate_partitions()
129 129
130 require_var type 130 require_var type
131 case "$type" in 131 case "$type" in
132 efi-system-partition|bios-grub|samizdat-*) ;; 132 efi-system-partition|bios-grub|boot|samizdat-*) ;;
133 dm-verity-hashes|dm-verity-data) require_var data_path ;; 133 dm-verity-hashes|dm-verity-data) require_var data_path ;;
134 partition-table) ;; 134 partition-table) ;;
135 *) die "invalid type: $type" ;; 135 *) die "invalid type: $type" ;;
@@ -196,7 +196,7 @@ create_ptable_conf()
196 case "$type" in 196 case "$type" in
197 partition-table) start=$((start + devsz)); return;; 197 partition-table) start=$((start + devsz)); return;;
198 efi-system-partition) typecode=C12A7328-F81F-11D2-BA4B-00A0C93EC93B ;; 198 efi-system-partition) typecode=C12A7328-F81F-11D2-BA4B-00A0C93EC93B ;;
199# bios-grub) typecode=21686148-6449-6E6F-744E-656564454649 ;; 199 bios-grub) typecode=21686148-6449-6E6F-744E-656564454649 ;;
200 *) typecode=0FC63DAF-8483-4772-8E79-3D69D8477DE4 ;; 200 *) typecode=0FC63DAF-8483-4772-8E79-3D69D8477DE4 ;;
201 esac 201 esac
202 202
@@ -295,14 +295,13 @@ do
295 require_var name 295 require_var name
296 require_var type 296 require_var type
297 case "$type" in 297 case "$type" in
298 dm-verity-hashes|partition-table) ;; 298 dm-verity-hashes|partition-table|bios-grub) ;;
299 efi-system-partition|bios-grub) 299 efi-system-partition|boot)
300 mkdir -p "$mnt" 300 mkdir -p "$mnt"
301 loudly $sudo mount "$dev" "$mnt" 301 loudly $sudo mount "$dev" "$mnt"
302 302
303 if [ "$type" = 'bios-grub' ] 303 if [ "$type" = 'boot' ]
304 then 304 then
305 $sudo mkdir "$mnt"/grub
306 BOOT_DIR=$mnt 305 BOOT_DIR=$mnt
307 else 306 else
308 EFI_DIR=$mnt 307 EFI_DIR=$mnt