[wellylug] Help needed.
David Antliff
david.antliff at gmail.com
Wed Mar 26 08:36:37 NZDT 2008
On 25/03/2008, David Chord <gnome at gnome.co.nz> wrote:
> And just to be sure I ran what I had run numerous times before without issue
> - mkfs.vfat -I /dev/sda
Hi David,
Are you sure this is the command you ran? You don't have a number
there (e.g. sda1 or sda2) so you will have created an empty FAT
filesystem on the actual device rather than a partition.
You've probably only damaged the partition table and the first
partition (but I don't know for sure, maybe mkfs.vfat writes stuff all
over the place?). The partition table is easy to fix if you knew the
rough layout, but the original filesystem will be a bit trickier. It
should be fixable if you can find out what important ext3 sectors
mkfs.vfat overwrote and restore them, or recreate them. I think
ext2/3 keeps super-block backups throughout the filesystem?
Did you have any extended partitions (logical drives)? If all your
partitions are (were) Primary, then fixing the partition table is
really easy as it's just 48 bytes in the first sector. Extended
partitions are a little trickier but the chances are the 'chain' is
intact anyway.
I would recommend you borrow or buy another disk of similar size and
'dd' all the information from your broken system over to the backup,
BEFORE you attempt to repair anything. Seriously.
And you want to boot off a LiveCD or something so that you're not
trying to repair a disk that the system is using at the same time.
I can't help you with the NTFS partition but it's probably ok. Swap
doesn't matter.
There are also tools to try restoring files from a bad ext2/3
partition - you could consider this, rather than trying to fix the
entire thing.
Good luck, let us know how you get on and if you have any questions,
--
David.
> The command took less than a second to complete. I removed his player, got
> him to try it out - worked fine. Did a few more things and shut the machine
> down a while later.
>
> On restarting the computer - "non-bootable disk". Oops.. /dev/sda on his
> computer is the MP3 player, but on mine it's the main HDD.
>
> I am optimistic that the partition table alone has been screwed, and the
> data on the disk is easily recoverable - but only because it completed so
> quickly and I was able to do a fair bit for a while afterwards.. (And yes,
> had I suspected that there was any risk of loss of data I would've backed
> up).
>
> I do have some stuff I would rather not loose. I can probably recover
> anything important. But it would be nice to be able to run some simple
> partition table recovery program and not have to go through the pain of
> reinstalling windows, or the minor annoyance of picking which distro to try
> next...
>
> Years ago I had a dos 6.22 program that would quickly and happily restore
> damaged partitions. I probably still have it. But.. I don't know if it would
> be able to find NTFS or Ext3 partitions, let alone the swap.
>
> The disk should have 1 Ext3, 1 swap and 1 NTFS partition. The latter two can
> be wiped, but it is the first one that I want most. What is shown is 1
> rather large FAT32 :(
>
> Thanks in advance to anyone out there willing/able to help :)
>
> Oh, and a "Hello" to anyone on here I know from elsewhere... :)
>
> Take care,
> David
>
>
>
> --
> Wellington Linux Users Group Mailing List: wellylug at lists.wellylug.org.nz
> To Leave: http://lists.wellylug.org.nz/mailman/listinfo/wellylug
>
More information about the wellylug
mailing list