summaryrefslogtreecommitdiff
path: root/old-school
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-26 04:08:56 -0400
committerAndrew Cady <d@jerkface.net>2016-04-26 04:08:56 -0400
commit19fc3ad482a467dbfcd27c8366ba026107498f4f (patch)
tree215c1290167cd213ed0b82bd9a9d23ea6bac2778 /old-school
parentc33cb424ef479a6947395391b3771cc56b2d6161 (diff)
ejection script for cdrom duplication
included some necessary dependencies
Diffstat (limited to 'old-school')
-rw-r--r--old-school/lvm-create.sh22
1 files changed, 18 insertions, 4 deletions
diff --git a/old-school/lvm-create.sh b/old-school/lvm-create.sh
index ecbae49..b6d38d2 100644
--- a/old-school/lvm-create.sh
+++ b/old-school/lvm-create.sh
@@ -1,6 +1,4 @@
1#!/bin/sh 1#!/bin/sh
2: ${ROOT_MKFS_CMD:=mkfs.ext4 -q}
3: ${ROOT_FS_TYPE:=ext4}
4 2
5losetup() { /sbin/losetup "$@"; } 3losetup() { /sbin/losetup "$@"; }
6 4
@@ -55,12 +53,28 @@ init_samizdat()
55 53
56 btrfs device add "$blockdev" /root || return 54 btrfs device add "$blockdev" /root || return
57 mount -o rw,remount /root || return 55 mount -o rw,remount /root || return
58 btrfs subvolume create /root/gpg || return 56
59 mv /gpg/gnupghome /root/gpg/ || return 57 initialize_root_filesystem || return
60 58
61 bootdone root-mounted 59 bootdone root-mounted
62} 60}
63 61
62initialize_root_filesystem()
63{
64 btrfs subvolume create /root/gpg || return
65 mv /gpg/gnupghome /root/gpg/ || return
66
67 rm -r /root/var/cache/apt/archives
68 btrfs subvolume create /root/var/cache/apt/archives || return
69
70 rmdir /root/home
71 btrfs subvolume create /root/home || return
72
73 [ -x /root/sbin/mdadm ] || cp /sbin/mdadm /root/sbin/
74 [ -e /root/sbin/mdadm-dup.sh ] || cp /bin/mdadm-dup.sh /root/sbin/
75 true
76}
77
64# Get the uuid of the filesystem with the most devices, 78# Get the uuid of the filesystem with the most devices,
65# excluding filesystems that don't incorporate loop devices. 79# excluding filesystems that don't incorporate loop devices.
66# This is used to choose the latest seed -- which should have 80# This is used to choose the latest seed -- which should have