FAT filesystem mount after format

I am working on a legacy formatter application that writes FAT and UDF
formats to a removable drive (MO, etc.). We are encountering some
difficulty with the FAT filesystem driver recognizing the format once the
process is complete. The application uses the following basic chain of
events to write the format:

  1. Open handle to volume.
  2. Issue IOCTL_LOCK_VOLUME.
  3. Write format.
  4. Issue IOCTL_DISMOUNT_VOLUME.
  5. Issue IOCTL_UNLOCK_VOLUME.
  6. Broadcast volume change message to system.
  7. Close handle.

This all seems to work as expected when writing a UDF format to the disk.
When the volume is unlocked, the UDF file system will recognize and mount
the volume. However, the FAT filesystem is not a cooperative, and will only
mount a disk that orginally had a FAT format. If the disk orginally
contained a UDF or NTFS format, and was formatted to FAT, the FAT filesystem
will not mount it, and so far I can tell, is not even interested in looking
at it. The system will claim the disk is not formatted. However, if the
disk is ejected and re-inserted, the FAT filesystem will mount it. So the
filesystem structures written to the disk are valid. Does anyone have any
idea what else we need to do, or what we need to change, to make the FAT
filesystem mount these disks?

Thanks,
Gary Glenn

I recommend building the FAT filesystem from the IFS Kit and, using a
debugger, catch the mount request using a checked version of the FAT FSD.
This will let you know exactly why the FAT Filesystem is rejecting the mount
operation.

Pete

Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Glenn
Sent: Monday, July 18, 2005 6:20 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FAT filesystem mount after format

I am working on a legacy formatter application that writes FAT and UDF
formats to a removable drive (MO, etc.). We are encountering some
difficulty with the FAT filesystem driver recognizing the format once the
process is complete. The application uses the following basic chain of
events to write the format:

  1. Open handle to volume.
  2. Issue IOCTL_LOCK_VOLUME.
  3. Write format.
  4. Issue IOCTL_DISMOUNT_VOLUME.
  5. Issue IOCTL_UNLOCK_VOLUME.
  6. Broadcast volume change message to system.
  7. Close handle.

This all seems to work as expected when writing a UDF format to the disk.
When the volume is unlocked, the UDF file system will recognize and mount
the volume. However, the FAT filesystem is not a cooperative, and will only

mount a disk that orginally had a FAT format. If the disk orginally
contained a UDF or NTFS format, and was formatted to FAT, the FAT filesystem

will not mount it, and so far I can tell, is not even interested in looking
at it. The system will claim the disk is not formatted. However, if the
disk is ejected and re-inserted, the FAT filesystem will mount it. So the
filesystem structures written to the disk are valid. Does anyone have any
idea what else we need to do, or what we need to change, to make the FAT
filesystem mount these disks?

Thanks,
Gary Glenn


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hello Gary,

