Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
I installed XP on one partition, boot it and configured it. Then I installed RedHat Linux 9 on another partition with the GRUB bootloader, and then boot RedHat. No problems. Then I rebooted and the GRUB menu came up with Linux and DOS (it calls Windows "DOS" because it doesn't know what Windows is).

When I click DOS, it prints a few simple statements as though it were preparing to do something... and then... does nothing. I've let it sit for 15 minutes, it never boots Windows.

So here I am, writing from Linux on Mozilla Firebird (which isn't a bad browser, I'm now noticing), unable to get into windows.

Should I do another clean XP install on that partition?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
simply reinstalling windows might not be a good idea at this point as that tends to completely screw up your linux boot management (I'm sure if you make linux boot disks you can go back and fix it after, probably some here know much more about this than me).

Did you make windows boot disks? Also, have you tried booting from your windows install cd? maybe safe mode or a repair would bring more clues to light?
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Check out the GRUB conf, should be in /boot/grub/grub.conf or /boot/grub/menu.lst
Might be something funny there.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Reinstalling Windows should certainly not be necessary. Usually, the Linux installers do a pretty good job of accomodating Windows as a dual-boot. Do you have any kind of unusual disk situation - RAID, mixed IDE/SCSI, etc. ? Or did you perhaps specify any options to the boot loader during setup?

If you post the contents of grub.conf (do cat /etc/grub.conf, highlight, and middle-click in a browser to paste), we can probably fix things up.
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Originally posted by: Sunner
Check out the GRUB conf, should be in /boot/grub/grub.conf or /boot/grub/menu.lst
Might be something funny there.

What sorts of weird things am I looking for?

All it says under DOS is

rootnoverify (hd0,4)
chainloader +1

Is that what it's supposed to say?

Alphathree33
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/hde1
# initrd /boot/initrd-version.img
#boot=/dev/hde
default=2
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-28.9)
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-28.9 ro root=LABEL=/ hdb=ide-scsi
initrd /boot/initrd-2.4.20-28.9.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ hdb=ide-scsi
initrd /boot/initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,4)
chainloader +1
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: Alphathree33
I'm using a PROMISE IDE Controller for ATA-100 support.
Hrm... that's definitely the issue. The BIOS and the OS use somewhat different methods for numbering disks, and in this case they're working against one another.

To clarify, what exactly is the disk situation here? Is everything on a single disk, on the Promise controller? Or something else?

 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Originally posted by: cleverhandle
Originally posted by: Alphathree33
I'm using a PROMISE IDE Controller for ATA-100 support.
Hrm... that's definitely the issue. The BIOS and the OS use somewhat different methods for numbering disks, and in this case they're working against one another.

To clarify, what exactly is the disk situation here? Is everything on a single disk, on the Promise controller? Or something else?

I've got one promise controller running one physical IDE drive with two partitions.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
title DOS
rootnoverify (hd0,4)
chainloader +1



In this change hd0,4 to hd0,1 or hd0,0

hd0,0 = first harddrive, first partition.
hd0,1 = first harddrive, 2nd partition.

Also grub's naming convention doesn't make any distention on which IDE device or SCSI device or anything. Just the first drive it detects or is installed in or something like that.

Grub uses programmer's number counting, which like computer's natural counting method. Zero is the first number. So you start counting from zero not one, like in most sane places.


The one major thing that doesn't match is when you have a number 4 for a partition. Since max x86 partitions = 4 you make the 4th the extended partition and then all the logical partitions fall in this. Just like DOS or windows stuff.

However it's possible to have 1 primary and 1 extended with 3 logical partitions inside it. (for example).

But irregardless grub will always make the first extended partition the number 4 partition. So (if I am correct) in my 1 primary and one extended with 3 logical partitions you would have the possible options of:
hd0,1
hd0,4
hd0,5
hd0,6

So is your windows partition on a logical partition?

If not try making the dos section look like this:

title DOS
rootnoverify (hd0,1)
chainloader +1

You can add multiple choices, plus it's possible to manually do it. This config aproximate's you entering commands into the grub command line. If you hit "c" that should get you to a command line.

