Ubuntu + Luks: Volume Group 'vgcrypt' not found (drop to busybox)

Problem: I followed the intructions for installing Ubuntu 16.04 over an EFI system with LUKS+LVM of this upvoted question on AskUbuntu, but I ended up with a somewhat unusable system.

The only thing that I changed was the size/order of the partitions, and the device on which I performed the partitioning.


This is the output of lsblk, the disk of interest is /dev/sdb/:

NAME                      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                         8:0    0 931.5G  0 disk  
└─sda1                      8:1    0 931.5G  0 part  
sdb                         8:16   0 596.2G  0 disk  
├─sdb1                      8:17   0   976M  0 part  
├─sdb2                      8:18   0   977M  0 part  /mnt/root/boot
└─sdb3                      8:19   0 594.3G  0 part  
  └─crypt                 252:0    0 594.3G  0 crypt 
    ├─vgcrypt-lvcryptswap 252:1    0    16G  0 lvm   
    ├─vgcrypt-lvcryptroot 252:2    0    50G  0 lvm   /mnt/root
    └─vgcrypt-lvcrypthome 252:3    0 528.3G  0 lvm   
sdc                         8:32   0 119.2G  0 disk  
├─sdc1                      8:33   0   260M  0 part  
├─sdc2                      8:34   0    16M  0 part  
├─sdc3                      8:35   0 118.5G  0 part  
└─sdc4                      8:36   0   499M  0 part  
sdd                         8:48   1   7.6G  0 disk  
└─sdd1                      8:49   1   7.6G  0 part  /cdrom
loop0                       7:0    0   1.4G  1 loop  /rofs
mmcblk0                   179:0    0   1.9G  0 disk  
└─mmcblk0p1               179:1    0   1.9G  0 part  /media/ubuntu/31FCE9E42220D4BE

The lvm in the luks partition /dev/sdb3 is called crypt and contains swap, root and home.

The remaining disks are used by windows 10, so I left them untouched.


After getting the uuid of /dev/sdb3 from blkid:

/dev/sda1: LABEL="DATA" UUID="2AE43A49E43A1791" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="2a7b3856-3192-47aa-8554-b6cfb2f04a8f"
/dev/sdb1: UUID="2943-F2AC" TYPE="vfat" PARTUUID="ae1b8a40-ac1a-43c7-9ea5-6a5af9ab3a8e"
/dev/sdb2: UUID="3db754a7-09c6-482f-935d-01a6eb0b73f6" TYPE="ext4" PARTUUID="6f366b6f-8a81-4b48-9c4a-430587cc036c"
/dev/sdc1: LABEL="SYSTEM" UUID="C046-94A0" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="5476cd55-9ffe-4117-8ae9-0327ef674d98"
/dev/sdc3: LABEL="OS" UUID="5C3A4A083A49E01E" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="f4cfabec-46df-4b83-8fb3-3046fa637d17"
/dev/sdc4: LABEL="RECOVERY" UUID="4EAE64A2AE6483F5" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="96888350-a7f1-44f7-9088-84e7978f5fe0"
/dev/sdd1: UUID="B700-D919" TYPE="vfat" PARTUUID="14f70980-bceb-4945-a267-d9877f147b2a"
/dev/loop0: TYPE="squashfs"
/dev/sdb3: UUID="132a57e3-b7dd-4404-9782-944a050d3153" TYPE="crypto_LUKS" PARTUUID="0a24c795-1346-4c5d-9018-620f4bf28785"
/dev/mmcblk0p1: UUID="31FCE9E42220D4BE" TYPE="ntfs" PARTUUID="0009e3b9-01"
/dev/mapper/crypt: UUID="6wnHdE-Vr7r-lECO-PcTi-aMz9-dnQY-5wY8ne" TYPE="LVM2_member"
/dev/mapper/vgcrypt-lvcryptswap: UUID="12f1b51a-1de2-4be1-ac8b-5c7ee92cf7d6" TYPE="swap"
/dev/mapper/vgcrypt-lvcryptroot: UUID="d45bfda9-7759-4eb2-a739-d4b55c6e3ecc" TYPE="ext4"
/dev/mapper/vgcrypt-lvcrypthome: UUID="1034f3c4-aafe-4086-b4ee-61af1f96ddea" TYPE="ext4"
/dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="e5ed0f27-374d-4fb0-bf52-b7d6371cea51"
/dev/mmcblk0: PTUUID="0009e3b9" PTTYPE="dos"

I updated the /etc/crypttab file within the new system as adviced by the instructions:

crypt UUID="132a57e3-b7dd-4404-9782-944a050d3153" none luks

Since I wish to be prompted for the password each time, I did not configure a password file.


