LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-01-2004, 08:31 PM   #1
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Rep: Reputation: 15
Getting Windows XP and Linux To Work Together


Sorry if this message is offensive to some because it has to do with Windows, but I need help, and the Microsoft newsgroup can't help. I have had Windows XP and Red Hat 9.0 on my computer. Each one has its own hard drive. However, Windows won't boot when the Linux HD is in. It always locked up when loading, where even after 30 minutes, it was still at the load screen, the HD activity light on. RH works perfectly though. Right now, I am thinking of upgrading from RH to Gentoo. However, I am in a losing situation right now, with no way to connect to the internet. So I want to temporarily remove my RH 9.0 HD, order a Gentoo CD, install it on a removable HD, and then use it. But the trouble began as soon as I (foolishly) unplugged the HD with RH 9.0 on it. When I went to start up my computer again, I got an error at my bios saying "GRUB hard disk error." It would then show some HD activity, and freeze. After a few times, it froze at the starting screen. I then posted to the Microsoft newsgroup for XP asking for help. I got one reply pointing to an article on how to disable LILO. However, it assumed I could get to Linux or the MS-DOS prompt. I cannot get to either. When I plugged in the RH 9.0 HD again, the BIOS recognized it, but I still got a GRUB boot error. Now, I noticed it was still booting to HD-0. So I replugged in the RH HD, and tried again. At first it didn't recognize the HD, but I did an IDE auto-detect from the BIOS and it recognized it. I gave HDD-1 boot priority, and tried again. it froze up at the BIOS screen, and beeped at me when I pressed anything, even delete to enter the BIOS. So when HDD-1 is in, I cannot get past the starting logo and the BIOS. I put in a livecd to access fdisk when HDD-0 was in and HDD-1 was out, and everything went fine. So from the procedure above, here are the important things.
1. HDD-0(the WIndows HD) won't boot, displaying a GRUB Hard Disk error message.
2. HDD-1(the RH 9.0 HD) won't boot at all.
Now, i have no clue what to do. An XP reinstall would make sense, but I no longer have the XP CD! I need to know the following things:
1. Is it legal to borrow my friends Windows XP disk and use my CD key? If so, will it work?
2. Does anyone see a workaround to my problem?
3. Did this doom my computer?
Sorry for such a long post. I have confused myself all day, andmight confuse some of you. Thanks in advanced for a tough problem. Also, I couldn't determine what forum to put this in, so if it needs to be moved, please move it to a better forum.
 
Old 05-01-2004, 08:57 PM   #2
alrolim
LQ Newbie
 
Registered: Jan 2004
Location: Brazil
Distribution: Red Hat 9
Posts: 3

Rep: Reputation: 0
Have u tried a boot disk

Try a boot disk....
If u dont have one...the CD of your Red Hat probably has one image.
Use rawrite to do this in a windows computer, or try to download some already donne boot/rescue disk's over the internet
[ ]'s
 
Old 05-01-2004, 09:14 PM   #3
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Original Poster
Rep: Reputation: 15
Okay. That didn't work well. i got the Red Hat boot floppy from the Redhat website. Keep in mind the computer locks up at the logo screen when HDD-1 is in. So I unplugged it and could get to the floppy. But then, I couldn't get to HDD-1 with Red Hat. So that won't work. I tried putting in Red Hat Install disk 1, but that failed too, as it wasn't recognized to match the boot media. And I can't get to the internet. Is there anything else that will work? Some way to access the bootloader and delete it?
 
Old 05-01-2004, 10:37 PM   #4
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Borrow your friend's XP disk. You don't need to worry about legalities. Plug it in and hit "R" as it boots up. That should bring you to the recovery console. If it insists on booting to the install screen, let it and then hit "R". This should bring you to a "console" (quites are really intended here -console schmonsole!). Type fixmbr. This should rewrite the MBR with NTloader, which is WinNT/2000/XPs bootloader. You should be able to get into Windows now.

To get back to Red Hat, I always suggest that you swap the drives. Put the Linux drive in as the first and the Windows drive in as the second (as it should be....). Then, you can write grub or lilo to the MBR of the Linux drive. Add Windows to the grub cinfig or lilo config file and then you can boot to either.