Then to manually select you would go
grub> rootnoverify (hd0,0)
grub> chainloader +1
grub> makeactive (I don't know if you need makeactive each time or even once, but it flags the partition as a active boot device for the bios)
grub> boot

if you press "?" it will show you possible options... like if you go

grub> rootnoverify (hd0,?

It should show you possible partitions to choose from.

You can even go
grub> ?
grub> rootnoverify ?
grub> rootnoverify (hd?
grub> rootnoverify (hd0,?
grub> rootnoverify (hd0,1)

to get help on each step of the way...

That way if you don't get something right in the menu or you have a typo or something then you can still manually type in your boot selection. Saved my butt plenty of times and is a big improvement over lilo or a windows boot loader.

Also once you edit your grub.conf or menu.lst then the changes are automatic, no need to re-run any commands the grub loader reads the config file each time it boots up.

Of course the commands differ from using windows vs linux selections.

Also the chainload +1 means that you go to the beginning of the partition and select what ever bootloader is installed their and then boot up using it. I beleive the ntldr boot loader is self contained in your windows partition, the only thing that is installed in the MBR is something to point the computer to the NTLDR. But not sure about that, could be wrong. But installing grub or linux shouldn't completely disable anything in windows or it's loader unless you accidently formatted it. :)


Hope that's accurate and makes sense. :)
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Okay I've tried a number of things... hd0,1 and hd0,4

With either of those and chainloader +1, nothing happens.

If I throw in makeactive, it says "invalid device". (It says makeactive can only be used on primary partitions in the help file, I don't think my windows partition is primary but I could be wrong, not sure what DRUID did with it)

The question mark help thing doesn't seem to work.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
crap. I was hoping the question mark would help you out.


What is your harddrive setup? You just have 2 partitions 1 for linux, 1 for windows.. what about the swap partition?

if your in linux right now what is the output of the command df?

that should show the partitions that are being used...

Then using the /dev/hd* (was it /dev/hde ?) name of your harddrive try to look at the dialog you get from "cfdisk /dev/hde" I assume you don't have any extended/logical partitions correct?

did you try (hd0,0) ?

I am guessing that your windows partition is going to be /dev/hde1

can you mount it to your system, is already mounted?

if not as root do:

mkdir /mnt/winhd
mount /dev/hde1 /mnt/winhd

then
cd /mnt/winhd
ls

does that show all your windows files?

Basicly I am just trying to make sure that I have all your partition information straight in my head and how you have your partitions set up.
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hde1 9.7G 2.2G 7.1G 24% /
none 125M 0 125M 0% /dev/shm

This is correct -- I made one 10 GB partition for Linux and one 30 GB NTFS partition for Windows. df can't see the NTFS, so it's giving me the 10GB. Makes sense, doesn't it? The swap is on the same partition.

[root@localhost /]# fdisk /dev/hde1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 1274.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Oh and I didn't try hd0,0 because grub.conf is already booting linux from hd0,0... so why would Windows be there too?
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
OKay I just tried running hd0,0 with rootnoverify and chainloader +1... it gave an error. It also gave an error with hd0,0 with root and chainloader +1.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I ment do

cfdisk /dev/hde
not
fdisk /dev/hde1

cfdisk is a different partitioning utility that is a bit more pleasent to use then just the old fdisk.. although fdisk would of worked out fine, it's just a bit weird because you have to type in "p" and then enter to show the partition information and the partition information is shown automaticly with cfdisk as part of a little menu, so it's easier to use (and cfdisk is better then fdisk anyways) (oh and be sure to exit without saving...)

When you just do the /dev/hde1 your telling it that the specific partition hde1 is the entire disk, and it can't tell the difference.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: Alphathree33
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hde1 9.7G 2.2G 7.1G 24% /
none 125M 0 125M 0% /dev/shm

This is correct -- I made one 10 GB partition for Linux and one 30 GB NTFS partition for Windows. df can't see the NTFS, so it's giving me the 10GB. Makes sense, doesn't it? The swap is on the same partition.
Yes, the df comments make sense. RH doesn't include NTFS support, so the partition won't be mounted, so df won't see it. But how did you put swap on the root partition? I didn't think the RH installer would allow you to do that. Whatever, probably not important...

The linux partition at hde1 is unusual. I guess that you made both partitions first, installed XP to the larger one, and then installed Linux to the first one? Is that correct? Also, to eliminate other possibilites, did you at any point change the boot order in your BIOS while you were doing all this installing?
[root@localhost /]# fdisk /dev/hde1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
hde1 is a partition. You can't fdisk a partition, only a disk. So try hde. Better yet, do fdisk -l /dev/hde (that's an "el", not a "one") to get convenient output.

 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Disk /dev/hde: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hde1 * 1 1275 10241406 83 Linux
/dev/hde2 1276 4864 28828642+ f Win95 Ext'd (LBA)
/dev/hde5 1276 4864 28828611 7 HPFS/NTFS
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Ick. hde5 is a logical partition, which means something is really not right here. I wouldn't even think Windows would let itself be installed to a logical partition, but I have some dim memory of seeing something like this once, and it was a big mess. If (hd0,1) and (hd0,4) didn't work, then I think you're screwed.

Even if you're not, I'd really suggest reinstalling both systems to get yourself a more sane disk setup. Don't try any tricks. Boot from the XP CD, delete all partitions, and create one 30GB partition for XP to install itself on. Boot from the RH CD, make a swap and a root partition, and the installer should take care of all your booting.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
/dev/hde2 1276 4864 28828642+ f Win95 Ext'd (LBA)
/dev/hde5 1276 4864 28828611 7 HPFS/NTFS


So /dev/hde2 is the extended partition and /dev/hde5 is logical partition that your windows stuff is installed on....

So grub's original (hd0,4) is correct.

You should be able to mount ntfs partitions to your directory. Linux generally supports the ability to read safely from NTFS, but writing is usually disabled because that part of NTFS support is stuff experimental.

so make sure that all the information is there:
mkdir /mnt/winhd
mount -t ntfs /dev/hde5 /mnt/winhd
ls /mnt/winhd

and make sure that all your info is still intact.

That's weird because windows generally only likes to be installed in the first partition on the harddrive. Anything else it doesn't like. Maybe I am missing something in my XP knowledge...

Does windows require special drivers to use the promise card? I am afraid that my knowledge of promise cards and booting windows from a extended partition is limited...


I am going to keep looking around to see if I can find the answer, but hopefully someone here knows it..

I would considure trying to use Lilo at this point instead of grub and see if lilo is any smarter...

But (hd0,4) should be the right one since it is the first logical partition...

However this this guy says that windows can only boot from a primary partition

And you did that when you installed windows, right? It booted up ok?

Maybe you can make a little fat32 partition before the extended partition and put all of windows boot stuff into their, (the boot.ini ntldr etc etc)

It might be easiest to try to get rid of the extended/logical partition setup and then reinstall windows inside a primary partition. Also while your at it give yourself a 512meg swap partition for Linux, this is better then having a swap file and is faster, too.

Here's generally what you do when you want to dual boot windows and linux. (in your case I'll use /dev/hde as the drive, but normally people explain it with /dev/hda)

Install windows in /dev/hde1 first
Install Linux in /dev/hde2 while making a little swap partition in /dev/hde3

Then that would make it easy to dual boot. I think the extended partiton setup may be what is screwing everything up. :(

There are ways to install windows second but that is a bit harder.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: cleverhandle
Ick. hde5 is a logical partition, which means something is really not right here. I wouldn't even think Windows would let itself be installed to a logical partition, but I have some dim memory of seeing something like this once, and it was a big mess. If (hd0,1) and (hd0,4) didn't work, then I think you're screwed.

Even if you're not, I'd really suggest reinstalling both systems to get yourself a more sane disk setup. Don't try any tricks. Boot from the XP CD, delete all partitions, and create one 30GB partition for XP to install itself on. Boot from the RH CD, make a swap and a root partition, and the installer should take care of all your booting.

My thoughts exactly.

My recommendation is:

/dev/hde1 = windows
/dev/hde2 = linux root
/dev/hde3 = linux swap

Install windows first then linux. The swap file is something that's not needed anymore, but is nice to have and will help out when your running a bunch of stuff at once.

:(
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Generally, I would say that's true. Any attempts to install Windows to a pre-existing logical partition have always been outright refused for me. But one time, I was messing around with the partitions in the XP installer, told Setup to create a new partition, and ended up with the root partition inside an extension, like we saw here. It installed and booted fine, but a later attempt to modify the partition table through Linux borked the whole system. Perhaps there's some variant of Dynamic Disk technology going on here? I don't know, and was never able to find any hard information about it. And I've never seen it happen again since then. In any event, I try to prevent future problems by avoiding the Windows partitioner - I let it create it's own root partition during Setup and that's it. If any more partitions are necessary, I'll do it through PM, Ranish, or Linux.