this post was submitted on 11 Sep 2023
14 points (93.8% liked)

Linux

48118 readers
663 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Seriously you guys. I love tinkering. I never give up. I feel like I've failed here, having used about 4 promising tutorials found online. Just can't make it all play right.

So here's my end goal: RAID __ (mobo has x3 M.2 slots) across x3 one TB nvme drives (I have 1 nvme drive right now, but this is good to plan for NOW)

1TB nvme drive with 3 Linux OSes:

120GB to Ubuntu Studio 22.04 Jammy LTS

120GB to Debian 12 LTS "Bookworm"

120GB to Qubes-OS

That's 360GB/1TB so far.

512GB shared btrfs encrypted Home partiton for all the OSes to use.

872GB/1TB on the nvme M.2 drive.

Finally... 128GB encrypted space for... stuff.

1TB/1TB usage on nvme M.2 drive

Hotay.

So what I run into, is a fight between Ubuntu Studio (Debian-based) and my GNU/Linux Debian OSes.

Ubuntu Studio offers to encrypt the /boot partiton in the LVM.

Debian12 shrieks this isn't possible (encrypting the /boot partiton in the LVM).

But they're both Debian-based. So there has to be common ground here.

I haven't even wrestled with Qubes-OS installation (OS #3) at this point (have used it in the past, it's delightful).

So. I'm going to wipe it all again for the umpteenth time, and I await your suggestions, pearls of wisdom, and potential "pitfalls/gotcha's" regarding my vision.

Thank you in advance, you're wonderful!

you are viewing a single comment's thread
view the rest of the comments
[–] Dark_Armadill0@lemmy.ml 1 points 1 year ago (1 children)

... Go on... ^_^ I'm all ears. I'm not a poweruser but I've been a penguin for about a decade now. Learned via trial by fire. Never gave up, and went completely Windozeless back in 2017.

Don't regret a thing (except that one unsuccessful stint with Gentoo... Don't hate me!)

[–] Illecors@lemmy.cafe 3 points 1 year ago* (last edited 1 year ago) (1 children)

Hate? Are you kidding me? That's awesome! And Gentoo is not going anywhere, it's still waiting for you :)

So in a bit more detail:

  • Create a btrfs partition - I sometimes use the whole drive + usb for boot, sometimes carve out a boot partition. Up to you.
  • Create desired subvolumes
  • Install Ubuntu, since that sounds like the one covering most of your requirements, but try avoiding fully automated route - specify the subvolumes so you don't have to migrate later on. Or at least don't have to migrate everything.

I'm going to assume the whole drive is encrypted using luks and there's a btrfs partition on top of it. My btrfs layout would be something like this:

root of btrfs (subvol id 5)
|___Ubuntu (directory)
|   |_@root (/, not /root)
|   |__@home
|   |__@srv
|   |__@var
|   |__@opt
|___Debian (directory)
|   |__@root (/, not /root)
|   |__@home
|   |__@srv
|   |__@var
|   |__@opt
|___Qubes(directory)
    |__@root (/, not /root)
    |__@home
    |__@srv
    |__@var
    |__@opt

I've never played with Qubes, so I'm assuming the layout here.

Your fstab would have to specify the subvolumes in the options bit of the line:

UUID=something-something      /               btrfs        defaults,relatime,subvol=Ubuntu/@root    0 0
UUID=something-something      /home           btrfs        subvol=Ubuntu/@home    0 0
UUID=something-something      /srv            btrfs        subvol=Ubuntu/@srv    0 0
UUID=something-something      /var            btrfs        subvol=Ubuntu/@var    0 0
UUID=something-something      /opt            btrfs        subvol=Ubuntu/@opt    0 0

Yes, you specify the same device (luks one, in this case, not actual /dev/nvme0n1p1) multiple times. BTRFS can only take mount options once for the whole filesystem, so specify whatever you need for / as anything else other than subvol will be ignored for the following mounts of the same device.

I would go with systemd-boot for the bootloader or, better yet, unified kernel image, but that's beyond this post. In general, though, you should either pick one OS to control the bootloader, or have separate boot devices/partitions for every OS so it can do whatever it pleases.


Once you have one system running - mount stuff somewhere (/mnt comes to mind) and install the target. Gentoo has good instructions to make sure your chroot env is not missing anything. I've used debootstrap before for Debian - it worked well.

[–] Dark_Armadill0@lemmy.ml 3 points 1 year ago (1 children)

Not all heroes wear capes. But you, doubtlessly, do. Thank you. Thank you so much. This is why I went full penguin.

I WILL give Gentoo another try. She calls me. I just need to understand flags a bit more...

P.S. there was also a bloodbath regarding Grub. Neither of the two OS'es did the os-probesuccessfully, so I botched something up, there, too.

[–] Illecors@lemmy.cafe 2 points 1 year ago

Glad to be useful :) also updated the previous reply, had fstab subvol written doen wrong.