how to format a ramdisk with ntfs

Hello,
I have seen Microsoft Ramdisk sample code for creating a virtual drive(ramdisk) with FAT filesystem. But how to format the drive with ntfs filesystem. Is it that ntfs boot sector has to be written like FAT. Or else is there any other way to convert Fat file system to NTFS file system? I tried with different disk IOCTLS to change the partition type and drive layout but i couldn’t.
Please direct me how to format a ramdisk with ntfs. Any positive response in this regard would be appreciable.

There’s format.com and convert.exe. Additionally, a trivial MSDN search reveals that Win32_Volume has a Format method which can format NTFS volume (right on the front page for “format ntfs volume”).

  • S

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@atc.tcs.com
Sent: Sunday, January 24, 2010 9:53 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] how to format a ramdisk with ntfs

Hello,
I have seen Microsoft Ramdisk sample code for creating a virtual drive(ramdisk) with FAT filesystem. But how to format the drive with ntfs filesystem. Is it that ntfs boot sector has to be written like FAT. Or else is there any other way to convert Fat file system to NTFS file system? I tried with different disk IOCTLS to change the partition type and drive layout but i couldn’t.
Please direct me how to format a ramdisk with ntfs. Any positive response in this regard would be appreciable.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thank you Ken.

I have used format command like …
format Z: /fs:ntfs
But it gives me msg - Error in IOCTL call.

I have also used convert.exe – convert Z: /fs:ntfs
but it also gives me msg --Cannot determine file system of drive Z:.

so, how should I proceed now.

This is not my thing really, but I don’t think that you can format that sample (msft wdk ramdisk) as NTFS. Take a look at RamdiskFormatDisk().

Backing up a bit, why do you want to format it as NTFS?

mm

I want a memory drive that has NTFS on it to add some features to that drive which I could not do with FAT.

I actually want to add some features related to security on the ramdisk. so, I want NTFS on that drive. it is programatically determining the file system as FAT when i use GetVolumeInformation().
But when I tried to use convert.exe, it is resulting in a msg that it could not determine the filesystem on the drive. What could be the reason for it?

can any body please help me out how to format a ramdisk with NTFS.

On Mon, 25 Jan 2010, xxxxx@atc.tcs.com wrote:

can any body please help me out how to format a ramdisk with NTFS.

A working RAM-disk can be formated to any file system, you should se if
you can find a better one or you can try to add the missing IOCTLs
yourself.

> I have used format command like …

format Z: /fs:ntfs
But it gives me msg - Error in IOCTL call.

You need to support all IOCTLs required by FORMAT.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

How can I find all that need to be supported ?
How can I find all that are sent by FORMAT ?

Harish

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Monday, January 25, 2010 2:00 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] how to format a ramdisk with ntfs

I have used format command like …
format Z: /fs:ntfs
But it gives me msg - Error in IOCTL call.

You need to support all IOCTLs required by FORMAT.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Breakpoint in IOCTL handler in the driver can help, or KdPrint of all unrecognized IOCTLs.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

“Arora, Harish” wrote in message news:xxxxx@ntfsd…
How can I find all that need to be supported ?
How can I find all that are sent by FORMAT ?

Harish

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Monday, January 25, 2010 2:00 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] how to format a ramdisk with ntfs

> I have used format command like …
> format Z: /fs:ntfs
> But it gives me msg - Error in IOCTL call.

You need to support all IOCTLs required by FORMAT.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

On Mon, 25 Jan 2010, Arora, Harish wrote:

How can I find all that need to be supported ?

You can study the different virtual disks that is available, they are
rather close in design.

I have tried with IOCTL_SET_DRIVE_LAYOUT_EX, IOCTL_SET_PARTITION_INFO, IOCTL_DISK_UPDATE_PROPERTIES to change the partition type.
Even though DeviceIoControl does not return any error, the file system is FAT itself but not changed to NTFS.
could any one please tell me what are the IOCTLS that should be used to change the FAT filesystem on a Ramdisk sample to NTFS.