unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* grub failure after fresh system installation with lvm on luks: disk lvmid/.. not found
@ 2023-02-20 23:51 Martin Castillo
  0 siblings, 0 replies; only message in thread
From: Martin Castillo @ 2023-02-20 23:51 UTC (permalink / raw)
  To: help-guix

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

Hi,

I'm trying to install guix (inside qemu) with "/" on lvm on luks on 
sda2. sda1 contains the efi partition:

NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
fd0                       2:0    1     4K  0 disk
sda                       8:0    0    30G  0 disk
├─sda1                    8:1    0   600M  0 part  /mnt/efi
└─sda2                    8:2    0  29.4G  0 part
   └─lukspart            253:0    0  29.4G  0 crypt
     └─lvmSystem-volRoot 253:1    0  29.4G  0 lvm   /tmp
                                                    /mnt
sr0                      11:0    1 813.9M  0 rom
sr1                      11:1    1  1024M  0 rom

The installation finishes with no problem. However on reboot grub errors 
out:
error: disk 
`lvmid/VyWL64-HaH6-Wnec-fiND-VZye-90JJ-LxWLuj/NvcAEV-u4y7-PAyi-6ctt-
    xlrL-Wbzt-eTfVq3' not found.
    Entering rescue mode...
    grub rescue> insmod lvmi
    error: disk 
`lvmid/VyWL64-HaH6-Wnec-fiND-VZye-90JJ-LxWLuj/NvcAEV-u4y7-PAyi-6ctt-
    xlrL-Wbzt-eTfVq3' not found.
    grub rescue> insmod lvm
    grub rescue> ls
    (hd0) (cd0) (cd1)
    grub rescue> insmod lvm
    grub rescue> cryptomount (hd0)
    Unknown command `cryptomount'.
    grub rescue> cryptomount
    Unknown command `cryptomount'.
    grub rescue> insmod luks2
    error: disk 
`lvmid/VyWL64-HaH6-Wnec-fiND-VZye-90JJ-LxWLuj/NvcAEV-u4y7-PAyi-6ctt-
    xlrL-Wbzt-eTfVq3' not found.
    grub rescue> lin
    Unknown command `lin'.
    grub rescue> insmod luks
    error: disk 
