LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2015, 04:55 AM   #1
Shadders
LQ Newbie
 
Registered: Jun 2015
Posts: 15

Rep: Reputation: Disabled
Install 3 Versions of Linux on Same Hard Disk


Hi,

I am new to the installation of Linux, and wish to install 3 different distro's on the same hard disk.

I have installed Centos 7 successfully as follows :

The /boot is /dev/sda2

/dev/sda1 is listed as unknown so i assume it is the Master Boot Record with Grub installed. I do obtain the option to boot to the various kernels after updating the OS.

/dev/sda3 is a Linux LVM with the various partitions i required.

When i installed the CentOS 7 the installer stated an error about the bootable partition - which was effectively /boot, so i moved this to /dev/sda2.

What i am not sure about is that if i want to install 2 other Linux OS's will i run out of /dev/sdaX assignments ?.

I read somewhere that there are 4 maximum that can be used a /boot (SDA1, SDA2, SDA3, SDA4), so does this mean i can only install one other OS ?.

Any guidance gratefully received. Thanks.

Regards,

Richard.
 
Old 06-03-2015, 05:11 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by Shadders View Post
/dev/sda1 is listed as unknown so i assume it is the Master Boot Record with Grub installed.
No, more likely a Windows partition - NTFS.
Quote:
When i installed the CentOS 7 the installer stated an error about the bootable partition - which was effectively /boot, so i moved this to /dev/sda2.
"an error" tells us nothing - post exact message(s) in future. Do you mean you moved the boot flag to /dev/sda2?.
Quote:
What i am not sure about is that if i want to install 2 other Linux OS's will i run out of /dev/sdaX assignments ?.

I read somewhere that there are 4 maximum that can be used a /boot (SDA1, SDA2, SDA3, SDA4), so does this mean i can only install one other OS ?.
Linux is (much) more flexible than Windows, and can use logical partitions - even for /boot. Some (Linux) installers won't do this easily (RHEL and CentOS come to mind), you have to use the "Advanced" partitioning option at install.

From a terminal in Centos, run this command and post all the output
Code:
sudo parted /dev/sda "print free"
 
Old 06-03-2015, 08:04 AM   #3
Shadders
LQ Newbie
 
Registered: Jun 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hisyg00,

I did use advanced - so i thought so only have one distro installed at the moment.

Output from command you provided is :
Quote:
Code:
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
        32.3kB  1049kB  1016kB           Free Space
 1      1049kB  525MB   524MB   primary
 2      525MB   1574MB  1049MB  primary  ext4         boot
 3      1574MB  349GB   347GB   primary               lvm
        349GB   1000GB  652GB            Free Space
So is the 500MB 1 partition grub ?.

I do not recall ever installing Windows on this disk - was a clean Linux installation - CentOS 5 originally.

As such - do i have to reinstall or can i move the partitions around etc ?.

I was planning to install Fedora 21 on the other partitions, or Fedora 21 as second Linux build, and possibly CentOS 6 on the third.

Thanks and regards,

Shadders.

Last edited by Shadders; 06-03-2015 at 08:17 AM.
 
Old 06-03-2015, 08:17 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Ugh - edit that and change the [quote] tags to [code]. That way the layout is maintained - use [code] for all output.

Create an extended partition using all that free space, then you can allocate multiple logicals within it as needed - the extended is merely a container. It gets you around the MS-DOS limit of 4 primary partitions. See wikipedia for an explanation.
No need to move anything around. Looks like no filesystem in /dev/sda1 - basically unused.
The boot flag is ignored by grub, so just leave it there.

So just install what you want - BTW F22 is now out; install that rather than F21.
 
Old 06-03-2015, 08:19 AM   #5
Shadders
LQ Newbie
 
Registered: Jun 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi Syg00,

Thanks for the assistance - much appreciated. I updated the text to CODE.

Regards,

Shadders

Last edited by Shadders; 06-03-2015 at 11:53 AM.
 
