LinuxQuestions.org
Help answer threads with 0 replies.
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 12-29-2012, 08:31 AM   #1
manuce
Member
 
Registered: Nov 2012
Posts: 48

Rep: Reputation: Disabled
Harddrive partitions win7 and centos how to?


Hello ,

I have a following scenario but unable to get my head around this.

Scenario:

I have 200 GB BLANK harddrive (SATA)

I want to install Centos 64bit first and assign 50 GB to it then install Win7 64bit and assign 50 GB to it as well, leaving the rest of 100GB for win7 to use it as storage.

I want to install Linux first so that I can learn this partitioning thing and don't want to install Win7 first.

Can someone please tell me how I am suppose to do my partitioning once I boot up with Centos OS.

Last edited by manuce; 12-29-2012 at 08:37 AM.
 
Old 12-29-2012, 08:50 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
It's always recommended to install windows first and then linux, as windows os cant recognize the primary boot sector created by linux.

If you want to do the reverse, you can do that.
You have to install centos first in 50 gb space and keep the rest free.
Then you will install the windows in 50 gb from the free space.
So now the grub is erased as windows now taken over the primary boot sector.
Now you have to boot the linux in rescue mode using the Centos media.
There you have to install the grub again using grub-install command.

Try it and post the results.
 
Old 12-29-2012, 08:55 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
It is easy to tell the Centos installer to use just 50GB. You also need to leave at least one primary partition slot available for Windows. It is also better to have all your logical partitions together, which might make it simpler to leave at least two primary partition slots for Windows.

You should think about the desired physical sequence of the partitions. It is easiest to have the partitions in the same physical sequence as creation sequence. The physically earlier partitions have faster access. Do you want Centos physically earlier with faster access? Or just first in creation sequence? It is possible to get the Centos installer to use 50GB that is not the physically first 50GB, leaving a gap before it for Windows to use later (if you want to leave the faster disk area for Windows). I don't know the details of how you tell the Centos installer to do that.

It is probably simplest to make the Centos installer use all "logical" partitions and no primary. So you leave three primary slots for Windows. Linux doesn't care whether its partitions are primary vs. logical.

As divyashree described, the inconvenience of installing Linux first is that the Windows install will trash the MBR portion of GRUB (the Linux boot code). After that, you need to boot into a Linux CD and repair the MBR portion of GRUB (or simply repair or reinstall all of GRUB including the parts that weren't broken). That is easy to do if you know how. If divyashree's instructions aren't enough, it is easy to search for online.

You also need to decide what partitions to create for Centos. Centos is usually installed in larger systems with LVM and/or RAID so there are usually reasons the /boot or /home or other directories should have their own partitions. So the Centos installer is designed to guide you in the direction of having partitions for special directories. But in a small simple install of Centos it makes more sense to have all of those kept as directories inside / rather than as their own partitions. So in my opinion your best selection of partitions for Centos would be a small swap partition (maybe 2GB) and the rest as a single / partition.

Last edited by johnsfine; 12-29-2012 at 09:06 AM.
 
Old 12-29-2012, 09:27 AM   #4
manuce
Member
 
Registered: Nov 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
Hello ,

Thanks for the swift answers over my question,actually I need to know about a proper way for partitioning while installing Centos OS,if you know once you boot with centos CD and goes to the point where it gives you 4 or 5 options of choosing the parition space . I choose to do my own partition (the last option) and I need to know how to do my partitioning there.

I think if I install Centos of 30Gb then I can use 20GB to learn making swap partitions and play with this LVM options.I will try to google bare metal installtion on Centos in the mean while.
 
Old 12-29-2012, 09:50 AM   #5
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,680
Blog Entries: 10

Rep: Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080
http://server-world.info/en/note?os=CentOS_6&p=install may help you.
 
Old 12-29-2012, 10:10 AM   #6
manuce
Member
 
Registered: Nov 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
wow that's pretty much what I am looking for,seems to be having a lot of other stuff that I can read and have a play with

Thanks
 
Old 12-29-2012, 10:11 AM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by manuce View Post
I think if I install Centos of 30Gb then I can use 20GB to learn making swap partitions and play with this LVM options.
Maybe I should have asked your purpose for installing Centos.

I assume you know LVM is pointless in that small and simple and install of Centos.

But maybe your purpose is to learn about more advanced installs of Centos while playing with a tiny one.

In that case, your / and swap partitions should be inside the LVM.

1) You want to create a small /boot partition and then an LVM partition that uses the rest of 50GB. (I don't have up-to-date info on how big /boot ought to be, maybe 1GB. Or do an online search for more informed advise on that question).

2) Then you want to create a moderate size / partition and small swap partition inside the LVM partition. (Leaving some of the LVM space unused to play with later).

