Formatting a virtual disk as FAT on W2K

Hi,

Does anyone know what you need to do to be able to format a virtual
disk with FAT on Windows 2000. I can format my drive with NTFS on
W2K and both FAT and NTFS on NT4 - just not FAT on W2K!

The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
seems to suggest this is optional for function drivers that don’t
have a bus.

Thanks.
Shaun


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
(just gives and “Incorrect function” error when you try and access
the virtual drive.

My virtual disk does work on W2K, it just can’t format the volumes
to FAT. If I format it in to FAT in NT4 and then mount it in W2K,
it works fine!

Shaun

MOHAMMAD IQBAL wrote:
>See the ramdisk sample from Microsoft.
>
>-----Original Message-----
>From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
>Sent: Monday, July 02, 2001 7:23 PM
>To: File Systems Developers
>Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
>
>
>Hi,
>
>Does anyone know what you need to do to be able to format a virtual
>disk with FAT on Windows 2000. I can format my drive with NTFS on
>W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
>
>The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
>a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
>seems to suggest this is optional for function drivers that don’t
>have a bus.
>
>
>Thanks.
>Shaun
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@nestec.net
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Shaun,

RamDisk sample for w2k can be downloaded from ms web. I don’t have the link
because they change it on daily base; just try to search for ramdisk. FAT
formating problem is caused by some changes in the FastFat driver. I already
forgot details, it was something with disk verify and verify override flag.
w2k FastFat has some stronger expectation about it than NT4 implementation
and NTFS driver. If you have both NT4 and w2k IFS kits, just compare FastFat
sources and will see what is necessary to change.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Shaun[SMTP:xxxxx@sdlabs.demon.co.uk]
Reply To: File Systems Developers
Sent: Tuesday, July 03, 2001 9:07 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
(just gives and “Incorrect function” error when you try and access
the virtual drive.

My virtual disk does work on W2K, it just can’t format the volumes
to FAT. If I format it in to FAT in NT4 and then mount it in W2K,
it works fine!

Shaun

MOHAMMAD IQBAL wrote:
> >See the ramdisk sample from Microsoft.
> >
> >-----Original Message-----
> >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
> >Sent: Monday, July 02, 2001 7:23 PM
> >To: File Systems Developers
> >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
> >
> >
> >Hi,
> >
> >Does anyone know what you need to do to be able to format a virtual
> >disk with FAT on Windows 2000. I can format my drive with NTFS on
> >W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
> >
> >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
> >a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
> >seems to suggest this is optional for function drivers that don’t
> >have a bus.
> >
> >
> >Thanks.
> >Shaun
> >
> >
> >—
> >You are currently subscribed to ntfsd as: xxxxx@nestec.net
> >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

For a Win2k Ramdisk sample look at KM article Q257405

-----Original Message-----
From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
Sent: Tuesday, July 03, 2001 12:08 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
(just gives and “Incorrect function” error when you try and access
the virtual drive.

My virtual disk does work on W2K, it just can’t format the volumes
to FAT. If I format it in to FAT in NT4 and then mount it in W2K,
it works fine!

Shaun

MOHAMMAD IQBAL wrote:
>See the ramdisk sample from Microsoft.
>
>-----Original Message-----
>From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
>Sent: Monday, July 02, 2001 7:23 PM
>To: File Systems Developers
>Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
>
>
>Hi,
>
>Does anyone know what you need to do to be able to format a virtual
>disk with FAT on Windows 2000. I can format my drive with NTFS on
>W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
>
>The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
>a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
>seems to suggest this is optional for function drivers that don’t
>have a bus.
>
>
>Thanks.
>Shaun
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@nestec.net
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

On Tue, 3 Jul 2001, Shaun wrote:

I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
(just gives and “Incorrect function” error when you try and access
the virtual drive.

It isn’t included but can be downloded separatly. Se:

Q257405 - FILE: Ramdisk.sys Sample Driver for Windows 2000

http://support.microsoft.com/support/kb/articles/Q257/4/05.ASP


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I recalled this problem in the meantime. In my virtual disk driver I have
following code:

if (IoctlCode == IOCTL_DISK_GET_PARTITION_INFO) {

if (BuildNumber > NT4_BUILD_NUMBER) {
// w2k ufat.dll tests if StartingOffset isn’t zero in sectors. We
have to apply this nasty workaround.
PartitionInfo->StartingOffset =
RtlConvertUlongToLargeInteger(Extension->DriveGeometry.SectorSize);
}
else {
PartitionInfo->StartingOffset =
RtlConvertUlongToLargeInteger(0);
}

RamDisk code seems different and uses zero there. It sets HiddenSectors to 1
and maybe it also solves the problem.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Vodicka, Michal[SMTP:xxxxx@rkk.cz]
Reply To: File Systems Developers
Sent: Tuesday, July 03, 2001 10:25 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

Shaun,

RamDisk sample for w2k can be downloaded from ms web. I don’t have the
link
because they change it on daily base; just try to search for ramdisk. FAT
formating problem is caused by some changes in the FastFat driver. I
already
forgot details, it was something with disk verify and verify override
flag.
w2k FastFat has some stronger expectation about it than NT4 implementation
and NTFS driver. If you have both NT4 and w2k IFS kits, just compare
FastFat
sources and will see what is necessary to change.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]

> ----------
> From: Shaun[SMTP:xxxxx@sdlabs.demon.co.uk]
> Reply To: File Systems Developers
> Sent: Tuesday, July 03, 2001 9:07 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>
> I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
> one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
> (just gives and “Incorrect function” error when you try and access
> the virtual drive.
>
> My virtual disk does work on W2K, it just can’t format the volumes
> to FAT. If I format it in to FAT in NT4 and then mount it in W2K,
> it works fine!
>
> Shaun
>
> MOHAMMAD IQBAL wrote:
> > >See the ramdisk sample from Microsoft.
> > >
> > >-----Original Message-----
> > >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
> > >Sent: Monday, July 02, 2001 7:23 PM
> > >To: File Systems Developers
> > >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
> > >
> > >
> > >Hi,
> > >
> > >Does anyone know what you need to do to be able to format a virtual
> > >disk with FAT on Windows 2000. I can format my drive with NTFS on
> > >W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
> > >
> > >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
> > >a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
> > >seems to suggest this is optional for function drivers that don’t
> > >have a bus.
> > >
> > >
> > >Thanks.
> > >Shaun
> > >
> > >
> > >—
> > >You are currently subscribed to ntfsd as: xxxxx@nestec.net
> > >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@rkk.cz
> > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks everyone - looks like I should have enough to sort this
out 8*>

Shaun

Vodicka, Michal wrote:
>I recalled this problem in the meantime. In my virtual disk driver I have
>following code:
>
> if (IoctlCode == IOCTL_DISK_GET_PARTITION_INFO) {
>…
> if (BuildNumber > NT4_BUILD_NUMBER) {
> // w2k ufat.dll tests if StartingOffset isn’t zero in sectors. We
>have to apply this nasty workaround.
> PartitionInfo->StartingOffset =
>RtlConvertUlongToLargeInteger(Extension->DriveGeometry.SectorSize);
> }
> else {
> PartitionInfo->StartingOffset =
>RtlConvertUlongToLargeInteger(0);
> }
>…
>
>RamDisk code seems different and uses zero there. It sets HiddenSectors to 1
>and maybe it also solves the problem.
>
>Best regards,
>
>Michal Vodicka
>Veridicom
>(RKK - Skytale)
>[WWW: http://www.veridicom.com , http://www.skytale.com]
>
>
>
>> ----------
>> From: Vodicka, Michal[SMTP:xxxxx@rkk.cz]
>> Reply To: File Systems Developers
>> Sent: Tuesday, July 03, 2001 10:25 PM
>> To: File Systems Developers
>> Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>>
>> Shaun,
>>
>> RamDisk sample for w2k can be downloaded from ms web. I don’t have the
>> link
>> because they change it on daily base; just try to search for ramdisk. FAT
>> formating problem is caused by some changes in the FastFat driver. I
>> already
>> forgot details, it was something with disk verify and verify override
>> flag.
>> w2k FastFat has some stronger expectation about it than NT4 implementation
>> and NTFS driver. If you have both NT4 and w2k IFS kits, just compare
>> FastFat
>> sources and will see what is necessary to change.
>>
>> Best regards,
>>
>> Michal Vodicka
>> Veridicom
>> (RKK - Skytale)
>> [WWW: http://www.veridicom.com , http://www.skytale.com]
>>
>>
>>
>> > ----------
>> > From: Shaun[SMTP:xxxxx@sdlabs.demon.co.uk]
>> > Reply To: File Systems Developers
>> > Sent: Tuesday, July 03, 2001 9:07 PM
>> > To: File Systems Developers
>> > Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>> >
>> > I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
>> > one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
>> > (just gives and “Incorrect function” error when you try and access
>> > the virtual drive.
>> >
>> > My virtual disk does work on W2K, it just can’t format the volumes
>> > to FAT. If I format it in to FAT in NT4 and then mount it in W2K,
>> > it works fine!
>> >
>> > Shaun
>> >
>> > MOHAMMAD IQBAL wrote:
>> > >See the ramdisk sample from Microsoft.
>> > >
>> > >-----Original Message-----
>> > >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
>> > >Sent: Monday, July 02, 2001 7:23 PM
>> > >To: File Systems Developers
>> > >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
>> > >
>> > >
>> > >Hi,
>> > >
>> > >Does anyone know what you need to do to be able to format a virtual
>> > >disk with FAT on Windows 2000. I can format my drive with NTFS on
>> > >W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
>> > >
>> > >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
>> > >a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
>> > >seems to suggest this is optional for function drivers that don’t
>> > >have a bus.
>> > >
>> > >
>> > >Thanks.
>> > >Shaun
>> > >
>> > >
>> > >—
>> > >You are currently subscribed to ntfsd as: xxxxx@nestec.net
>> > >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>> >
>> >
>> >
>> >
>> > —
>> > You are currently subscribed to ntfsd as: xxxxx@rkk.cz
>> > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>> >
>>
>> —
>> You are currently subscribed to ntfsd as: xxxxx@rkk.cz
>> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@sdlabs.demon.co.uk
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

What is failing in the driver? Can you follow the calls down and up to
isolate what is failing?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shaun
Sent: Tuesday, July 03, 2001 12:08 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

I couldn’t find the ramdisk sample in the Windows 2000 DDK.
The one in the NT 4 DDK doesn’t seem to work at all on
Windows 2000 (just gives and “Incorrect function” error when
you try and access the virtual drive.

My virtual disk does work on W2K, it just can’t format the
volumes to FAT. If I format it in to FAT in NT4 and then
mount it in W2K, it works fine!

Shaun

MOHAMMAD IQBAL wrote:
> >See the ramdisk sample from Microsoft.
> >
> >-----Original Message-----
> >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
> >Sent: Monday, July 02, 2001 7:23 PM
> >To: File Systems Developers
> >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
> >
> >
> >Hi,
> >
> >Does anyone know what you need to do to be able to format a virtual
> >disk with FAT on Windows 2000. I can format my drive with
> NTFS on W2K
> >and both FAT and NTFS on NT4 - just not FAT on W2K!
> >
> >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with a
> >minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The
> documentation seems to
> >suggest this is optional for function drivers that don’t have a bus.
> >
> >
> >Thanks.
> >Shaun
> >
> >
> >—
> >You are currently subscribed to ntfsd as: xxxxx@nestec.net
> >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@storagecraft.com To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

RAM disk sample will not Allow you to format either.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nathan Nesbit
Sent: Tuesday, July 03, 2001 1:25 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

For a Win2k Ramdisk sample look at KM article Q257405

-----Original Message-----
From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
Sent: Tuesday, July 03, 2001 12:08 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

I couldn’t find the ramdisk sample in the Windows 2000 DDK.
The one in the NT 4 DDK doesn’t seem to work at all on
Windows 2000 (just gives and “Incorrect function” error when
you try and access the virtual drive.

My virtual disk does work on W2K, it just can’t format the
volumes to FAT. If I format it in to FAT in NT4 and then
mount it in W2K, it works fine!

Shaun

MOHAMMAD IQBAL wrote:
> >See the ramdisk sample from Microsoft.
> >
> >-----Original Message-----
> >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
> >Sent: Monday, July 02, 2001 7:23 PM
> >To: File Systems Developers
> >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
> >
> >
> >Hi,
> >
> >Does anyone know what you need to do to be able to format a virtual
> >disk with FAT on Windows 2000. I can format my drive with
> NTFS on W2K
> >and both FAT and NTFS on NT4 - just not FAT on W2K!
> >
> >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with a
> >minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The
> documentation seems to
> >suggest this is optional for function drivers that don’t have a bus.
> >
> >
> >Thanks.
> >Shaun
> >
> >
> >—
> >You are currently subscribed to ntfsd as: xxxxx@nestec.net
> >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@microsoft.com To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@storagecraft.com To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hmm, listserv ignored this mail… another try, sorry if receive it twice.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Vodicka, Michal
Sent: Tuesday, July 03, 2001 11:26 PM
To: ‘File Systems Developers’
Subject: RE: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

Yet another addendum: below workaround also apply for
IOCTL_DISK_GET_DRIVE_LAYOUT. This one isn’t implemented by RamDisk sample
and maybe this is the reason why it isn’t affected by this problem. IIRC
ufat.dll tested StartingOffset only for one IOCTL code.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Vodicka, Michal[SMTP:xxxxx@rkk.cz]
Reply To: File Systems Developers
Sent: Tuesday, July 03, 2001 11:03 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

I recalled this problem in the meantime. In my virtual disk driver I
have
following code:

if (IoctlCode == IOCTL_DISK_GET_PARTITION_INFO) {

if (BuildNumber > NT4_BUILD_NUMBER) {
// w2k ufat.dll tests if StartingOffset isn’t zero in
sectors. We
have to apply this nasty workaround.
PartitionInfo->StartingOffset =
RtlConvertUlongToLargeInteger(Extension->DriveGeometry.SectorSize);
}
else {
PartitionInfo->StartingOffset =
RtlConvertUlongToLargeInteger(0);
}

RamDisk code seems different and uses zero there. It sets
HiddenSectors to 1
and maybe it also solves the problem.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yet another addendum: below workaround also apply for
IOCTL_DISK_GET_DRIVE_LAYOUT. This one isn’t implemented by RamDisk sample
and maybe this is the reason why it isn’t affected by this problem. IIRC
ufat.dll tested StartingOffset only for one IOCTL code.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Vodicka, Michal[SMTP:xxxxx@rkk.cz]
Reply To: File Systems Developers
Sent: Tuesday, July 03, 2001 11:03 PM
To: File Systems Developers
Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K

I recalled this problem in the meantime. In my virtual disk driver I have
following code:

if (IoctlCode == IOCTL_DISK_GET_PARTITION_INFO) {

if (BuildNumber > NT4_BUILD_NUMBER) {
// w2k ufat.dll tests if StartingOffset isn’t zero in sectors. We
have to apply this nasty workaround.
PartitionInfo->StartingOffset =
RtlConvertUlongToLargeInteger(Extension->DriveGeometry.SectorSize);
}
else {
PartitionInfo->StartingOffset =
RtlConvertUlongToLargeInteger(0);
}

RamDisk code seems different and uses zero there. It sets HiddenSectors to
1
and maybe it also solves the problem.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]

> ----------
> From: Vodicka, Michal[SMTP:xxxxx@rkk.cz]
> Reply To: File Systems Developers
> Sent: Tuesday, July 03, 2001 10:25 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>
> Shaun,
>
> RamDisk sample for w2k can be downloaded from ms web. I don’t have the
> link
> because they change it on daily base; just try to search for ramdisk.
FAT
> formating problem is caused by some changes in the FastFat driver. I
> already
> forgot details, it was something with disk verify and verify override
> flag.
> w2k FastFat has some stronger expectation about it than NT4
implementation
> and NTFS driver. If you have both NT4 and w2k IFS kits, just compare
> FastFat
> sources and will see what is necessary to change.
>
> Best regards,
>
> Michal Vodicka
> Veridicom
> (RKK - Skytale)
> [WWW: http://www.veridicom.com , http://www.skytale.com]
>
>
>
> > ----------
> > From: Shaun[SMTP:xxxxx@sdlabs.demon.co.uk]
> > Reply To: File Systems Developers
> > Sent: Tuesday, July 03, 2001 9:07 PM
> > To: File Systems Developers
> > Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
> >
> > I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
> > one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
> > (just gives and “Incorrect function” error when you try and access
> > the virtual drive.
> >
> > My virtual disk does work on W2K, it just can’t format the volumes
> > to FAT. If I format it in to FAT in NT4 and then mount it in W2K,
> > it works fine!
> >
> > Shaun
> >
> > MOHAMMAD IQBAL wrote:
> > > >See the ramdisk sample from Microsoft.
> > > >
> > > >-----Original Message-----
> > > >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
> > > >Sent: Monday, July 02, 2001 7:23 PM
> > > >To: File Systems Developers
> > > >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
> > > >
> > > >
> > > >Hi,
> > > >
> > > >Does anyone know what you need to do to be able to format a virtual
> > > >disk with FAT on Windows 2000. I can format my drive with NTFS on
> > > >W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
> > > >
> > > >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
> > > >a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
> > > >seems to suggest this is optional for function drivers that don’t
> > > >have a bus.
> > > >
> > > >
> > > >Thanks.
> > > >Shaun
> > > >
> > > >
> > > >—
> > > >You are currently subscribed to ntfsd as: xxxxx@nestec.net
> > > >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as: xxxxx@rkk.cz
> > > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@rkk.cz
> > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Nothing at all is “failing” at my level. I tried to handle all
IRPs and all DeviceIoclts that I got. The only one I didn’t know
what to do with was the PnP request to get the related target device.

Hopefully some of the suggestions that others have mention may help.

Thanks
Shaun

Jamey Kirby wrote:
>What is failing in the driver? Can you follow the calls down and up to
>isolate what is failing?
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Shaun
>> Sent: Tuesday, July 03, 2001 12:08 PM
>> To: File Systems Developers
>> Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>>
>>
>> I couldn’t find the ramdisk sample in the Windows 2000 DDK.
>> The one in the NT 4 DDK doesn’t seem to work at all on
>> Windows 2000 (just gives and “Incorrect function” error when
>> you try and access the virtual drive.
>>
>> My virtual disk does work on W2K, it just can’t format the
>> volumes to FAT. If I format it in to FAT in NT4 and then
>> mount it in W2K, it works fine!
>>
>> Shaun
>>
>> MOHAMMAD IQBAL wrote:
>> >See the ramdisk sample from Microsoft.
>> >
>> >-----Original Message-----
>> >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
>> >Sent: Monday, July 02, 2001 7:23 PM
>> >To: File Systems Developers
>> >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
>> >
>> >
>> >Hi,
>> >
>> >Does anyone know what you need to do to be able to format a virtual
>> >disk with FAT on Windows 2000. I can format my drive with
>> NTFS on W2K
>> >and both FAT and NTFS on NT4 - just not FAT on W2K!
>> >
>> >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with a
>> >minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The
>> documentation seems to
>> >suggest this is optional for function drivers that don’t have a bus.
>> >
>> >
>> >Thanks.
>> >Shaun
>> >
>> >
>> >—
>> >You are currently subscribed to ntfsd as: xxxxx@nestec.net
>> >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>
>>
>>
>>
>> —
>> You are currently subscribed to ntfsd as:
>> xxxxx@storagecraft.com To unsubscribe send a blank email to
>> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@sdlabs.demon.co.uk
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yep it doesn’t let you do it. The command line format just
says you can’t format a RAM drive. If you re-build the driver
to create devices of FILE_DEVICE_DISK (instead of
FILE_DEVICE_VIRTUAL_DISK) then the command line format says “Error in
IOCTL call”.

My device at least lets you bring up the format window from the
explorer properties and attempt the format. Unfortunately it
just says “Windows was unable to complete the format”. I’m
going to try the suggestions presented by others here tomorrow,
so maybe that will help.

Shaun

Jamey Kirby wrote:
>RAM disk sample will not Allow you to format either.
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Nathan Nesbit
>> Sent: Tuesday, July 03, 2001 1:25 PM
>> To: File Systems Developers
>> Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>>
>>
>> For a Win2k Ramdisk sample look at KM article Q257405
>>
>> -----Original Message-----
>> From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
>> Sent: Tuesday, July 03, 2001 12:08 PM
>> To: File Systems Developers
>> Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>>
>> I couldn’t find the ramdisk sample in the Windows 2000 DDK.
>> The one in the NT 4 DDK doesn’t seem to work at all on
>> Windows 2000 (just gives and “Incorrect function” error when
>> you try and access the virtual drive.
>>
>> My virtual disk does work on W2K, it just can’t format the
>> volumes to FAT. If I format it in to FAT in NT4 and then
>> mount it in W2K, it works fine!
>>
>> Shaun
>>
>> MOHAMMAD IQBAL wrote:
>> >See the ramdisk sample from Microsoft.
>> >
>> >-----Original Message-----
>> >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
>> >Sent: Monday, July 02, 2001 7:23 PM
>> >To: File Systems Developers
>> >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
>> >
>> >
>> >Hi,
>> >
>> >Does anyone know what you need to do to be able to format a virtual
>> >disk with FAT on Windows 2000. I can format my drive with
>> NTFS on W2K
>> >and both FAT and NTFS on NT4 - just not FAT on W2K!
>> >
>> >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with a
>> >minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The
>> documentation seems to
>> >suggest this is optional for function drivers that don’t have a bus.
>> >
>> >
>> >Thanks.
>> >Shaun
>> >
>> >
>> >—
>> >You are currently subscribed to ntfsd as: xxxxx@nestec.net
>> >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>
>>
>>
>>
>> —
>> You are currently subscribed to ntfsd as:
>> xxxxx@microsoft.com To unsubscribe send a blank email to
>> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>
>> —
>> You are currently subscribed to ntfsd as:
>> xxxxx@storagecraft.com To unsubscribe send a blank email to
>> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@sdlabs.demon.co.uk
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

It worked! I set the hidden sectors to one and the partition
number to -1 and that was enough to convince UFAT to format
it.

Thanks again.
Shaun

Vodicka, Michal wrote:
>Yet another addendum: below workaround also apply for
>IOCTL_DISK_GET_DRIVE_LAYOUT. This one isn’t implemented by RamDisk sample
>and maybe this is the reason why it isn’t affected by this problem. IIRC
>ufat.dll tested StartingOffset only for one IOCTL code.
>
>Best regards,
>
>Michal Vodicka
>Veridicom
>(RKK - Skytale)
>[WWW: http://www.veridicom.com , http://www.skytale.com]
>
>
>
>> ----------
>> From: Vodicka, Michal[SMTP:xxxxx@rkk.cz]
>> Reply To: File Systems Developers
>> Sent: Tuesday, July 03, 2001 11:03 PM
>> To: File Systems Developers
>> Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>>
>> I recalled this problem in the meantime. In my virtual disk driver I have
>> following code:
>>
>> if (IoctlCode == IOCTL_DISK_GET_PARTITION_INFO) {
>> …
>> if (BuildNumber > NT4_BUILD_NUMBER) {
>> // w2k ufat.dll tests if StartingOffset isn’t zero in sectors. We
>> have to apply this nasty workaround.
>> PartitionInfo->StartingOffset =
>> RtlConvertUlongToLargeInteger(Extension->DriveGeometry.SectorSize);
>> }
>> else {
>> PartitionInfo->StartingOffset =
>> RtlConvertUlongToLargeInteger(0);
>> }
>> …
>>
>> RamDisk code seems different and uses zero there. It sets HiddenSectors to
>> 1
>> and maybe it also solves the problem.
>>
>> Best regards,
>>
>> Michal Vodicka
>> Veridicom
>> (RKK - Skytale)
>> [WWW: http://www.veridicom.com , http://www.skytale.com]
>>
>>
>>
>> > ----------
>> > From: Vodicka, Michal[SMTP:xxxxx@rkk.cz]
>> > Reply To: File Systems Developers
>> > Sent: Tuesday, July 03, 2001 10:25 PM
>> > To: File Systems Developers
>> > Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>> >
>> > Shaun,
>> >
>> > RamDisk sample for w2k can be downloaded from ms web. I don’t have the
>> > link
>> > because they change it on daily base; just try to search for ramdisk.
>> FAT
>> > formating problem is caused by some changes in the FastFat driver. I
>> > already
>> > forgot details, it was something with disk verify and verify override
>> > flag.
>> > w2k FastFat has some stronger expectation about it than NT4
>> implementation
>> > and NTFS driver. If you have both NT4 and w2k IFS kits, just compare
>> > FastFat
>> > sources and will see what is necessary to change.
>> >
>> > Best regards,
>> >
>> > Michal Vodicka
>> > Veridicom
>> > (RKK - Skytale)
>> > [WWW: http://www.veridicom.com , http://www.skytale.com]
>> >
>> >
>> >
>> > > ----------
>> > > From: Shaun[SMTP:xxxxx@sdlabs.demon.co.uk]
>> > > Reply To: File Systems Developers
>> > > Sent: Tuesday, July 03, 2001 9:07 PM
>> > > To: File Systems Developers
>> > > Subject: [ntfsd] Re: Formatting a virtual disk as FAT on W2K
>> > >
>> > > I couldn’t find the ramdisk sample in the Windows 2000 DDK. The
>> > > one in the NT 4 DDK doesn’t seem to work at all on Windows 2000
>> > > (just gives and “Incorrect function” error when you try and access
>> > > the virtual drive.
>> > >
>> > > My virtual disk does work on W2K, it just can’t format the volumes
>> > > to FAT. If I format it in to FAT in NT4 and then mount it in W2K,
>> > > it works fine!
>> > >
>> > > Shaun
>> > >
>> > > MOHAMMAD IQBAL wrote:
>> > > >See the ramdisk sample from Microsoft.
>> > > >
>> > > >-----Original Message-----
>> > > >From: Shaun [mailto:xxxxx@sdlabs.demon.co.uk]
>> > > >Sent: Monday, July 02, 2001 7:23 PM
>> > > >To: File Systems Developers
>> > > >Subject: [ntfsd] Formatting a virtual disk as FAT on W2K
>> > > >
>> > > >
>> > > >Hi,
>> > > >
>> > > >Does anyone know what you need to do to be able to format a virtual
>> > > >disk with FAT on Windows 2000. I can format my drive with NTFS on
>> > > >W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
>> > > >
>> > > >The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
>> > > >a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
>> > > >seems to suggest this is optional for function drivers that don’t
>> > > >have a bus.
>> > > >
>> > > >
>> > > >Thanks.
>> > > >Shaun
>> > > >
>> > > >
>> > > >—
>> > > >You are currently subscribed to ntfsd as: xxxxx@nestec.net
>> > > >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>> > >
>> > >
>> > >
>> > >
>> > > —
>> > > You are currently subscribed to ntfsd as: xxxxx@rkk.cz
>> > > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>> > >
>> >
>> > —
>> > You are currently subscribed to ntfsd as: xxxxx@rkk.cz
>> > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>> >
>>
>> —
>> You are currently subscribed to ntfsd as: xxxxx@rkk.cz
>> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@sdlabs.demon.co.uk
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi!
Check your driver Dispatch for handling IOCTL_STORAGE_CHECK_VERIFY and
IOCTL_DISK_CHECK_VERIFY.
If not you may insert following.
case IOCTL_STORAGE_CHECK_VERIFY:
case IOCTL_DISK_CHECK_VERIFY:

ntStatus = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
break;

----- Original Message -----
From: Shaun
To: File Systems Developers
Sent: Monday, July 02, 2001 5:53 PM
Subject: [ntfsd] Formatting a virtual disk as FAT on W2K

> Hi,
>
> Does anyone know what you need to do to be able to format a virtual
> disk with FAT on Windows 2000. I can format my drive with NTFS on
> W2K and both FAT and NTFS on NT4 - just not FAT on W2K!
>
> The last thing I see before UFAT.DLL unloads is a IRP_MJ_PNP with
> a minor code of IRP_MN_QUERY_DEVICE_RELATIONS. The documentation
> seems to suggest this is optional for function drivers that don’t
> have a bus.
>
>
> Thanks.
> Shaun
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@mail.ru
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com