Page 2 of 2
Re: Understanding the FAT32 allocation table
Posted: Sat Mar 07, 2009 10:59 pm
by Firestryke31
I use ImDisk Virtual Disk Driver, which lets Windows handle formatting it, but due to the way it works you can't partition the image (it emulates a logical drive, not a physical one). However, the code for partitioned and unpartitioned drives should be the same if you do it right. You just add HiddenSectors to FirstDataCluster and FirstFATSector.
Edit: Weird, Windows tends to set HiddenSectors to 1 on disk images, when it should be 0. Now I'm going to have to have 2 versions of my boot loader: one for flat images and one for partitioned ones.
Re: Understanding the FAT32 allocation table
Posted: Sun Mar 08, 2009 4:55 am
by mangaluve
Thanks I'll try that! Any good information about how to use ImDisk (couldn't find much on the site where I downloaded it). What I want to do is to create a fat32 image and mount it, put some files there, and then unmount it and try to "parse" it with my own code
Re: Understanding the FAT32 allocation table
Posted: Sun Mar 08, 2009 6:14 am
by Combuster
Frequently asked question.
Disk Images
Re: Understanding the FAT32 allocation table
Posted: Sun Mar 08, 2009 10:51 am
by Firestryke31
mangaluve wrote:Thanks I'll try that! Any good information about how to use ImDisk (couldn't find much on the site where I downloaded it). What I want to do is to create a fat32 image and mount it, put some files there, and then unmount it and try to "parse" it with my own code
Create a file of the appropriate size (I used the Bochs image program thing) and just right click it, select Mount (IIRC it's the second option), go to My Computer, format the new drive as usual, right click the drive, and unmount. Then you can play around with the image file. Whenever you want to add/remove files, just mount it and use it like a normal drive.