Currently, my /etc/fstab/ looks as follows

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/vgcrypt-lvcryptroot /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdb2 during installation
UUID=3db754a7-09c6-482f-935d-01a6eb0b73f6 /boot           ext4    defaults        0       2
# /boot/efi was on /dev/sdb1 during installation
UUID=2943-F2AC  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/vgcrypt-lvcrypthome /home           ext4    defaults        0       2
/dev/mapper/vgcrypt-lvcryptswap none            swap    sw              0       0

AFAIK, this file was automatically generated during the installation process and it looks fine.


Error:

During the boot process, I am dropped to busybox with the following error message:

Volume group not found
Cannot process volume group vgcrypt

I am somewhat puzzled by this error, so far googling doesn't seem to return any useful answer among the first page results.

Question: would anyone know what is wrong in my setup and how I could fix it?

I already tried using

# update-initramfs -u -k all 

And verified that lvm2 is installed in the new system, which is Ubuntu 16.04 with kernel 4.4.0-31-generic.


In case anyone thinks that it could be useful, here is the grub.cfg file:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  3db754a7-09c6-482f-935d-01a6eb0b73f6
else
  search --no-floppy --fs-uuid --set=root 3db754a7-09c6-482f-935d-01a6eb0b73f6
fi
    font="/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=it_IT
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d45bfda9-7759-4eb2-a739-d4b55c6e3ecc' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    set root='hd1,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  3db754a7-09c6-482f-935d-01a6eb0b73f6
    else
      search --no-floppy --fs-uuid --set=root 3db754a7-09c6-482f-935d-01a6eb0b73f6
    fi
    linux   /vmlinuz-4.4.0-31-generic.efi.signed root=/dev/mapper/vgcrypt-lvcryptroot ro  quiet splash $vt_handoff
    initrd  /initrd.img-4.4.0-31-generic
}
submenu 'Opzioni avanzate per Ubuntu' $menuentry_id_option 'gnulinux-advanced-d45bfda9-7759-4eb2-a739-d4b55c6e3ecc' {
    menuentry 'Ubuntu, con Linux 4.4.0-31-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-advanced-d45bfda9-7759-4eb2-a739-d4b55c6e3ecc' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  3db754a7-09c6-482f-935d-01a6eb0b73f6
        else
          search --no-floppy --fs-uuid --set=root 3db754a7-09c6-482f-935d-01a6eb0b73f6
        fi
        echo    'Caricamento Linux 4.4.0-31-generic...'
        linux   /vmlinuz-4.4.0-31-generic.efi.signed root=/dev/mapper/vgcrypt-lvcryptroot ro  quiet splash $vt_handoff nouveau.modeset=0
        echo    'Caricamento ramdisk iniziale...'
        initrd  /initrd.img-4.4.0-31-generic
    }
    menuentry 'Ubuntu, with Linux 4.4.0-31-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-init-upstart-d45bfda9-7759-4eb2-a739-d4b55c6e3ecc' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  3db754a7-09c6-482f-935d-01a6eb0b73f6
        else
          search --no-floppy --fs-uuid --set=root 3db754a7-09c6-482f-935d-01a6eb0b73f6
        fi
        echo    'Caricamento Linux 4.4.0-31-generic...'
        linux   /vmlinuz-4.4.0-31-generic.efi.signed root=/dev/mapper/vgcrypt-lvcryptroot ro  quiet splash $vt_handoff init=/sbin/upstart
        echo    'Caricamento ramdisk iniziale...'
        initrd  /initrd.img-4.4.0-31-generic
    }
    menuentry 'Ubuntu, with Linux 4.4.0-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-recovery-d45bfda9-7759-4eb2-a739-d4b55c6e3ecc' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  3db754a7-09c6-482f-935d-01a6eb0b73f6
        else
          search --no-floppy --fs-uuid --set=root 3db754a7-09c6-482f-935d-01a6eb0b73f6
        fi
        echo    'Caricamento Linux 4.4.0-31-generic...'
        linux   /vmlinuz-4.4.0-31-generic.efi.signed root=/dev/mapper/vgcrypt-lvcryptroot ro recovery nomodeset 
        echo    'Caricamento ramdisk iniziale...'
        initrd  /initrd.img-4.4.0-31-generic
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (su /dev/sdc1)' --class windows --class os $menuentry_id_option 'osprober-efi-C046-94A0' {
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1  C046-94A0
    else
      search --no-floppy --fs-uuid --set=root C046-94A0
    fi
    chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
    fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

2
задан 13 April 2017 в 15:24

1 ответ

в склепе UUID/etc/crypttab

= "132a57e3-b7dd-4404-9782-944a050d3153" ни один удачи

попытка, которую строка без кавычек

crypt UUID=132a57e3-b7dd-4404-9782-944a050d3153 none luks

должна добиться цели

0
ответ дан 2 December 2019 в 10:21

Другие вопросы по тегам:

Похожие вопросы: