The trouble with dual booting of Windows XP and Linux
Linux - SoftwareThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The trouble with dual booting of Windows XP and Linux
I DO have Windows XP Professional and Linux on the same hard drive. 1st partition is NTFS with bootable Windows, 2nd partition is NTFS. 3rd partition is Linux's swap. 4th partition is ReiserFS with Linux.
If I run fdisk /mbr in pure MS-DOS and SETUP "Large" for hard drive I can run Windows and ONLY Windows.
If I boot from Linux CD and replacing MBR with GRUB or LILO AND change "Large" to LBA or CHS then I am able to boot Linux from GRUB or LILO menu. HOWEVER, I can NOT boot Windows with ANY conditions. Both boot managers GRUB and LILO tell on the screen about file system id error. And changing hdd(0,0) to hdd(0,1), or chainloader +1 to chainloader +0 in GRUB or LILO configurations are not helping me to be able to use GRUB or LILO for dual booting.
That is the problem. What I can do to solve it?
I'm in trouble with dual booting of XP and Linux now.
XP was installed on NTFS in HDD "Large" mode.
However, Linux's both GRUB and LILO can access partitions only in LBA and CHS modes.
When I am choosing Winodws from GRUB or LILO menu I am getting file system's ID error that 0x7 is wrong ID. However, it IS real ID for NTFS!
I need help.
I will be happy to hear any ideas from you about it.
Should I reinstall XP with LBA HDD mode? Will it help me actually?
Do you know a way how to boot Linux from XP's boot.ini file?
Thanks in advance.
Down below hard drive partitioning information:
Large mode works only for Windows
LBA or CHS works only for Linux.
That is how
/dev/hda1 16,0gb HPFS/NTFS /windows/C 0 2227
represented in Windows XP:
\WINDOWS="Microsoft Windows XP Professional" /fastdetect
My idea was to reinstall XP under NTFS with LBA turned ON, and then later rewrite GRUB or LILO into MBR and see what's gonna happen. So far, I couldn't find better solution for it. And I don't know if this XP trick gonna work or not.
I have both WinXP home and RH9....
I just instaled WinXP first and RH9 after
What is your linux?
Red Hat? Debbian?
Older Grubs can saw WinXp cause of chain load...but newer versions can handle it very well...
See if your linux have the latest grub...if not get at gnu page...and make install
When i had an old linux ( Connectiva 5 ---now part of United Linux) i have to use boot disk to acess my linux...may be a choice..but temporaly until you get new Grub
fdisk /mbr is NOT supposed to be used with XP. It's a DOS command, and it kills your XP boot info, replacing it with a totally different boot that was ONLY meant for Windows 9x and earlier. There is a really big problem on the Internet with well-meaning folk who are not XP-savvy, advising others to "simply" use fdisk /mbr.
At worst, it can be a real disaster, and you can lose all your XP data for good. At best, it can be used for a MAXIMUM OF 4 PARTITIONS. Others will be lost forever.
Having said that, it's a pretty straightforward repair to make XP happy again. You need your NTLDR, your BOOT.INI, and your NTDETECT.COM in your equivalent to C:\ [main drive]. It's good if you can simply find them and copy them to that location, where they always belong for XP.
Whether you can do that or not, the usual repair is by booting from your XP CD. No, it will NOT re-install XP! Don't worry about that! Press the Yes for "Boot from CD?" and let it take a couple of minutes--it's a fair while--to load up a lot of files, after which it will give you 3 options, the middle one of which is for Recovery. Go for that.
I'm not sure which comes next, but at one point you need to know these answers:
-- your administrator password: you either know it, or you get 3 tries. If you don't recall ever setting one, press <enter>
-- which installation: It might suggest just one: (1) C:\WINDOWS, and the correct response is to type "1" (without ""). Or you may have a choice.
-- Enter load identifier: scary, huh? That's probably wanting you to type "Microsoft Windows XP Professional" or whatever it says in your boot.ini. (That can be seen, and probably you should look at it first, in Start > Settings > Control Panel > System > Advanced > Startup & Recovery > Settings > Edit. DON'T edit anything; just look at it and write it down, EXACTLY as you see it. And notice what "long" name it calls your XP by.
-- Oh, I forget what they ask next, it's another tech-term; but the response you type in, without the " but with the slash, is " /fastdetect"
Plus, although I may well have the sequence out, you will get just a simple DOS prompt somewhere along the line, and the response is to just type "fixboot" and press enter. It will give you a warning and you can feel nervous if you like, and then press Y for yes.
There are a few other things you can do in there, but take it one at a time, so you're changing the fewest things. "Fixmbr" is another you may have to use, fairly likely, but see what happens. The Recovery Console is weird but friendly. :-)
You may come out of all that to a black screen with just the ghastly message, "NTLDR is missing." That looks horrible, but don't be scared; you're likely one step away from success. That NTLDR (Windows NT Loader) is housed somewhere in your XP files. You need to run Search, if you can do that, or somehow get it back into your C:\ drive, as I said earlier. From now on, be sure to have a floppy with these half dozen necessities on it!
That's pretty partial; I don't know if I've given you everything you need. But try NEVER to use fdisk /mbr again. It's been called a "potential disaster," and Microsoft has a page on it, in which you're advised that you CAN use it, but it's risky business. It's not the end of the world, but it is a way of over-writing your XP system with unuseable DOS boot-up commands. And it's very commonly given as VERY MISDIRECTED ADVICE by a lot of people who are out of date about Windows.
(You'll also hear the Linux boot loaders are much better than Windows boot loader, but that is likewise 4 years out of date. XP's boot loader handles all sorts of OSs with ease. Plus, XP has an amazingly good partitioning system in Disk Management. You can delete or create partitions, go from NTFS back and forth to FAT32, to your heart's content!)
One last suggestion: Get the free BOOT-US Internet download, and INSTALL IT TO A FLOPPY DISK. (Don't change anything on your hard drive--well, I mean, don't unless you want to.) That will be the best emergency boot floppy you'll ever have, because it GOES AROUND the problem you have now, and gets you back into your OS! Then you have the luxury of taking years, if you want, to fix up your boot problems.
While searching for something else, this old post caught my attention because of some incorrect advice given by Carson. DOS “fdisk /mbr” and XP recovery console “fixmbr” do exactly the same thing. Here is a quote directly from the Microsoft Windows XP Professional Resource Kit Documentation:
“The Recovery Console, a troubleshooting tool in Windows XP Professional, offers a feature called Fixmbr. However, it functions identically to the Fdisk /mbr command, replacing only the master boot code and not affecting the partition table.”
The warning microsoft gives about restoring the MBR applies to boot sector virus infections, drive overlay programs (e.g., SpeedStor) and dual boot programs. The virus issue speaks for itself and you would probably already know if you were using a drive overlay, which is unlikely in XP. The third warning covers exactly why “fixmbr and “fdisk /mbr” are used in this forum: to restore windows functionality after a lilo or grub failure. I have personally used dos fdisk /mbr dozens of times on dual boot XP/linux systems without a problem.
Are there situations where you should not use fdisk /mbr? Yes, but they apply equally to XP fixmbr. Any potential damage done by dos fdisk /mbr would also be done by fixmbr.
If you have a LOT of devices, like me, in your computer, here's my setup:
Fortunately, my BIOS lets me boot off of the MBR of either hda or hde, since I have a PCI card giving me more IDE channels. I just leave hda alone, that way if I screw up the boot loader, I can still boot into XP, download a boot disk, install the boot disk, and boot back into Linux. However, there was one time where LILO wanted to do its own automatic install, and installed over my hda's MBR, and that screwed up XP's booting. It took me a while to figure out that I shouldn't have had my Linux partition flagged as bootable (For some reason, when I switched it off, XP could boot again, I forget the errors, but I do have to thank Partition Magic and fdisk for fixing that.) But after doing fdisk /mbr from XP's recovery, I was back to normal. I have Lilo's first option be XP and then when it gets to XP, I have the good old menu of XP or recovery mode....