Skip to content

Commit

Permalink
Patch to use cryptsetup volumes for persistent storage.
Browse files Browse the repository at this point in the history
Cryptsetup must be used with usual
"cryptopts=source=UUID=$(UUID),target=$(TARGET)". For USB devices it may be
necessary to specify "rootdelay=$SECONDS" in order to wait for USB media.
  • Loading branch information
asadchev authored and daniel-baumann committed Feb 29, 2008
1 parent c9419ef commit 81e1d86
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/live
Expand Up @@ -1171,7 +1171,7 @@ find_livefs ()
fi

# or do the scan of block devices
for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram)
for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v 'dm-')
do
devname=$(sys2dev "${sysblock}")
fstype=$(get_fstype "${devname}")
Expand Down Expand Up @@ -1218,6 +1218,11 @@ set_usplash_timeout ()

mountroot ()
{

if [ -x /scripts/local-top/cryptroot ]; then
/scripts/local-top/cryptroot
fi

exec 6>&1
exec 7>&2
exec > live.log
Expand Down
20 changes: 20 additions & 0 deletions scripts/live-helpers
Expand Up @@ -34,6 +34,13 @@ get_fstype ()
local FSTYPE
local FSSIZE

# fstype misreports LUKS devices
is_luks "${1}"
if [ $? -eq 0 ]; then
/lib/udev/vol_id -t ${1} 2>/dev/null
return
fi

eval $(fstype < ${1})

if [ "${FSTYPE}" != "unknown" ]
Expand Down Expand Up @@ -306,3 +313,16 @@ get_mac ()

echo ${mac}
}

is_luks()
{
devname="${1}"
if [ -x /sbin/cryptsetup ]
then
/sbin/cryptsetup isLuks "${devname}" 2>/dev/null
return $?
else
return 1
fi

}

0 comments on commit 81e1d86

Please sign in to comment.