Expert Partitioning Assistance in LEAP 42.3

Hi All,
Thanks for your help in advance.

As I am sort of new to the linux world, I need some guidance and understanding. I crawled around the internet and found some answers, but need additional information.

So I am dedicating one whole machine to run opensuse and this PC has a 1TB hard drive. I wanted to partition the hard drive in such a way to satisfy my needs so in case if I ever have to reinstall opensuse or another distro I don’t have to wipe out the data. The main purpose of this machine is to run multiple vms simultaneously.

During the advance setup, I wanted to make separate partitions; such as: /, /boot/grub2, /home, swap and another partition denoted for my VMs.

  1. Do I have to create the partitions in any specific order?
  2. My machine has about 8GB RAM, so how what size should I make my Swap? I was reading that 4GB should be good?
  3. If I denoted 400GB to the /home, is this 400GB shared between all the users on the system or is it just for the root user?
  4. When I attempted to create this additional partition for VMs, it put it under /var, is that how it is suppose to be? Can’t I create a partition called /vms?
  5. What all partitions are required that I create?

I know these may seem like elementary questions, but need to understand how this all works. Thanks in advance for your all your help.

  • AJ
  1. order makes no difference

  2. 4 gig should be ok if you do not plan on hibernating

  3. All regular users share home root’s home is on /root not in the home directory/partition

  4. you can make a separate partition mounted as /VM but you may have to mess with the VM program’s settings to use it. Example if using VirtualBox the default is the VM’s are in the users home you have to change setup settings to put else where. Note that ownership is important in Linux so file owners/groups may need to be adjusted depending on your needs

5 By default you get EFI boot (if booting in EFI mode, small FAT format type EF00) swap root about 40 gig by default BTRFS format ( can change but should be at least 40 gig if using BTRFS) home on the rest. You could need to change size of home and add a new partition mounted as /vm )I’d recommend ext4 or XFS format what ever size you want for the VM images.

You did not mention which VM you plan to use which may make a difference

Thanks for your feedback. Much appreciated. I plan on using KVM, it was pretty smooth when I was playing around with it. Do you think Virutalbox or vmware would be better? I plan on installing at minimum RedHat, CentOs, Ubuntu and Windows. In case you ask why I need this many, its to support some of my customer base more appropriately.

You did mention about booting in EFI mode. I am not too familiar with this. I have heard this here and there, what exactly does it mean and does it give me any sort of advantage. If it helps any, I know my motherboard supports UEFI, I have a new machine that I bought only a few months ago.

Thanks…

I’ll just add a comment on this.

I am using KVM for VMs. And, by default, KVM wants to store the VM images in “/var/lib/libvirt/images”. I made that a symbolic link to “/shared/virtimg”. And now, images are saved there.

No KVM is fine Virtual box is a little easier to setup but KVM runs closer to the metal. You just did not mention which VM so I picked one at random

I would like to thank everyone for their help. Here is what I think I am going to do, so any feedback on this would be great.

Root (/) : 100GB : BtrFS
Home (/home): 300GB : ext4
Swap (/swap): 50GB : BtrFS
VMs (/vms): 100GB : ext4 // I will be using this for virtual machines and have a plan on running 3 vms using kvm.

/boot/grub: DO NOT KNOW AND WOULD LOVE SOME FEEDBACK ON THIS. What size? What file system?

When I install any applications are they stored in root (/)? Do I need more than 100GBs then?

I’ll still have space left on the drive and I’m going to leave that untouched for now, but my plan is to create a partition in which I can share data between Linux and Windows. I’ll figure out how to do that later.

Right now, I want to know if the partitions sizes and file system are correct. Should I use BtrFS2 instead of BtrFS? Am I missing any partitions that need to be created?

Also is it true, if in the future I want to install another distro or want to override my current one then all I need to do is delete and recreate all the partitions except for the /home partition?

Thanks everyone for your help again. Much appreciated.

  • AJ

Swap is formatted as SWAP not BTRFS or EXT4 or anything else. Also you don’t need 50 gig. Here is the rule of thumb values.1 - 1.5x memory. If not hibernating then 1xmemory up to about 8 gig. If you have to use more then that things will get very very slow. Swap is just a safety valve and to store the memory image when you hibernate. It is best when not used

Also root is excessive for normal usage 40-50 gig should be plenty. Unless you plan to simply install ALL Linux programs ever written or need huge SQL data bases:P

TO share with Windows you need a NTFS or FAT formatted partition . Remember Windows can’t read Linux but Linux can read Windows

