48
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
[-] Macaroni9538@lemmy.ml 6 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 9 points 1 year ago

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

[-] Macaroni9538@lemmy.ml 3 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 7 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.

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

Perfect! I will be disabling hibernation in Bios. Also, how exactly do you choose a default bootloader when each distro automatically installs their own? not sure on that process. Or do things like display managers matter? or is Xorg or Wayland pretty much good for all three?

[-] lvxferre@lemmy.ml 3 points 1 year ago* (last edited 1 year ago)

Also, how exactly do you choose a default bootloader when each distro automatically installs their own?

I'd probably let Debian or LMDE do it simply because I'm more used to those distros, but you can simply roll a die if you want.

Or, if you already chose which distro should manage boot, and you want to know how to do it - the tutorial in the link does the trick. I'll adapt and copypaste a simplified version here:

how to let the distro of your choice manage boot

  1. Install all distros the way that you want. Make sure that you know in which partition each is installed.

  2. Pick the distro of your choice to manage boot. Let's say that it's Foobar Linux, and it's installed in /dev/sda69. (why 69? Because it's funny, so you'll remember to replace it with the right number later on.)

  3. Boot in some live USB. The distro in that USB doesn't matter.

  4. Open a terminal. Type the following junk in it:

    sudo sudo mount /dev/sda69 /mnt for i in /sys /proc /run /dev; do sudo mount --rbind "$i" "/mnt$i"; done sudo chroot /mnt update-grub

5. This should be enough. Now restart your computer without the live USB, and your Foobar Linux should be managing the boot.

And just now I realised that some random distro might decide to take over the boot, once it updates kernel (as it triggers updating grub). So when installing the other distros, look for some configuration that allows you to not install grub in it. (It's also possible to remove it after the installation of the distro.)

Or do things like display managers matter? or is Xorg or Wayland pretty much good for all three?

That's a per-distro choice, you could go with Wayland for some and Xorg for others. I would probably go with Xorg for all three because it works for me.

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

Thanks! still a tad confusing for me, but it's something to work with at least. so you only mount the one that you want to handle the bootloader? what about the storage drive? do I just mount all the partitions to that drive and they will all automatically save to that storage drive? I ought to look up diagrams and such just to see it visually I think. Also, someone mentioned creating the partition first. how would that work out if you're still running a distro? would rebooting wipe that out and keep the partition in tact and then you work from there? or do you just partition as you go along with each install?

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

I think that this might help you, since you said that you mentioned diagrams:

The numbers after /dev/sda will change depending on how you partition your SSD, as well as their order, and I'm assuming that your username will be "macaroni" for simplicity, but look at the idea. (Also, you don't need to mount your personal files partition in /home/macaroni/storage. It could be mounted anywhere you want, even /randomjunk/catpix/dogpix/mypartition.)

If I recall correctly you don't need to mount the partition with grub (the bootloader), but do check it with other users as I'm not sure of that. Once you update grub in that distribution, it'll automatically detect "look! There are other systems here! I'll add them to the boot options!".

Also, someone mentioned creating the partition first. how would that work out if you’re still running a distro?

You should only create, delete or modify partitions of your SSD from a live USB. Never do it while the system installed in your SSD is running. Those partitions will stay even after you reboot.

I recommend creating the partitions first, then installing your distros. This way you'll have better control on how to organise your partitions. For example, if you decide to install Arch on the third partition, you can simply say it "hey, you shall be installed in /dev/sda3", no matter the order that you're installing Arch vs. other distros.

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

this is very very helpful, thanks alot. I love lemmy over reddit. you guys are actually kind and helpful here. so I mentioned in other posts, I don't store a whole lot of things at all and anything important is stored in a cloud. So do I necessarilly need to create a storage partition? can't I just use storage within each distro partition for trivial stuff like downloads or whatever? I hope that makes sense

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

You don't need to create a storage partition if you don't want to. You could theoretically reduce that partition table from the diagram to three partitions - one for each distro. It's up to you, really.

The problem that I see with that is organisation and security:

  • you'll likely use one distro more than the other two. That distro's partition will get full of personal files faster. Eventually you'll need to juggle files to the other two partitions.
  • you'll need to remember which system you were using in order to remember where your files are. And since you'll be juggling files back and forth, you'll reach a point where you need to search three directories to find a file.
  • if your personal files are spread across multiple partitions, you'll likely need to mount all of them in all your systems. This means that you'll need to mount Debian's and RHEL's partitions in Arch, Arch's and Debian's in RHEL, etc. It's generally not a good idea to mount partitions with system files unnecessarily.
[-] Macaroni9538@lemmy.ml 2 points 1 year ago

Oh ok, so scratch that idea then lol see, this is the stuff I have no clue about! thank you

[-] Gurfaild@feddit.de 1 points 1 year ago

Hibernation is an OS feature, so you can't disable it in the BIOS. You can either disable it in all your distros or simply not use it.

