LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-01-2013, 08:05 AM   #1
maxgsp
LQ Newbie
 
Registered: Jun 2004
Posts: 22

Rep: Reputation: 1
need to repartition hard drive to install Linux alongside Windows 7


I'd like to install CentOS 6.3 on a pc that already has Windows 7 installed and make the system dual bootable. The problem is that the Windows 7 installation uses 4 primary partitions on the hard drive (/sda1=mbr, /sda2=c:, /sda3=d:, /sda4=t: (temp)). I've shrunk the partitions to give me enough room for the Linux distro. Is there a way to change /sda4 from a primary partition to an extended partition? do I have to delete it and then add it back in under an extended partition? Is there another or better way to accomplish this task? thanks
 
Old 05-01-2013, 08:24 AM   #2
perseus12
LQ Newbie
 
Registered: Oct 2012
Distribution: Slackware 14.1, FreeBsd 10.1
Posts: 28

Rep: Reputation: Disabled
Hi maxqsp:

I've come across your type of situation before, so I can tell you what I did, although it may not be the optimal method.

1. backup your data
2. create a recovery disk for your windows installation
3. test to see that it works, i.e. boot up to it and take it as far as you
would like: either do the actual reinstall or quit just before you have to
commit;
4. boot up to some Linux recovery disk or live disk; any Linux disk that has
cfdisk
5. use cfdisk to repartition the HD so that it has ONE partition ONLY,
say about 50% of the drive; the other 50% is unpartitioned (I had to do this
because for me if windows can see it, it would use it).
6. install windows on the single partition
7. bootup and reuse cfdisk to partition the unused partition as you prefer,
i.e. /, /home, /user...
8 install Linux

I had to use this method because I could not find any software I could trust to
move windows data from one partition to another.

If you figure out a better way let us know.
Good luck
 
Old 05-01-2013, 10:41 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,300

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
If this is an OEM install of windows 7, sda1 is probably your boot partition and sda2 contains the windows system files. Don't do anything with either. You should be able to resize whichever partition is the largest with an option in Disk Management. You don't indicate what you have in sda3 or sda4?

Anytime you are changing partitions, you should have a backup of data that is important to you.
Do you have a windows 7 installation CD/DVD?
Do you have a Recovery CD/DVD?
If you need to use a Recovery CD/DVD, it will reset to factory defaults.
You could resize after saving your data to an external medium, then delete one of the partitions (sda3 or sda4) and create an Extended partition and logical partition(s) within the Extended for CentOS.

It would be difficult to give specific advice without partition info. You could run the 'fdisk -l' and 'df -h' commands from a terminal in CentOS or any Linux Live CD to get that info to post.
 
Old 05-01-2013, 10:48 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
If d:\ is your data drive you can backup data, change it to etxended recreate d:\ then install linux to free space within extended.
 
Old 05-01-2013, 12:51 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,189

Rep: Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507
the first thing i would do is call MS on the phone ( or on microsoft.com ) and order a full install dvd
it is free but they will mail it to you ( allow a week or 2 )

the OEM's put a "recovery" partition as the FIRST partition ( seeing as MS no longer sends out a install dvd with every computer)

-- i never liked that ,if win7 gets infected( likely) ,then that recovery partition is ALSO infected and untrusted

with the install dvd there is no need for this recovery partition .

--- up to you if you want that recovery partition or not
but it takes up a lot of space and one of the 4 primary partitions

yes you can change sda4 to an extended , but NOT in windows

Gparted live CD
http://gparted.sourceforge.net/
burn "GParted Live 0.14.1-6" to cd ( .16 has a NASTY BUG !! -- read the warning on the download page !!!!!!!!)

boot into the live cd and reformat sda4 to extended
and add partitions for CentOS

Warning:
CentOS 6.3 is unsupported !
please download and burn to dvd the current version !
CentOS 6.4
 
Old 05-01-2013, 01:43 PM   #6
SLW210
Member
 
Registered: Apr 2013
Location: South Central Florida
Posts: 43

Rep: Reputation: 10
Quote:
Originally Posted by John VV View Post
the first thing i would do is call MS on the phone ( or on microsoft.com ) and order a full install dvd
it is free but they will mail it to you ( allow a week or 2 )

the OEM's put a "recovery" partition as the FIRST partition ( seeing as MS no longer sends out a install dvd with every computer)

