Ubuntu – Sharing SWAP and /home beteween Ubuntu 15.10 and Kali Linux 2.0

dual-boothome-directorykaliswap

I am currently running Ubuntu-15.10 on my machine and I am planning to install KaliLinux alongside Ubuntu. I would like to know 2 things before I proceed.

(As both Questions are related and similar, I included both in same question)

  1. Can I have Only 1 (current) Swap partition for both?

Should I create 2 different swap partitions 1 for each? Or can I use the existing Swap partition as a common Swap?

  1. Can I use the same /home Partition for both?

I have an 25GB separate partition for /home on my Ubuntu. It would be amazing if I could share the same /home for both the O.S so that changes made in one will be reflected in the other

And I will follow these (if required):

  • I will use the Exact same username if both the O.S
  • I will create one and only one user in both the O.S
  • Permission of /home will be set to 777 always

I am aware that During the installation of the 2nd OS, if I tick ☑ on /home instructing it to use the current partition, It will be formatted once. But will this effect Ubuntu?

Note : I am not having an encrypted /home

Best Answer

  1. Yes, you can use one swap partition for several Linux operating systems.
    There is an exception, in case want to hibernate, you cannot share a swap partition.

  2. Yes, it is possible but not recommended, better create separate partitions.
    There you can store your personal data and you can access them from every system.

Below an example of a convenient disk partition setup for being used by multiple systems :

enter image description here

enter image description here

As you can see in the screenshots, the data partitions are separated from the system partitions.

They can be accessed from every operating system, in this case from non-Linux systems as well.

sdb is used for operating systems : sdb3 contains the Ubuntu system, sdb4 contains virtual disks.

sda is used for everything external : sda1 contains personal data, sda2 music, photos and videos.

sda3 contains backups of data and operating systems, sda4 (bootable) ISO files and various tools.

This is only a suggestion, of course, you should create partitions suitable for your personal needs.

Related Question