The advantage here is that each drive will boot on its own to its own OS regardless of the other

Nobody seems to clue in to this right away. Because the Windows drive is seconf fiddle, but really wants to be first, you have to fool it, so your Windows stanza would tell Windows its on the first drive . Add the line "boot-as=0x80" to the Windows stanza of a lilo.conf and, I think its same type of thing for grub's menu.lst, but you add it to the kernel= line. Haven't used grub in that situation (still learning it, but seems more straightforeward).

I haven't used Red Hat since long before I found the Drake, so I don't know what RH has up its sleeve, but I'm sure there's a comparable feature to the 1st cd as Mandrake's "rescue" option, which allows you to fix the bootloader...
 
Old 05-01-2004, 10:39 PM   #5
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
This lockup, by the way, really sounds like a hard drive jumper thing. Are they jumpered properly? If they are on CS (cable select), that usually doesn't work. Silly setting anyways. You may wanna check that too.
 
Old 05-02-2004, 03:54 PM   #6
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Original Poster
Rep: Reputation: 15
First, I checked the jumpers. i have one on master, 1 on slave. I called a friend who might have XP, but he wasn't home. I will ask him about it tomorrow and try and get it, and then report back.
 
Old 05-03-2004, 05:39 PM   #7
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Original Poster
Rep: Reputation: 15
He doesn't have XP after all. I will play around with the jumpers, and then hope that works.
 
Old 05-04-2004, 07:26 PM   #8
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Fixing the MBR:

Since the XP installation CD seems to be misplaced (or, more likely, the system manufacture didn’t supply one), you can rewrite the master boot record using a Win95/98/ME Startup Disk, if you have access to one. Just to be on the safe side, install the windows-containing drive by itself with the jumpers set to “single” and boot to the windows floppy startup disk. From the command prompt, type:

fdisk /mbr

Windows should now boot from that drive, provided that it is selected as the first boot (hard) drive.

Fixing Grub:

To fix the Grub problem with a dead RHL9 installation, you will first need to make a Grub Boot Disk while running “linux rescue” and then use the Grub Boot Disk to fix the problem. First, install the hard drives or single drive the way you want them to be, using correct jumper settings. If you are unable to mount linux (see below), come back and just install the linux-containing drive.

Then, start the Red Hat installation process using the Installation Floppy Disk (i.e., BootDisk.img) and the first RH9 CD, but type “linux rescue” when it stops to ask what you want to do (note: normally, you would hit “enter” to install RHL9 at this point). After you answer several questions, linux rescue will search for installed linux partitions. Assuming that linux rescue found and mounted the Red Hat partition, remount the partition under root by typing the command:

chroot /mnt/sysimage

Remove the Installation Disk from the floppy drive and replace it with a blank floppy. From the command line, type:

cd /usr/share/grub/i386-redhat
dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

Congratulations! You just made a Grub Boot Disk. Obviously, this would have been much easier to do with a working system.

Now, to fix the boot problem. Boot the system using the Grub Boot Disk and you will get the grub command prompt “grub>”. Enter the command:

find /boot/grub/stage1

It will probably return something that looks like “(hd0,0)” or “(hd1,0)”. It’s telling you where it found the Grub files. Since Grub numbers drives and partitions starting at zero, (hd0) usually means the first drive (i.e., /dev/hda) and (hd0,0) usually means the first partition on the first drive. For the following steps, I’ll represent whatever was returned by “find” as (hdX,Y).

To follow vectordrake’s suggestion about letting the BIOS “drive boot order” select windows vs linux, you would install Grub stage1 to the MBR of the linux-containing drive by entering:

root (hdX,Y) (using the “find” output instead of (hdX,Y))
setup (hdX) (install Grub stage1 to the MBR of the linux drive)

Not intentionally, but I do have WinXP set up that way on one system, where changing the drive boot order selects linux vs. windows. It was completely unintentional.

Alternatively, you may want to return to your original setup, where the first hard drive contained windows. If that is how you wish to proceed, it would probably go like this:

find /boot/grub/stage1
(hd1,0) (= second drive, first partition)

root (hd1,0)
setup (hd0) (install Grub stage 1 to the MBR of first drive)

