[wellylug] Help needed.

David Chord gnome at gnome.co.nz
Fri Mar 28 23:01:52 NZDT 2008


 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.

No number was used. I was using the command as specified from a page I found 
on the Ubuntu forums referring to the problem. I can't find the page atm but 
then I cannot remember the search string, but could get it from my Nephew 
tomorrow.. 

> 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?). 

I doubt it did much writing.. Disk activity was basically nil, and execution 
took less than a second. I doubt it spawned a background task of any sort. I 
was able to read and most likely write to the file system after the screwup, 
so my bet is that the partition table is lost.

> The partition table is easy to fix if you knew the 
> rough layout, 

I can remember the order - ext3, swap, ntfs. But the actual sizes is another 
matter.. Was I feeling kind and gave windows 10g? Or was it 7? Or 5? But 
really, the windows partition isn't that great a loss. If I could restore the 
whole lot in one hit, not an issue. If I can't restore it, and have to use 
recovery to get files back, I won't bother. After all, it is just a games 
system now, and the install was all of 3 weeks old. 

> 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?

I don't know much on the physical structures of any file system these days. I 
spent some time with a hex editor reading raw data off disks many years ago, 
but that was before Win95 days. 

> 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. 

All primary partitions. Fixing the partition table itself may be easy, but I 
simply don't have a tool that I would trust to do it right now. I still have 
a program I used under dos 6.2 around somewhere, that searched the disk for 
start and end data on partitions, and worked well. But I don't know if it 
would find more modern partitions. Maybe it will and simply won't recognise 
their type, but will find the start and ends of them.

> 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.

Agreed. I just need to find a spare 80g disk now..  Maybe I need to buy one.

How exactly does it have to match? I could quickly get my hands on a 120G 
drive, but that's 40G larger.. 

> 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.

Heh..Considering the system won't boot at all, a liveCd will definetly be the 
go.. :)


> 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.

Any reccomends? I did buy one a while back, which was expensive. Not sure if 
the key would still work though.. The machine it was originally installed on 
no longer exists, and some companies are tetchy about you installing 
expensive software a 2nd time. 

I'm kinda nervous about using the dd command as well.. Why do you think I 
needed to shell out for expensive recovery software in the first place? :)

Thanks. Will be spending more time this weekend on it. Would love to have it 
working real soon.. 

Bye for now,
yet another David..




More information about the wellylug mailing list