How do I install Manjaro MATE with LVM on LUKS and dual boot with Windows?

Right when I try this it says: cat: rootfs-pkgs.txt: No such file or directory same for the other command too.

By the way, following the finilising steps on the Ubuntu guide to enable GRUB to work on an encrypted partition and adding the UUID I at least managed to make GRUB support the basic decryption window based on the password and then take you to the actual GRUB list. Now, Windows won’t appear in that list, only Linux, Advanced options for Linux and a third option, when I select Linux it boots into Manjaro, but it doesn’t have a UI, and it can’t mount the VG named ‘ubuntu–vg-root’ (as I had it named from the previous Ubuntu MATE installation) it waits 10 seconds and then drops me to an emergency root shell which doesn’t seem to do much…
Mind you, I haven’t edited the fstab file whilst doing the installation

You need to enable the os-prober in Grub’s default config, and then redo update-grub.


If you boot into a live USB, then manjaro-chroot into your Manjaro root file-system, you can retrieve the contents of the following files:

  • /etc/fstab
  • /etc/crypttab
  • /etc/default/grub
  • /etc/mkinitcpio.conf

If you are not in the root of the file system - you will have to prepend the path like this

cat /rootfs-pkgs.txt

When using the partitiontype uuids it is not necessary to add mountpoints to grub.

systemd will mount them automagically based on their partition type.

You can add the mountpoints if it makes you better understand but as noted - not necessary.

https://systemd.io/DISCOVERABLE_PARTITIONS/

Ok, that’s what I was doing wrong. I didn’t realise I was in the home folder of the live ISO. I solved it by cd /.

Anyway, this is what I still get:

:: running early hook [udev]
Starting version 249.4-2-manjaro
:: running early hook [udev]
:: Triggering uevents...
Waiting 10 seconds for device /dev/mapper/ubuntu--vg-root ...
ERROR: device '/dev/mapper/ubuntu--vg-root' not found. Skipping fsck.
:: mounting '/dev/mapper/ubuntu--vg-root' on real root
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#_

It sucks I can’t attach links nor pictures…

What about the above files from a chroot environment (of your installed system)?

You can use a third-party service to copy+paste the contents.


While you’re at it, use the vgscan and lvscan commands to list all discoverable logical volumes prior to jumping into the chroot.

I don’t exactly know what you mean by retrieving the content of the files and do copy and paste. Copy from where to where? Thank you

Now that’s what I think I’m missing. Something is going on that it won’t recognise the partition type when booting. Therefore I think I will have to edit the fstab with the UUIDs to make it work. I’ll give it another try and let you know when I can.

When you enter the chroot environment (using manjaro-chroot), to retrieve the contents and outputs of the previously mentioned files and commands.

You can paste it in here or with a third-party link, such as pastebin.

/etc/fstab —> /etc/fstab - Pastebin.com
/etc/crypttab —> /etc/crypttab - Pastebin.com
/etc/default/grub —> /etc/default/grub - Pastebin.com
/etc/mkinitcpio.conf —> /etc/mkinitcpio.conf - Pastebin.com

:warning: Your fstab is… empty?

:warning: You’re missing the encrypt and lvm2 hooks in your mkinitcpio.conf. I believe you need them inserted in the order of blockencryptlvm2. (Must be after udev and before filesystems hooks.)

Perhaps in the chroot environment, you can edit your fstab to add the proper entries for /boot, /, and /home, and make the corrections in mkinitcpio.conf. Then rebuild the initramfs and Grub menu with mkinitcpio -P and update-grub, respectively.

This feels a bit too precarious for me, considering it’s not a fresh installation, but rather salvaging your existing LUKS + LVM setup from Ubuntu. :grimacing:

fstab file is empty as I followed the exact steps as the full installation guide linked up here in the comments and didn’t touch it. That’s as it came.

