LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Install 2 Linux OS systems on one Harddrive which already has Linux installed (https://www.linuxquestions.org/questions/linux-desktop-74/install-2-linux-os-systems-on-one-harddrive-which-already-has-linux-installed-816801/)

navneethr 06-28-2010 09:09 AM

Install 2 Linux OS systems on one Harddrive which already has Linux installed
 
Hello,
I have installed fedora 12 successfully on my desktop however I installed it on the entire hard disk. I would like 2 partitions with fedora on one partition (40 MB) and Redhat or any other Linux OS on the other one.
Can someone let me know how this is to be done? I have 5 CD;s for fedora 12 with me. I do not have a floppy drive.
Help is requested urgently.

saikee 06-28-2010 09:18 AM

Every Linux supports at least 15 partitions in a hard disk.

Discounting one partition used up as the extended partition which has no storage of its own and one swap you should be able to put a distro in every partition.

One partition is enough for a Linux but if you insist more just use up the partitions any way you like.

I run about 60 partitions in a hard disk. The current kernel can support at least 128 partitions. The restriction of partitions is manily with the installers not moving with time.

Thus if you pre-partition a hard disk into a number of partitions just tell each installer where you want the new Linux to be installed.

vigilandy 06-28-2010 10:04 AM

If you need to make space on your hard drive, first back up any important files in case you hose your system, then use gparted
Code:

sudo yum -y install gparted
to make some free space for additional partitions. After that, you can also use gparted to make partitions and then do as saikee said and indicate the empty partition during installation.

navneethr 06-29-2010 01:36 AM

THanks for the info on gparted. It seems to be a good tool.

I downloaded and tried to use gparted via the live CD. THe UI etc came up well, however I am not successful because it does not allow to resize an lvm partition.
My HDrive now has 2 partitions
/dev/sda1 200MB (File system ext4) whose flag is "boot"
/dev/sda2 74.36GB (File system lvm2) whose flag is "lvm" (on which fedora resides)
The application does not allow me to resize sda2

As an alternative I think of deleting both sda1 and sda2 and then start creating from scratch.
Here is how I propose doing it. Please let me know if I should proceed this way.

Once I delete both /dev/sda1 and /dev/sda2

I will use new and create a new
/dev/sda1 size 35 GB File system ntfs Primary //is the choice of ntfs ok?
/dev/sda2 size 25 GB File system ntfs Primary // should the second one be Primary or Extended I may install another Linux system here
/dev/sda3 size 20 GB File system ntfs Primary //I may install Window or another Linux system here later

I then use fedora 12 and start the process and install Fedora on /dev/sda1
Would this do the job?

Would appreciate your suggestion at your earliest.

vigilandy 06-29-2010 02:01 AM

In order to reduce the size of an lvm partition, you have to first resize the virtual partitions within the lvm to create empty space that can then be removed by resizing the lvm partition itself. However, personally I never use lvm's and just have a root, swap, and /home partition.

Your partition plan seems ok, but the installer might complain about installing fedora on an ntfs partition. ntfs doesn't support the *nix system of file permissions. It may work, but I've never tried it myself. The installer defaults to ext4, so I've always gone with that.

You should add a swap partition, 2 or 3 times the amount of RAM. Also, if you ever plan on having more that 4 partitions, you need to create an extended partition. Another common partition to have is a share partition that can be accessed by all the OS's installed on your system.

Here's an example plan:
/dev/sda1, ext4, 30GB, fedora
/dev/sda2, swap, 4GB (depending on amount of RAM)
/dev/sda3, *any file system*, 25GB, secondary OS
/dev/sda4, extended partition containing the remainder of your disk, additional partitions are contained within this extended partition
/dev/sda5, ntfs, 20GB, shared partition

This of course is just an example plan and you can adjust it however you see fit. Hope it helps.

navneethr 07-01-2010 09:47 PM

Hello,
Thanks for your posts. It helped me in getting the solution I wanted. Here is what I finally did...

Deleting the partitions via XP or the 98 bootable CD was not clean and these programs could not cleanly delete the Linux partitions. THe linux partitions have to be deleted via the Linux programs itself.

Procedure:
I used the fedora disk and went into rescue mode. I used the skip option which prevented it from mounting any filesystems and went to the system prompt.
I then used the fdisk option
fdisk /dev/sda
It reported to me the existing partition info I had.
I then used p or list or m (not sure) to see the various options.
Based on this I used the d option (for deleting the partitions)
I entered 2 and 1 to delete the 2 partitions.
I again used the p option to print the partition info...which clearly showed that I now had no partition.

Finally I used the w option to write this info to the hard disk. (without using this option nothing really happens).

I then booted with an XP CD. Now the system clearly showed that there was 80 GB space available. Deleting the partitions via XP earlier was giving ambigious reports at this stage.

I used 10 GB to create the first primary partion and formatted it for NTFS. I created another logical parttion of around 20 GB and the rest I left free (50GB).
I installed XP on the 10 GB. Went into Control panel ..maintenance--disk-manangement and formatted the logical partion too.
I then booted with the Fedora disk and installed Fed on the remained free space. Everything went very smoothly.
I use Fedora 95% of the times, but sometimes I need XP for some of my old data.

In the future when I want to install another Linux OS I will go into XP and delete the logical drive which will mean 20 GB of free space and then I will tell the new Linux CD to use this free space.
Hope this will help the others. It helped me. THanks everyone for your help.


All times are GMT -5. The time now is 08:17 PM.