summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/initrd/btrfs-create.sh5
-rw-r--r--src/initrd/common.sh8
-rwxr-xr-xsrc/initrd/menu-select7
3 files changed, 11 insertions, 9 deletions
diff --git a/src/initrd/btrfs-create.sh b/src/initrd/btrfs-create.sh
index f31b14d..3066331 100644
--- a/src/initrd/btrfs-create.sh
+++ b/src/initrd/btrfs-create.sh
@@ -63,8 +63,6 @@ init_samizdat()
63 samizdat_movemounts "$imgfile" || return 63 samizdat_movemounts "$imgfile" || return
64 64
65 initialize_root_filesystem || return 65 initialize_root_filesystem || return
66
67 bootdone root-mounted
68} 66}
69 67
70samizdat_movemounts() 68samizdat_movemounts()
@@ -78,8 +76,6 @@ samizdat_movemounts()
78 fi 76 fi
79 mkdir /root/cdrom 77 mkdir /root/cdrom
80 mount -o move /cdrom /root/cdrom 78 mount -o move /cdrom /root/cdrom
81 mkdir -p /run/initramfs/samizdat/log
82 cp /var/log/* /run/initramfs/samizdat/log
83 umount /gpg 79 umount /gpg
84 true 80 true
85} 81}
@@ -208,7 +204,6 @@ open_samizdat()
208 mount -t btrfs "$blockdev" /root || return 204 mount -t btrfs "$blockdev" /root || return
209 samizdat_movemounts "$imgfile" 205 samizdat_movemounts "$imgfile"
210 LoSetup -D 206 LoSetup -D
211 bootdone root-mounted
212} 207}
213 208
214init_samizdat_lodev() 209init_samizdat_lodev()
diff --git a/src/initrd/common.sh b/src/initrd/common.sh
index 1471e7c..5c8ece3 100644
--- a/src/initrd/common.sh
+++ b/src/initrd/common.sh
@@ -2,17 +2,17 @@
2REQUIRED_MB=250 # minimum megabytes available to offer install 2REQUIRED_MB=250 # minimum megabytes available to offer install
3MENUFIFO=/menu.fifo 3MENUFIFO=/menu.fifo
4DEBUG=y 4DEBUG=y
5LOGBASE=/var/log 5SAMIZDAT_LOG_DIR=/run/initramfs/samizdat/log
6 6
7debug_log() 7debug_log()
8{ 8{
9 if [ -n "$DEBUG" ]; then 9 if [ -n "$DEBUG" ]; then
10 if [ -n "$1" ]; then 10 if [ -n "$1" ]; then
11 DEBUG_LOG=$LOGBASE/"$1".$$.log 11 DEBUG_LOG=$SAMIZDAT_LOG_DIR/"$1".$$.log
12 else 12 else
13 DEBUG_LOG=$LOGBASE/$(basename $0).$$.log 13 DEBUG_LOG=$SAMIZDAT_LOG_DIR/$(basename $0).$$.log
14 fi 14 fi
15 mkdir -p $LOGBASE 15 mkdir -p $SAMIZDAT_LOG_DIR
16 exec >>$DEBUG_LOG 2>&1 16 exec >>$DEBUG_LOG 2>&1
17 set -x 17 set -x
18 fi 18 fi
diff --git a/src/initrd/menu-select b/src/initrd/menu-select
index 625f775..4c921b0 100755
--- a/src/initrd/menu-select
+++ b/src/initrd/menu-select
@@ -80,6 +80,7 @@ case "$1" in
80 umount /root 80 umount /root
81 error 81 error
82 } 82 }
83 bootdone root-mounted
83 ;; 84 ;;
84 boot-destroy-disk) 85 boot-destroy-disk)
85 dev="$2" 86 dev="$2"
@@ -93,6 +94,9 @@ case "$1" in
93 init_samizdat_blockdev "$dev"3 /gpg/disk.key || error 94 init_samizdat_blockdev "$dev"3 /gpg/disk.key || error
94 init_samizdat /dev/mapper/samizdatcrypt '' || error 95 init_samizdat /dev/mapper/samizdatcrypt '' || error
95 96
97 mark_partitions_as_complete "$dev"
98
99 bootdone root-mounted
96 ;; 100 ;;
97 boot-native) 101 boot-native)
98 dev="$2" 102 dev="$2"
@@ -100,6 +104,7 @@ case "$1" in
100 mount "$dev"2 /gpg || error 104 mount "$dev"2 /gpg || error
101 open_samizdat_blockdev "$dev"3 /gpg/disk.key || error 105 open_samizdat_blockdev "$dev"3 /gpg/disk.key || error
102 open_samizdat || error 106 open_samizdat || error
107 bootdone root-mounted
103 ;; 108 ;;
104 boot-overwrite|boot-new|boot-luks) 109 boot-overwrite|boot-new|boot-luks)
105 dev="$2" 110 dev="$2"
@@ -121,6 +126,7 @@ case "$1" in
121 if [ "$1" = 'boot-luks' ]; then 126 if [ "$1" = 'boot-luks' ]; then
122 open_samizdat_blockdev_from_loop "$loopfile" "$loopfile"k || error 127 open_samizdat_blockdev_from_loop "$loopfile" "$loopfile"k || error
123 open_samizdat || error 128 open_samizdat || error
129 bootdone root-mounted
124 exit 130 exit
125 fi 131 fi
126 132
@@ -130,6 +136,7 @@ case "$1" in
130 init_samizdat_blockdev "$newdev" "$loopfile"k && 136 init_samizdat_blockdev "$newdev" "$loopfile"k &&
131 init_samizdat /dev/mapper/samizdatcrypt "$loopfile"; then 137 init_samizdat /dev/mapper/samizdatcrypt "$loopfile"; then
132 stop_meter done. 138 stop_meter done.
139 bootdone root-mounted
133 else 140 else
134 stop_meter error! 141 stop_meter error!
135 rm "$loopfile" "$loopfile"k 142 rm "$loopfile" "$loopfile"k