Re: Urgent: Linux Guru Needed. you description is the least informative possible.
What do you mean crash? What's the problem?
I'm assuming from the trashed partitions part that the partition table somehow got trashed and it's not a major hardware failure (at least an hdd one).
The first thing to do in such situations if your data is so important (and you stupid enough not to backup) would be to make an image of the disk as soon as possible.
No reboots and other attempts since this could aggravate the problem if it's the impending hdd failure of doom.
Stick your disk in a diferent pc, boot linux and if I remember the syntax correctly it's
"dd if=/dev/hdX of=/somepath/to/image/file"
hdX ofc refers to the connectiont hat the disk that needs saving can be plugged into like hdb.
Since you said the partition table is dead I'm assuming that there were multiple partitions on a single disk but they are no longer recognizable. If that's not the case make files for /dev/hdb1 and /dev/hdb2 and so on for all the partitions in place.
If you start getting read errors (case where disk is dying) try reading the dd manpage so you can substitute the read errors with zeroes in order to at least get all the available data.
If all is good:
Now, you can mess around all you want with the disk or try and mount the file as a device in the new linux. You can do that with the mount command ofc and some RTFM on the manpages. Not that tough.
If it all goes well you can mount the file and pull all the files you need from there.
If there were multiple partitions on the disk and the partition table was shot:
If it doesn't work, you're in deep **** but I've seen people swim out of there.
If there were multiple partitions and you lost their location (saved as an entire disk image) then i have no idea how to exactly fix that. It is possible if you remember exatly their sizes or are an fs expert and just can spot the beggining/end of the partition (reading some manuals and grepping the disk for the telltales might do the trick. Then just recreate partitions with exactly the same size and no fromatting).
Ah, just remembered. Ext2/3fs at least saves copies of the partition table in different locations of the disk. Try to retrieve them if necessary, don't know the tool, read manpages.
*partitions ok and fs is just shot (mount refuses to identify/mount the image):
Try reading manpages of fsck that apply to the filesystem your friend has (assuming ext2/3?). You may be able to save the most/some files and retrieve them from lost+found directory once fsck is done.
If nothing works or you want to skip all work:
It depends on what files you want to take out. Small text files can usually be extracted by a simple grepping of the disk image and hoping they weren't fragmented.
Larger files too if they weren't fragmented (if I remember correctly ext filesystems have minimal fragmentation going around) and you know what to grep for + can discover the header/footer of the file.
Ok, there's no way I'm proofreading all of this. I'm in an insomniac stage and most/all of what I've written may make no sense or help you discover the meaning of life. |