Skip to contentSkip to conversation

GRUB_CRYPTODISK_ENABLE undocumented

DISCUSSION Andrey Borzenkov 4 participants 9 messages Mar 29, 2013 – Sep 27, 2013

lore
Share & tools
lore
#0 lore raw

Is it intentional? I hit it when testing grub on encrypted partition. When no, I'll submit a patch.

#1 lore raw

Hi Andrey,

2013/3/29 Andrey Borzenkov <[email protected]>:

Quoted 2 lines

Is it intentional? I hit it when testing grub on encrypted partition. When no, I'll submit a patch.

Do you have any progress on this? Besides document it, IMHO why not we consider to remove it or make it default enable to receive more testing from downstream ? Is there any consequence to enable it or because it's not officially supported yet?

Even if it's immature, more testing is welcome to get all bugs sorted and resolved.

Thanks,
Michael

Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#2 lore raw
Quoted 11 lines · Michael Chang

Hi Andrey,

2013/3/29 Andrey Borzenkov <[email protected]>:

Quoted 2 lines

Is it intentional? I hit it when testing grub on encrypted partition. When no, I'll submit a patch.

Do you have any progress on this? Besides document it, IMHO why not we consider to remove it or make it default enable to receive more testing from downstream ? Is there any consequence to enable it or because it's not officially supported yet?

This option authorizes GRUB to ask user for password and wait until the password is supplied which can break unattended and remote boot. Think of theme in /usr. With the option disabled GRUB would simply skip theme and boot successfully. But with this option enabled it will wait for password until user supplies it or presses ESC.

Quoted 18 lines

Even if it's immature, more testing is welcome to get all bugs sorted and resolved.

Thanks,
Michael

Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw
Quoted 12 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 11 lines · Michael Chang

Hi Andrey,

2013/3/29 Andrey Borzenkov <[email protected]>:

Quoted 2 lines

Is it intentional? I hit it when testing grub on encrypted partition. When no, I'll submit a patch.

Do you have any progress on this? Besides document it, IMHO why not we consider to remove it or make it default enable to receive more testing from downstream ? Is there any consequence to enable it or because it's not officially supported yet?

Quoted 5 lines

This option authorizes GRUB to ask user for password and wait until the password is supplied which can break unattended and remote boot. Think of theme in /usr. With the option disabled GRUB would simply skip theme and boot successfully. But with this option enabled it will wait for password until user supplies it or presses ESC.

In this case we shouldn't blame GRUB to interrupt the boot, instead it's why the policy been made to place theme file in /usr (which's supposed be encrypted) and expecting it to work on unattended or remote boot.

As long as GRUB offers the option to on or off it (OK we don't remove it as we know it's required now), it's the system setup program's responsibity to make sure that the correct option is set for his setup to work as intended. I do really hope that the default can be changed for the reason that I have supplied.

Thanks,
Michael

Quoted 27 lines
Quoted 13 lines

Even if it's immature, more testing is welcome to get all bugs sorted and resolved.

Thanks,
Michael

Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 7 lines
Michael Chang
Software Engineer
Rm. B, 26F, No.216, Tun Hwa S. Rd., Sec.2
Taipei 106, Taiwan, R.O.C
+886223760030
[email protected]
SUSE
#4 lore raw
In reply to Andrey Borzenkov

Hi Andrey,

2013/3/29 Andrey Borzenkov <[email protected]>:

Quoted 2 lines

Is it intentional? I hit it when testing grub on encrypted partition. When no, I'll submit a patch.

Do you have any progress on this? Besides document it, IMHO why not we consider to remove it or make it default enable to receive more testing from downstream ? Is there any consequence to enable it or because it's not officially supported yet?

Even if it's immature, more testing is welcome to get all bugs sorted and resolved.

Thanks,
Michael

Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#5 lore raw

В Wed, 28 Aug 2013 15:04:44 +0800
Michael Chang <[email protected]> пишет:

Quoted 6 lines

Hi Andrey,

2013/3/29 Andrey Borzenkov <[email protected]>:

Quoted 2 lines

Is it intentional? I hit it when testing grub on encrypted partition. When no, I'll submit a patch.

Quoted 8 lines

Do you have any progress on this? Besides document it, IMHO why not we consider to remove it or make it default enable to receive more testing from downstream ? Is there any consequence to enable it or because it's not officially supported yet?

Even if it's immature, more testing is welcome to get all bugs sorted and resolved.

Well, I'm not sure which progress can be. I do not have any preference whether it should be default or not, I just think it should be documented.

Vladimir, is it OK?

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] document GRUB_ENABLE_CRYPTODISK configuration option

---
 docs/grub.texi | 6 ++++++
 1 file changed, 6 insertions(+)
docs/grub.texi +6 -0
index 574f602..9903a36 100644
@@ -1354,6 +1354,12 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_ENABLE_CRYPTODISK
+If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
+check for encrypted disks and generate additional commands needed to access
+them during boot.  Note that in this case unattended boot is not possible
+because GRUB will wait for passphrase to unlock encrypted container.
+
 @item GRUB_INIT_TUNE
 Play a tune on the speaker when GRUB starts.  This is particularly useful
 for users unable to see the screen.  The value of this option is passed