Ok will try that. Btw forgot to mention that I formatted boot and root partitions and now the GRUB menu won’t show anymore like before. It will just boot straight to the faulty install of Manjaro with emergency root shell. Anyway, will see if those steps work. If it means me having to recreate the LVMs from scratch then I could give that a try, but don’t see how that would make it any different since I formatted the root installation and just kept the home files on a separate Volume group

Ok, I’ve tried to do that, updated fstab with /dev/mapper/ubuntu--vg-root / ext4 defaults 0 1
And same for /home and /boot and /boot/efi. I then edited the hooks like you said and got the same error as before with it not finding /dev/mapper/ubuntu–vg-root and dropping me to the emergency root shell. I even tried to used systemd hooks as I saw that some people seemed to have solved it that way, and still same error. :frowning:

I would be happy to scrap the LVM system if there is another slightly easier way to use an encrypted installation just for Manjaro. Does anyone know anything more about it? Cheers.

The default installation method (erase entire drive) will use the following setup if you select encryption:

  • 300MB, ESP (FAT32, Grub EFI loader)
  • Remainder of drive as a single, large LUKS encrypted partition, which contains everything, including /boot and /home (Ext4, or XFS, or Btrfs, or F2FS)
  • Swap will either live as a file in your encrypted root partition, or as a separate partition, depending on which choice you make

You can instead choose to do a manual partition scheme, in which you create a separate /home partition.

Oh God. I’m going to lose all the programs and stuff I have on Windows that I use for music. Not that this laptop is my main workstation, I use it as a secondary machine but it’s going to be a nightmare even just to reinstall Windows. Don’t think I’ll go down that route…

If I delete the existing LVM only, does Manjaro Installer support creating a new encrypted LVM and installing Manjaro on it instead?

Would it be alright if I deleted the LVM on LUKS and created just another big one that will include root, home and boot sections (alongside all the rest) and try to set up the installation with the graphical installer rather than having to do it all manually? I feel like I’m missing something the manual way…

Yes - that is correct but that guide is not on LUKS it is plain installation.

When you need LUKS there is some additional steps.

That is exactly what I must be missing then. I don’t know the steps to be taken, would you be so kind to provide me a guide or something that explains them please? I’m quite at a loss at the moment :frowning:

I assumed since you wanted to do LVM on LUKS you would have the necessary knowledge to apply before doing the actual install.

The simplest less complicated method I know of uses systemd to boot and it does not involve LVM.

Please bear with me linking to my notepad - while I have published the notes here I cannot remember when or if it was the archived instace - my notepad is there to help me remember.

Direct link to my notepad systemd-boot - LUKS - ext4 | root.nix.dk
Another link using grub Encrypted CLI installation | root.nix.dk
A third - USB stick using grub USB LXDE with persistence | root.nix.dk

While LVM certainly has application in some use-cases - it rarely has application for personal computing - but that is only my personal opinion - and you should use what ever you like - but LVM and RAID I steer clear - instead I have come to appreciate backup, git providers and cloud storage.

1 Like

I am happy to scrap LVM if I can do without but still the whole installation and personal files encrypted

I did try the 2nd method and it still didn’t work. It still shows me the error about /dev/mapper/ubuntu–vg-root not found. Even though I checked the fstab file and everything seems configured properly. Now this is the guide I followed initially to setup the LVM on LUKS for Ubuntu
https://help.ubuntu.com/community/Full_Disk_Encryption_Howto_2019

As you can see from that guide it creates 2 LVM on LUKS one for root, home and all the rest and the other a LUKS1 for the encrypted boot. Now I don’t think this setup would work for Manjaro, so I thought of asking you, should I just scrap the existing LVMs on LUKS I have at the moment and just create 1 big partition for all the installation that is root, home, boot and everything else in just one big LVM on LUKS and then try to follow these guides again? As having two makes things so much more complicated and seems unnecessary as I think even if the boot partition is in a LUKS2 container it should still succeed in being decrypted at boot by GRUB.