Skip to contentSkip to conversation

Query about GRUB_ENABLE_CRYPTODISK

DISCUSSION Barry Jackson 3 participants 7 messages Dec 9, 2014 – Mar 27, 2015

lore
Share & tools
lore
#0 lore raw

Hello,
In Mageia it has been proposed that GRUB_ENABLE_CRYPTODISK=y be made the default setting in /etc/default/grub for all installations, whether they use encryption or not. The bug report is here:

https://bugs.mageia.org/show_bug.cgi?id=14741

I already had a useful reply on IRC from Jordan (copied in report) who suggested asking here as well in case this raises other issues.

This is fairly urgent as we are in version freeze for the next release of the distro.

Any comments would be appreciated.

Barry

#1 lore raw

В Tue, 09 Dec 2014 12:35:20 +0000
Barry Jackson <[email protected]> пишет:

Quoted 4 lines

Hello,
In Mageia it has been proposed that GRUB_ENABLE_CRYPTODISK=y be made the default setting in /etc/default/grub for all installations, whether they use encryption or not.

The discussion happens every now and then.

http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00112.html

Quoted 18 lines

The bug report is here:

https://bugs.mageia.org/show_bug.cgi?id=14741

I already had a useful reply on IRC from Jordan (copied in report) who suggested asking here as well in case this raises other issues.

This is fairly urgent as we are in version freeze for the next release of the distro.

Any comments would be appreciated.

Barry

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

#2 lore raw
Quoted 11 lines · Andrei Borzenkov

В Tue, 09 Dec 2014 12:35:20 +0000
Barry Jackson <[email protected]> пишет:

Quoted 4 lines

Hello,
In Mageia it has been proposed that GRUB_ENABLE_CRYPTODISK=y be made the default setting in /etc/default/grub for all installations, whether they use encryption or not.

The discussion happens every now and then.

http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00112.html

OK, thanks for the link.

In the case of Mageia the default installation puts everything required by grub under /boot, so AFAICT this should not cause a problem.

Am I correct Andrei in thinking that you originally packaged grub2 for Mandriva? (There is/was a comment with "(bor)" in the spec which made me wonder) :)

Regards,
Barry

#3 lore raw
Quoted 9 lines · Barry Jackson
Quoted 8 lines · Andrei Borzenkov

В Tue, 09 Dec 2014 12:35:20 +0000
Barry Jackson <[email protected]> пишет:

Quoted 4 lines

Hello,
In Mageia it has been proposed that GRUB_ENABLE_CRYPTODISK=y be made the default setting in /etc/default/grub for all installations, whether they use encryption or not.

Quoted 8 lines
Quoted 3 lines

The discussion happens every now and then.

http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00112.html

OK, thanks for the link.

In the case of Mageia the default installation puts everything required by grub under /boot, so AFAICT this should not cause a problem.

... but it does.

I found time to do some testing, and adding it to the config on a system with no encryption at all causes an error message:
error: device name required.

this seems to be triggered by this line which grub-mkconfig adds to grub.cfg:

cryptomount -u

this causes a "Press any key to continue" message.
In practice the boot continues after about a 10 second delay without pressing a key.

I have confirmed this in VM and real h/w.

#4 lore raw

В Tue, 09 Dec 2014 23:27:49 +0000
Barry Jackson <[email protected]> пишет:

Quoted 21 lines · Barry Jackson
Quoted 9 lines · Andrei Borzenkov
Quoted 8 lines

В Tue, 09 Dec 2014 12:35:20 +0000
Barry Jackson <[email protected]> пишет:

Quoted 4 lines

Hello,
In Mageia it has been proposed that GRUB_ENABLE_CRYPTODISK=y be made the default setting in /etc/default/grub for all installations, whether they use encryption or not.

Quoted 8 lines
Quoted 3 lines

The discussion happens every now and then.

http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00112.html

OK, thanks for the link.

In the case of Mageia the default installation puts everything required by grub under /boot, so AFAICT this should not cause a problem.

... but it does.

Quoted 9 lines

I found time to do some testing, and adding it to the config on a system with no encryption at all causes an error message:
error: device name required.

this seems to be triggered by this line which grub-mkconfig adds to grub.cfg:

cryptomount -u

Does patch below help?

From: Andrei Borzenkov <[email protected]>
Subject: [PATCH] do not emit cryptomount without crypto UUID

---
 util/grub-mkconfig_lib.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
util/grub-mkconfig_lib.in +1 -1
index 29ef865..60b31ca 100644
@@ -145,7 +145,7 @@ prepare_grub_to_access_device ()
   done
 
   if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then
-      for uuid in "`"${grub_probe}" --device $@ --target=cryptodisk_uuid`"; do
+      for uuid in `"${grub_probe}" --device $@ --target=cryptodisk_uuid`; do
 	  echo "cryptomount -u $uuid"
       done
   fi
Signature · 1 line
tg: (bac5d1a..) u/mkconfig-cryptomount (depends on: master)
#5 lore raw
Quoted 16 lines · Andrei Borzenkov

Does patch below help?

From: Andrei Borzenkov <[email protected]>
Subject: [PATCH] do not emit cryptomount without crypto UUID

---
  util/grub-mkconfig_lib.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
util/grub-mkconfig_lib.in +0 -0
index 29ef865..60b31ca 100644

util/grub-mkconfig_lib.in prepare_grub_to_access_device () · line 151

Quoted 8 lines
util/grub-mkconfig_lib.in +1 -1
@@ -145,7 +145,7 @@ prepare_grub_to_access_device ()
    done
 
    if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then
-      for uuid in "`"${grub_probe}" --device $@ --target=cryptodisk_uuid`"; do
+      for uuid in `"${grub_probe}" --device $@ --target=cryptodisk_uuid`; do
  	  echo "cryptomount -u $uuid"
        done
    fi

Yes that fixes it. Thanks :)

#6 lore raw
In reply to Andrei Borzenkov

Please commit this patch

Quoted 57 lines · Andrei Borzenkov

В Tue, 09 Dec 2014 23:27:49 +0000
Barry Jackson <[email protected]> пишет:

Quoted 21 lines · Barry Jackson
Quoted 9 lines · Andrei Borzenkov
Quoted 8 lines

В Tue, 09 Dec 2014 12:35:20 +0000
Barry Jackson <[email protected]> пишет:

Quoted 4 lines

Hello,
In Mageia it has been proposed that GRUB_ENABLE_CRYPTODISK=y be made the default setting in /etc/default/grub for all installations, whether they use encryption or not.

Quoted 8 lines
Quoted 3 lines

The discussion happens every now and then.

http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00112.html

OK, thanks for the link.

In the case of Mageia the default installation puts everything required by grub under /boot, so AFAICT this should not cause a problem.

... but it does.

Quoted 9 lines

I found time to do some testing, and adding it to the config on a system with no encryption at all causes an error message:
error: device name required.

this seems to be triggered by this line which grub-mkconfig adds to grub.cfg:

cryptomount -u

Does patch below help?

From: Andrei Borzenkov <[email protected]>
Subject: [PATCH] do not emit cryptomount without crypto UUID

---
  util/grub-mkconfig_lib.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
util/grub-mkconfig_lib.in +1 -1
index 29ef865..60b31ca 100644
@@ -145,7 +145,7 @@ prepare_grub_to_access_device ()
    done
 
    if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then
-      for uuid in "`"${grub_probe}" --device $@ --target=cryptodisk_uuid`"; do
+      for uuid in `"${grub_probe}" --device $@ --target=cryptodisk_uuid`; do
  	  echo "cryptomount -u $uuid"
        done
    fi