Our packet writing software is doing FAT and UDF formatting and writing on
DVD-RAM and while we did have trouble to get Windows to format our UDF discs
as FAT (and ISO to FAT - to which I was answered
http://support.microsoft.com/default.aspx?scid=kb;en-us;283588 ), we did not
observe the problem you report. I notice your step 6 in:

  1. Issue IOCTL_DISMOUNT_VOLUME.
  2. Issue IOCTL_UNLOCK_VOLUME.
  3. Broadcast volume change message to system.
  4. Close handle.

Actually, something is probably going wrong if you need to do step 6. I
think the fs manager has to re-scan fsd to mount after step 4, as it sees
the volume being dismounted. Broadcasting the volume change manually can
have side-effects such as duplication of mount request, or user setting to
turn auto-insert notification off to not work properly.

Best regards,

David Burg


David Burg
Software Development

Nero AG
Im Stoeckmaedle 18 fax: +49 (0)7248 928 299
76307 Karlsbad email: xxxxx@nero.com
Germany http://www.nero.com


Subject: FAT filesystem mount after format
From: “Gary Glenn”
Date: Mon, 18 Jul 2005 17:20:02 -0700
X-Message-Number: 11

I am working on a legacy formatter application that writes FAT and UDF
formats to a removable drive (MO, etc.). We are encountering some
difficulty with the FAT filesystem driver recognizing the format once the
process is complete. The application uses the following basic chain of
events to write the format:

1. Open handle to volume.
2. Issue IOCTL_LOCK_VOLUME.
3. Write format.
4. Issue IOCTL_DISMOUNT_VOLUME.
5. Issue IOCTL_UNLOCK_VOLUME.
6. Broadcast volume change message to system.
7. Close handle.

This all seems to work as expected when writing a UDF format to the disk.
When the volume is unlocked, the UDF file system will recognize and mount
the volume. However, the FAT filesystem is not a cooperative, and will only

mount a disk that orginally had a FAT format. If the disk orginally
contained a UDF or NTFS format, and was formatted to FAT, the FAT filesystem

will not mount it, and so far I can tell, is not even interested in looking
at it. The system will claim the disk is not formatted. However, if the
disk is ejected and re-inserted, the FAT filesystem will mount it. So the
filesystem structures written to the disk are valid. Does anyone have any
idea what else we need to do, or what we need to change, to make the FAT
filesystem mount these disks?

Thanks,
Gary Glenn

Thanks for the input. I am attempting to get the FastFAT filesystem
working, but running into difficulties. Do you have any suggestions on how
to load the built FastFAT.sys driver? The OS always wants to overwrite it
with its own, non-debug version. I have built a map file, set the
_NT_KD_FILES environment variable to reference it, and started the system
with the debug version on NTLDR. Is there anything I missed?

Thanks,

Gary Glenn

“Peter Scott” wrote in message
news:xxxxx@ntfsd…
>
> I recommend building the FAT filesystem from the IFS Kit and, using a
> debugger, catch the mount request using a checked version of the FAT FSD.
> This will let you know exactly why the FAT Filesystem is rejecting the
> mount
> operation.
>
> Pete
>
> Kernel Drivers
> Windows Filesystem and Device Driver Consulting
> www.KernelDrivers.com
> (303)546-0300
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Gary Glenn
> Sent: Monday, July 18, 2005 6:20 PM
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] FAT filesystem mount after format
>
> I am working on a legacy formatter application that writes FAT and UDF
> formats to a removable drive (MO, etc.). We are encountering some
> difficulty with the FAT filesystem driver recognizing the format once the
> process is complete. The application uses the following basic chain of
> events to write the format:
>
> 1. Open handle to volume.
> 2. Issue IOCTL_LOCK_VOLUME.
> 3. Write format.
> 4. Issue IOCTL_DISMOUNT_VOLUME.
> 5. Issue IOCTL_UNLOCK_VOLUME.
> 6. Broadcast volume change message to system.
> 7. Close handle.
>
> This all seems to work as expected when writing a UDF format to the disk.
> When the volume is unlocked, the UDF file system will recognize and mount
> the volume. However, the FAT filesystem is not a cooperative, and will
> only
>
> mount a disk that orginally had a FAT format. If the disk orginally
> contained a UDF or NTFS format, and was formatted to FAT, the FAT
> filesystem
>
> will not mount it, and so far I can tell, is not even interested in
> looking
> at it. The system will claim the disk is not formatted. However, if the
> disk is ejected and re-inserted, the FAT filesystem will mount it. So the
> filesystem structures written to the disk are valid. Does anyone have any
> idea what else we need to do, or what we need to change, to make the FAT
> filesystem mount these disks?
>
> Thanks,
> Gary Glenn
>
>
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

Yes, you need to disable the system file protection mechanism. See
OSROnline.com for a nice utility to do this.

You can then overwrite the system files with them being restored.

Pete

Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Glenn
Sent: Tuesday, July 19, 2005 3:49 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] FAT filesystem mount after format

Thanks for the input. I am attempting to get the FastFAT filesystem
working, but running into difficulties. Do you have any suggestions on how
to load the built FastFAT.sys driver? The OS always wants to overwrite it
with its own, non-debug version. I have built a map file, set the
_NT_KD_FILES environment variable to reference it, and started the system
with the debug version on NTLDR. Is there anything I missed?

Thanks,

Gary Glenn

