50
submitted 1 year ago by Macaroni9538@lemmy.ml to c/linux@lemmy.ml

Hello all, sorry for such a newbish question, as I should probably know how to properly partition a hard drive, but I really don't know where to start. So what I'm looking to do is install a Debian distro, RHEL, and Arch. Want to go with Mint LMDE, Manjaro, and Fedora. I do not need very much storage, so I don't think space is an issue. I have like a 500+ something GB ssd and the few things that I do need to store are in a cloud. I pretty much use my laptop for browsing, researching, maybe streaming videos, and hopefully more programming and tinkering as I learn more; that's about all... no gaming or no data hoarding.

Do I basically just start off installing one distro on the full hard drive and then when I go to install the others, just choose the "run alongside" option? or would I have to manually partition things out? Any thing to worry about with conflicts between different types of distros, etc.? hoping you kind folks can offer me some simple advice on how to go about this without messing up my system. It SEEMS simple enough and it might be so, but I just don't personally know how to go about it lol. Thanks alot!!

you are viewing a single comment's thread
view the rest of the comments
[-] lvxferre@lemmy.ml 15 points 1 year ago

Warning: this is definitively doable, but messier than it looks like. I'd recommend you to partition it manually, before installing any distro, like this:

  • one partition per distro. For sizes check their requirements. Given 500GB I'd probably reserve 60GB for each, perhaps a bit more if I know that I'll install a lot of stuff in that distro.
  • one swap partition, that'll be accessed across distros. Optional if you have 16GB+ of RAM.
  • use the leftover space for a "storage" partition, for personal files that you won't save in someone else's computer (i.e. the cloud). That allows you to mess with the distros without risking your personal files.

Don't worry too much on getting the space right though - if necessary you can always resize a few partitions after installation. It's a bit of a bother though.

Do not share /home across distros, it's simply more trouble than it's worth. Instead, mount that "storage" partition in each distro, inside your /home/[$username] directory.


Another thing that you might want to consider is virtualisation. Odds are that you won't use a lot of those distros in your everyday, and that you're just curious about their differences. In that case, consider installing one of them, install Virtualbox in it, and then the other distros get installed inside Virtualbox. I'm suggesting that because it'll use overall less space, and make distro management less messy.

[-] Macaroni9538@lemmy.ml 4 points 1 year ago

Thanks. I do not want to mess around with virtualization; I went down that rabbithole before and got lost and broke stuff lol. I need to do a bit more research and learning before im more confident with virtualization. So how large should the swap be? and what about a bootloader?? Are all three compatible with grub? also how large should the bootloader partition be? thanks, this is all a bit foreign to me.

[-] 3laws@lemmy.world 8 points 1 year ago

VM are as easy as point and click with GNOME Boxes, also available as standalone.

[-] Macaroni9538@lemmy.ml 2 points 1 year ago

Gotcha. Never explored Gnome boxes yet; probably just waiting for the right time. I've been trying to learn a whole lot of other tech stuff, so I sorta put virtualization on the back burner for now. Definitely wanna learn about KVM, lxd and lxc and even gnome boxes. just not right now

[-] 3laws@lemmy.world 2 points 1 year ago

Happy hacking ✌️

[-] lvxferre@lemmy.ml 6 points 1 year ago

