2

So I followed many times with success this particular tutorial http://thesimplecomputer.info/full-disk-encryption-with-ubuntu

With 2 slightly different things: lubuntu instead of ubuntu and install it on an USB key instead of a normal drive.

However with my latest attempt with this in a new usb key something happened. All good in the few first days of use until I done a dist-upgrade with apt-get. I completed it without problems or interruptions.

However now when I boot basically I see the usual Lubuntu splash screen, but without the input field where usually I type the password.

I tried in pressing up or down arrow keys to see if I can type in terminal mode, no success. All is see is the message "cryptsetup: lvm is not available" repeat an endless number of times then basically busybox mode starts.

Note: that message, "cryptsetup: lvm is not available" happened to me randomly a lot of times with other usb keys too (same cryptsetup + lubuntu in usb keys) but I still had the input field and I could simply proceed to unlock the crypto volumes without issues.

So I can't understand where is the problem right now. I don't think is in grub or boot cause otherwise it wouldn't boot at all.

That last dist-upgrade for sure caused this, I just saw that it did updated linux headers and more but I can't understand this issue.

I'm using lubuntu yakkety installed in a disk with MBR partition table if that matters at all.

What can I try to fix this? Any way to fix this issue via busybox? Im not really an expert in using that kind of terminal


UPDATE

Following the suggestion from the answer below I tried from a neon live cd the following:

  • Use KDE Partition Manager and unlock your encrypted LUKS volume. Now you need to activate LVM. Either press F5 (refresh) in KDE Partition Manager or type sudo vgchange -ay in the terminal. Your root file system should now appear as a block device in /dev/mapper/. Again, in KDE Partition Manager it might be visually easier to see the name of your root file system. Lets say it is /dev/mapper/rootfs but you'll have to substitute correct path in the commands bellow.
  • Then execute the following commands to chroot into your root file system:

    sudo mount /dev/mapper/rootfs /mnt1 sudo mount --bind /dev /mnt/dev sudo mount --bind /sys /mnt/sys sudo chroot /mnt

Finally with 'sudo update-initramfs -u -k all' I get this output:

update-initramfs: Generating /boot/initrd.img-4.8.0-32-generic
cat: /proc/cmdline: No such file or directory
/proc/devices: fopen failed: No such file or directory
Failed to set up list of device-mapper major numbers
Incompatible libdevmapper 1.02.130 (2016-07-06) and kernel driver (unknown version).
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for root
/proc/devices: fopen failed: No such file or directory
Failed to set up list of device-mapper major numbers
Incompatible libdevmapper 1.02.130 (2016-07-06) and kernel driver (unknown version).
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for swap
Warning: couldn't identify filesystem type for fsck hook, ignoring.
update-initramfs: Generating /boot/initrd.img-4.8.0-30-generic
cat: /proc/cmdline: No such file or directory
/proc/devices: fopen failed: No such file or directory
Failed to set up list of device-mapper major numbers
Incompatible libdevmapper 1.02.130 (2016-07-06) and kernel driver (unknown version).
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for root
/proc/devices: fopen failed: No such file or directory
Failed to set up list of device-mapper major numbers
Incompatible libdevmapper 1.02.130 (2016-07-06) and kernel driver (unknown version).
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for swap
Warning: couldn't identify filesystem type for fsck hook, ignoring.

UPDATE 2:

Here's the new error output I get, after simply delete everything and repeat the whole procedure. I include the 2 screen I can see after grub boot menu.

After command "update-initramfs -u -k all" I see this error log:

root@lubuntu:/# update-initramfs  -u -k all
update-initramfs: Generating /boot/initrd.img-4.8.0-22-generic
device-mapper: table ioctl on root failed: No such device or address
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for root
device-mapper: table ioctl on swap failed: No such device or address
Command failed
cryptsetup: WARNING: failed to determine cipher modules to load for swap
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
Warning: couldn't identify filesystem type for fsck hook, ignoring.

And here you can see how lubuntu appear after boot, password input doesnt shows up

no input field for password

this is what I see if I hit F2 in the previous screen

0

I suggest downloading Neon Live CD that has already packaged KDE Partition Manager 3.0 (but Ubuntu 17.04 will also have it). Then open a terminal window and run sudo apt update; sudo apt install cryptsetup lvm2 partitionmanager

  • Start KDE Partition Manager and unlock your encrypted LUKS volume. Alternatively you can do it from the terminal: sudo cryptsetup open /path/to/USB_device decrypted. After this step /dev/mapper/decrypted will contain LVM PV volume.
  • Now you need to activate LVM. Either press F5 (refresh) in KDE Partition Manager or type sudo vgchange -ay in the terminal. Your root file system should now appear as a block device in /dev/mapper/. Again, in KDE Partition Manager it might be visually easier to see the name of your root file system. Lets say it is /dev/mapper/rootfs but you'll have to substitute correct path in the commands bellow.

Then execute the following commands to chroot into your root file system:

  • sudo mount /dev/mapper/rootfs /mnt
  • sudo mount --bind /dev /mnt/dev
  • sudo mount --bind /sys /mnt/sys
  • sudo mount --bind /proc /mnt/proc
  • sudo chroot /mnt
  • sudo mount /boot

Now you need to regenerate initramfs. Try running:

sudo update-initramfs -u -k all and see if it shows any errors about lvm which you need to fix. I'll try to find a bit more links later... Please post any errors you see here.

  • Thank you very much for your reply, I had the time to try this only yesterday and it failed. I added the output I get after I use 'sudo update-initramfs -u -k all' – user635976 Jan 10 '17 at 18:29
  • argh, looks like I forgot mounting /proc in the instructions, try with /proc and see what the error is then.... I also added mount /boot command after chrooting. – Andrius Štikonas Jan 10 '17 at 21:34
  • Thank you again for your reply Andrius, two month passed and only recently I had the time to try this again. I obtained the same error. What I did is repeating the whole procedure of that tutorial that always worked out for me in the past, then once I saw the same exact fail, I re-used the commands you gave me. – user635976 Mar 26 '17 at 21:25
  • I updated the first post btw and you can see the new output of the error – user635976 Mar 26 '17 at 21:26
  • hmm, somehow initramfs-tools do not fetch lvm. I'm thinking maybe it's worth trying out dracut as initramfs generator? (It will be default in Debian 10 and hence in Ubuntu in the future. Once you are chrooted (like before, try running apt install dracut). I actually use dracut here and it works well. – Andrius Štikonas Mar 28 '17 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.