Using Linux and Windows: How to partition properly?
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.
In reality, the way you partition your drives is a personal matter. That is to say: What works for others may not work for you.
I don't understand the point of having a separate /boot partition any more. Back in the day when LILO couldn't read beyond the 1024 cylinder limit, it was a necessity. But that issue was fixed at least 5 years ago.
As for separate /usr and /var partitions - again, the reasons for running these on separate partitions have been obsolete for ages.
Here's my setup (on a 250 GB SATA drive):
2 GB swap
25 GB /
25 GB /spare
remainder /home
This way, I can test new distros on the /spare partition and have the option of sharing a common /home directory between the two setups.
With current filesystems, you don't lose any space by running one large "/" partition.
Bearing that in mind, here's what I'd do with your 120 GB drive:
Because one day you might want to do something which requires more free space under /usr, /var, /home or /tmp. In which case you'd be hamstrung by your current partitioning scheme.
Making different partitions for different directories is to prevent data crash. If anything happens to the filesystem in one partition, I can reformat it and then apply a backup so the system will continue working. If the whole thing happens to a big partition with all stuff on it... well... you can imagine.
Making different partitions for different directories is to prevent data crash. If anything happens to the filesystem in one partition, I can reformat it and then apply a backup so the system will continue working. If the whole thing happens to a big partition with all stuff on it... well... you can imagine.
Imagine what? You stick your distribution's CD in the drive and re-install it. In this day & age I fail to see the advantage in keeping /boot, /usr and /var on separate partitions.
Imagine what? You stick your distribution's CD in the drive and re-install it. In this day & age I fail to see the advantage in keeping /boot, /usr and /var on separate partitions.
I mean, we are talking home computers here right?
Yes, we talk about home computers! The reinstallation isn't the problem here. The problem is the data, the important one. It is a home computer (as you said), so you probarly don't make a backup every few hours, so if all data is lost you have a problem. A big one. All of your documents, passwords, everything is then lost and - most probarly - not recoverable anymore. Not to mention all the effort in configuring the system the way you like it. Of course you can mage an image of the HD so you have a backup, but you won't make it every week or even every day, it is just too much effort. That's my opinion, and I like to be on the safer side, I can spare some of the free GB for this sake.
HDs aren't so expensive nowadays, you can get 3 GB for 1 Euro (like 0,8 USD) for your security (regular 160 GB Samsung drive). It's an investment for years.
Yes, we talk about home computers! The reinstallation isn't the problem here. The problem is the data, the important one.
Right.
Quote:
Originally Posted by Nucomer
All of your documents, passwords, everything is then lost and - most probarly - not recoverable anymore.
OK, so how much of this type of data is kept outside your /home directory?? I can tell you that on my system none of it is kept under /boot, /opt, /usr, /tmp, /var or /usr/local.
All of this valuable data is kept under /home.
Quote:
Originally Posted by Nucomer
Not to mention all the effort in configuring the system the way you like it.
If it worries you that much, just keep a regular backup of your /etc directory - it's only a couple of megs.
The point is that the parts of your system outside the /home directory are EASILY replaced, so running such a complex partitioning scheme on a home computer is largely redundant in this day & age.
/boot: no need for journaling fs, could be mounted read only.
/opt
/usr: used for servers.
/var: log files are very important if you have a crash, it can be intersting to have a separate partition
/home: user data files and configuration files
/root: if you put a lot of stuffs in root directory, you can free space from / to another partition.
/tmp: should be in ram
/Swap: You MUST have some for everything to work properly.
That's what I do on my home computers.
Inspecting /var while / was corrupted helped me to rebuild an exact same system as it contained the list of installed package. Takes a few hours to reinstall, fully automatic.
Because home computers also sometimes crash..
so running such a complex partitioning scheme on a home computer is largely redundant in this day & age.
Without intending to offend you, but I do not see a reason, except for some more work and a few MB / GB gone for waste, not to use it. It may be redudnant in your opinion, in mine it is a step closer to more stability and safety.
What do you think is going to go wrong? Late model hard disk drives are extremely reliable. In my experience, when a disk drive does go bad, you can never predict which sector will fail next. I don't see how extra partitions will help. If you are that worried about data security, install a RAID.
On the other hand, as rkelsen said, it's your computer, partition it however it makes you feel most comfortable! I have an awful lot of security and backups and the biggest thing I'm protecting is the investment in time it took me to rip my CD collection. I have a fully encrypted VPN tunnel set up with a friend and we do little more than play Neverwinter Nights. Do what you want and have fun!
One newbie question
If i have al the partitions like /boot , /tmp and others on the same physical partition rather than on different would my PC not perform better ?
If i have al the partitions like /boot , /tmp and others on the same physical partition rather than on different would my PC not perform better ?
I think so, although I haven't analyzed this numerically. If the directories are all together, the disk arm doesn't have to travel as far to find the correct cylinder when loading the next program or data. As I said before, disk access is orders of magnitude slower than CPU cycles. Anything you can do to shorten this delay will improve your computer's performance.
Now another question regarding partitions... If I want to use Firefox and Thunderbird on both systems, is it possible to put the configuration files on the FAT32 partition so that on both systems the settings, mails, bookmarks etc are the same?
There's a very slim chance all the appropriate filenames and paths could be set through changing the preferences, but....
I can't speak directly to Mozilla programs, but I have installed a program to a shared partition so that both Linux and Windows could use it. It is the game, Neverwinter Nights. Of course, there are two executable files, one for Windows, the other for Linux, but as you suggested, the config and data files are all the same. In this case, I knew which files Neverwinter Nights needed because one method for installing the game to Linux began with "install to Windows and copy...."
Here are some pitfalls I found along the way:
1) Linux is case sensitive, Windows is case insensitive. In other words, in Linux, "tnandy" and "TNAndy" are two different file names. In Windows, they would specify the same file.
2) FAT32 does not support linked files. Shortcuts are not the same thing. I got around this by making copies of the original file using the names that were supposed to be link files. I assume my linked files are static or else BAD THINGS would happen.
3) There were some configuration files that had exactly the same name, but needed to contain different data for different operating systems. I got around this by making backups of the files for each operating system and using a launcher script (batch file) to copy the appropriate backup into the live file.
I figured out the dual boot approach to Neverwinter Nights mainly through trial and error. Can the same thing be done for Firefox? Maybe. Will it be easy? Very doubtful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.