GNU bug report logs - #19190
Cannot boot with encrypted root

Previous Next

Package: guix;

Reported by: Nikita Karetnikov <nikita <at> karetnikov.org>

Date: Wed, 26 Nov 2014 04:28:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Nikita Karetnikov <nikita <at> karetnikov.org>
Subject: bug#19190: closed (Re: bug#19190: Cannot boot with encrypted root)
Date: Sun, 20 Sep 2015 20:15:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#19190: Cannot boot with encrypted root

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 19190 <at> debbugs.gnu.org.

-- 
19190: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19190
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: Duncan Keall <duncan <at> duncankeall.com>
Cc: Nikita Karetnikov <nikita <at> karetnikov.org>, 19190-done <at> debbugs.gnu.org,
 Petter <petter <at> mykolab.ch>
Subject: Re: bug#19190: Cannot boot with encrypted root
Date: Sun, 20 Sep 2015 22:14:33 +0200
Duncan Keall <duncan <at> duncankeall.com> skribis:

> The boot process still fails at mounting the root filesystem (as
> expected):
>
>   fsck.ext4: No such file or directory while trying to open /dev/mapper/main
>   Possibly non-existent device?

It took us a while but this part is now fixed with cc0e575, and commit
07779d0 adds dm-crypt.ko and xts.ko and their dependencies to the
default initrd.

I’m closing this bug, but if you have time and interest, you’re welcome
to confirm whether this works for you.

Thanks!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Nikita Karetnikov <nikita <at> karetnikov.org>
To: bug-guix <at> gnu.org
Subject: Cannot boot with encrypted root
Date: Wed, 26 Nov 2014 07:26:50 +0400
[Message part 4 (text/plain, inline)]
(Ludo suggested to report this as a bug, so this issue won’t get lost.)

While booting, GRUB prints this error:

error: file
‘/gnu/store/rz…-linux-libre-3.17.3/bzImage’ not found.

which is not surprising since the store is encrypted.

I’ve tried putting these lines after the “setparams” line in the GRUB
config (by hitting the ‘e’ key):

insmod luks
cryptomount hd0,gpt3
set root=crypto0

After pressing the ‘F10’ key, I get a password prompt.  And after that, a
bunch of warnings about ‘/dev/mapper/main’:

ext2fs_check_if_mount: Can’t check if filesystem is mounted due to
missing mtab file while determining whether /dev/mapper/main is mounted.
fsck.ext3: No such file or directory while trying to open
/dev/mapper/main
Possibly non-existent device?
‘fsck.ext3’ exited with code 8 on /dev/mapper/main; spawning REPL

In the REPL:

scheme@(guile-user)> ,use (gnu build linux-boot)
scheme@(guile-user)> (boot-system)
[…]
ERROR: In procedure mount:
ERROR: In procedure mount: Device or resource busy

My config is shown below:

(use-modules (gnu))

(define %linux-modules
  '(
    ;; cryptsetup/LUKS
    "dm-crypt.ko" "aes-x86_64.ko" "crc32.ko" "pcbc.ko" "xcbc.ko" "sha256-ssse3.ko"))

(operating-system
  (host-name "test")
  (timezone "Europe/Paris")
  (locale "en_US.UTF-8")

  (bootloader (grub-configuration
               (device "/dev/sda")))

  (initrd (lambda (fs . args)
            (apply base-initrd fs
                   #:extra-modules %linux-modules
                   args)))

  (mapped-devices (list (mapped-device
                         (source "/dev/sda3")
                         (target "main")
                         (type luks-device-mapping))))

  (file-systems (cons* (file-system
                         (device "/dev/mapper/main")
                         (mount-point "/")
                         (type "ext3"))
                       (file-system
                         (device "boot")
                         (type 'label)
                         (mount-point "/boot")
                         (type "ext3"))
                       %base-file-systems))

  (users (list (user-account
                (name "test")
                (group "users")

                (supplementary-groups '("wheel"
                                        "audio" "video"))
                (home-directory "/home/test")))))
[Message part 5 (application/pgp-signature, inline)]

This bug report was last modified 9 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.