[-] Ooops@kbin.social 2 points 1 year ago

Oh, believe me: There are so many messy BIOS and UEFI implementations out there that you can definitely deactivate it in the BIOS for some. Which just introduces even more mess where hibernation triggered on the OS level then fails.

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

Oh ok thanks. I just coulda swore I saw a hibernation setting in BIOS. That's another thing, would I have to create a Bios partition? this is a tad more confusing that I thought. Also determining the proper sizes of everything. What about an efi partition? or is that only associated with Windows? I have no clue

[-] Gurfaild@feddit.de 2 points 1 year ago* (last edited 1 year ago)

~~There are no BIOS partitions - you may be confusing the term with the BIOS partition scheme, but that doesn't matter in this context~~ "BIOS partitions" do exist, but they are irrelevant on modern machines - they are for booting GPT disks on systems that only support MBR disks.

If you need an EFI partition, the first installer will create one. As for the sizes, the recommendation in the other comment makes sense to me (one ≈60 GB partition per distro, one swap partition and one partition for your personal files that uses the remaining space on the disk).

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

I mean SHOULD I make an efi partition? I have no clue if I need it or if it's optional. Simple is better in my case lol. SOO just trying to put it all together so far. first create a roughly 8gb fat32 partition for swap? Then a 60gb ext4 partition for distro 1, then so on with the other two partitions and thats it? how does the storage partition work? what format should that be? and I was reading about mount points and stuff, what ought I know about those?

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

If the installer doesn't automatically create an EFI partition, you can create a small FAT16 or FAT32 partition (a few hundred MB should be enough).

The swap partition is just a swap partition - that is the partition type you select in your partitioning tool.

The storage partition can be any format you want. If you don't need to access it from Windows, just use ext4.

Mount points are similar to drive letters, but more flexible. You can read these Wikipedia articles: https://en.wikipedia.org/wiki/Mount_%28computing%29 https://en.wikipedia.org/wiki/Fstab

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

Thanks again. So did you mention it's not really necessary to install an efi partition? Idk if I need it or not? or is it just better safe than sorry, sorta like a swap?

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

If you install your first distro without creating any partitions manually, the installer will probably create an EFI partition. Maybe it wouldn't need to create one on your specific system, but it will probably do it anyway.

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

gotcha! now how would that storage partition work? like do you point each distro to that partition? is that how that works?

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

Usually you create an entry in /etc/fstab that tells the system which partition should be mounted where. I'd do that in each distro once you have installed all of them.

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

But how do you know which partition should be mounted wear and Im sorta confused by that statement. Like what do you mean by "where"? Aren't they all on the same hard drive, so wouldn't they all just mount to your drive?

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

It's similar to how drive letters work in Windows: the partition you installed it on is C:\ and you can assign any other letter to any other partition.

On Linux, the partition you installed it on is / and you can mount other partitions in any empty directory.

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

I understand. Would I mount all partitions to root? also I just thought about something; what about gpt format? I know that is used for linux but where does that come in? like are ext4 and gpt the same types of things or different types of formats for different things?

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

You can only mount one partition at one mount point, but any empty directory on one partition can be a mount point for another partition.

GPT is a partition table and is not used for Linux specifically, but on any computer with UEFI - it defines how to find partitions on a disk, but not how they are formatted.

ext4 is a filesystem - formatting a partition with ext4 means creating data structures that tell the OS where to find files and directories in the partition.

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

Ahh ok I understand the filesystem types but still darn confused about the mount points. So the first distro I should mount to root??? then how could I partition the next distros in empty partitions that don't have directories yet (since theres no distro on them yet). Sorry, just getting a lil confused on some parts

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

Mount points are specific to one install - for example, you can mount your Manjaro root partition as /mnt/manjaro on Fedora. From every distro's perspective, the partition it is installed on is /.

You seem to be mixing up the locations of partitions and mount points - a partition is somewhere on a disk and a mount point is basically a sign that points to it, and every distro can have different signs that point to the same thing.

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

Ok I'm following. that doesn't make sense to me to make the mount points for one distro inside another. I dont understand that. In my mind, it seems like the mount points would all be to the bootloader? but again, I dont know much about this stuff lol

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

You only need mount points in each distro for partitions that you want to be able to access from that distro. If you don't need access to your Arch system files from Debian, don't mount the Arch partition in Debian.

But if you have a partition that you want to access from multiple distros, you don't need to use the same mountpoint in each distro - just like a USB flash drive can be E:\ on one Windows computer and H:\ on another - that is just a name and the files on it are the same.

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

Thanks for all your help. I have a feeling that once I start the process, things will become more clear as Im actually doing it

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

If this is a plain computer (desktop/laptop): I'd simply turn EFI off and call it a day.

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

Sounds good to me. If I dont really know what it is, then maybe I dont need it enabled

[-] 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 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.

this post was submitted on 05 Sep 2023
48 points (92.9% liked)

Linux

48001 readers
979 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