From 4854ffec94f70705dc95c5657e43c5f69c270a1a Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 1 May 2016 05:07:10 -0400 Subject: netbooting, with unique keys, WORKS --- src/initrd/btrfs-create.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/initrd/btrfs-create.sh') diff --git a/src/initrd/btrfs-create.sh b/src/initrd/btrfs-create.sh index 8688560..edd2d1c 100644 --- a/src/initrd/btrfs-create.sh +++ b/src/initrd/btrfs-create.sh @@ -1,5 +1,8 @@ #!/bin/sh +. loop-layer.sh +. mdadm-dup.sh + losetup() { /sbin/losetup "$@"; } luks_secret() @@ -24,10 +27,15 @@ ceil4() printf '%d\n' "$x" } -. loop-layer.sh - losetup_layers() { + if netbooting; then + bootwait samizdat-nbd-dev + dd if=/dev/zero of=/nbd0.rw bs=1M count=10 + dm_snapshot /dev/nbd0 /nbd0.rw + return + fi + bootwait samizdat-cdrom local fs fs_rw for fs in /cdrom/rootfs/*.btrfs; do -- cgit v1.2.3