Accidentally deleted debian partition PLZ HELP
Sorry for the caps, but I was installing windows (need cygwin + vpn) and managed to disconnect the wrong hd before setup, I accidentally deleted the debian partition, but nothing was writtten to it. Is it possible to recover the partition? I'm going to google it, but I must restart first, to complete XP setup. Note that I do have a CD burner and will be able to burn ISOs shortly if there's a bootable linux that can do this. (e.g. Knoppix, though I'm not sure that it has the right software). Here's the system info: Debian Sid, ext3 file system, only one other partition on the drive, swap (at the end of the disk), Linux kernel 2.4.25, grub bootloader.
|
How exactly did you delete it? I think your pretty much out of luck for an entire partition, especially on a linux file system, barring use of some sort of professional forensics tool.
:( |
deleted from partition table
I deleted it from the partition table (to be precise winxp setup deleted it) no formatting was done, no file writing was done, it's just been removed from the file system. Shouldn't the ext3 journal still be intact?
|
it's there!
I used TestDisk to look for the partition and it found it! I don't think it can restore the disk, though, there must be a way to do this!
Does anyone know how? Is there a utility that can "undelete" an entry from the partition table? I still have space on my backup drive, if I need to install another debian to restore my main one I will. |
Need GRUB
Turns out TestDisk -can- restore ext3 partitions. I am now using an ext3 driver for winxp to view the contents of the partition from windows. The bootloader was overwritten, it was GRUB before, how do I restore it? I think I need to do something like this from a bootable linux cd.
chroot /dev/hda1 after that, what's the command to restore the MBR for GRUB? |
Good to here you've solved it. I don't use grub, but I think the command is grub-install /dev/hda (?)
All you have to do is boot to a bootable linux cd you don't need to chroot because the mbr is independant of partitions, as long as you select you proper HD. |
thanks
I'll try that tomorrow (taking a while to get Gnoppix, which will have the grub executable on it). Is there a way to make grub recognize WinXP? In debian setup it recognized my old Windoze (which managed to destroy itself shortly thereafter), can I rerun that to detect the new windoze? (BTW the old one was win98, so I don't think the current config will work).
|
fixed
I am posting this from Debian, the system is working, the command I used to fix it was
Code:
grub-install --root-directory=/mnt/hda1 /dev/hda Thanks for the tip. Now I need a bit more help, is there a way I can get grub to recognize XP (on /dev/hdb5 with MBR @ /dev/hdb). Also, how can I rebuild the list of drives in the "Computer" icon in gnome (uri = computer:///)? |
All times are GMT -5. The time now is 12:50 PM. |