Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Feb 19 '11 at 14:52

This question came from our site for professional and enthusiast programmers.

2 Answers 2

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.

share|improve this answer
    
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 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

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.

share|improve this answer
    
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. unix.stackexchange.com/questions/6344/… –  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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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