Grub trouble
Sorry to have to ask this here, but I just installed fc5 and in grub i ran setup (hd0,0) to put grub on the first partition. The reason I included that information is because I'm not sure what needs to be done in order to configure grub to boot windows xp that was on the first partition. I'm quite certain setup (hd0,0) replaced windows bootloader with grub on the mbr.
here's my grub.conf file. Code:
# grub.conf generated by anaconda |
Quote:
It's possible you can recover this by booting the XP CD and selecting recovery console, then run fixboot. I wouldn't be surprised if you need to run fixmbr first, but I haven't tried it, so I'm guessing. Various posters have reported no success, and had to resort to full re-install of XP. After that you'll need to restore grub to the MBR - this time use "setup (hd0)" After that, remove the "map" lines from grub.conf, and you should be good to go. FC5 should have installed grub correctly itself I would have thought. |
Thanks syg00, I didn't realize the difference between setup (hd0,0) and (hd0). I will fixmbr with windows and let you know how it went.
Quote:
|
Yeah thanks for that wonderful advice. fixboot managed to completely destroy the partition tables so now I can't even get into linux recovery cause it doesnt detect that linux is on a partition...
ugh. |
Just trying to help - note I said "It's possible ...".
Regardless, let's see if we can fix it. I'd be surprised if fixboot trashed the partition table - I suspect you're misinterpreting the error. Try booting Knoppix or somesuch - I'd expect the partitions to be o.k. Only thing I can think of is that you had the FC partition marked as bootable, and the fixboot used that as an indicator of which partition it needed to recover. So it went ahead and overwrote your Linux boot sector record. Going from bad to worse. I would think you could boot the FC CD1 into recovery mode, and recover from there, but I haven't used FC at all, so you'll need to look for yourself. |
The partitions are still there, yes, but like i said the partition table is damaged so it doesn't know that it has a fedora partition therefore recovery cannot be used. I've been for the past 6 hours searching for a partition table recoverer but every time I think I found one it ends up having some limitation that makes it unable to do it. The closest I got was with an app called testdisk which did the job partially but the reason it failed was because it was limited to a 128gb hard drive and mine is 250 so it was unable to salvage the linux partition. but it did salvage grub somehow only i can't do anything with grub because technically it has nothing to boot. This just completely sucks that is all I know.
|
Maybe the ultimate boot cd could help with the partition table: http://www.ultimatebootcd.com/
Good luck anyways! |
I know this isn't what you want to hear right now, but this is why it's a good idea to backup the MBR and partition table before such operations. It's relatively simple to do once you have the knowledge, and because they take up such little space, you can write them as an image file to floppy or, if like me you don't trust floppies, CD, USB stick, a webhost, etc. Then it's a simple matter to restore your MBR and partition table instead of all this headache. You can do this with a number of programs, or if you understand how you can simply use the dd command.
I currently can't boot XP using Grub because XP wasn't on a primary partition. I'm not sure this is the problem you had though. For the time being it doesn't appear to matter. Quote:
As syg00 hinted, how are you sure that your partition table is damaged? I think it would be wise to know this for sure. How are you running your forensic programs such as Testdisk? I take you are using a live CD like Knoppix? If so, what is the output of fdisk -l? If fdisk is showing you partitions, then your partition table is fine. If instead you are running your forensic programs from Windows, then I'd assume your partition table is not kaputt. Has Testdisk or another program you've used may have modified the partition table? I'm still not sure whether you are saying the Windows XP CD cannot be used to recover your XP installation. Is Windows working? If it is or can be recovered, and probably it can, at this stage it may be easiest to forget about your current Linux installation and just recover XP. Once that's working, you can then backup your MBR and partition table, and try installing Linux again. By the way, according to the Testdisk site: Quote:
Quote:
|
Quote:
I forgot to mention before, but you need to backup the MBR and partition table each time you make partition or boot changes. |
I'll try the ultimate boot cd, thanks.
Concerning other questions: the partition table is damaged because i get this error when the computer starts: "invalid partition table" And absolutely nothing will boot off the disk. I didn't know that i should back up my partition table because I never had to deal with anything like this before. In fact I didn't even know what I was doing. EDIT: Ultimate Boot CD says that it includes Active@ partition recovery. I've tried the demo version and this software was successful up to the part where i couldn't write to disk since it was demo. Is the one on Ultimate Boot just a demo? I can't see how it would be the commercial... |
Quote:
Quote:
About the Ultimate Boot CD, and I hope you read this in time, because I should have mentioned: Make sure to get the version of Ultimate Bood CD (UBCD) with Insert, which is based on Knoppix. This means downloading the full version, as opposed to the basic version. It's worth the extra 64 MB of download because (despite being for the "advanced user") you can then also use UBCD to boot Insert Linux from the CD, without installing to hard-drive. If you like, you might also try out Knoppix straight away, although it is a bigger download and is more of a "try out Linux" type of deal. I don't seem to have explained live CD concept so far, so here goes. The advantage of these live CDs (like UBCD full and Knoppix) is that they allow you to easily run a complete operating system without using the hard-drive. You can then use them to investigate and make changes to your machine, including such things as restoring partition tables. Note that I am no expert and can only tell you my thoughts on what to do. Just trying to help. To boot with UBCD, you just need to put it in your CD drive and start the machine. If it doesn't boot from CD, you may need to open your BIOS to enable booting from CD. What happens with UBCD is that it brings up a menu. You can then choose whether to start using tools or to load Insert Linux. In your case, the first thing I think you should do is to start Insert Linux. It uses Fluxbox as a window manager, which you probably are not familiar with. No worries, you can right-click on the desktop and look for a terminal window app. Look under XShell for Xterm for example, or Apps > Shells for Bash or Sh. Once you have a terminal window, switch to superuser by entering the command "su". You won't need a password, since this is a live CD session and not a permanent Linux installation. Now type Code:
fdisk -l If you don't like fdisk or don't understand it, you can try running Qtparted, which is a graphical interface to the program parted. (It should run if you just type in qtparted in your terminal window and hit Enter.) Be careful though not to actually use the program to partition until you understand what you're doing. All you're looking for is to see whether the partitions show up. We can be much more specific than that though, if needed. If the above two methods don't help you, we can take a look directly at your partition table. To do that, from the terminal window as superuser type in (don't type the #, it just means you're superuser): Code:
# sfdisk -d /dev/hda Code:
# sfdisk -d /dev/sda If you get this output, then your partition table is indeed intact. Let us know how this looks. The more explicit the info, the better, especially if you get warnings, errors, or garbage. To quote the Red Hat post where I got this: Quote:
If you are now convinced that the partition table is hosed though, then I would reboot and try using the partition tools from the UBCD startup screen. (To reboot, right-click the Fluxbox desktop and select Exit, or if you can't figure out how to restart it should be safe to just press your reset button since the hard-disks shouldn't be mounted.) Quote:
But if you do still need such a tool, let's see what the Ultimate Boot CD has to offer. Here is a list of tools on the UBCD that I found will recover a partition table: - Active@ Partition (demo, need to buy to restore) - TestDisk (free, though you've already tried it) A couple of other notes: DIY Datarecovery DiskPatch; this is listed on UBCD as MBRtool, which is freeware from DIY. MBRtool won't recover your partition table, but their DiskPatch software will. It also has a demo, which you can use to create a support logfile to send to their staff. Of course this is also payware -- the non-pro version costs $30, compared to Advanced@ Partition for 30 Euros. On the same page hosting MBRWork there is a utility called Partinfo that you can use it to view your partition table, although the way described above with sfdisk above does this already. Furthermore, it looks like DIY Datarecovery has some good information. This is more like expert advice, even if their products are not free. General procedures for data recovery: http://www.diydatarecovery.nl/forum/viewtopic.php?t=15 Info on the MBR and partition tables: http://www.diydatarecovery.nl/mbr.htm Summary: You should figure out whether your partition table is okay. If it is, you just need to fix your MBR. If it is not, it looks to me that to restore it you have the choice between freeware and payware. For freeware, try TestDisk again and get as much help with it as possible. For payware, there are two versions: Active@ Partition and DIY DiskPatch, both of which cost roughly $30. Of course, there is always the abortive approach, which is to reinstall Windows -- but you are likely to lose any and all valuable data already on your drive if you do this. I would consider giving TestDisk another, closer look. (I just used its sister program PhotoRec, to recover some valuable files from a partition I borked at the end of a 200GB drive.) There is a list of live CDs that it appears on. Outlook If, at the end of all these trials, you cannot recover your partition table, which I consider unlikely, and you have valuable data on the drive that you want to keep (say on your Windows partition), all is not lost. It is still possible to recover the data. But one step at a time. If none of this helps you, maybe it will help some poor soul down the road, that's the great thing about searchable forums. :) |
All times are GMT -5. The time now is 04:23 PM. |