You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

One would think the Fedora docs/wiki would answer that.
With RHEL/CentOS it quickly became obvious that it pays to stick with the defaults - especially if you want to use Anaconda for the guests. Looks like /var/lib/libvirt/images/ for Fedora.
After trying to make my own arrangements I found it "better" to carve out a separate lv for that mountpoint in Centos 6 - YMMV.

First ask why you want /boot or /home separate from root. If you don't have a clear understanding of the reason, you probably don't have a valid reason.

Neither of those being separate actually simplifies switching or upgrading the distribution later. If you have some really big data files (or if your VMs are big) and you can conveniently put them in a /data partition rather than in their default location. Then a /data partition may significantly simplify your next distribution reinstall.

If the default location for your big files are at least one directory level removed from all the stuff that a Linux install writes, it may be best to use symbolic links to make the big files appear to be in default directories in the hierarchy despite actually being in directories under /data.

/home itself and each user's home directory are things you cannot expect to slip past a Linux reinstall. You should expect to need to back those up and selectively restore whatever hasn't had its format change (various files in home directories store options and settings in a way that is incompatible across a distribution change or major upgrade).

If you aren't going to mess with a /data partition, I don't see any reason for you to split anything other than swap out from root.

I also don't know where the VMs reside. How can you decide on a roughly 50/50 split between root and /home before you know where the only significant files are going to go?

The advantage of not splitting root and /home is that you don't need to plan in advance for which big files go into which of those places.

I also don't have enough experience with VMs to know what demands they will make on the outer system's swap partition.

I do have a lot of experience with informally managed shared testing systems in which a lot of test environments are possible and typically very few at a time are in use (via scheduled tasks or manual requests). Occasionally by accident you have several more tests running at the same time than you intended. For our tests, we would greatly prefer that error result in a giant slow down so someone manually decides what to kill or deprioritize. If you don't have enough swap, the OOM killer takes away the decision. Some tasks would finish without a giant slowdown and other would just be killed and the choice of which is which is not made based on your preference. Disk space is cheap. I prefer a giant swap segment to catch those situations. You may have a different view, but at least give it some thought.

10GB is a really large swap partition for almost any Linux system. But for the use you describe it might be a foolishly small swap partition.

First ask why you want /boot or /home separate from root. If you don't have a clear understanding of the reason, you probably don't have a valid reason.

Neither of those being separate actually simplifies switching or upgrading the distribution later. If you have some really big data files (or if your VMs are big) and you can conveniently put them in a /data partition rather than in their default location. Then a /data partition may significantly simplify your next distribution reinstall.

If the default location for your big files are at least one directory level removed from all the stuff that a Linux install writes, it may be best to use symbolic links to make the big files appear to be in default directories in the hierarchy despite actually being in directories under /data.

/home itself and each user's home directory are things you cannot expect to slip past a Linux reinstall. You should expect to need to back those up and selectively restore whatever hasn't had its format change (various files in home directories store options and settings in a way that is incompatible across a distribution change or major upgrade).

If you aren't going to mess with a /data partition, I don't see any reason for you to split anything other than swap out from root.

I also don't know where the VMs reside. How can you decide on a roughly 50/50 split between root and /home before you know where the only significant files are going to go?

The advantage of not splitting root and /home is that you don't need to plan in advance for which big files go into which of those places.

I also don't have enough experience with VMs to know what demands they will make on the outer system's swap partition.

I do have a lot of experience with informally managed shared testing systems in which a lot of test environments are possible and typically very few at a time are in use (via scheduled tasks or manual requests). Occasionally by accident you have several more tests running at the same time than you intended. For our tests, we would greatly prefer that error result in a giant slow down so someone manually decides what to kill or deprioritize. If you don't have enough swap, the OOM killer takes away the decision. Some tasks would finish without a giant slowdown and other would just be killed and the choice of which is which is not made based on your preference. Disk space is cheap. I prefer a giant swap segment to catch those situations. You may have a different view, but at least give it some thought.

10GB is a really large swap partition for almost any Linux system. But for the use you describe it might be a foolishly small swap partition.

Hi johnsfine,

Thanks for your advice.

I'm prepared putting the bootloader on /boot. Would it be a good idea? OR /boot and /root in the same partition?

What I expect to achieve is putting all data including VM images to a directory/folder which won't be erased even in the worst situation I have to reinstall the OS. Would /data be the right directory/folder? If it is then I'll rearrange my planning as follows;

