Boot issue after luks encryption removal

I followed the Arch wiki to remove luks encryption on my ssd because of very slow boot time.

So I booted into live-usb and issued this command to decrypt the disk in-place.

The command ran successfully,
But on reboot I am getting the following error and thrown into grub rescue.

From the next section in Arch wiki I found that I need to update some files after decryption (and possibly regenerate initramfs by mkinitcpio -P command)

So I tried chrooting into the decrypted partition, but on mounting the root I don’t see the complete root partition…
This is what ls gives after mounting the disk partition.

Please help me out here, how do I get my system back running.

  • boot from USB, chroot is needed later, but most things can be done without

lsblk -f
tells you the UUID of your disk/partitions
this needs to be adapted in /etc/fstab

What is in your current /etc/fstab ?

What does the HOOKS line in /etc/mkinitcpio.conf look like?
(the “encrypt” keyword can go)
grep -e ^HOOKS /etc/mkinitcpio.conf

What does the /etc/default/grub look like?
grep GRUB_CMDLINE_LINUX_DEFAULT /etc/default/grub
(the reference to your encrypted device needs to go)

Then you can manjaro-chroot -a
and regenerate the initrd from within chroot
(update-grub should take care of that)

I booted from live-usb,
/etc/fstab shows this

grep GRUB_CMDLINE_LINUX_DEFAULT /etc/default/grub returns empty string. (maybe because of live-usb)

This is the output of lsblk,

please do not post screenshots - it is very easy to just copy/paste the terminal output
(and would even make it easy for me to just give ready to use commands to help you
but no one will type the UUID off of your screenshot, for example …)

For one thing, you need to comment out that one line in /etc/fstab
and put another in with the correct UUID.

But I will not be able to help you with that - your root partition seems to be BTRFS
and I have zero knowledge and zero experience with that
and wouldn’t know how that entry would have to look like.

Or is your system root on /dev/sda2 (which is an ext4 partition) ?
It is labelled as “backup”.

Sorry!

I understand, I will paste the output instead of screenshots from now on.

My system is on this ssd and it is a btrfs partiton.
nvme0n1p2 is the root, and
nvme0n1p1 is EFI partiton.

nvme0n1                                                                                                   
├─nvme0n1p1 vfat  FAT32   E12C-83B8                             298.7M
└─nvme0n1p2 btrfs         9e27b54b-2b8d-423d-959f-1c299343f39e  250.4G

So I edited /etc/fstab as such:

<file system>                           <dir>   <type> <options> <dump> <pass>
UUID=9e27b54b-2b8d-423d-959f-1c299343f39  /     btrfs   defaults     0     1 

Any suggestions on what to do next?
Thanks for your help so far!

yes

but first: I can’t tell whether your edit to /etc/fstab is correct or not - no experience with BTRFS …

the UUID doesn’t match between your two snippets - you lost the last character (the “e”)

next will be:
/etc/mkinitcpio.conf
and, more importantly
/etc/default/grub

and then:
chroot to regenerate the initrd

I finally found the solution after an entire day of troubleshooting, scouring the internet and countless forums.

Apparently somehow my @ subvolume got corrupted and that’s why there was no /etc folder when I chrooted into my system.
To solve this issue, I restored the @ root subvolume from an earlier btrfs snapshot following this guide: [HowTo] Manual rollback with btrfs

Now, on to the main issue of this post.
For anyone removing luks disk encryption using:
cryptsetup reencrypt --decrypt *device_path*
(Removing system encryption - ArchWiki)

You need to update the following to successfuly boot into your system after removing luks disk encryption:

  1. chroot into your system using a live USB.
  2. Delete /etc/crypttab file. Its no longer required.
  3. Edit /etc/fstab and replace the luks entries for /, /home etc with UUID=... (Find the correct UUID of your root partition using lsblk -f command)
  4. Edit /etc/mkinitcpio.conf and remove encrypt from HOOKS=(...), and also comment the FILE=... linking to the crypt lock file. Then regenerate initramfs using mkinitcpio -P command.
  5. Edit /etc/default/grub and remove the luks uuid entry from GRUB_CMDLINE_LINUX_DEFAULT="..."
  6. reinstall grub:
    1. grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
    2. grub-mkconfig -o /boot/grub/grub.cfg
    The above two commands are for efi systems. You can follow this guide for specific details suiting your system. (GRUB/Restore the GRUB Bootloader - Manjaro)
  7. Exit chroot & reboot.

That’s all. Now you can boot into your old system without encryption!

2 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.