Choosing a partition scheme
I want to install linux on my desktop and keep the possibility of additionally installing Windows later. I want to have a separate /home partition to allow me to try different distros easily, and ideally that same directory would be accessible by Windows.
I was thinking of having a partition each for Windows, Linux OS, swap, /home, and /boot, but don't know if I need all of those, or which should be of which types (primary, extended, logical). Also, I have two large hard drives (460 GB and 150 GB), but I was just going to mount the smaller one inside a folder of /home. Just thought I'd add this here in case it was significant. So, the main questions: 1) what partitions do I need? 2) what are their minimum recommended sizes? 3) which should be primary, which should be extended, which should be logical? |
Quote:
1) It depends on what you want to do. Separate /boot is mainly needed if you want to encrypt the disk. (Even then you don't really need a separate /boot anymore because grub can also handle full disk encryption, but that's just a side note). swap is a matter of taste. If you have a small RAM it makes sense. Some argue that beyond 8GB of RAM, swap is not really needed any more. There is one caveat: If you want to suspend to RAM (I keep forgetting whether that's hibernating or suspending) you need swap, and it must be larger than your RAM. Probably not relevant for you, as you were talking about a desktop. As far as the separate /home is concerned: Using the same /home partition for different distros is not a good idea because they will each be overwriting the config files of the others. Better create a pure data partition and mount it under e.g. /mnt/data. Then create a symlink pointing to it in your home. That way, each distro gets to have their own config files. Another advantage: You don't need to use a windows readable filesystem for your /home. If you want to access your data from windows I recommend making the data partition ntfs. (Only do this if you really need to access the data from windows, as ntfs has many shortcomings then can be annoying) 2) Recommended sizes: For swap see comments above. For the root file systems it depends on how much software you want to install. I typically give a linux root file system 100GB. But 50 would probably be way enough. For a current windows I have no idea. I know that the last preinstalled win7 I saw was 40GB. I'd expected it to grow beyond 100GB easily. For data: Only you can tell. 3) Extended partitions are a workaround of the old days to be able to use more partitions. Don't use an msdos partition table but a GPT partition table, then you don't need to worry about this. |
If I install linux now, and windows later, you're saying the bootloader will be screwed up, right? But will any of the data or other partitions be messed up? That is, when I install windows, can I then just reinstall linux + programs to make it work? Admittedly, that may be a pain in the ass.
For the data partition, is that where all my personal files would go, or is that a place just for config files? |
Quote:
Cheers ! |
Awesome! I was planning on keeping an empty partition that would be saved for windows, and I think with those tips, I can figure out how to install windows safely, and I'll be sure to look into it more when the time actually comes.
Some follow up questions to the data partition: How does having an additional partition separately mounted solve the problem of overwriting config files if they're mostly saved in separate places anyways? (if too complicated to explain easily, that's fine) Would it be possible for me to save some files in home (which would be visible only to linux, I assume?), and some in data (visible to both?) @Rickkkk: to be clear, you're suggesting that I have an EFI partition in addition? Which would make the total list to be /, Windows OS, swap, data, /home, and EFI (550MiB according to ArchWiki)? Edit: maybe a recovery partition too? |
My preference would be to use the smaller hard drive solely for linux. The larger drive could be mostly for Windows with maybe a 100-150 GB data storage partition for the linux OSes to use.
|
Nah, I would ... just joking; ask 10 people, get 8 opinions ... :shrug:
Some technical issues exists, but after that pretty much anything goes. Which windows ? - if Win10 I think it will only install fresh to a gpt disk. I have it on MBR disk on a couple of systems, but that isn't true of retail versions I believe. Is this a "clean system" or is there data on the disks ?. Is it a EFI system ? - just check the "BIOS" when you power it on. Do you have a Linux install/live ISO on a CD or USB ?. Can you get around in that - say use a terminal ?. Forgot: the recovery partition is Windows only - it will get created at install if you simply leave some unallocated space for the installer to use (just one big area is ok). |
There's no point in being concerned about installing Windows after Linux if you prepare in advance. After all, you're not going to reinstall Linux every time you need to reinstall Windows, which need is virtually inevitable. Simply install Linux to not depend on its bootloader living on the MBR. I have bunches of multiboot PCs, many of which include Windows, and Windows has never been the first installed OS here, ever, except in a rare case or two of being the only OS installed.
Partition in advance and you can have any partition scheme that suits your fancy, whether on MBR or UEFI, whether on one disk or more. On MBR, I recommend three partitions dedicated to Windows, a very small primary to boot from, one logical for the OS, another logical for data. It's the same principle as used for Linux with a separate home so that when the OS is replaced, all user data remains intact. Likewise for the separate boot, so that any time booting becomes an issue, repair does not necessitate complete installation. Having Windows using only one small primary facilitates having Linux boot from the same generic MBR code Windows depends on. Two primaries can be dedicated to Linux, which along with the small Windows primary, leaves the 4th primary available for as many logicals as you care to have. sda1 can be Windows, sda2 can be a separate Linux boot or a full Linux installation, and same for sda3. If you're going to have more than one Linux OS, which I recommend, then you want a primary under your personal exclusive control, which facilitates preventing subsequent installations usurping control from working installations, including Windows, in the form of a home for a master bootloader. Many moons ago I created http://fm.no-ip.com/PC/install-doz-after.html in large part to show how to partition for Windows with Linux. The disk and partitions are small, but the strategy remains valid for those still using MBR partitioning. The 3 PCs I have Windows 10 on use the exact same strategy, just with bigger disk and partition sizes, and no need for any recovery partition or GPT, such as this one: http://fm.no-ip.com/Share/multibootWinParts.txt Using UEFI/GPT can be easier, because the MBR isn't subject to usurpation, depending on sharing of one EFI//ESP partition by all involved OSes, and there's no confusion over primary vs. logical partitions. UEFI depends more on having a good understanding of the UEFI system, particularly as employed by your own PC's BIOS, and the fact that all installed OSes must use either UEFI or MBR, never a mixture of both in the same PC. If you're going the UEFI route, I suggest the following template: Code:
sda1 320MB FAT EFI/ESP |
Quote:
Discover them with Code:
ls -halt ~ If you have a subdirectory in your home for data (or a symlink that points to one) then you don't have these "dotfiles" on your common home partition. Does that explain? |
Quote:
joe_2000 has answered your question concerning why a separate data partition solves the config files issue ... If you need more clarity, let us know. In answer to your other questions: Would it be possible for me to save some files in home (which would be visible only to linux, I assume?), and some in data (visible to both?)
Edit: maybe a recovery partition too?
Cheers - hope this helps - let us know how it goes ! |
Quote:
|
Advantage 1 in the overall long-term scheme of things is it can be advantageous to use a single partitioning application to do all partitioning.
#2 is it's to your personal mental advantage administratively that partition device names do not change unnecessarily if at all. If you don't create the Windows partitions before starting, existing ones are subject to change when they are created. If after installing Linux you decide you wish to alter the sizes created for the Windows partitions before installing Windows, you can delete and recreate them without causing name changes. If you really want to leave the freespace for Windows now, I suggest create the ESP, then immediately follow with all the Linux, so that the freespace is at the end. Or, go right ahead now and do ESP, then Linux, then all Windows following. With rotating rust, end of disk space is typically detectably slower than front and middle, giving first partitions a slight to modest performance advantage. Personally, I object to allowing Windows to do anything automatically. :D |
Yeah, that's kind of what I was assuming.
@ joe_2000, do you mean that one operating system is using /home for the config files whereas the other is using the data partition? If I wanted to have a partition for trying other distros (as I understood mrmazdas suggestion) would I need a separate data-like partition to separate those config files too? |
Quote:
Then you install another distro2, while reusing the username joe. You mount the same partition under /home as in distro1. You use firefox. Firefox will find that there is already a .mozilla directory in your user's home. At first sight, this might seem like a good thing, because right after install of distro2 you'll find all your browsing history, bookmarks etc. from distro1. But what happens if the two distro2 maintain different versions of firefox? What if their respective settings are incompatible? Ever noticed that upon a firefox upgrade, it tries to update your plugins? That means it modifies the user profile to match the new version, which might break it for another distro. The same logic applies for many other applications. To solve this problem, my suggestion is not mounting a separate partition under home. That means that the directory /home/joe will have different contents between distro1 and distro2. Under /home/joe you will have a symlink that points to e.g. /mnt/data, which is the mountpoint for the data partition. During normal usage, it will feel as if "data" was a subdirectory of /home/joe on both distros, and the content will be the same. That's where you documents, music etc. goes. If you format the data partition in ntfs, you will also be able to see it from within windows, and it will not be "polluted" with configuration files from linux applications. Let me know if it is still unclear. |
Quote:
|
Quote:
But to answer the question again: Config files should be individual for each distro, and hence not go onto the (shared) data partition. |
Quote:
Don't use NTFS for your /home. If you really need to share files between Windows and GNU/Linux, it is easier to make an NTFS partition and mount this somewhere on home and share files through it. Don't let Windows control your use, there are ways around the lacks and weaknesses of Windows, and it does not involve making bad choices to accomodate Windows. Quote:
Quote:
Quote:
Quote:
|
Quote:
|
Quote:
/data is not part of FHS. / is considered root territory. |
Quote:
At the end of the day, this is a matter of taste. So while I can see your points, I would humbly disagree that this suggestion would make the OP's life easier. |
Quote:
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
I have OS1, OS2, and data on separate partitions, OS1 and OS2 each has its own /home directory which is visible only to it's respective OS. Within each OS specific /home directory are the config and program files. Then the data partition is mounted within that OS (with a symbolic link, depending on mount location). This would effectively become my general-use home directory. So the default /home/$USER directory effectively becomes just a place for configuration files, while the data partition (does it need its own empty folder?) holds my documents and files, and can be mounted to any number of distros, assuming compatible file systems. One other question about this, since I haven't used Linux extensively Quote:
|
Quote:
Testing involves risk that you don't want mixed into your everyday OS, so it needs to be either a separate filesystem (testing on real hardware), or in a VM (testing software on software), if not on a totally separate PC and/or HD. |
Quote:
Now as discussed with mrmazda to be able to see the "data" easily in file-pickers etc. it makes sense to have it "visible" below your /home/$USER directory. This can be achieved e.g. by symlinking to the mountpoint or by creating the mountpoint within /home/$USER. |
Don't know why you are even contemplating putting MS Windows on your computer, do you need it for some program(?), if that is the case, why are you thinking of 'maybe' installing it later!
If you really think that you might want MS Windows in the future, just keep that smaller disk for it. Keep all you data in a separate partition, install your distro with just enough room for the O/S itself, & a bit for a /home area. Nearly all Linux distros can be run 'live' these days, so you don't have to install them until you are sure you like it. My regular partitioning scheme that has served me well for a good number of years, is a root (/) area big enough for the distro plus additional programs, sometimes a swap partition, depending on intended usage, (laptop will need equal to amount of ram if you want to suspend/hibernate). The rest of the disk as my /home. |
Quote:
|
Hello, fyzx92 For me, as a person who is a constant Linux Newbie (I hate trying to remember cryptic cmds and strategies) but a person who loves trying Linux distros and software I have found that there are two positions you can take here: 1. Dig in up to your elbows in complexity, and learn the hard (complex) way. (Many Linuxers would recommend that too.) 2. KISS. (Keep It Simple Sweetheart.) Without going into details I have a multiboot system with Windows up front (which has remained unused for two/three years? (I can't even remember the last time I used it.) I keep it there for some unforseen emergency. I have managed to set this up after MANY years of trial and error. I used to have an old two-disk system with Win on one and Lin on the other, but found that it is probably better with O/S's on one hd, and Data/Backup on the other. Now, however, on a single disk system (with backups off-system) I have Windows up front, then Swap partition, followed by Linux distros partitions - with a dedicated Data partiton somewhere in the Lins or after. For a real Newbie I would recommend KISS, but for one reason - use Linux first. (Lin <> Win) So, such a system would have: Windows, Swap, 1 Linux partition, YOUR Data/Backup partition, and an UNUSED partition). The only technical part there is to leave a large chuck of UNUSED space behind your working partitions - which you will eventually turn into other distros or whatever. To get that let Windows install in its own small partition, with NO partitioning after it. In other words let Windows mark its own small territory, with blank after it. Then forget Windows, and install your Linux. Use Linux heartily for some time to understand the How and Why, then move onto the Dual- or Multi- boot thing. It's the Linux understanding that you should get first. Thats just my opinion. However, should you choose option 1. then with great assistance (as demonstrated herein already by Joe_2000, Rickkkk, even pholland, syg00, mrmazda, zeebra, et al) you can't go wrong anyway. For me, I have found that many Linuxers - trying to help, of course - use lingo that is hard to fathom at times. This post is only added lightly because the other posts are pretty darn good advice. P.S. I am using Linux MX (non-systemd) which I recommend to a Newbie, but Linux Mint (systemd) is also handy for a Newbie. There are many others worthwhile distros (eg Debian, Unbuntu, Mageia, Fedora, etc.) with good value. [This is NOT a flame thing.] Regards, boombaby |
Quote:
There are technologies (e.g. LVM) that make later changes in the partition scheme a lot easier, but I don't want to add more complexity to the discussion. Better take one step at a time. So short of LVM and the likes I would make a slight modification to boombaby's advice quoted above: Put the data partition (which is presumably going to be your largest partition) right after windows. Don't bother leaving an unused partition as downsizing the data partition later on is reasonably easy (as long as there is enough free space in it). So the workflow could be: state 1: Code:
| Win | DATA | Distro 1 | Swap | Code:
| Win | DATA | unallocated | Distro 1 | Swap | Code:
| Win | DATA | Distro 2 | Distro 1 | Swap | |
All times are GMT -5. The time now is 04:40 PM. |