LM17-VirtualBox: Help needed to decide on the sizes of the /root and /home partitions
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LM17-VirtualBox: Help needed to decide on the sizes of the /root and /home partitions
Hello guys,
I am back with my problems & questions. It's really assuring that you guys are there. I am paranoid about this problem of mine because I had to reinstall the LM17 OS, for lack of knowledge on this.
But please kindly bear with me, because this problem of mine needs longer explanation. And so atleast this one post of mine will be large. Forgive me for that. Please kindly help me on this. Thank you.
My Task:
I am in the process of Re-installing LM17 [why? see here]. I want to create new partitions for a /Root, Swap and a /home.
Please help me decide on the sizes of the /Root and /Home partitions.
My Problem regarding /home partition::
I have about 70GB of free space that I can allot to LM17. Other than this 70GB space, I have a 'storage-space' of about 190GB. I have created different NTFS partitions on this 190GB space for different users of both Linux and dual boot Windows and can make them accessible from both Windows and Linux by making the required editing on the /etc/fstab file. So the size of my /home partition need not be big enough to accommodate any documents, media and other user generated files. Those will be stored on this 'storage-space'.
However I have recently found that VirtualBox installed for one user account cannot be accessed by other users. So it has to be installed seperately for each user.
So taking into account the minimum space required to create 'Virtual Drives' for each user, for installing Windows7 on VirtualBox for each user, and devoid-of/less/minus the space required to accommodate any documents, media and other user generated files [since it already exists elsewhere], what should be the 'minimum required' size of the /home partition for TWO users?. We also need to consider, I suppose, that each user would install different softwares on her/his Virtual-Windows-partition.
My Problem regarding /root partition::
Similarly, what should be the 'Minimum required size of the /root partition to create 'Virtual Drives' for TWO users for installing Windows7 on VirtualBox.
Why do you think you need a separate /root partition? I've never done one, I don't really see the point. Or do you just mean the root of the filesystem "/"? If so, you need to watch terminology. Root is a user on Linux, the superuser, and the root user has its home directory at /root. So when you say /root, you're referring to root's home directory, not "/", the root of the filesystem.
I usually just do 2-4 GB for swap (depends on the application), 20-40 GB for /, and the rest for /home.
That said, Windows takes up a crapton of room. You're asking how to fit TWO Windows installations AND a Linux installation into 70 GB. I'm not even sure that can be done. Is there a reason both users need their own Windows installations? Are they both going to be using it simultaneously? If not, just do one Windows VM running under a neutral 3rd party user (vmuser or something) and let the two users remote desktop into it under their own individual user accounts.
Otherwise I don't think there's enough space. I have a Win 7 VM on one of my systems with practically nothing installed on it (one small game and LTSpice, that's it). According to Windows, it's using 28 GB of the allotted 100 GB, and the .vbox file is 40 GB. That's just for one installation with basically nothing on it.
If you need two Windows installations, then I think you need to add another hard drive, or set up symlinks so the virtual machines aren't on the 70 GB.
If you can get by with one Windows installation, then I'd probably do ~2 GB for swap, ~15 GB for / and the remainder for /home, with the vast majority of it taken up by the Windows VM.
Last edited by suicidaleggroll; 06-16-2015 at 05:15 PM.
Why do you think you need a separate /root partition? I've never done one, I don't really see the point. Or do you just mean the root of the filesystem "/"? If so, you need to watch terminology. Root is a user on Linux, the superuser, and the root user has its home directory at /root. So when you say /root, you're referring to root's home directory, not "/", the root of the filesystem.
You are right suicidaleggroll, I got myself confused with the two terms "/" and "/root". Took them to be synonymous.
Yes, by "/root", I really meant the root of the filesystem "/".
[Forgive me for going off-topic a bit here. I'm just trying to get used to Linux.] However this seems to be interesting, [keeping the space issues aside], that one can have a separate home directory for the superuser. Is it so? Can we create a separate home directory for the superuser named as "/root", during installation? And then what happens to the /home directory created for other standard users? Will it also again contain the superuser's home directory, generated by the system automatically? If so where will the superuser-generated files be saved to, by default? In the separate "/root" directory or again the "/home" directory, created by the system?
Quote:
Originally Posted by suicidaleggroll
Is there a reason both users need their own Windows installations? Are they both going to be using it simultaneously? If not, just do one Windows VM running under a neutral 3rd party user (vmuser or something) and let the two users remote desktop into it under their own individual user accounts.
That's a great suggestion. Why I thought about TWO Windows-VM installations is, the Windows-VM installed on one user's account can't be accessed by other users. Now taking your suggestion, I shall create a neutral user account and install VM & the Windows-VM on it and that would serve most of my purposes , thanks to you.
However I have a question here [trying to stretch], can it be customized such that the Windows-VM OS, on the neutral 3rd party user-account be accessed by other users from their own accounts that they have logged-on already, without going for the 'switch-user' option?
Quote:
Originally Posted by suicidaleggroll
If you can get by with one Windows installation, then I'd probably do ~2 GB for swap, ~15 GB for / and the remainder for /home, with the vast majority of it taken up by the Windows VM.
Is 15GB sufficient for "/"? Because, I could be installing much software, for media editing etc, which could consume much space and it also houses the VM & the Windows-VM too. If not, how mush space for "/" is quite sufficient?
As regards "/home"; [since I am new to & using, VirtualBox for the first time], what does VB use the "/home" partition for? Is it for saving user generated files and keeping custom-settings of the VM? I suppose the entire VM software and the Windows-VM are installed on the "/" partition. The VM & the Windows-VM wouldn't require much of space on the "/home" partition. Moreover, since all the users have their own separate "/user" partitions to store their user-generated files, I suppose "/home" need not be much bigger.
I suppose, the thing to verify here is, how much space do the VM & the Windows-VM occupy on the "/" & "/home" partitions. We need NOT take here into consideration, the space required to keep the user-generated files. There are separate partitions allotted for storing them.
Thanks once again for your compassionate efforts, suicidaleggroll.
[Forgive me for going off-topic a bit here. I'm just trying to get used to Linux.] However this seems to be interesting, [keeping the space issues aside], that one can have a separate home directory for the superuser. Is it so? Can we create a separate home directory for the superuser named as "/root", during installation? And then what happens to the /home directory created for other standard users? Will it also again contain the superuser's home directory, generated by the system automatically? If so where will the superuser-generated files be saved to, by default? In the separate "/root" directory or again the "/home" directory, created by the system?
root already has its own home directory at /root. Whether this directory lives on the same filesystem as / or a separate filesystem doesn't matter one bit to the operating system. Generally it's put on the same filesystem as / for simplicity, since there's really no reason why it needs to be on its own. root shouldn't have all that many files in its home directory in the first place.
Quote:
Originally Posted by Anil Kagi
That's a great suggestion. Why I thought about TWO Windows-VM installations is, the Windows-VM installed on one user's account can't be accessed by other users. Now taking your suggestion, I shall create a neutral user account and install VM & the Windows-VM on it and that would serve most of my purposes , thanks to you.
However I have a question here [trying to stretch], can it be customized such that the Windows-VM OS, on the neutral 3rd party user-account be accessed by other users from their own accounts that they have logged-on already, without going for the 'switch-user' option?
Once the VM is up and running, any user will be able to remote desktop into it like it's a real computer. It doesn't matter which Linux user is the one that owns it. The only issue is that only one user will be able to remote desktop into it at a time, unless you install a Windows Server edition that allows multiple simultaneous remote desktop sessions. The normal Windows 7/8 Pro/Ultimate only allows one user to operate the system at a time. So if you were remote desktop'd into the Windows system, and then somebody else tried to rdesktop in, it would kick you off (not off of Linux, just off of the Windows VM). That's the only thing that having multiple Windows VMs would buy you, multiple people could operate them at the same time.
Quote:
Originally Posted by Anil Kagi
Is 15GB sufficient for "/"? Because, I could be installing much software, for media editing etc, which could consume much space and it also houses the VM & the Windows-VM too. If not, how mush space for "/" is quite sufficient?
This is really application-specific. A regular Linux installation, depending on the distro used, requires somewhere around 4-5 GB including the GUI. Any applications you install will be in addition to this, so the final requirements depend entirely on what you plan to install.
Quote:
Originally Posted by Anil Kagi
As regards "/home"; [since I am new to & using, VirtualBox for the first time], what does VB use the "/home" partition for? Is it for saving user generated files and keeping custom-settings of the VM? I suppose the entire VM software and the Windows-VM are installed on the "/" partition. The VM & the Windows-VM wouldn't require much of space on the "/home" partition. Moreover, since all the users have their own separate "/user" partitions to store their user-generated files, I suppose "/home" need not be much bigger.
VirtualBox itself will be installed in /, but it's small. Any VMs created will go in /home/user/VirtualBox VMs/, where "user" is whoever owns the VM. This directory will contain the VM configuration, as well as the vdi file (the VM's "hard drive"). Anything saved in the VM will go in that vdi file, which lives in /home/user/VirtualBox VMs/"name of VM"/"name of VM".vdi. This is why /home needs to be as big as possible. It will hold ALL user-generated files in both Linux and in the Windows VM. There is no /user directory by default in Linux. There is a /usr, but this is still a system directory, it's not where user-generated files go unless you go out of your way to modify permissions and put them there. Unless you go out of your way to change things, / is where the Linux operating system and all programs will be installed, and /home is where all user-generated data, per-user configuration files, VMs, and data contained within those VMs, will be saved.
That was a great post. You have provided a lot of vital information for me.
Thanks for the affectionate effort. Very kind of you.
Quote:
Originally Posted by suicidaleggroll
root already has its own home directory at /root. Whether this directory lives on the same filesystem as / or a separate filesystem doesn't matter one bit to the operating system. Generally it's put on the same filesystem as / for simplicity, since there's really no reason why it needs to be on its own. root shouldn't have all that many files in its home directory in the first place.
Point taken.
Quote:
Originally Posted by suicidaleggroll
Once the VM is up and running, any user will be able to remote desktop into it like it's a real computer. It doesn't matter which Linux user is the one that owns it. The only issue is that only one user will be able to remote desktop into it at a time, unless you install a Windows Server edition that allows multiple simultaneous remote desktop sessions. The normal Windows 7/8 Pro/Ultimate only allows one user to operate the system at a time. So if you were remote desktop'd into the Windows system, and then somebody else tried to rdesktop in, it would kick you off (not off of Linux, just off of the Windows VM). That's the only thing that having multiple Windows VMs would buy you, multiple people could operate them at the same time.
If there are three users on the Linux system, the Superuser, a standard-User1 and a standard-User2; and the Superuser installs the VM and the Windows7-guest-OS. Is it possible then that, any one of the standard Linux users can log-on to their Linux-accounts and get access to the Windows7-guest-OS from their own Linux-accounts by 'remote desktop-ping' into the Windows7-guest-OS? Have I understood this right? Moreover, when the standard-Linux-user gets access to the Windows7-guest-OS, does he also get access to the Superuser's permissions?
Quote:
Originally Posted by suicidaleggroll
This is really application-specific. A regular Linux installation, depending on the distro used, requires somewhere around 4-5 GB including the GUI. Any applications you install will be in addition to this, so the final requirements depend entirely on what you plan to install.
VirtualBox itself will be installed in /, but it's small. Any VMs created will go in /home/user/VirtualBox VMs/, where "user" is whoever owns the VM. This directory will contain the VM configuration, as well as the vdi file (the VM's "hard drive"). Anything saved in the VM will go in that vdi file, which lives in /home/user/VirtualBox VMs/"name of VM"/"name of VM".vdi. This is why /home needs to be as big as possible. It will hold ALL user-generated files in both Linux and in the Windows VM.
Great. Point taken.
Quote:
Originally Posted by suicidaleggroll
There is no /user directory by default in Linux. There is a /usr, but this is still a system directory, it's not where user-generated files go unless you go out of your way to modify permissions and put them there. Unless you go out of your way to change things, / is where the Linux operating system and all programs will be installed, and /home is where all user-generated data, per-user configuration files, VMs, and data contained within those VMs, will be saved.
Oh sorry Suicidaleggroll,
I forgot to mention something before. There are three users on my PC, in either of the dual OSs, the Linux and the dual boot Windows 7. The Superuser/administrator, a standard-User1 and a standard-User2. And for all three of them I have created separate NTFS partitions and named them as /Administrator-documents, /User1-documents and /User2-documents. And I have made them accessible to the owners and inaccessible to others, by editing the /etc/fstab in Linux and the security settings in the dual boot Windows 7. These partitions are accessible only to their owner from both the dual boot OSs.
When I mentioned /user, I was actually mentioning one of those separate NTFS partitions. What I was pointing towards was that, all the users have their own partitions to keep their user-generated files in their own partitions, and they will not be placed in the /home partition. And that is why in my earlier Linux installation I kept the size of the "/home" partition small, upto only 9GB. Any user-generated file would go to their seperate partitions, and a smaller "/home" would suffice.
Now in order to install the VM, it came upon me to re-size the "/home". And during that process I messed-up everything. So now for a re-installation, I have to increase the size of the "/home" partition to "9+something" GB. So I must know how much that "something GB" amounts to.
So now taking this into consideration and as per your info above; my /home will be containing only :-
VM created in /home/user/VirtualBox VMs/, the vdi file (the VM's hard drive)
VM configuration files
Anything saved in the VM (We will hold that, that will be saved/shifted, in/to the above mentioned respective "NTFS /user partitions" of the three above mentioned users.)
All the software I would install on the VM (according to my previous experience, it could require about 15GB)
NO user-generated files of Linux users.
So from all this; can the required size of the "/home" partition be deduced now? So the matter remaining to be ascertained is; how much space the Windows7-VM created in the "/home/user/VirtualBox VMs/" would occupy?
Now, will the Windows 7 OS installed on VB occupy the same space as it occupies on a real hard drive? In my last experience I had seen that, while bare Windows 7 OS occupied about 28GB on the hard drive, it occupied only about 8GB on the VB! Is it so? Will Windows 7 OS occupy lesser space on the vdi file (the VM's hard drive) than it occupies on a hard drive !?
Sorry Suicidaleggroll, again this was a long post. Forgive me for that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.