I don't have the UI details of what you click when to accomplish that, and the details Habitual just posted are for a different path through the installer (not what you want). But if the point is learning to do Centos installs, figuring out the right steps in the GUI yourself isn't too hard and is an important part of learning.

Since you want to install Windows second, it is important to leave open primary partition slots. With just two (/boot and LVM) Linux partitions, you are OK anyway. But it would be a good idea to learn how to make those two Linux partitions "logical" rather than "primary". It is in that GUI somewhere. It is easy to get confused between "logical volume" which is something created inside the LVM and "logical partition" which is part of standard partitioning. Those are two very different things and it appears you ought to create both of them (/boot and LVM as logical partitions, then / and swap as logical volumes inside the LVM).

One way to create logical partitions is to first create an "extended" partition that covers the total of all the space you want the logical partitions to occupy. Then create the logical partitions inside the extended partition. In some installers that is the only way to create logical partitions. I think the Centos installer gives you the alternative to directly request logical partitions and it then creates the required extended partition around them for you. But I'm not certain it works that way. You might need to create the extended partition yourself.

Last edited by johnsfine; 12-29-2012 at 10:24 AM.
 
Old 12-29-2012, 11:04 AM   #8
manuce
Member
 
Registered: Nov 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
Hello,

May be I didn't explain it quite right or what I wanted to achieve,I tried this earlier with my lame thinking here is what my plan was(which didn't quite work and confused the matter)before posting it here.

200 GB BLANK HDD SATA

I created two PP(primary partitions) each 50 GB for LINUX and later for WIN and I thought windows would be able to pick up the second partition and one 100GB EXT partition which would carry my to LP (logical partitions) 20GB for linux and 80GB for Windows formated as NTFS.

Also can you please tell me difference between this "/" and "/boot" ? as I thought this "/" is will be the root partition have the boot info in it.

Last edited by manuce; 12-29-2012 at 12:05 PM.
 
Old 12-29-2012, 01:44 PM   #9
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by manuce View Post
May be I didn't explain it quite right
I understood exactly what you meant (what you thought you wanted). I was trying to explain some of the things that need to be different from what you requested.

Quote:
I created two PP(primary partitions) each 50 GB for LINUX and later for WIN
If you already created a PP for Linux, you probably need to delete that.
1) A partition for Linux must be created by Linux and be the correct type.
2) Linux is rarely installed using just one partition. If you want to use LVM, you need at least two partitions (/boot and LVM). If you don't want LVM, you probably want two partitions (/ and swap) though you could manage without a swap partition.

Quote:
which would carry my to LP (logical partitions) 20GB for linux and 80GB for Windows formated as NTFS.
I think you want your Linux partitions together and your Windows partitions together. So I think one primary and one logical for each of Windows and Linux is a bad idea. I think you are better off with two logical for Linux and two primary for Windows. Windows doesn't care whether its second partition is logical vs. primary and Linux doesn't care whether any partition is logical vs. primary.

Quote:
Also can you please tell me difference between this "/" and "/boot" ? as I thought this "/" is will be the root partition have the boot info in it.
/ is the root of the whole system of partitions and directories. In a simple install of Linux /boot is a directory inside the / partition. But Centos is normally installed with /boot as a separate partition. In Linux, any directory you choose can be created as a separate partition.

If you use LVM and/or any but the simplest version of RAID, then /boot needs to be outside the LVM and outside the RAID. But you almost certainly want / inside the LVM and/or RAID. So when you use LVM or RAID, you need /boot to be a separate partition, rather than just a directory of /
 
Old 12-29-2012, 02:45 PM   #10
manuce
Member
 
Registered: Nov 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
Hello John,

I will keep these point in mind.Thanks for helping me out really appreciate it
 
Old 12-30-2012, 02:08 PM   #11
manuce
Member
 
Registered: Nov 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
Hello,

I have installed the CENTOS and WIN 7 finally so thanks everyone who helped me with this,now the next issue is fixing the boot loader as WIN was second installed so it has messed up the grub boot loader.

I will be following this googled search doc :
http://www.centos.org/docs/5/html/In...all-bootloader