As a third alternative, if you planned to use a different boot director such as BootMagic, the commands for this example would be:

find /boot/grub/stage1
(hd1,0)

root (hd1,0)
setup (hd1,0) (install Grub stage 1 to the first sector of linux partition)

Hope that helps.
 
Old 05-04-2004, 08:23 PM   #9
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
Desired situation
----------------------
To dual boot Win2K and Debian, using Win2K's boot.ini as the first OS loader, i.e. Upon bootup, boot.ini will display a menu that allows you to choose to boot either Win2K or Debian. Choosing Debian will load the Grub GUI menu, that displays the various versions of Kernel, from which you can boot from (assuming you have more than one version of kernel installed).

My partition layout
------------------------
/dev/hdb1 /
/dev/hdb5 swap
/dev/hdb6 /home

What has been done
---------------------------
- Install GRUB using apt-get install grub
- Run grub
- At grub prompt: find /boot/grub/stage1, of which returns (hd1,0)
- do a 'root (hd1,0)'
- do a 'setup (hd1,0)'
- mount floppy to /mnt
- dd if=/dev/hdb1 of=/mnt/sarge.lnx bs=512 count=1
- umount /mnt
- reboot and copy sarge.lnx into window's C:/
- edit Win2K's boot.ini to include c:\sarge.lnx="Debian"
- reboot

Problem: After choosing Debian from the boot menu displayed by
Win2K's boot.ini, I get a black screen with the word GRUB and a blinking cursor at the top right hand corner of the screen.

Any advice please?

Thanks !


Quote:
Originally posted by WhatsHisName
As a third alternative, if you planned to use a different boot director such as BootMagic, the commands for this example would be:

find /boot/grub/stage1
(hd1,0)

root (hd1,0)
setup (hd1,0) (install Grub stage 1 to the first sector of linux partition)

Hope that helps.
 
Old 05-05-2004, 06:44 PM   #10
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Original Poster
Rep: Reputation: 15
Okay. I don't have any Windows disks period. I am thinking a complete format of the hard drive would be appropriate here, and then an installation of Gentoo. I have already broken two IDE cables, so I feel more bad luck is to come. And the Linux drive appears to be dead, I can't get past the BIOS with it mounted, may it be with the Windows HD or alone.
 
Old 05-06-2004, 07:49 PM   #11
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Don't give up yet.

If you know someone who is running Win95 or Win98 or WinME, ask them to make a Startup Disk for you. To make a startup disk, go to the Control Panel and select Add/Remove Programs. The Make Startup Disk is one of the tabs at the top. You can then boot with the disk and run dos fdisk.

The drive problem you are describing sounds like a jumper problem or cable problem, since it was working under the BIOS. I am just guessing here, but you may not be familiar with drive jumpers. A good description of jumpers can be found on the Western Digital site:

http://support.wdc.com/techinfo/general/jumpers.asp

Only use the WesternDigital jumper settings if your drives are WesternDigitals. Download the drive jumper setting for your drives from the manufacture’s web site, just to be sure. Also, they are often printed on the drives, but sometimes in an upside-down view (e.g., Quantum Fireballs). The jumper settings are often different when you use one drive vs. two drives, unless your motherboard uses Cable Select.
 
Old 05-09-2004, 10:44 AM   #12
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Original Poster
Rep: Reputation: 15
I am using warranty on the hard drive, the pins are so messed up I cannot get an IDE cable to fit in now. Then I might get Windows again, possibly Gentoo.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dose The Sims 2 For Windows Work On Linux? game_freak101 Linux - Games 2 01-31-2005 12:46 PM
Getting HDD to work both in Windows and Linux Cyberian Linux - Hardware 10 01-04-2005 11:24 AM
I need my new modem to work in windows so I can use Linux vdogvictor Linux - Hardware 3 06-13-2004 06:44 AM
Networking Linux and Windows - Ping doesn't work njs12345 Linux - Wireless Networking 5 02-20-2004 03:29 PM
Linux hostname on a Windows network doesn't work lynnwgnr Linux - Networking 4 08-12-2003 06:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:23 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
Open Source Consulting | Domain Registration