2

my machine's partition table

I just want to install another version of same distro linux into the extended partition, i. e. into the /dev/sda7.

Does it make any problem into current Linux and its data and contents? If no, I can dual boot into two distro's after installation right?

Also , how can I efficiently mount the / and /home for the new installation?

All suggestions are welcome

Caleb
  • 70,105
Renjith G
  • 5,888

2 Answers2

1

Having multiple Linux installations on the same disk is not a problem. The installer should get everything right, though this depends on your distribution (which you don't specify). With “automated” distributions such as Ubuntu, you may just need to answer one or two questions; with “hands-on” distributions such as Arch, you may need to configure a couple of things manually.

There's no risk of losing any data as long as you're careful not to tell the installer to overwrite your existing installation (double-check all partition numbers). I recommend deleting /dev/sda7 now, that way you can just tell the installer to install in the free space.

Only one of the distributions will manage the bootloader. It can be either the old one of the new one. Older BIOSes require the bootloader to be near the beginning of the drive; I don't know the exact timeline but if your 500GB drive was sold with your computer.

You can share swap space between installations. This should happen automatically if you tell the installer to use /dev/sda6 as swap space.

You can share home partitions between installations. Here I'm less confident that the installer can do the right thing. Make sure it doesn't reformat /dev/sda5 (if it does, it will ask for confirmation before). If you can't get the installer to do what you want, add an entry for /home manually to /etc/fstab on the new installation. Copy the entry from the existing installation, it should look like

/dev/sda5  /home  ext4  defaults  0 2

If the installer doesn't add mount points for your existing system, add them yourself to /etc/fstab. You'll probably want to do that on the existing installation anyway. An entry in /etc/fstab looks like this:

/dev/sda7  /media/linux2  auto  defaults

Replace defaults by ro if you want to mount read-only, or by noauto if you don't want the filesystem to be mounted at boot time but want to be able to mount it with the command mount /media/linux2. If you want both options, it's a comma-separated list: noauto,ro. If your installer doesn't add fstab entries to the new installation, they should be something like

/dev/sda3  /media/linux1  auto defaults
/dev/sda5  /media/linux1/home  auto  defaults

The two entries should be in this order. You'll need to create the directories /media/linux1 and /media/linux2. You only need to create /media/linux1/home if you want to be able to mount /dev/sda5 even when /dev/sda3 is not mounted.

  • I am Using Pardus 2011 linux(KDE flavour) currently.From your answer i understood that, i can safely install another version into /dev/sda7 , though it is an extended parttion.But my another doubt is clarified fully. That is , in my current installation , the "/" is mounted on /dev/sda3 and "/home" is mounted on /dev/sda5. If i install another version, how can i give / and /home on another drive. Also should i need another swap partition for new this installation? – Renjith G Feb 19 '11 at 15:32
  • @Gilles: my question is whether i can install in the EXTENDED drive. – Renjith G Feb 19 '11 at 15:47
  • @Robertew: Linux doesn't care about primary vs extended (logical, actually — extended is sda4, 5–7 are called logical partitions) partitions. You need a bootloader in the boot sector, but your existing installation has already taken care of that. You can share swap partitions.. – Gilles 'SO- stop being evil' Feb 19 '11 at 16:00
  • @Gilles: ok thanks. but i can mount my /home for new installtion in /dev/sda7 itself right? – Renjith G Feb 19 '11 at 16:11
  • @Gilles: i need two mount points../ and /home in sda7 ..possible? – Renjith G Feb 19 '11 at 16:13
  • @Robertew: Yes, you can share home directories, I should have mentioned that in the first place. I've edited my answer to cover this. – Gilles 'SO- stop being evil' Feb 19 '11 at 16:19
  • @Gilles: Thanks. now i have two logical partitions unlike my above picture. ie /dev/sda7 and /dev/sda8 . I would like to give "/" mount point as /dev/sda7 and "/home" mount point as /dev/sda8 , this should work perfectly right? – Renjith G Feb 19 '11 at 16:34
0

Sharing the /home partition may not be a good idea because a lot of applications store user configurations in the home directory and these configurations can be incompatible between versions. What I do is mount the shared partition under /data and store stuff there.

Important Note: Make sure that when you are installing the second distro that you don't tell it to format the /data directory since that would clobber everything you have stored there.

  • Usually when the format of config files changes, they add a version number string to the dot-file or dot-folder where the preferences are. I share lots of home folders and this is rarely a problem. – Caleb Jun 21 '11 at 19:32
  • Hmm, perhaps. At any rate, you may have different configurations for an application across distributions, so it may still be a good idea not to share home directories. – Zhehao Mao Jun 21 '11 at 19:40
  • Also, my qualms about sharing the home directory come from the answers to this question. http://unix.stackexchange.com/questions/6344/different-linux-distros-sharing-the-same-home-folder – Zhehao Mao Jun 21 '11 at 19:42
  • I kind of doubt it, the guy isn't even talking about different distros, just different versions. The drawbacks mentioned in that thread might be useful, but point to it and summarize the pros and cons so he can make an educated choice. Like I said, I share home directories across distros, over nfs, across program versions and desktop environments, and even across different OS's. There are a few gotchas but a lot of advantages. – Caleb Jun 21 '11 at 19:50