Dual booting with Windows 7 and CentOS just doesn't work

General support questions including new installations
Post Reply
cleger
Posts: 7
Joined: 2010/10/02 23:34:27

Dual booting with Windows 7 and CentOS just doesn't work

Post by cleger » 2010/10/02 23:46:57

Hello all,

I'm a visual effects artist and although many VFX post production houses use linux, I've always used windows because of the programs. At this point, I've migrated to different programs which are also available on linux. The only set of programs I won't have, would be the Adobe Suite. So, I decided to finally start using linux again. I used it back when I was a kid for a few years, but just to have it really. We mainly use macs at work, but I'm switching to linux now.

Since I mainly use Autodesk Maya, the first choice would've been RHEL. Which is why I'm here now, you can guess.

I've downloaded the .iso of CentOS 5.5 and checked it against the hashes and it came out fine. I burned it to a DVD and booted my main computer (I have 3 I plan on installing it onto) and tested the media, came back fine.

I have two HDs, one 1.5TB SATA and one 150GB SATA. The 1.5TB is the C: drive of windows, and I've shrunk it to allow 80GB for linux.

So that is sda. sda1 is the windows partition and I make sda2 ext3 out of the empty space by choosing the custom partition scheme. It installs fine.

However, booting up the computer boots straight to windows. No GRUB.

I've reinstalled many times now, changing the GRUB from sda to sda1 to sda2. Nothing.

http://www.iceflatline.com/2009/09/how-to-dual-boot-windows-7-and-linux-using-bcdedit/

I've adapted that guide to CentOS and tried that, but whenever I select the CentOS option during bootup, the computer instantly restarts itself.

I've tried reinstalling the GRUB via a Live CD like many googled sites say to, but I always get errors.

If I find the /boot/grub/stage1, it says it can't be found.
If I try to setup GRUB, it says /boot/grub/stage1 is unreadable

So, I download the Ubuntu CD and install that. I use the guide previously posted to do the same thing, by installing GRUB onto sda2 where Ubuntu is.

So I pick that option on startup and it brings me to Ubuntu's GRUB menu. It all works fine. CentOS doesn't though.

Ubuntu is using GRUB2, so it has a grub.cfg file. Inside the file near the end, it lists Ubuntu as (hd0,2) and windows as (hd0,1).

That shouldn't be right? What's (hd0,0) then?

The CentOS grub.conf file lists CentOS as (hd0,1) and windows as (hd0,0). That should be correct. But I change it anyway to (hd0,2) and (hd0,1) and it still doesn't work.

Does anyone know what is going on here? What are my options or what can I do to help you help me?

azca
Posts: 174
Joined: 2006/06/03 18:06:13
Location: Peoria, AZ USA

Dual booting with Windows 7 and CentOS just doesn't work

Post by azca » 2010/10/03 03:49:17

I don't know if this will help, but have you tried reinstalling GRUB using your CentOS installation disc instead of a Live CD?

http://wiki.centos.org/TipsAndTricks/ReinstallGRUB

In your case, it looks like:
[code]
# grub-install /dev/sda2
[/code]
Should do the trick.

Also, CentOS GRUB (Legacy) begins partitions with "0". So (hd0,0) would be /dev/sda1.

Whereas Ubuntu's GRUB2 begins partitions with "1". So (hd0,1) would be /dev/sda1.

cleger
Posts: 7
Joined: 2010/10/02 23:34:27

Re: Dual booting with Windows 7 and CentOS just doesn't work

Post by cleger » 2010/10/03 14:46:13

Are you talking about using linux rescue under the options?

Yes.

I just tried again as well. Once I get to the shell, I type chroot /mnt/sysimage so I'm at my installation, then grub-install /dev/sda2

I get:

The file /boot/grub/stage1 not read correctly


I just cd into /tmp and I found some files called grub-install.log.****** where ******* are random numbers and letters. Each one has the following line

grub> dump (hd0,1)/boot/grub/stage1 /tmp/grub-install.img.Zkc998
Error 18: Selected cylinder exceeds maximum supported by BIOS
grub> quit


