From: Michael Prokop Date: Fri, 14 Sep 2012 14:38:24 +0000 (+0200) Subject: Enable write-mode for persistency related devices in readonly/forensic mode X-Git-Tag: v3.0_a27-1+grml.7~1 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=a488db657ecb072da4144790ccdeae04616b409f;hp=f3fa1515234c8d334a58b747da463763850c4289;p=live-boot-grml.git Enable write-mode for persistency related devices in readonly/forensic mode --- diff --git a/debian/patches/39_persistence_with_forensic.patch b/debian/patches/39_persistence_with_forensic.patch new file mode 100644 index 0000000..16a67b0 --- /dev/null +++ b/debian/patches/39_persistence_with_forensic.patch @@ -0,0 +1,24 @@ +--- a/scripts/live-premount/readonly ++++ b/scripts/live-premount/readonly +@@ -32,4 +32,21 @@ + blockdev --setro $device && printf "done [ execute \"blockdev --setrw %-9s\" to unlock]\n" $device >/dev/console || printf "failed\n" >/dev/console + fi + done ++ ++ if grep -qe persistence /proc/cmdline ++ then ++ printf " * Persistence mode enabled, searching for persistency related devices to unlock\n" >/dev/console ++ ++ for label in custom-ov home-rw home-sn live-rw live-sn ++ do ++ if blkid -t LABEL="$label" | grep -q '.' ++ then ++ device=$(blkid -t LABEL="$label" | awk -F: '{print $1}') ++ printf " - Setting device %-9s with label '%s' to write mode for persistence mode: " "$device" "$label" >/dev/console ++ blockdev --setrw $device && printf "done\n" >/dev/console || printf "failed\n" >/dev/console ++ fi ++ ++ done ++ fi ++ + fi diff --git a/debian/patches/series b/debian/patches/series index 4e78816..6f8f3bf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -19,3 +19,4 @@ 36_support_dhcp_bootoption.patch 37_fix_legacy_persistence_handling.patch 38_do_not_check_for_forensic_in_readonly_mode.patch +39_persistence_with_forensic.patch