Old 06-03-2015, 10:31 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
What distro's are you trying to install?
Some distro's such as debian can be installed without installing grub to the mbr, which would be a good thing because whatever grub you end up with would have to be able to access n lvm partition such as ubuntu's, or I believe you would have to create a new initrd image with support for lvm.
 
Old 06-03-2015, 11:54 AM   #7
Shadders
LQ Newbie
 
Registered: Jun 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
HI Eddy1,

I was installing rpm based distro's - Fedora, Centos, possibly Scientific Linux. I purchase Linux Format regularly so will use their DVD's with distros to try. I essentially want two builds at least to experiment on, in different ways - so the separate installs are required. Thanks.

Regards,

Shadders.
 
Old 06-03-2015, 11:57 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I think that fedora & centos both use lvm so I would believe that it is safe for either of them to control grub.
 
Old 06-03-2015, 12:06 PM   #9
Shadders
LQ Newbie
 
Registered: Jun 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi Eddy1,

Yes - i have not loaded any programs i wish to use just yet so if it all goes wrong, i am ok, and it does mean i can experiment a bit too. Thanks.

Regards,

Shadders.
 
Old 06-03-2015, 12:16 PM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Yes you can experiment, but if it all goes wrong after installingthe other distro's don't remove them just remember where ubuntu's grub was installed & boot up the ubuntu dvd/usb, in rescue mode & reinstall grub. You'll find ubuntu easier to manage grub & it will find & add the other OS's to it's grub.
 
Old 06-03-2015, 12:40 PM   #11
SCSIraidGURU
Member
 
Registered: Oct 2014
Posts: 69

Rep: Reputation: Disabled
I had XP, XP 64, and Windows 7 installed on my workstation for testing. I installed three hard drives. I installed the oldest first. I created a separate boot sector and separate C: drives as primary. This way the three OS could not write or see the other OS partitions and corrupt them. I kept separate hard drives for space for applications for each. So I can't see why Linux can't do it. Use Grub it is common to move flavors.
 
Old 06-04-2015, 01:56 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if you install cent then THERE IS NO!! REASON!!! to install Scientific linux

they ARE REALLY THE EXACT SAME OS !!!!

just a few different icons and background images

also PUT !!! fedora's grub2 on the MBR and not centos's legacy grub0.9
 
Old 06-04-2015, 03:02 PM   #13
Shadders
LQ Newbie
 
Registered: Jun 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi All,

Thanks for the advice. I will use Fedora grub2 - but i have already installed CentOS 7 - so will installing fedora as the second OS overwrite the existing Grub with the new version ?.

I know Scientific Linux is the same as CentOS ., but i thought it was more of a beta than CentOS ?, offered some changes that were not in the official CentOS distribution.

I could install a debian based OS - as i have no experience of that.

Thanks and regards,

Shadders.
 
Old 06-04-2015, 06:23 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
If you accept the default for the bootloader installation with Fedora, it should ovewrite the Grub installation from CentOS although I believe CentOS beginning with 7.0 now uses Grub2. You don't indicate which release you have, the 6.5 version I tried still used Grub Legacy.
 
Old 06-05-2015, 01:48 AM   #15
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
ut i thought it was more of a beta than CentOS
Nope
cent and sl use the EXACT SAME code base RHEL

sl is created by the good people at FermiLab - usa and at CERN - Geneva

now Cent adds a few DESKTOP related things to the RHEL code

SL adds a few scientific things

but for all that matters they ARE THE SAME
Just minor differences
one of witch is SL has SECURITY backports to older versions like 6.5 and 6.4

cent DOSE NOT !!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting linux files from another hard disk(IDE) to current hard disk(sata) the lord protector Linux - Hardware 5 05-04-2008 11:30 AM
Now I have a scsi hard disk, two IDE hard disk, i want install linux on scsi hard dis tecpenguin Linux - Server 4 11-10-2007 06:44 AM
SATA Hard disk(Windows) MBR corrupted by IDE hard disk(Linux) Peter_APIIT Fedora 6 07-07-2007 12:20 AM
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 10:55 AM
install 2 linux on the same hard disk? tb-guru Linux - Software 3 04-10-2002 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration