Help - Search - Members - Calendar
Full Version: Really Need Help, Can't Boot Winxp
Linuxhelp > Support > Technical Support
mattinthahouse
Hi everybody,

I have two hard drives one 8gb the other 40gb. On my 40 I have WinXP with an NTFS file system. I downloaded RedHat 9 and made my 8gb my slave drive. I installed Linux on the 8gb thinking that I would get a boot screen so I could select either Windows or RedHat. When I did the computer booted from the hard drive and then froze with the word "Grub". So I unplugged the linux hard drive and tried to boot back into windows. It froze with no word. Now I can only boot to Linux through a linux boot disk. I want to get my windows back because I have alot of important documents on there. I was thinking if I could get access to the windows drive through linux I could copy the files over but I don't know if that would even work because I've tried to fdisk both drives and format but it says that there are no drives. When I put the WinXP CD in to boot it doesn't read it and when I use a boot disk and run in DOS it says setup.exe cannot be run in DOS mode. Please I really need to get back into windows without loosing my data.

Thanks.
Robert83
Hi,

Boot the computer with either a DOS boot cd or boot floppy, and type fdisk /mbr [if I'm right], this will fix the mbr for win, and you'll be able to start up windows from you're 40GB hard disk driver.

Sinerely
Robert B
mattinthahouse
Which drive should be the boot drive the 40gig or the 8 with linux on it?
Robert83
the 40GB

to make things easier since linux is on the 8GB, remove that drive [the 8GB],

and leave only the 40GB hd inside the computer
boot up with a bootdisk

and type the command : fdisk /mbr

and after it's done rewriting the master boot record [it does not alter the partition table so files are safe, tough microsoft does not reccomends doing this if you've got more then 4 partitions [I did it with 5, maybe luck dunno].

You should be fine with this soulution, reboot and pray smile.gif

Sincerely
Robert B
mattinthahouse
Ok I unplugged the drive and booted up through a boot disk and i typed in fdisk/mbr and it said that there are no fixed drives, i don't know what to do now.
mattinthahouse
please i really need some help i have to get back onto my windows hard drive so i can work on my work documents.
hughesjr
When you installed Windows XP on the Computer ... was it installed with only the 40gb drive in ... or were both drives present?

If both drives were present .... what was the configuration of the drives when Windows XP was installed? (ie which drive was primary and which drive was secondary).
mattinthahouse
When I installed Winxp on the 40 gb it was the only drive in the computer, I just recently aquired the 8gb one.
Robert83
Hi,

then make sure that it's detected correctly in the BIOS, if you use Gigabyte moterboards for example [those with the via 266 chipset], the hardisk is often not detected correctly until you press enter to redetect it, but you should do this anyway, you should check if you're BIOS actualy can see you're hard drive and shows 40GB , ...and after that try again,
boot cd or floppy , and fdisk /mbr

Sincerely
Robert B

ps.: check bios to see if it can actualy see you're hd, maybe when you removed you're 8GB disk , one of the cables got lose, or something,...it could be a possibility , make sure that you're 40GB HD is ENABLED in the bios [NOT JUST DETECTED!!!]
xiphenull
[edit] nevermind tongue.gif
mattinthahouse
Hi, I tried to get into my bios but my computer takes like 3 mintues to get to the boot screen and I can't get into the bois it just starts booting linux. I know that the 8gb one works because i can boot linux and even when i try to access the hard drive from DOS it says the same thing that " no fixed disks present " please help.
hughesjr
OK ....

Looks like somehow your grub wasn't installed correctly ...

Put the XP as Primary Master and the 8gb drive in as slave and boot from the linux boot disc into linux.

Login as the root user.

Open a terminal window and go the /boot/grub directory like this (unless otherwise noted, type all commands in the root terminal window):

cd /boot/grub

edit the file menu.lst like this:

gedit /boot/grub/menu.lst

If there is nothing that looks like this:
CODE
title Windows XP
      rootnoverify (hd0,0)
      chainloader +1


Then add it to the bottom of the file.

there should also be an entry similar to this in there (the version may be different, but everything else should be similar):
CODE
title RedHat Linux
       root (hd1,0)
       kernel /vmlinuz-2.4.20-30.9 ro root=LABEL=/
       initrd      /initrd-2.4.20-30.9.img


Now save the gedit file and exit gedit....

Go back to the terminal window ... you should still be in /boot/grub

type the command:

grub

You are now at the grub prompt ... type this:

root (hd1,0)

it should tell you the filesystem type ... type this command:

setup (hd0)

if there is any errors indicated, do the command again:

setup (hd0)

now you are ready to exit and try to reboot ... tyoe this command:

quit

Now you can close the terminal window and reboot the computer ... you should have a menu with RedHat 9 and Windows XP ... and both should boot.
mattinthahouse
Hi, I did everything and it said that it was successful in the terminal then when it rebooted it started loading GRUB and then it says this: " Grub Loading Stage 1,5" "Grub Loading please wait" "Error 21"
hughesjr
is that for Windows XP, for Linux, or both?
Robert83
Hi,

I've fixed the problem, I've installed my boot partition on my non removable hd2 a 100mb boot partition, now grub can load just the way it likes to load, and I can safely remove my hard drive anytime and place in my movie hard drive.

Thank you anyway.


Sincerely
Robert B
mattinthahouse
That is for WinXP linux boots fine with the boot disk.
mattinthahouse
Also when I go into the Hardware Browser and Hard Drives it shows both my 40gb with WInXP and the NTFS file system showing up and the 8gb with Red Hat. The 40gb has a name of hda1 and the 8gb has hdd1, hdd2, hdd3. 1 and 2 are "ext3" and the 3rd is "linux-swap" i don't know if that helps.
hughesjr
Yep ... that helps.

I thought you had it on Primary slave ... (hdb), but you have it on secondary slave (hdd) ...

OK, as root in a terminal window:

cd /boot/grub

grub


at the grub prompt, then issue this command:

root (hd3,0)

then issue the command:

setup (hd0)

then exit with:

quit

then reboot and everything should work...
mattinthahouse
Ok when i entered root (hd3,0) it gives me a message saying " Error 21: Selected disk does not exist"
hughesjr
are you sure it says hdd and not hdb ....

what is the output of :

fdisk -l /dev/hda

fdisk -l /dev/hdb

fdisk -l /dev/hdc

fdisk -l /dev/hdd
mattinthahouse
are those commands in the terminal?
mattinthahouse
hda: Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

hdb: Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

hdc: Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

hdd: Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

It just says the same thing every time.
hughesjr
the switch is a lower case L, not an upper case i

fdisk -l
mattinthahouse
[root@localhost grub]# fdisk -l

Disk /dev/hdd: 8455 MB, 8455200768 bytes
255 heads, 63 sectors/track, 1027 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 13 104391 83 Linux
/dev/hdd2 14 995 7887915 83 Linux
/dev/hdd3 996 1027 257040 82 Linux swap

Disk /dev/hda: 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/hda1 * 1 4865 39078081 7 HPFS/NTFS
Robert83
Hi,


Well you're 40GB drive is formated with NTFS, and from a boot disk , you can only see FAT / FAT32 drives, I think you'll love NTFS after this...

Possible solutions :


Install Win9x or WinXP on you're 8GB drive, get Partition Magic 8 from somewhere www.google.com and search for it,

install partition magic and convert you're 40GB drive to FAT32, and then you'll be able to see it from Dos, BUT IF YOU ONLY HAVE one big 40GB NTFS partition, be careful not to format the drive, try fdisk /mbr again, I don't know if it'll work with a drive converted from NTFS to FAT32 [NTFS CONVERTION DOES WORK, I've tried it several times with Success], and after the fdisk /mbr reboot you're computer and hope that you'll computer will start WindowsXP

Sincerely
Robert B
hughesjr
OK ... one more thing to try

in a terminal (as root)

grub-install --recheck /dev/hda

then go to /boot/grub

cd /boot/grub

look at the file device.map

cat device.map

post what it says...
mattinthahouse
cat: device.map: No such file or directory
mattinthahouse
Oops sorry here's what it says:

[root@localhost grub]# cat device.map
# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hdd
hughesjr
Edit it and make it look like this:

# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdd


then do this:

(from within /boot/grub as root)

grub

root (hd1,0)

setup (hd0)

quit


then reboot
mattinthahouse
how do I edit it?
hughesjr
you can use gedit ... from the terminal window (from inside /boot/grub as root) type:

gedit device.map
mattinthahouse
Ok after I do that and reboot it give me the same error:

Grub Loading stage 1,5

Grub loading please wait
Error 21
hughesjr
there is something wrong wrong with linux reading your WinXP drive ...

try this from linux:

grub-install /dev/hda

then try rebooting
mattinthahouse
still gives me the same error message.
hughesjr
I think there is something wrong with the boot sector of the XP partition ... I recommand fixing like this:

Boot from your Windows XP CD, and enter the recovery console per these instructions

Once you get in the console (you are at step 5 in the above link) you will use the fixboot command like this:

fixboot c:

Then type exit to exit the recovery console, then reboot the machine and remove the CD ... try to boot WinXP from the C drive...
mattinthahouse
yeah i tryed but i can't get my windows xp cd to boot. The bios is alright and everything.
hughesjr
Go here and download the proper boot floppies for your CD (XP Home, XP Pro, etc.) and boot from the setup floppies instead of the CD ... make sure to enter the Recovery Console....
mattinthahouse
how do I install the .exe file in Linux to create the boot disks?
hughesjr
can't ... you'll have to do it on a windows PC somewhere....
mattinthahouse
Ok i booted from the floppies, got into the recovery console and fixboot c: it said do you want to replace to boot thing and I said yes, it made a new boot thing and i restarted with the linux drive unplugged and the xp one as the master. It still didn't work and came up with the GRUB loading and error 21. What should I do now?
hughesjr
You can boot to the repair console agian and this time try the fixmbr command ....
hughesjr
BTW ... you shouldn't unplug the linux drive....grub is installed on it, so it won't work with the linux drive unplugged.
mattinthahouse
OHHHHHHHHHHHHH MYYYYYYYYY THANK YOU SOOOOOOOOOO MUCHHHH!!!!!!!!!!!!!!!!!! biggrin.gif biggrin.gif biggrin.gif biggrin.gif biggrin.gif biggrin.gif biggrin.gif biggrin.gif It finally worked! THANK YOU all soo much!
hughesjr
Gald you got it working... biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.