unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Nikita Karetnikov <nikita@karetnikov.org>
To: 19190@debbugs.gnu.org
Subject: bug#19190: Cannot boot with encrypted root
Date: Wed, 26 Nov 2014 07:26:50 +0400	[thread overview]
Message-ID: <8761e2wsjp.fsf@karetnikov.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2458 bytes --]

(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")))))

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

             reply	other threads:[~2014-11-26  4:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  3:26 Nikita Karetnikov [this message]
2014-11-26  9:55 ` bug#19190: Cannot boot with encrypted root Ludovic Courtès
2014-11-26 12:41   ` Ludovic Courtès
2014-11-26 12:05 ` Duncan Keall
2014-11-26 16:04   ` Ludovic Courtès
2014-11-27  2:06     ` Duncan Keall
2014-11-27 10:12       ` Ludovic Courtès
2014-12-13 22:01         ` Ludovic Courtès
2014-12-15 10:49           ` Duncan Keall
2015-09-20 20:14             ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761e2wsjp.fsf@karetnikov.org \
    --to=nikita@karetnikov.org \
    --cc=19190@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).