I never split /boot from root. I don't see any advantage in that split. But I don't think it does any harm either. 1GB is both big enough that there is no real risk it will be insufficient for /boot and small enough that you won't miss it when using the rest of your 2TB.

Slitting /home from root has more problems, because you can't predict which of them will outgrow its allocation.

When you want a data partition that will be untouched during any future Linux upgrade or distribution change, there is no specific name that is better than most other names. I use /data because it is obvious. Just avoid using any of the names that are predefined parts of the Linux file hierarchy.

If all your big files are in that extra partition, I don't understand why you want root so big.

In my earlier post, I suggested reasons why 10GB might be too little for swap. Instead you cut it to 5. Did you understand those reasons and decide they do not apply to your situation? (The reasons mainly related to the possibility of accidentally running more tests at the same time than you planned for). Or did you just find some generic advise that only a few GB are needed for swap and not realize that the generic answer doesn't apply to a big test system?

I never split /boot from root. I don't see any advantage in that split. But I don't think it does any harm either. 1GB is both big enough that there is no real risk it will be insufficient for /boot and small enough that you won't miss it when using the rest of your 2TB.

Slitting /home from root has more problems, because you can't predict which of them will outgrow its allocation.

When you want a data partition that will be untouched during any future Linux upgrade or distribution change, there is no specific name that is better than most other names. I use /data because it is obvious. Just avoid using any of the names that are predefined parts of the Linux file hierarchy.

fedora ,by default , will NOT let you log in as "root" into the GUI
so WHY is the partition for the /root ( root user HOME folder)
1000 gig or 600 gig ?

do not make a separate partition for the root home folder!!! keep it on the / partition

now
"/ " as 1000 gig or 600 gig is also rather BIG
20 gig is more than enough

if you are going to share data between distros then make a DATA partition
( BUT NOT -- i repeat NOT on "/" !!!-- SELinux will through a very nasty fit !!! )
/mnt/DATA
or
/media/DATA (-- default for fedora auto mount)
or
/opt/DATA

Until I saw the OPs other thread on a related question I never noticed the "LVM" in the first post of this thread. Because of LVM my suggestion to not split /boot from root is wrong.

Quote:

Originally Posted by John VV

WHY is the partition for the /root ( root user HOME folder) 1000 gig or 600 gig?

Obviously the OP does not distinguish between root meaning / in a discussion of partitioning and /root which is the root user's home folder. Similarly, the OP has been saying /swap when meaning swap.

In a discussion of partitioning / is hard to see, so a lot of documentation and/or prompts in installers say root when they mean /
Swap is different from other partitions in that it does not get a mount point, so it is not correct to call it /swap when discussing partitioning.
I'm sure we all knew what the OP meant by /root and /swap this time, but using less precise terms is generally asking for confusion.

Sorry for the confusion made by me previously. Actually there is plenty of space on the 2TB HD. 1TB will be sufficient for my current use. Therefore I plan making / (root) 600G in case installing bundles of software. What I expect is having a folder/directory which won't be erased on reinstalling the OS.

just make sure that the data partition ( or use your name "MyFiles", or "anything you like" )
is not mounted directly to "/"
it is an issue of folder file permissions and ownership and things like SELinux will NOT like it
/mnt/data
/opt/data
and
/media/data

just make sure that the data partition ( or use your name "MyFiles", or "anything you like" )
is not mounted directly to "/"
it is an issue of folder file permissions and ownership and things like SELinux will NOT like it
/mnt/data
/opt/data
and
/media/data

are normal everyday locations

I didn't know any of that, and I use systems where data partitions are directly in /

Can you explain or link to documentation?

Does it make a difference that (in my case) the data is not in the top level directory of /data but in subdirectories?

SELinux will keep tossing an error and SELinuxTroubleShooter will show a context problem
do to the fact that /DATA ( mount point) needs to be owned by root, and root will be needed to save things into that folder ( can be a problem)
if the "data" partition is directly mounted to /
then it also must be read/write for a normal user , to be able to use it

now if you do not mind becoming root to save things into /data
( mostly a SELinux thing )

Quote:

Does it make a difference that (in my case) the data is not in the top level directory of /data but in subdirectories?

and the subdirectories are not owned by root like /data

it is a SELunix thing
the NSA is a bit paranoid ( they are supposed to be )