Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help rebuilding FAT1 and FAT2 #19

Open
bsdimp opened this issue Oct 25, 2019 · 2 comments
Open

Need help rebuilding FAT1 and FAT2 #19

bsdimp opened this issue Oct 25, 2019 · 2 comments

Comments

@bsdimp
Copy link

bsdimp commented Oct 25, 2019

I have a disk where FAT1 and FAT2 are missing. It's a very old drive, so heads 1 and 2 are no longer over the tracks for the first several tracks (I'm using an advanced imaging tool that tells me things like this about the drive). So, the drive cannot read those areas and so my image has 0's in them. It would be nice to be able to start somewhere and initialize a FAT whose chains are all 1 long, based on different parameters I give on the command line. This may also mean the first N sectors of the root directory are zero'd too, I don't know yet. The first entry is weird, so I strongly suspect that's the case:

00002400  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00006c00  57 53 4d 53 47 53 20 20  4f 56 52 20 00 00 00 00  |WSMSGS  OVR ....|
00006c10  00 00 00 00 00 00 9a 06  21 09 21 00 80 71 00 00  |........!.!..q..|
00006c20  4c 4f 54 55 53 32 20 20  20 20 20 10 00 00 00 00  |LOTUS2     .....|
00006c30  00 00 00 00 00 00 34 6e  07 11 dd 04 00 00 00 00  |......4n........|

It's a 10MB file from a non PC-DOS compatible computer (it ran MS-DOS 2.11), so there's also some weird stuff at front for the non-standard partitioning scheme that it uses. It's clearly more damaged than you're used to dealing with in your fatcat program...

@Gregwar
Copy link
Owner

Gregwar commented Oct 28, 2019

Hi
I guess you could use fatcat with orphan (lost+found) feature
One issue is that you at least need fat headers there, so maybe we can consider rebuilding them
Also, if FAT are missing, it means that files will be read contiguously, which might not be be perfect

@Gregwar
Copy link
Owner

Gregwar commented Oct 28, 2019

I would try:

  1. Make a volume of the same size using mkfs (is it fat12?)
  2. Copy the fat headers to the missing sectors (the 0s of your file)
  3. Run fatcat in -o mode and see what you get

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants