From 3af02e032f39ba16c3f8de2e606abec317d99354 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 26 Mar 2017 22:20:18 -0400 Subject: fully enable booting from installed native partition --- src/initrd/btrfs-create.sh | 5 ----- src/initrd/common.sh | 8 ++++---- src/initrd/menu-select | 7 +++++++ 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src') 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() samizdat_movemounts "$imgfile" || return initialize_root_filesystem || return - - bootdone root-mounted } samizdat_movemounts() @@ -78,8 +76,6 @@ samizdat_movemounts() fi mkdir /root/cdrom mount -o move /cdrom /root/cdrom - mkdir -p /run/initramfs/samizdat/log - cp /var/log/* /run/initramfs/samizdat/log umount /gpg true } @@ -208,7 +204,6 @@ open_samizdat() mount -t btrfs "$blockdev" /root || return samizdat_movemounts "$imgfile" LoSetup -D - bootdone root-mounted } init_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 @@ REQUIRED_MB=250 # minimum megabytes available to offer install MENUFIFO=/menu.fifo DEBUG=y -LOGBASE=/var/log +SAMIZDAT_LOG_DIR=/run/initramfs/samizdat/log debug_log() { if [ -n "$DEBUG" ]; then if [ -n "$1" ]; then - DEBUG_LOG=$LOGBASE/"$1".$$.log + DEBUG_LOG=$SAMIZDAT_LOG_DIR/"$1".$$.log else - DEBUG_LOG=$LOGBASE/$(basename $0).$$.log + DEBUG_LOG=$SAMIZDAT_LOG_DIR/$(basename $0).$$.log fi - mkdir -p $LOGBASE + mkdir -p $SAMIZDAT_LOG_DIR exec >>$DEBUG_LOG 2>&1 set -x 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 umount /root error } + bootdone root-mounted ;; boot-destroy-disk) dev="$2" @@ -93,6 +94,9 @@ case "$1" in init_samizdat_blockdev "$dev"3 /gpg/disk.key || error init_samizdat /dev/mapper/samizdatcrypt '' || error + mark_partitions_as_complete "$dev" + + bootdone root-mounted ;; boot-native) dev="$2" @@ -100,6 +104,7 @@ case "$1" in mount "$dev"2 /gpg || error open_samizdat_blockdev "$dev"3 /gpg/disk.key || error open_samizdat || error + bootdone root-mounted ;; boot-overwrite|boot-new|boot-luks) dev="$2" @@ -121,6 +126,7 @@ case "$1" in if [ "$1" = 'boot-luks' ]; then open_samizdat_blockdev_from_loop "$loopfile" "$loopfile"k || error open_samizdat || error + bootdone root-mounted exit fi @@ -130,6 +136,7 @@ case "$1" in init_samizdat_blockdev "$newdev" "$loopfile"k && init_samizdat /dev/mapper/samizdatcrypt "$loopfile"; then stop_meter done. + bootdone root-mounted else stop_meter error! rm "$loopfile" "$loopfile"k -- cgit v1.2.3