What is the reason partitioning is usually a step in installing multiple (2) operating systems on the same computer?

Does an operating system have to have it's own partition to run or can it run in the same partition as another operating system? (i.e. -can two of the same flavor run in the same partition but if you have one Linux and one windows it needs to be partitioned?)

Is it necessary to make disk partitions to run multiple operating systems?

  • 1
    Related: Dual boot without partitioning – Ƭᴇcʜιᴇ007 Oct 28 '13 at 0:51
  • @techie007: completely different question, read the answers here. – P.S. Oct 28 '13 at 1:44
  • "Related", not duplicated. It points to the idea that you could use a virtual drive (in the same physical partition) for dual-booting to another OS. – Ƭᴇcʜιᴇ007 Oct 28 '13 at 2:47

Generally, different operating systems support different kinds of filesystems, and it is unfortunately rare for two different OSes to support the same filesystem sufficiently for the OS needs.

For example, the default filesystem in Windows is NTFS, which is closed – meaning, a Linux reimplementation of NTFS basically needs to be done by guessing and reverse-engineering, as there are no official specs to read. Linux has two NTFS drivers: one is part of the kernel, but is still low-quality; the other – ntfs-3g – is written using FUSE, which makes it a bit tricky to integrate into the boot process, although it could certainly be done (if booting with an initramfs).

Going in the other direction, out of maybe a dozen filesystems supported by Linux, only ext2/3/4 has third-party drivers available for Windows (ext2IFS and ext2fsd); again, one of them is limited to just ext2, the other claims support for ext3/ext4 but only without a journal, and neither of them are capable of actually booting Windows from a ext2/3/4 partition.

The situation is basically the same regardless of what combination of operating systems you have. Linux cannot read UFS from FreeBSD and needs a third-party driver to support ZFS due to licensing issues (again, booting Linux from ZFS is possible, but it won't necessarily be as easy as using a Linux-native filesystem). FreeBSD also supports just ext2 and – barely – ext3.

In general, the only widely natively supported filesystem is Microsoft's FAT/FAT32, which is quite slow and unreliable compared to everything else above, not to mention its limitations (e.g. file size limited to 2 or 4 GB.)

FAT also does not natively support anything that Unix-like operating systems would expect, i.e. permission bits, access lists, or special files like symlinks. (All of which, yes, NTFS does support.)

There was once a time when one could install Linux on a FAT partition alongside MS-DOS or early Windows systems, using the special umsdos filesystem driver that would store this additional Unix metadata inside special files hidden from both Linux and MS-DOS. However, it has long since been removed. (Windows itself has dropped support for booting from a FAT partition, too.)

On the other hand, installing two versions of the same operating system to the same partition often is possible, although almost always will result in file conflicts. For example, even though the \WINDOWS directory name can be changed for a second installation (some releases even had \WINNT as the default), both systems will still expect to have control over the default \Users and \Program Files directories.

Modern Linux makes this possible rather easily – most installations use an initramfs which has just enough userspace tools to mount the main "root" filesystem on a regular path like /mnt or /new_root, then enter it using chroot or pivot_root. It would be trivial to modify the initramfs to make it enter /mnt/system-one or /mnt/system-two instead – so the root partition would have /system-one/usr and /system-two/usr, for example, but both systems would be convinced that they only see their own /usr, and you could even have the actual filesystem root bound on top of /all-systems if wanted.

(Note that nowhere do I say that this is actually a good idea.)

  • very informative and helpful to many, thank you, – P.S. Oct 27 '13 at 22:09

Simple answer is yes.

Different OS (example Windows and Linux) uses 2 different file format (NTFS vs Ext3/Ext4), and those different file format will not be able to live in 1 partition.

But then you might ask: But what if I have 2 Linux OS, they both run Ext4, so they can live in 1 partition right?

Technically yes you can, but then there will be confusion of where does each OS file will be sitting if they are all simply meshed together. The Linux Kernel itself will survive as the Linux kernel will have different file name. But most Linux folder structure will be similar you will have /usr /bin, and both Linux OS will simply overwrite each other files, and you may end up crippling your system.

So yes, partition is necessary to contain the files of your OS into separate areas due to either file / folder name conflict (when installing 2 Linux OSes), or due to difference in file system format. Maybe others can add more info of other reasons, but these are the 2 I know for now.

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.