If using EFI boot then you do need a small FAT partition type EF00 for the EFI Boot mounted as /boot/efi in Linux but if you boot the installer in EFI mode then that should be part of the default settings. If one already exists then it should just be mounted Size generally around 100 meg.

Yes that is why a separate home partition it can just be mounted and not formatted to preserve your data. Same can be done with your /vms partition just don’t format and set it to mount at /vms when changing OS you just format root

For storage of any database of significant size, I would recommend a separate file system in any case.

That’s not even used. OpenSUSE uses “/boot/grub2”. But you should not make that a separate partition. Just leave it as part of the root file system. Since you are using “btrfs”, it is best to not have a separate “/boot” or “/boot/grub2”. That way, if you ever roll back to an older snapshot, the boot settings will also roll back (needed for consistency).

Thanks again, so here’s what I am thinking
My machine has 8GB of RAM and 1TB HDD.

SWAP – 16GB – SWAP Partition
ROOT – 50GB – /
HOME – 300GB – /home
VMS – 100GB – /vm – This will be used for the 3 to 4 virtual machines I plan on installing.

**Now the part that I am confused about is this EFI Stuff. I am not exactly sure what this is and if I am suppose to make a different partition for this. I know EFI from when I go into the my PCs BIOS, but not too familiar with it. What size should this be?

** I have been reading online about a /boot/grub2 partition. Do I need to make this partition as well? If so, whats a good size? And what is this partition used for?

** After all this, I’ll still have roughly 400GB left over. I’m thinking to leave this as unpartitioned for now and when I need I can mess with it. I assume I can always come back later and partition this left over space and use it for something. I was looking at the File system options. I could format this as FAT and share data between Windows and LINUX as needed. I would have chosen NTFS, but its not listed as option. furthermore, I think windows now formats as FAT32 and NTFS, not just ‘FAT,’ will this pose any sort of issues?

Thanks again guys, you are great. I’m really looking forward to getting back into linux.

Thanks.
AJ

I swap I do not do it by not using the suspension

8 GB should be enough, unless you plan on installing an extra 8GB of RAM.

**Now the part that I am confused about is this EFI Stuff. I am not exactly sure what this is and if I am suppose to make a different partition for this. I know EFI from when I go into the my PCs BIOS, but not too familiar with it. What size should this be?

As already written by gogalthorp, just boot the installer in EFI mode and it will take care of this automatically.

** I have been reading online about a /boot/grub2 partition. Do I need to make this partition as well? If so, whats a good size? And what is this partition used for?

As already written by nrickert, forget about it.

** After all this, I’ll still have roughly 400GB left over. I’m thinking to leave this as unpartitioned for now and when I need I can mess with it. I assume I can always come back later and partition this left over space and use it for something. I was looking at the File system options. I could format this as FAT and share data between Windows and LINUX as needed. I would have chosen NTFS, but its not listed as option. furthermore, I think windows now formats as FAT32 and NTFS, not just ‘FAT,’ will this pose any sort of issues?

OK, leave it uncommitted for now.
To be able to deal with NTFS you need to install package ntfs-3g and possibly ntfsprogs. Then you should be able to format as NTFS with your favourite disk manager (e.g. GParted or whatever you are used to).
FAT, FAT16, FAT32, VFAT are all readable by Linux and Win, just the max number of addressable files varies. Use VFAT or FAT32 if a large partition is needed.

The EFI partition is supposed to use FAT format, preferably FAT32.

On my main desktop, I am using a 500M partition. And that seems plenty. I am only using 6% of that partition. I currently have Windows 8.1, openSUSE 42.2 and openSUSE 42.3 installed.

On another computer, where I also have a 500M EFI partition, currently 21% is in use. I have several linux versions installed. But I think the big difference is with Solus. And that’s because Solus wants to put kernels and “initrd” files in the EFI partition.

It still looks as if 500M is plenty of disk space for the EFI partition. By the way, openSUSE mounts that partition at “/boot/efi”.

So my next question is how do you boot the installer in Efi mode?

If your system is not too old (say 5 years or less) it should be EFI enabled and the installer should boot in EFI mode automatically. To check, the boot menu screen of the installer in EFI mode should display NO option keys at the bottom of the screen (F1…F8 for language, display, kernel etc.). If you see those, the installer booted in legacy mode and you might enter your BIOS or otherwise select a proper boot option according to your system firmware (usually by pressing F9 or F2 or ESC or whatever during the power-on self test).

Many motherboards offer Bios the ability to disable Efi boot.
If you do not have Windows you can disable it