Signature · 1 line
tg: (321e011..) u/crypto_eable (depends on: master)
#6 lore raw
Quoted 18 lines · Andrey Borzenkov

В Wed, 28 Aug 2013 15:04:44 +0800
Michael Chang <[email protected]> пишет:

Quoted 6 lines

Hi Andrey,

2013/3/29 Andrey Borzenkov <[email protected]>:

Quoted 2 lines

Is it intentional? I hit it when testing grub on encrypted partition. When no, I'll submit a patch.

Quoted 8 lines

Do you have any progress on this? Besides document it, IMHO why not we consider to remove it or make it default enable to receive more testing from downstream ? Is there any consequence to enable it or because it's not officially supported yet?

Even if it's immature, more testing is welcome to get all bugs sorted and resolved.

Quoted 6 lines

Well, I'm not sure which progress can be. I do not have any preference whether it should be default or not, I just think it should be documented.

Vladimir, is it OK?

Go ahead.

Quoted 28 lines

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] document GRUB_ENABLE_CRYPTODISK configuration option

---
 docs/grub.texi | 6 ++++++
 1 file changed, 6 insertions(+)
docs/grub.texi +6 -0
index 574f602..9903a36 100644
@@ -1354,6 +1354,12 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_ENABLE_CRYPTODISK
+If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
+check for encrypted disks and generate additional commands needed to access
+them during boot.  Note that in this case unattended boot is not possible
+because GRUB will wait for passphrase to unlock encrypted container.
+
 @item GRUB_INIT_TUNE
 Play a tune on the speaker when GRUB starts.  This is particularly useful
 for users unable to see the screen.  The value of this option is passed
#7 lore raw

GRUB_ENABLE_CRYPTODISK vs GRUB_CRYPTODISK_ENABLE ?

What is the difference between GRUB_ENABLE_CRYPTODISK and GRUB_CRYPTODISK_ENABLE?

GRUB_ENABLE_CRYPTODISK only seems to be used in an export in "util/grub-mkconfig.in" whereas GRUB_CRYPTODISK_ENABLE is used in "util/grub-{install,mkconfig_lib}.in".

On Ubuntu 13.10 at least I found that I had to edit the export in 'grub-mkconfig' to be GRUB_CRYPTODISK_ENABLE in order for the installer scripts to correctly install for whole-disk encryption.

Unless there's some Makefile or pre-processor magic going on which I've missed I believe this might be a bug.

#8 lore raw

Re: GRUB_ENABLE_CRYPTODISK vs GRUB_CRYPTODISK_ENABLE ?

В Fri, 27 Sep 2013 17:19:47 +0100
TJ <[email protected]> пишет:

Quoted 8 lines

What is the difference between GRUB_ENABLE_CRYPTODISK and GRUB_CRYPTODISK_ENABLE?

GRUB_ENABLE_CRYPTODISK only seems to be used in an export in "util/grub-mkconfig.in" whereas GRUB_CRYPTODISK_ENABLE is used in "util/grub-{install,mkconfig_lib}.in".

On Ubuntu 13.10 at least I found that I had to edit the export in 'grub-mkconfig' to be GRUB_CRYPTODISK_ENABLE in order for the installer scripts to correctly install for whole-disk encryption.

Unless there's some Makefile or pre-processor magic going on which I've missed I believe this might be a bug.

Looks like it.

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] consistently use GRUB_ENABLE_CRYPTODISK everywhere

Both GRUB_ENABLE_CRYPTODISK and GRUB_CRYPTODISK_ENABLE
were used in different places. Use GRUB_ENABLE_CRYPTODISK everywhere for consistency with other GRUB_ENABLE_* or GRUB_DISABLE_* parameters.

---
 util/grub-install.in      | 2 +-
 util/grub-mkconfig_lib.in | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
util/grub-install.in +1 -1
index ce8f840..7cd089b 100644
@@ -632,7 +632,7 @@ if [ "x${devabstraction_module}" = "x" ] ; then
 	fi
     fi
 else
-    if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then
+    if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then
 	for uuid in "`echo "${grub_device}" | xargs "${grub_probe}"  --target=cryptodisk_uuid --device`"; do
 	    echo "cryptomount -u $uuid" >> "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg"
 	done
util/grub-mkconfig_lib.in +2 -2
index 016d8c5..98d8a77 100644
@@ -71,7 +71,7 @@ is_path_readable_by_grub ()
     return 1
   fi
 
-  if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then
+  if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then
       return 0
   fi
   
@@ -138,7 +138,7 @@ prepare_grub_to_access_device ()
     echo "insmod ${module}"
   done
 
-  if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then
+  if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then
       for uuid in "`"${grub_probe}" --device "$@" --target=cryptodisk_uuid`"; do
 	  echo "cryptomount -u $uuid"
       done
Signature · 1 line
tg: (144214a..) u/grub_cryptodisk_enable (depends on: master)