how to install dual linux os in single harddisk

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

how to install dual linux os in single harddisk

Postby praveenvikram24r » Sat Jun 16, 2012 2:15 pm

hi,

please guide me how to install dual linux os in single harddisk

praveen
praveenvikram24r
 
Posts: 10
Joined: Sat Jun 16, 2012 7:45 am

Postby towy71 » Sat Jun 16, 2012 2:46 pm

I have found this site which tells you how to install 145 operating systems one one hard drive, overkill but it is possible :wink: but I don't know why you would want to do that :roll:

Maybe you should think about using virtualbox and just have one system and as many distros as you like 8)
still looking for that door into summer
User avatar
towy71
Moderator
 
Posts: 4263
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales

Postby johnhudson » Sat Jun 16, 2012 5:37 pm

If you point most distros at a single hard drive with nothing on it, they will take the whole drive. So you may be better off partitioning the drive first. With two linux distros leave or create a small primary partition (my laptop came with a small primary partition anyway) and make everything else the entended partition.

Make swap the first logical partition, then use up to 20Gb for the first root (/) partition and enough for the first /home partition to leave enough for the second distro.

Though in theory you should be able to use the same /home partitioin for both distros, in practice this may cause problems.

Once you have installed the first distro, install the second and point it at the spare partition; it should pick up that there is already a swap partition and another distro and partitioin the spare partition correctly and write a new GRUB entry. The problem you may get here is if one distro uses legacy GRUB and one uses GRUB2 - in this case install the one that uses GRUB2 first and allow the one that uses legacy GRUB to take over - unless you are a dab hand with GRUB anyway.
johnhudson
LXF regular
 
Posts: 876
Joined: Wed Aug 03, 2005 1:37 pm

Postby ajgreeny » Sat Jun 16, 2012 9:20 pm

I suggest you partition first as johnhudson says.

First make an extended partition of the whole disk, then make a logical swap partition as suggested in the extended partition. Now make one partition for each OS, each one about 10 - 15 GB, and I would keep /home within the root partition, not separate. Finally make another partition, as large as possible, and use that for all the data files, ie, your personal docs, photos, music, etc etc and then you can set it to mount at boot and link the files in there to the various folders in your several home folders.

This is how I have done it on my second hard disk which has four different Linux OSs on it, all in separate root partitions with home in root, and in my case, all linked to the data files in my first hard disk OS's separate /home partition. It works with no difficulty of any sort and use of all five OSs is seamless as far as using the files is concerned.

PS: It may be necessary to have the same username and GUID in all OSs for this linking of data files to work if your data partition is ext4, like mine, and therefore has linux permissions enabled, but perhaps not if it is fat32 or ntfs. I have no need for ntfs or fat32 any more being entirely linux.
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 456
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby nelz » Sun Jun 17, 2012 10:25 am

The username is irrelevant, but the numeric UID must be the same.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8499
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

how to install dual linux os in single harddisk

Postby cbuffer » Sun Jun 17, 2012 3:24 pm

[quote="ajgreeny"]I suggest you partition first as johnhudson says.

...snip...... Finally make another partition, as large as possible, and use that for all the data files, ie, your personal docs, photos, music, etc etc and then you can set it to mount at boot and link the files in there to the various folders in your several home folders.


Now that's a good idea. I've had problems in the past with using a common home partition. Do you have a script to create a link in each home to new files in the big partition?

Ken
cbuffer
 
Posts: 67
Joined: Thu Nov 01, 2007 12:04 am

Postby nelz » Sun Jun 17, 2012 5:13 pm

Don't link files, link directories. That way, whenever you create a new file in any of those directories, it will be available to all distros.

I'd still use a separate /home partition, it makes reinstalling or removing any of the distros easier, but sharing a home direcotry can cause problems with config files, so I use a different home directory for each distro, all under /home.There is no rule that the home directory name has to be the same as the username, so I generally use home directories named home/user-distro. It makes organising things much easier and also, by keeping all user directories on the same filesystem, you can use hard links instead of symbolic links. Hard links are more suitable than symlinks for this as they remove the risk of blowing away all your data by deleting the wrong home directory (or uninstalling the wrong distro).
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8499
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby ajgreeny » Sun Jun 17, 2012 8:06 pm

Thanks for that nelz.

I do link directories, not folders, it was just my poor explanation of what to do that was wrong. However, I was not aware of the fact that the home folder could be named differently to the username, and that is worth remembering. I will also consider the possibility of keeping homes separate , even from my "test" OS partitions, ie the ones on my second disk.

Also, I have always been a bit confused about the difference between soft and hard links. I first made such a link as I'm speaking of by dragging with the middle mouse button from one nautilus to another, ie I would drag Documents from my main OS home to the new test home with middle mouse button and choose "Link here" in the menu that appears; I presume that is a hard link. Am I correct?
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 456
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby nelz » Mon Jun 18, 2012 12:53 am

The home directory is specified in /etc/password, there is no default so you can change it to whatever you want.

A soft link is from one file/directory to another, it has a source and a target. If you symlink from a to b and delete a, b becomes useless. A hard link is effectively a second directory entry for the same object. Hard link a to b and both appear the same in ls -l (a symlink appears as a symlink) but a change to the contents of one appears in the contents of the other. Delete one and the other continues as before. Technically, every directory is a hard link, it points from a name to an inode on the filesystem, what we call a hard link is just a second (or subsequent) instance of such a pointer.

One major different is that hard links have to be on the same filesystem while soft links do not and can even link to objects on a network filesystem.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8499
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby ajgreeny » Mon Jun 18, 2012 12:08 pm

Thanks also for that info which I was not aware of.

In fact in my Ubuntu 10.04 system, /home is specified not in /etc/password but /etc/passwd, which I assume was a typo of yours.
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 456
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby nelz » Mon Jun 18, 2012 9:37 pm

It was, I must have been thinking in English rather than Unix when typing that :(
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8499
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby cbuffer » Mon Jun 18, 2012 10:51 pm

Thanks for the tips nelz. I am about to move to a new hard-drive, which is what drew me to this thread.

Ken
cbuffer
 
Posts: 67
Joined: Thu Nov 01, 2007 12:04 am


Return to Help!

Who is online

Users browsing this forum: theocl and 3 guests