`lvmid/VyWL64-HaH6-Wnec-fiND-VZye-90JJ-LxWLuj/NvcAEV-u4y7-PAyi-6ctt-
    xlrL-Wbzt-eTfVq3' not found.
    grub rescue> insmod lvm
    grub rescue>

Looks like it cannot load the modules luks / luks2. Is it looking for 
those on the root partition?  That lvmid belongs to my root partition. 
Well, that's still encrypted. I attached the grub.cfg created by guix 
system init.

I don't know how this chicken-egg problem is generally solved by grub.
On my day-to-day system I have a similar setup (root on lvm on luks), 
but I don't know, why/how this works. I do have a 1M grub partition, 
though I believe I just followed a bad guide and it is only used on 
bios+gpt systems.

Is there something wrong with my config.scm, or is this a guix bug?

Martin Castillo

[-- Attachment #2: config.scm --]
[-- Type: text/x-scheme, Size: 2183 bytes --]

;; This is an operating system configuration generated
;; by the graphical installer.

(use-modules (gnu))
(use-service-modules desktop networking ssh xorg)

(operating-system
  (locale "de_DE.utf8")
  (timezone "Europe/Berlin")
  (keyboard-layout (keyboard-layout "de" "neo"))
  (host-name "geex")
  (users (cons* (user-account
                  (name "mcd")
                  (comment "Martin")
                  (group "users")
                  (home-directory "/home/mcd")
                  (supplementary-groups
                    '("wheel" "netdev" "audio" "video")))
                %base-user-accounts))
  (packages
    (append
      (list (specification->package "nss-certs"))
      %base-packages))
  (services
    (append
      (list (service xfce-desktop-service-type)
            (service openssh-service-type)
            (set-xorg-configuration
              (xorg-configuration
                (keyboard-layout keyboard-layout))))
      %desktop-services))
  (bootloader
    (bootloader-configuration
      (bootloader grub-efi-bootloader)
      (target "/efi") ; deprecated
      (keyboard-layout keyboard-layout)))
  (mapped-devices
    (list (mapped-device
	    (source (uuid "e35658c9-6e31-431a-9397-2e988e32fe63"))
	    (target "lukspart")
	    (type luks-device-mapping))
	  (mapped-device
	    (source "lvmSystem")
	    (target "lvmSystem-volRoot")
	    (type lvm-device-mapping))))
  (file-systems
    (cons* (file-system
             (mount-point "/efi")
             (device (uuid "845E-533F" 'fat32))
             (type "vfat"))
           (file-system
             (mount-point "/")
             (device ; mapped device name: lvmSystem-volRoot, FS-label is guixsd-root
               (uuid "0584a348-341b-475d-b19f-93b5567ee02b"
                     'ext4))
             (type "ext4")
	     (dependencies mapped-devices))
           %base-file-systems))
  (swap-devices
    (list
      (swap-space
	(target "/swapfile")
	(dependencies (filter
			(file-system-mount-point-predicate "/")
			file-systems)))))
  (kernel-arguments
    (cons* "resume=/swapfile"
	   "resume_offset=34816" ;; got with: # filefrag -e /swapfile
	   %default-kernel-arguments)))

[-- Attachment #3: grub lvm not found.png --]
[-- Type: image/png, Size: 6665 bytes --]

[-- Attachment #4: bad.grub.cfg --]
[-- Type: text/plain, Size: 1576 bytes --]

# This file was generated from your Guix configuration.  Any changes
# will be lost upon reconfiguration.
insmod luks
insmod luks2
cryptomount -u e35658c96e31431a93972e988e32fe63

# Set 'root' to the partition that contains /gnu/store.
search --fs-uuid --set 0584a348-341b-475d-b19f-93b5567ee02b


if loadfont unicode; then
  set gfxmode=auto
  insmod all_video
  insmod gfxterm
fi

terminal_output gfxterm

insmod png
if background_image /gnu/store/8cv1gh9lzhxzga1idp0h4ykh4xh2d052-grub-image.png; then
  set color_normal=light-gray/black
  set color_highlight=yellow/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
# Localization configuration.
# search --file --set /gnu/store/d96mmrjwy9069g3dpl39hm6y5x6vb3z6-grub-locales/en@quot.mo
set locale_dir=/gnu/store/d96mmrjwy9069g3dpl39hm6y5x6vb3z6-grub-locales
set lang=de_DE
insmod keylayouts
keymap /gnu/store/3h2wmirf7scl2xq7jppq3a3fjawks1jf-grub-keymap.de

set default=0
set timeout=5
menuentry "GNU with Linux-Libre 6.0.10" {
  search --fs-uuid --set 0584a348-341b-475d-b19f-93b5567ee02b
  linux /gnu/store/3qdad0k7wvwl09wah246q7fvsb1hbr0x-linux-libre-6.0.10/bzImage root=0584a348-341b-475d-b19f-93b5567ee02b gnu.system=/gnu/store/j5fzvj8p2sx89qdj9gx8q081ypgh52r4-system gnu.load=/gnu/store/j5fzvj8p2sx89qdj9gx8q081ypgh52r4-system/boot resume=/swapfile resume_offset=34816 modprobe.blacklist=usbmouse,usbkbd quiet
  initrd /gnu/store/yzcnki05g7zlfjmx13dwd4vsljrs60pm-raw-initrd/initrd.cpio.gz
}

if [ "${grub_platform}" == efi ]; then
  menuentry "Firmware setup" {
    fwsetup
  }
fi

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-20 23:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 23:51 grub failure after fresh system installation with lvm on luks: disk lvmid/.. not found Martin Castillo

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).