All those distros are compatible with grub, and come with their own copies of it. You just need to install your distros, and then when you say "I want THIS ONE to manage boot", you follow this tutorial. (It's supposed to help you reinstalling grub after Windows, but it works fine for grub after another Linux instal).

Or, if you want to be lazy - install last the distro that you want to manage boot, then tell it "screw the current boot, reinstall it".

I wouldn't bother with a bootloader partition. The bootloader runs fine from any distro partition, and it's small enough so you don't need to worry about it wasting space.

swap

I've been running my system without swap whatsoever for quite some time, and it runs fine. But if you're planning to use hibernation or similar, reserve the same amount of swap space as you have RAM; for example if you have 8GB RAM then at least 8GB swap.

IMPORTANT: if hibernating a distro, don't boot another distro, otherwise the hibernation data will get wiped.

load more comments (28 replies)
[-] Pantherina@feddit.de 2 points 1 year ago

What?

  1. Install virt-manager qemu qemu-kvm
  2. Run virt-manager
  3. Install a new distro, choose the .iso that you downloaded, assign 8GB RAM and 60GB storage
  4. Leave the rest default
  5. Follow the Distros installing process as usual
  6. Delete the VM if you are done

Important note: using distrobox or toolbox you can run packages of pretty much any distro on your Laptop. I am currently using Ubuntu PPA VLC 4.0 on Fedora Kinoite.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

So virt manager, KVM, and qemu is the recommendation solution for this? Opposed to other methods like virtual box or gnome boxes or the other various virtualization platforms out there?

[-] Pantherina@feddit.de 2 points 1 year ago

Hmm, I use Virt-manager as it supports some things with no GUI in Gnome boxes. Gnome boxes seems nice, but after trying certain things you get to a limit of functionalities.

Kvm ans qemu are always needed.

Gnome boxes has a flatpak, but that one has no usb support for some weird reason.

[-] odium@programming.dev 2 points 1 year ago

Grub is compatible with pretty much everything.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

Dude please excuse my ignorance, but I would obviously need to make a bootloader partition, but do I have to like download grub software and install it on that partition or is that something the system will do during the partitioning process itself?

[-] odium@programming.dev 2 points 1 year ago

The system won't do that by itself. I would recommend letting one of your distros do it. During the installation process, when you set that bootloader partition to be the boot partition, many distros will automatically install grub if it doesn't exist and add themselves to an existing grub config if it does exist.

Find a distro which installs with a default grub bootloader and make that the first distro you install.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

Thanks! and as far as making one bootloader your default, is that just a matter of changing the order of your boot process? and if a distro automatically installs their own bootloader, would just the first installed one take precedence by default or is there some configuring you have to do? so I maybe really just be overthinking this. Is it as simple as making roughly 3 ~60gb ext4 partitions and simply just do the regular install according to each partition? what about mounting and all that. No clue how that all works

[-] odium@programming.dev 3 points 1 year ago* (last edited 1 year ago)

For the bootloader questions: You just have to go to your bios (spam a function key during start up, which function key depends on manufacturer) and change the boot order. The order of things which happen when you startup your machine is:

  • your bios starts up
  • your bios selects the highest priority bootloader you have (you want this to be grub)
  • you can choose which OS to open in grub, if you don't choose, it goes with whatever is set to be default in the grub config. If you haven't edited the grub config, I think this would either be the first installed OS or the first alphabetically
  • grub runs the startup sequence for the chosen OS

For the other questions: You might have to manually choose what to mount where. For each distro, you will want to mount a boot partition (your grub partition), a swap if your ram is low (make all your distros share the same swap partition), and a unique home partition.

You might also want to mount a shared files partition. These would be files you want stored locally that you can access from all the distros. Don't mount this in the install process, instead mount it after you install from whatever file manager you use on each distro. Make a ~/shared folder and mount it to that.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

now this version sounds more simple. SO create three ext4 partitions roughly 50-60gb for each distro, maybe create a swap or maybe a storage partition? I don't understand how the storage partition would come into play, but I can just save anything important to my cloud drive anyway, so I don't necessarily need extra on device storage. So is that really it?

[-] odium@programming.dev 2 points 1 year ago

I edited the comment you are replying to to answer more of the questions.

You would want the partitions you mentioned as well as a grub bootloader partition.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

Oh I see now. So I don't have much of a need for storage on my device. If I have anything important to save, I just use my cloud drive. Also I was under the impression from another poster that I don't need to make a bootloader partition because the installer will automatically do that for me, idk what is correct? if that's the case, then just mount the second and third distros to that first bootloader plus swap and I should be fine?

[-] odium@programming.dev 2 points 1 year ago

You need to make sure there's enough space for your installers to make a grub partition, but yes, if there's enough space, they will make the partitions themselves. You just need to tell them how big you want the partitions to be.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

Awesome! I think somebody said 50-60gb should be fine per distro? do agree?

[-] odium@programming.dev 2 points 1 year ago

Yep, that should be fine.

[-] odium@programming.dev 2 points 1 year ago

As for how exactly you add each distro to the grub config, refer to the distro specific grub instructions. Some user friendly distros auto detect and add themselves to grub, but some of the more customizable and bare bones distros need manual config.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

awwee damn, thats another aspect I wasnt aware of. Are you referring to fstab or the actual grub config?

[-] Pantherina@feddit.de 4 points 1 year ago

Really nice idea with the shared swap and storage!

Caveats:

  • you can LUKS encrypt that, but you may need to tweak some polkit rules to automatically unlock it.
  • Fedora uses zram and swap and SELinux is a hell of a task

Apart from that, great recommendation!

In the end you can simply delete all partitions except your storage partition, reinstall any distro and mount that partition to /home

load more comments (3 replies)
[-] Macaroni9538@lemmy.ml 1 points 1 year ago

Oh I just watched a video about home. So is that a partition of it's own? the guy was saying he was using different homes for each distro and it became a mess, so he planned to install one home directory for all distros.... idk?

[-] lvxferre@lemmy.ml 4 points 1 year ago

/home is a directory ("folder"). Inside that directory, there's one subdirectory for each user, where you're expected to keep your personal files, configuration files, user data from software (e.g. save games from your games), stuff like this, personal data.

And Linux allows you to mount any partition in any directory of your choice.

Because of those two things, a lot of people create a partition and mount it as /home. So if something bad happens with the distro, and you need to reinstall it, ~~your princess is in another castle~~ your data is in another partition, safely stored. It's usually a good idea, but in your case it's a bad idea - because your /home/[insert username] directory from one distro will be likely the same as in the other distros, so they'll interfere on each other, and software user data will become a mess.

Instead, what I recommend you is to not create a /home partition. Let each distro have its own /home. However, do create a partition to store your data, and mount it inside your /home/[insert your username] directory. That way you can access all your files from all your distros, but the software user data won't be mixed.

[-] Macaroni9538@lemmy.ml 1 points 1 year ago

Ahh brilliant! so create ONE storage partition and just mount that one partition in each distro's home directory?

[-] lvxferre@lemmy.ml 4 points 1 year ago

Yup. Check the diagram that I posted as a reply to another comment. It's a clean way and it allows you to access your files from all your distros.

At least in theory you could even use a /home partition if you really, really wanted, but then you'd need to make sure that your username is different for each distro. It's more work than it's worth, and muscle memory will make you to try to log into one system with the username of another system.

this post was submitted on 05 Sep 2023
50 points (100.0% liked)

Linux

47391 readers
432 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