On Wed, Sep 25, 2019 at 10:59:06AM -0400, Drew DeVault wrote:
>@@ -442,6 +445,11 @@ install_mounted_root() {> if [ -n "$(get_bootopt nomodeset)" ]; then> kernel_opts="nomodeset $kernel_opts"> fi>+ if [ "$USE_CRYPT" ]; then>+ root=$(cryptsetup status "$rootdev" | grep "device:" | awk '{ print $2 }')>+ kernel_opts="cryptroot=$root cryptdm=root">+ root=/dev/mapper/root>+ fi> modules="sd-mod,usb-storage,${root_fs}${raidmod}">> # generate the fstab
Why not just `cryptsetup status "$rootdev" | awk '/device:/ { print $2 }'`?
> native_disk_install() {> local prep_part_type=$(partition_id prep)> local root_part_type=$(partition_id linux)>@@ -1065,6 +1089,10 @@ native_disk_install() {> root_dev=$(find_nth_non_boot_parts $index "$root_part_type" $@)> fi>>+ if [ "$USE_CRYPT" ]; then>+ root_dev=$(setup_crypt $root_dev)>+ fi>+> [ $SWAP_SIZE -gt 0 ] && setup_swap_dev $swap_dev> setup_root $root_dev $BOOT_DEV $@> }
I think we should probably add a TODO for cryptkey.
>@@ -1290,6 +1321,15 @@ if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then> esac> done> DISK_MODE="$answer">+ # TODO: support encryption for more installation types>+ if [ -z "$USE_CRYPT" ] && [ "$DISK_MODE" = "sys" ] && [ -z "$USE_LVM" ]; then>+ echon "Would you like to encrypt $it_them? [y/N] ">+ default_read answer '?'>+ if yesno "$answer">+ then>+ USE_CRYPT=1>+ fi>+ fi> fi>> if [ -z "$SWAP_SIZE" ]; then
I was wondering why only LVM gets that first, in my mind many people use
LUKS without LVM, maybe I was wrong.
On Wed Sep 25, 2019 at 11:12 PM Ivan Tham wrote:
> Why not just `cryptsetup status "$rootdev" | awk '/device:/ { print $2 }'`?
+1
> I think we should probably add a TODO for cryptkey.
cryptkey?
> >@@ -1290,6 +1321,15 @@ if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then> > esac> > done> > DISK_MODE="$answer"> >+ # TODO: support encryption for more installation types> >+ if [ -z "$USE_CRYPT" ] && [ "$DISK_MODE" = "sys" ] && [ -z "$USE_LVM" ]; then> >+ echon "Would you like to encrypt $it_them? [y/N] "> >+ default_read answer '?'> >+ if yesno "$answer"> >+ then> >+ USE_CRYPT=1> >+ fi> >+ fi> > fi> >> > if [ -z "$SWAP_SIZE" ]; then> > I was wondering why only LVM gets that first, in my mind many people use> LUKS without LVM, maybe I was wrong.
I don't understand this question.