-- i never liked that ,if win7 gets infected( likely) ,then that recovery partition is ALSO infected and untrusted

with the install dvd there is no need for this recovery partition .

--- up to you if you want that recovery partition or not
but it takes up a lot of space and one of the 4 primary partitions

yes you can change sda4 to an extended , but NOT in windows

Gparted live CD
http://gparted.sourceforge.net/
burn "GParted Live 0.14.1-6" to cd ( .16 has a NASTY BUG !! -- read the warning on the download page !!!!!!!!)

boot into the live cd and reformat sda4 to extended
and add partitions for CentOS

Warning:
CentOS 6.3 is unsupported !
please download and burn to dvd the current version !
CentOS 6.4
It is the OEM that doesn't provide a Recovery CD or (best option) a Windows Installation disk, not MS, so you might see if the OEM might send you the Installation disk, I'm pretty sure you won't get a FREE disk from MS.

If you plan on keeping Windows, read these articles on the recover back-up recomendations (similar to perseus12 advice) ....Can a recovery partition be infected? I don't have installation media for Windows - what if I need it?
 
Old 05-01-2013, 02:07 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,189

Rep: Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507
i got a win7 install dvd FREE from Microsoft
It took about a week for it to show up in the US mail

I needed to use the activation code on the computer to use it
but it was free from Microsoft
now the the MS office 2012 i had to reinstall on my dad's computer , that was a download ( also FREE) but needed the activation code that came with his computer- it is now on a dvd
 
Old 05-02-2013, 12:35 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I forgot you also need to check in disk management to see if the partitioning type is Dynamic or not as I was informed here at LQ that linux won't work with Dynamic partitioning scheme.
 
Old 05-02-2013, 01:05 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,189

Rep: Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507
Quote:
linux won't work with Dynamic partitioning scheme.
?
Question
by "Dynamic" do you mean a logical partition ?
if so
i do believe that grub2 will boot on a "logical partition"

HOWEVER CentOS 6.4 is using Grub 0.98 ( legacy )

That must have grub on a primary partition

now
centos is 100% fine in chainloading to the MS bootloader for win7
but grub must be on a primary partition

For a LVM install ( fedora default)
grub will need to be on a primary and the rest can be a LVM

Last edited by John VV; 05-03-2013 at 11:47 AM.
 
Old 05-03-2013, 12:58 AM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Dynamic & basic disk
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
 
Old 05-03-2013, 11:58 AM   #11
maxgsp
LQ Newbie
 
Registered: Jun 2004
Posts: 22

Original Poster
Rep: Reputation: 1
Thank you all for your input. Your recommendations resolved my problem.
 
Old 05-04-2013, 01:29 AM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by maxgsp View Post
Thank you all for your input. Your recommendations resolved my problem.
Can you please let us know how you resolved so as to help others who may have same problem?
 
Old 05-06-2013, 08:10 AM   #13
maxgsp
LQ Newbie
 
Registered: Jun 2004
Posts: 22

Original Poster
Rep: Reputation: 1
Here are the steps I performed:

I used gparted live to do the partitioning.
I deleted the Windows Temp partition, (/dev/sda4) and shrunk the remaining partitions.
I created an extended partition,then recreated Temp (ntfs filesystem) as a logical partition under it.
Next I installed CentOS 6.4 and chose the "Use Free space" installation option. I took the default Linux partitions.
That's about it.

I had to comment "hiddenmenu" in /boot/grub/grub.conf so I could choose my Windows or Linux kernel during boot without missing the window to hit the esc key.

Last edited by maxgsp; 05-06-2013 at 08:31 AM.
 
1 members found this post helpful.
  


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
Repartition hard drive w/o losing data, centOS 5 sir-lancealot Linux - Server 3 06-05-2008 10:51 AM
Need To Repartition hard drive in ubuntu hallows1 Linux - Hardware 1 04-02-2007 06:39 PM
Can I buy a Dell pc and then install linux alongside with windows xp media center? cal_gecko Linux - Newbie 14 07-26-2006 04:22 PM
Repartition Hard Drive Mounts atomicx Linux - General 4 06-02-2006 03:55 PM
Hard Drive repartition crashed crewblunts Linux - Hardware 7 02-07-2004 11:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:51 AM.

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