“Peter Scott” wrote in message
news:xxxxx@ntfsd…
>
> I recommend building the FAT filesystem from the IFS Kit and, using a
> debugger, catch the mount request using a checked version of the FAT FSD.
> This will let you know exactly why the FAT Filesystem is rejecting the
> mount
> operation.
>
> Pete
>
> Kernel Drivers
> Windows Filesystem and Device Driver Consulting
> www.KernelDrivers.com
> (303)546-0300
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Gary Glenn
> Sent: Monday, July 18, 2005 6:20 PM
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] FAT filesystem mount after format
>
> I am working on a legacy formatter application that writes FAT and UDF
> formats to a removable drive (MO, etc.). We are encountering some
> difficulty with the FAT filesystem driver recognizing the format once the
> process is complete. The application uses the following basic chain of
> events to write the format:
>
> 1. Open handle to volume.
> 2. Issue IOCTL_LOCK_VOLUME.
> 3. Write format.
> 4. Issue IOCTL_DISMOUNT_VOLUME.
> 5. Issue IOCTL_UNLOCK_VOLUME.
> 6. Broadcast volume change message to system.
> 7. Close handle.
>
> This all seems to work as expected when writing a UDF format to the disk.
> When the volume is unlocked, the UDF file system will recognize and mount
> the volume. However, the FAT filesystem is not a cooperative, and will
> only
>
> mount a disk that orginally had a FAT format. If the disk orginally
> contained a UDF or NTFS format, and was formatted to FAT, the FAT
> filesystem
>
> will not mount it, and so far I can tell, is not even interested in
> looking
> at it. The system will claim the disk is not formatted. However, if the
> disk is ejected and re-inserted, the FAT filesystem will mount it. So the
> filesystem structures written to the disk are valid. Does anyone have any
> idea what else we need to do, or what we need to change, to make the FAT
> filesystem mount these disks?
>
> Thanks,
> Gary Glenn
>
>
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thank, I’ll look into that.

Regards,

Gary Glenn

“Peter Scott” wrote in message
news:xxxxx@ntfsd…
>
> Yes, you need to disable the system file protection mechanism. See
> OSROnline.com for a nice utility to do this.
>
> You can then overwrite the system files with them being restored.
>
> Pete
>
> Kernel Drivers
> Windows Filesystem and Device Driver Consulting
> www.KernelDrivers.com
> (303)546-0300
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Gary Glenn
> Sent: Tuesday, July 19, 2005 3:49 PM
> To: Windows File Systems Devs Interest List
> Subject: Re:[ntfsd] FAT filesystem mount after format
>
> Thanks for the input. I am attempting to get the FastFAT filesystem
> working, but running into difficulties. Do you have any suggestions on
> how
> to load the built FastFAT.sys driver? The OS always wants to overwrite it
> with its own, non-debug version. I have built a map file, set the
> _NT_KD_FILES environment variable to reference it, and started the system
> with the debug version on NTLDR. Is there anything I missed?
>
> Thanks,
>
> Gary Glenn
>
>
> “Peter Scott” wrote in message
> news:xxxxx@ntfsd…
>>
>> I recommend building the FAT filesystem from the IFS Kit and, using a
>> debugger, catch the mount request using a checked version of the FAT FSD.
>> This will let you know exactly why the FAT Filesystem is rejecting the
>> mount
>> operation.
>>
>> Pete
>>
>> Kernel Drivers
>> Windows Filesystem and Device Driver Consulting
>> www.KernelDrivers.com
>> (303)546-0300
>>
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Gary Glenn
>> Sent: Monday, July 18, 2005 6:20 PM
>> To: Windows File Systems Devs Interest List
>> Subject: [ntfsd] FAT filesystem mount after format
>>
>> I am working on a legacy formatter application that writes FAT and UDF
>> formats to a removable drive (MO, etc.). We are encountering some
>> difficulty with the FAT filesystem driver recognizing the format once the
>> process is complete. The application uses the following basic chain of
>> events to write the format:
>>
>> 1. Open handle to volume.
>> 2. Issue IOCTL_LOCK_VOLUME.
>> 3. Write format.
>> 4. Issue IOCTL_DISMOUNT_VOLUME.
>> 5. Issue IOCTL_UNLOCK_VOLUME.
>> 6. Broadcast volume change message to system.
>> 7. Close handle.
>>
>> This all seems to work as expected when writing a UDF format to the disk.
>> When the volume is unlocked, the UDF file system will recognize and mount
>> the volume. However, the FAT filesystem is not a cooperative, and will
>> only
>>
>> mount a disk that orginally had a FAT format. If the disk orginally
>> contained a UDF or NTFS format, and was formatted to FAT, the FAT
>> filesystem
>>
>> will not mount it, and so far I can tell, is not even interested in
>> looking
>> at it. The system will claim the disk is not formatted. However, if the
>> disk is ejected and re-inserted, the FAT filesystem will mount it. So
>> the
>> filesystem structures written to the disk are valid. Does anyone have
>> any
>> idea what else we need to do, or what we need to change, to make the FAT
>> filesystem mount these disks?
>>
>> Thanks,
>> Gary Glenn
>>
>>
>>
>>
>>
>> —
>> Questions? First check the IFS FAQ at
>> https://www.osronline.com/article.cfm?id=17
>>
>> You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>