Running Fedora Core 4 on a P4 box. I needed to back up the contents of one server (bsdboxer) to another (johnny5), so I decided to send a tar of a folder across SSH. I however, am a complete idiot, and dumped from the man pages of tar, I did this:
tar cvfb - 20 stuff/ | ssh johnny5 dd of=/dev/hda1 obs=20b
Hells yeah, I over wrote my boot parititon! ...
So, there's nothing in /boot now. I tried the advertised "Fedora rescue disk", typed in "linux rescue", was dumped to a terminal, and attempted to see if the drives were still there. An fdisk -l shows that the partitions are still intact, and the /mnt/sysimage still shows the contents of my drive which is great. However, if I try to "chroot /mnt/sysimage", the drives disappear, and I can't even begin to attempt to reinstall the GRUB loader.
Rebooting and praying that Knoppix could fix the the day, I wind up at in the face of a terminal and some very mean results.
1. I can see the devices when I do an fdisk -l. The parititions are there and happy, with the /dev/hda1 still being a boot partition, and /dev/hda2 still with the rest of the file system on it.
2. I can't mount either /dev/hda1 or /dev/hda2 to /mnt/hda1 or /mnt/hda2. Something about a wonky magic number error.
3. gpart /dev/hda1 doesn't quite work either. It hangs for a few minutes and I just smash my head on the coffee table a couple of times for the amount of stupidity I've done.
4. I can't do a reinstall of GRUB, well, because GRUB or any other program other than fdisk can't see the partitions.
Basically, what I'm asking is if there's anyway for me to fix the MBR and the partition table without having to kill the entire drive. Thanks.