1

This is not a duplicate of How to install two GNU/Linux in dual boot with one under LUKS and the other not?, since it assumes newly installing both distributions.

I have a Linux distribution installed with LUKS enabled and Grub bootloader, I'd like to install a second Linux distribution on the same disk.

Would it be possible to do this without wiping my existing installation and without losing any data?

Normally, I'd just shrink the existing partition and proceed with the installation using the newly created free space. However, with LUKS, I don't believe it is that simple.

Ideally, I would like this second distribution to not be encrypted (i.e. the grub bootloader to appear before entering my LUKS passphrase). If that is not possible however, then having everything be encrypted is also OK.

Here is my lsblk output:

nvme0n1       259:0    0 931.5G  0 disk
├─nvme0n1p1   259:1    0   500M  0 part
├─nvme0n1p2   259:2    0     8G  0 part  /efi
└─nvme0n1p3   259:3    0   923G  0 part
  └─cryptlvm  253:0    0   923G  0 crypt
    ├─vg-swap 253:1    0     8G  0 lvm   [SWAP]
    ├─vg-root 253:2    0    32G  0 lvm   /
    └─vg-home 253:3    0   883G  0 lvm   /home

nvme0n1p1 is my boot partition.

2
  • Easier to buy an external SSD & install to that. I have two USB to M.2 adapters, about $25 and NVMe drive, price varies a lot by size & vendor and one older SSD when upgraded desktop's internal drive. Found it works almost as good as internal SSD. While UEFI install, added BIOS boot stanza to old 2006 laptop to directly boot external drive and it made that old system functional. Commented Aug 18 at 13:38
  • honestly, there's no need for an external SSD, and it's not really conductive to a sensible system, imho. Plus, pretty far off what OP asks for (and what they probably need). Commented Aug 18 at 13:39

1 Answer 1

0

Would it be possible to do this without wiping my existing installation and without losing any data?

Yes, generally, all Linux distros can be installed manually into mounted file systems, if you are then willing to take the effort of adjusting the boot loader settings so that things are correctly set up. It's what Linux installers do, after they're finished partitioning and formatting your storage!

How well-documented and flexible these manual installation steps are depends a lot on your actual Linux distro. The fedora installer allows you to select externally mounted storage devices, the arch installer expects you to know a lot more about how you're planning to do this. So, no general advice can be made.

Ideally, I would like this second distribution to not be encrypted (i.e. the grub bootloader to appear before entering my LUKS passphrase). If that is not possible however, then having everything be encrypted is also OK.

You will have to shrink your LUKS volume then, first. That's not trivial, and is, as far as I can tell, usually done via backing up the contents externally, deleting the old LUKS volume, setting up a fresh, smaller LUKS volume, and restoring the contents to that after opening it. You'll probably have to adjust crypttab, fstab and grub config on the way.

So in all honesty, this sounds like "back up your data, make a fresh installation of the encrypted system that doesn't use the full disk, then do a normal installation of the second system in the remaining space". How the installation of the first and second are to be done is fully up to the distros used there, and there's no general installation guidance.

1
  • 1
    Hmm but there is cryptsetup resize. I think more importantly the OP needs to pvresize first, then cryptsetup resize (and, finally, resize the partition). Commented Aug 18 at 15:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.