From 5b6d1c68663854d271c7f7b271aa174d7c652625 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 29 Jan 2016 09:53:24 +0100 Subject: Fix a flow in the logic when using a LUKS /home and no persistence. The /home would end up read-only if the "nop" parameter was passed on the boot commandline in order to disable persistence for the session. So, remount the media as writable earlier during init. --- liveinit | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'liveinit') diff --git a/liveinit b/liveinit index 935495a..84bcc92 100755 --- a/liveinit +++ b/liveinit @@ -354,6 +354,10 @@ if [ "$RESCUE" = "" ]; then OVLWORK=/mnt/media/.ovlwork fi fi + elif [ ! -z "$LUKSVOL" ]; then + # Even without persistence, we need to be able to write to the partition + # if we are using a LUKS container file: + mount -o remount,rw /mnt/media fi # Create the writable upper directory, plus the workdir which is required # for overlay to function (the two must be in the same POSIX filesystem): @@ -489,8 +493,6 @@ EOPW # Bind any LUKS container into the Live filesystem: if [ ! -z "$LUKSVOL" ]; then - # Even without persistence, we need to be able to write to the partition: - mount -o remount,rw /mnt/media for luksvol in $(echo $LUKSVOL |tr ',' ' '); do luksfil="$(echo $luksvol |cut -d: -f1)" luksmnt="$(echo $luksvol |cut -d: -f2)" -- cgit v1.2.3