However not sure about these two point ?

Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader,
---> where /dev/hda is the boot partition.
so hda will be replaced by sda since I am on SATA?

Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.
---->what additional entries I would need to add so that it can recognised both Win 7 64bit ultimate ed.

Thanks
 
Old 12-30-2012, 02:28 PM   #12
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by manuce View Post
Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader,
I assume you are booted on a liveCD and logged in as root before to give that command.

Quote:
---> where /dev/hda is the boot partition.
so hda will be replaced by sda since I am on SATA?
Probably, but it doesn't hurt to be sure. Try this command:
cat /proc/partitions

That will tell you what Linux thinks all your drives and partitions are named.

Quote:
Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.
---->what additional entries I would need to add so that it can recognised both Win 7 64bit ultimate ed.
I think the grub-install program might figure all that out and do it for you. So you should see something that looks plausible for Windows when you review /boot/grub/grub.conf

If not, then you are not supposed to put the required entries directly into that file. Legacy GRUB had you directly edit its config file. But new GRUB requires you to edit files in /etc/grub.d from which it creates its config file.

There are many online tutorials (now that you know what to look for) that explain how to edit the files in /etc/grub.d and what to do after editing them. You may also want to edit /etc/default/grub

The most complete version of the documentation seems to be
http://www.dedoimedo.com/computers/grub-2.html

Last edited by johnsfine; 12-30-2012 at 02:35 PM.
 
Old 12-30-2012, 10:17 PM   #13
manuce
Member
 
Registered: Nov 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
ok,

so I am able to recover centos by fixing the grub half issue resolved.

problem is I couldn't find the windows info in my /boot/grub/grub.conf file so.... for that I tried to create a backup and added this file in vi and added the following line .

title Windows 7

rootnoverify (hd0,1)
chainloader +1

as a result I was able to see WINDOW 7 written in the gruop menu (which I would expect since I wrote that in the grub.conf ) however when I select this and press enter I get the following error.

Error 13: Invalid or unsupported executable format

press any key to continue ...

I am using GNU GRUB version 0.97 (centos 6.x)

I think problem lies in rootnoversity(hd0,1)...this needs to be pointing to the right parition where I installed windows?right?

when I ran cat /proc/partitions/ I get these results

major minor #Blocks name
8 0 19...4 sda
8 1 59...4 sda1
8 2 ....... sda2
8 3 ....... sda3 ( I installed windows in this partition)
8 4 ........sda4
253 0 ........ dm-0
253 1 ........ dm-1
253 2 .........dm-2

where these dot represents the space they are accoupying.Can someone tell which how should I be putting this in ?rootnoverify (hd0,1)

I tried rootnoverify (hd0,3) but then it threw me into grub mode without prompting me to load the centos.

Thanks
 
Old 12-31-2012, 08:18 AM   #14
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
You seem to be using legacy GRUB (my earlier instructions were for new GRUB).

In legacy GRUB the partition numbers are lower by 1 than the rest of Linux uses. If your Windows partition is sda3 (as you indicated) then in Legacy GRUB it is (hd0,2)

http://www.gnu.org/software/grub/man...ing-convention

Last edited by johnsfine; 12-31-2012 at 08:21 AM.
 
Old 12-31-2012, 10:57 AM   #15
manuce
Member
 
Registered: Nov 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
Hello ,

sending this message from Windows, (hd0,2) worked !!!

However there was issue with the bootmgr and at first attempt it showed me ERROR 18 when I selected windows 7 and that's it.

I booted the system with WIN 7 installation disc and started the Win 7 recovery environment and fixed my boot partition in repair mode and voila it worked.

I am able to use both Windows and Centos now and this issue can be flagged as solved.

Thanksalot for being patient with me and helping me out it was quite a ride to learn
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Is a virtual NAS practical/sensible way to access my Linux(ext4) partitions from Win7 drumlight Linux - Virtualization and Cloud 5 08-31-2012 04:20 PM
Problems with creating LVM in dual boot (CentOS/Win7) system jeff_schaffzin Linux - Newbie 4 07-28-2011 05:48 PM
CentOS Win7 Dual boot on NVRaid (fakeraid) dextermetzger Linux - Hardware 3 06-27-2011 10:17 PM
Win7 and dual Ubuntu 9.10 partitions asookazian Linux - Newbie 32 03-28-2010 11:21 PM
Merging Harddrive Partitions josegata Linux - Software 2 05-12-2006 07:30 PM


All times are GMT -5. The time now is 12:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration