Linux - GeneralThis 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.
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.
So a little history to set the scene and maybe provide some insight on what happened...the harddrive was partioned into 2 sections, C and D. Somehow, the windows XP installation on C got totally screwed up, and I was unable to boot it normally. So I reinstalled windows xp onto the D partion, and have been using that without problems. At this point I only assume that the information on C is now completely irrelevant with that on D.
So I want to start a dual boot on this computer, so i run the Redhat installation, removing the C partion (HDA1), and using half of it's freespace for a new linux parition. I did not use the automatic partition option as this gave me an error that there was no primary (/) partition to use. So linux formated and installed. When it restarts, Grub comes up with the dual boot option, DOS or Redhat. I choose DOS and the next screen displays the following:
Redhat boots fine by the way...so I searched on some internet forums for these keywords, trying to find a solution, and found that if I want to go back to windows xp, i can rewrite the master boot record (MBR) by using "fdisk /mbr". So I did this, figuring if I lose the redhat install, whatever I can try again...but once I did this from a win98se bootdisk (which was supposedly just fine), the computer would boot up to a blinking "_" With grub gone, as I expected, but no windows xp or anything booting...So i just reinstalled Redhat again and i'm back to the previous Grub problem above...I would simply like to return to windows XP, as all my data is there. What can be done?
I would see if xp is still there. Create a directory. Call it c or whatever. You'll need to figure out what the xp partition is called. Mine is hda1. So for me I would type "mount /dev/hda1 /c" in a konsole. Then browse to c and see if your data is there.
When trying to mount both hda1 and hda5, i get the error, file type NTFS not supported by kernel. So the file format is correct for Win XP, and I'm pretty sure the files are there. I believe the problem lies in the Master Boot Record, or the Boot Loader Grub.
Any luck? If all you want is xp back then you could try reinstalling in the same partition as before without formating. Or do a fresh install into another partition. That way you should be able to access your data without risk of losing it.
Or try to figure out why it's not working which is half the fun sometimes
First, let me say, congrats on trying something new. You had an issue or two. That's almost to be expected. The problem is, these particular issues might jeopardize your data. I hope one thing that this particular issue might emphasize for you is the importance of backing up your data, especially before any kind of major operations on your system. But these problems happen, and they get overcome.
In this instance, I think part of the problem is that, in addition to linux not being able to see this partition (you'll need to recompile the kernel in if you want ntfs support, which I'm surprised by, because my Mandrake installations --8.0-9.0, have enabled ntfs by default, though it's read-only), you appear to have created another partition on your hard drive, or at least changed the ordering of the partitions.
The reason this is significant to Windows XP is that XP, being based on NT, uses boot.ini to find windows, or its \winnt directory.
In addition, it looks like you've got two primary partitions.
The thing I'd do if I were you is to try to see if I can find the file boot.ini on THE FIRST PARTITION, whatever it may be in Linux.
That's issue #1, because without that, you're not gonna load XP, no matter what. Obviously, you're not going to see it from linux, so try booting from the floppy and see if you can see it, or anything else, from there.
Basically, there's three strategies:
Try to get your current installation of XP booted, which may take some doing, especially if you've overwritten boot.ini. You've most certainly wiped out the original mbr that XP installed. If it didn't happen with the Grub install, it happened with the fdisk /mbr.
The second is to try some other bootloader, of which there are many (do a search for bootloader on google and see what I mean). There's also some commercial boot loaders. I can tell you what's worked well for me. I use xosl as the main boot loader, from which I can boot into windows, or Linux, or whatever I have installed at the time, and then I use lilo installed on the same partition as /, which xosl points to. Check it out at http://xosl.sourceforge.net/binaries.html
Keep in mind none of this will help if you've overwritten, corrupted, or just can't find boot.ini on your hard drive and you can't come up with one that works.
The third way to go is simply to wipe out the partition with Linux currently on it, make sure that there's only one extra partion, other than the one with your data, and install XP there. I don't recommend the dirty install, on the same partition, without formatting, just because almost everytime, there ends up being something that gets messed up. I suppose it's a possibility if you're just going to have it installed long enough to save your data to some other media (tape, cdr, networked computer).
Everyone who is trying to duel boot XP/Linux should do the following, Before installing linux.
1. create or obtain a windows system disk, for win9.x (start-up disk for win 95-98-win-me).
2. copy from your win XP install's root dirrectory onto a dos formated floppy the following files; NTLDR, NTDETECT, BOOT.ini.
3. for more info go to microsoft.com search the knowledge base for article #311073, How to make a boot disk for NT/XP Ntfs or Fat32.
4. if you have the two disks mentioned above and need to restore your boot MBR, Do in this order.
A) boot the comp with the start-up disk and run fdisk/mbr.
B)change to the NTLDR floppy and reboot, your NT/XP system will boot up.
C) copy the files on the floppy (NTLDR......) into your windows root(Usually C: ) remove the floppy and windows will reboot.
So I mounted the windows XP partition in Linux after installing some kernel software to allow me to read NTFS file format. So I did a little exploration of the drive, using the nifty find command, I searched for boot.ini, no luck, so i looked for 'boot*' and guess what I found...boot.ini.backup in the windows directory. Only problem is, i can't rename it or move it from linux as it is read only.
This would be just fine if I could see this drive from a bootdisk, but unfortunately I can't. The bootdisk can read itself, and then "succesfully transfered diagnostic files to drive C". I am looking for what used to be drive D...but when I try to change to that drive, it says no such drive. Whats up now? I have the boot.ini.backup file which I assume all i need to do is rename it boot.ini and move it to the root directory. Whats up?
If you don't already have a rescue disk and don't have access to another XP machine to make one, this page might be able to help you in copying the files you need to a floppy and boot from the floppy.
Note: if the partitions changed on your machine, you'll need to edit boot.ini to match the location of /winnt on your hdd, then put a copy of that boot.ini file on the floppy.
The thing to remember is, don't modify the original file, even if the system somehow were to let you, make a copy of it to your home directory and edit that with a plain ascii text editor, IF YOU NEED TO. You may not have to. But if you do, do a search on how to edit boot.ini manually on Google, it can be kind of tricky. Go SLOW, just make a change to the last value, partition, if anything.
That should put you on the right track.
I'm having the same problem as Matt. Now, I had RedHat 8.0 with no problems, until a friend came with Mandrake 9.1 -- I decided it was worth the try, and installed. It eventually crashed during installation (when configuring the Video card), and even as i tried different combinations of options in each different installation (I installed Mandrake like 3 times)... So I ended up getting back to my RedHat disks.
I installed, without any problems, and logged into RH. It worked fine and all. Then I reboot, trying to enter WinXP to play Soldier of Fortune 2.... and the message that popped to Matt pops up, along with a large amount of 99 (half the screen was filled up of those numbers ).
Anyway, I tried RH again, and it boots fine... Now:
Originally posted by heretic
In addition, it looks like you've got two primary partitions.[/B]
I do have linux installed in a primary partition (hda3), and winXP also installed in a primary partition (hda1). However, when I reinstalled linux I did not touck the parts. and before It worked fine...
Heretic, I was able to follow the directions from the link you gave me about creating windows NT boot disk...I moved boot.ini.backup, ntdetect.com, and ntfrl..or whatever that last one is called, to a dos formated floppy drive, edited the boot.ini file to make it relevent, and it does not boot up. It says that it is a non-bootable floppy.
I just went into fdisk, and now realize that I don't have a primary dos partition...fdisk lists the following:
Oh. One other thing.
Make sure that, on the boot disk, you rename the boot.ini.backup file to just boot.ini.
So, you should have (just) these 3 files on your floppy (exactly):
That last file, ntldr, doesn't have any kind of extension.
Make sure that's the case.
Now, I tried this on both of my Windows XP machines, and the boot disk from each worked (the computer started XP), whereas with some other floppy, they get a non-system disk error. So, I know this works.
Listen, if your going by what the dos disk reports, I would n't pay too much attention to that right now.See, the dos boot disk can't understand ntfs at all, at least in Linux, you can read the partitions, because it has read permissions installed.
I tell you what.
Go ahead and and run this command as root:
fdisk -l /dev/hda
and tell me what the results are.
If you could run that command in Linux, we can see what your partitions actually look like.
I don't know how much you know about partitions, but it's like this: There are primary partitions, extended partitions, and logical partitions.
Just think of a primary partition as a regular old partition.
You can have up to four of them on a hard disk. OR, you can have three and an extended partition.
An extended partition is a type of primary partition that can hold more partitions inside it, so you can have a lot more within this one. These are the logical partitions, see?
Anyway to break it down, in linux, 1-4 are going to be primary partitions, anything 5 or higher's going to be a logical partition INSIDE an extended partition.
So, anyway let's see which, if any of your partitions are the ntfs partitions, then, we'll have an idea of whether it's really hosed, or what.
The thing is, I really think there's something wrong with the boot disk. Maybe the files aren't name exactly correct, or maybe their corrupted, not sure. It will be a lot easier for you if that's the issue anyway, because the partitions themselves won't be easy to manipulate a whole lot, without destroying data.
But, see, even if your partitions on your hard disk were completely HOSED, you should not have gotten a message about the boot disk being a non-system disk, if that's the message you got. You'd be getting some other kind of message, see?
Also, if you could print out what your boot.ini reads, that will also help.