I noticed when I shrink my drive, and then with CentOS create a partition for linux, there's one cylinder of free space left in the middle which occupies one cylinder head. I doubt that has anything to do with this because Ubuntu installed just fine with the same problem.

I tried typing grub in rescue to get into the grub shell. When I typed root(hd0,1) to start with the install, I get the same error from that log file.

So that seems to be the problem. From just looking at that error it seems like my BIOS doesn't like huge partitioned drives, or at least GRUB is saying that because on the same partition I've successfully installed Ubuntu. So maybe this is a legacy GRUB issue?




EDIT: A little more looking around. GRUB docs say that means the partition is too far ahead on the disk, way after the 1024 cylinder lookup the BIOS does. However, my motherboard is fairly new, an ASUS P5KPL-CM, able to support Core2Duos and with obvious SATA support, so I shouldn't have this restriction right?

It says the solution is to make a small (under 1024 cylinders) /boot partition at the beginning of the drive. This isn't the best option for me, as that would make me format my windows partition, right? I'm still very confused, because Ubuntu using GRUB2 boots up just fine. I might have to install an older version of Ubuntu with the legacy GRUB and see if that works. If that does, then this is a problem with GRUB .97 right? And in that case, can I update the GRUB on CentOS via linux rescue or a Live CD?

azca
Posts: 174
Joined: 2006/06/03 18:06:13
Location: Peoria, AZ USA

Re: Dual booting with Windows 7 and CentOS just doesn't work

Post by azca » 2010/10/03 16:30:30

At this point, I would try installing CentOS on a single hard drive unencumbered by Windows or partition peculiarities. You mentioned that you have a 150GB HD, so would a CentOS install on that drive, by itself, be an option?

Also, I would take a look at the BIOS settings, and check to see if the BIOS is up to date.

Other than that, I'm stumped at the moment. :-?

cleger
Posts: 7
Joined: 2010/10/02 23:34:27

Re: Dual booting with Windows 7 and CentOS just doesn

Post by cleger » 2010/10/03 17:21:07

I was thinking of that as a last resort.

Here's how I currently have it setup:
1.5TB is Windows 7 and programs and normal data stuff.
150GB is a shared drive to my two other computers. I have a small renderfarm setup here so I use that drive as the drive to store the jobs for.

If I go that route, I'd like to resize the Windows partition down to like 400GB, and then format the 1.1TB and use that as the shared project drive, and then use the 150GB drive for just linux. I should've thought about it that way in the first place, but I didn't.

Another route I was going to take, would be to install Ubuntu on a really small partition of the 1.5TB, and use the rest of the 100GB I set aside for CentOS, and just add the CentOS partition to Ubuntu's GRUB2 menu. That might work, but it's a little sloppy.

I'd like to see if the BIOS is up to date, but I have always been VERY skeptical about updating the BIOS, so many stories of things going wrong and completely screwing the computer to an unrepairable point. On top of that, looking at ASUS's site, I can't find my motherboard, except for the shopping part of it. They list the P5KPL-AM, but not CM. A google search revealed some BIOS updates for mine, but I have no idea if I can trust the websites.

azca
Posts: 174
Joined: 2006/06/03 18:06:13
Location: Peoria, AZ USA

Re: Dual booting with Windows 7 and CentOS just doesn

Post by azca » 2010/10/03 18:13:57

Yes, I hear what you're saying regarding BIOS updates. But if you later decide to give that a try, this appears to be the ASUS site for the P5KPL-CM:

http://www.asus.com/Product.aspx?P_ID=6nnVb6RBxd7PhGmt

cleger
Posts: 7
Joined: 2010/10/02 23:34:27

Re: Dual booting with Windows 7 and CentOS just doesn't work

Post by cleger » 2010/10/03 19:15:24

Thanks for that link, I searched using the box on their site but came up with nothing, and quickly looked through the entire list of products, but it must not have been in alphabetical order or something.

I'm running a complete defragmentation of that system right now so I can size the partition down to as early of a cylinder as possible, and I'll probably update the BIOS while I'm at it.

Then, I'll decide whether to just try it again or install CentOS on the 150GB drive. Either way, I'll be posting back here with the results.

Post Reply