1

So, I have a problem with the partitions setup of my laptop. I will try to include as many details as possible in order to make it easier to help.

In the past, I had an ubuntu 15.10 system on my laptop with 2 identically sized drives. These were both identically formatted with 2 partitions each, one for /boot and one for /. Both partitions were raid1'd together with mdadm. On the boot-raid I then had a btrfs file system for /boot. On the /-raid I had a LUKS-volume with a LVM-volume inside on it. On the LVM I then had a btrfs partition.

This setup worked quite well. but I wanted to change it: first, I wanted to have atomic backups, So the boot partition had to go so I would be able to snapshot the entire OS at once. Second, I wanted to encrypt the /boot, too. Third, I wanted to get rid of LVM. And fourth, I didn't want bit rot, so mdadm needed to go in favor of btrfs-raid.

So my idea for a better suited system was as follows: I would have only 1 partition on each drive with a btrfs-parity for a btrfs-raid1 inside.

I did that, moved the system over to the new partitions, added the cryptodisk-stuff into /etc/default/grub, corrected crypttab, corrected fstab, made sure initramfs is ok, updated grub, installed it to the drives once more, uninstalled mdadm and lvm2 from the system, moved away their config files I knew of (in /etc) and rebooted. I used external hard drives to balance around my btrfs file system during the procedure, and a USB stick with a ubuntu system with the same version as my system's.

When I rebooted, grub came up asking me for the first unlock, I did it, it apparently didn't care about the second LUKS-container, booted through fine anyway (I guess because it only needs to read, where 1 disk is enough), the init begun and it asked me to unlock the first container again (as expected). I did it, it continued and instead of unlocking the second one, it came with "crypsetup: lvm is missing".

I double-checked fstab and crypttab, as well as /etc/default/grub, and it all seemed fine. Do you have any hints on why this error could occur? also, if I use the same IDs to mount and chroot into my system from usb, everything works fine. So the system itself is perfectly fine.

6
  • Clarification: I set it up so I would need to enter the same password twice at boot. So it shouldn't unlock it automatically, it should ask me to unlock the second container, which it unfortunately doesn't. Jan 28, 2016 at 2:31
  • I only skimmed through your question, but this is sounding like something's missing from the initramfs, which can be fixed by (somehow) booting from rescue media and mounting the system, then while chrooted into the system running update-initramfs. Jan 28, 2016 at 20:59
  • The problem is, I already did 'update-initramfs -u -k all' from a chroot after I had finished with setting up everything. I even removed and recreated the initramfs to make sure. So I'm pretty certain this isn't the issue, but still thanks for trying to help. Jan 29, 2016 at 3:01
  • Okay, I finally found the solution to my problem! I feel like a TOTAL idiot, but hey, at least now I know what the problem was! I had a typo in the crypttab entry for the second container.... even though I double-checked, I somehow missed this little thing, and sadly, update-initramfs didn't complain either. The question is resolved (even though the cryptsetup error messages were misleading), and I'm going to try to mark it as resolved, too. Jan 29, 2016 at 4:32
  • Congratulations for finding the problem. To mark the question as resolved, post an answer that explains how you solved the problem, and mark it as accepted (as a new user, there may be a delay before you can mark your own answer as accepted). Jan 29, 2016 at 14:06

1 Answer 1

1

The question is answered by myself now! The problem was that the crypttab entry for the second container was invalid. Even though I double-checked, I missed the error, and the update-initramfs didn't complain either. What do I take away from this? Always triple- or quadruple-check such critical things, as it can often save you a lot of hassle (and others that try to help you, too ;).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .