Jump to content











Photo
- - - - -

FILEDISK and RAMDISK


  • Please log in to reply
35 replies to this topic

#1 ambralivio

ambralivio

    Frequent Member

  • Advanced user
  • 195 posts
  •  
    Italy

Posted 13 May 2011 - 01:00 PM

I've searched/browsed for a long time in this forum (but also googling) about this topic and till now I found a lot of documentation/tutorials/discussion, but only limited to RAMDISK.

But NOTHING, or very limited information, on FILEDISK.
Please, adviced me if I missed or misregarded/skipped some thread/topic on the matter.

Therefore, and if permitted, I'd like to open a new topic on the matter, with the main aim to better understand and possibly to clarify :

- What are the related features of these two "concepts" and driver types
- An effective comparison between them, if it does make sense
- When, and with limitations, they can (or have to) be used
- Other, more general, types of related drivers, like SCSI miniport.

Please, note that more than discussing about the specific & dedicated drivers (Winvblock, Firadisk, etc), the main interest here is on their "concepts" and what are the ideas beyond them, more than a discussion on the specific & related drivers, at least for starting.

I think that an effective clarification on this topic should be worthwhile for most of the "medium power" users/members in this Forum.

Thanks in advance to all that want to partecipate to the topic.

ambralivio

#2 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 13 May 2011 - 01:27 PM

A virtual disk is not a physical disk. Its operations are typically dealt with by software, rather than by hardware.

A RAM disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually stored in memory.

A sector-mapped disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually mapped to sectors on another disk.

A file-backed disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually stored in a file.

Several drivers are capable of providing both kinds of virtual disk, including, but not limited to: ImDisk, WinVBlock, Firadisk.

#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 May 2011 - 01:44 PM

HMM. :thumbsup:

  • A RAM disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually stored in memory.
  • A sector-mapped disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually mapped to sectors on another disk.
  • A file-backed disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually stored in a file.


Several drivers are capable of providing both kinds of virtual disk, including, but not limited to: ImDisk, WinVBlock, Firadisk.


It does remind me of the "fifth book in the increasinlgly inaccurately named trilogy of four"
http://en.wikipedia.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy#Novels

:cheers:

:worship:
Wonko

#4 ambralivio

ambralivio

    Frequent Member

  • Advanced user
  • 195 posts
  •  
    Italy

Posted 13 May 2011 - 01:53 PM

I was almost sure I'd have raised some misunderstandings and doubts, and that's why I opened the topic.

Wonko,

please can you better explain your doubts about Shao's response ?

ambralivio

#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 May 2011 - 02:46 PM

I was just kidding. :worship:

All mentioned drivers can work as "ramdisk".
All mentioned drivers can work as "filedisk" (in the sense of file-backed disk).
All mentioned drivers BUT IMDISK can work as "filedisk" (in the sense of sector mapped disk).

"both" implies "two", but we have three "kinds", actually two :thumbsup::
  • Ramdisk
  • Filedisk
(the latter that can be divided into file-backed disk and sector mapped disk, but Sha0 originally listed three "kinds")
The actual list structure should be:
1. Ramdisk

2. Filedisk -|

             |2.1 file-backed filedisk

             |2.2 sector mapped filedisk

Additionally both Firadisk and WinVblock when used in connection with a HD-like image (i.e. partitioned and with MBR/hidden sectors) map the images ENTIRELY, whilst IMDISK is more a "Volume driver" (like the original filedisk by Bo Branten) and though it can actually mount these kind of images, it actually "skips" the MBR and hidden sectors and mounts just the volumes inside it.

In other words different virtual disks may be "connected" to a lower or higher level in the Windows NT architecture.

Examples:
  • filedisk by Bo Branten cannot be accessed as \\.\PhysicalDrive (and isn't shown in Device Manager) (and it's a "filedisk" but NOT a "ramdisk")
  • IMDISK by Olof Lagerkvist cannot be accessed as \\.\PhysicalDrive (and isn't shown in Device Manager) (and it is BOTH a "ramdisk" and a "filedisk", but only "file-backed")
  • VDK by Ken Kato can be accessed as \\.\PhysicalDrive (but isn't shown in Device Manager)(and it's a "filedisk" but NOT a "ramdisk" and only "file-backed")
  • VSS by Microsoft can be accessed as \\.\PhysicalDrive (and is shown in Device Manager)(and it's a "filedisk" but NOT a "ramdisk" and only "file-backed")

Sha0 and/or Karyonix may fill the blanks for:
  • firadisk by Karyonix ....
  • WinVblock by Sha0 ....
I presume that they are at the same time ramdisk, file-backed filedisk and sector mapped filedisk, besides being "bootable".

:cheers:
Wonko

#6 ambralivio

ambralivio

    Frequent Member

  • Advanced user
  • 195 posts
  •  
    Italy

Posted 13 May 2011 - 04:49 PM

Shao and Wonko,

thanks a lot. Now I have enough data for studying the subject.

In the meantime, and waiting also for additional info from Shao & Karyonix, could you please complete the info by listing the features/characteristics of the so called miniport type driver, in comparison to filedisk/ramdisk drivers.

If I'm right, that type of driver is what Wonko would desire to have since a lot of time........instead of virtual disk driver.......

Thanks again,
ambralivio

#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 May 2011 - 05:36 PM

If I'm right, that type of driver is what Wonko would desire to have since a lot of time........instead of virtual disk driver.......

But Wonko (and everyone else :thumbsup:) do have them, BOTH firadisk and WinVblock are EXACTLY that.

ADDITIONALLY, they can "hook" grub4dos (and Syslinux/memdisk - not sure if both drivers can do this) mapped drives.

In other words they both provide the needed functionalities to boot from an image file (something that none of the others previously mentioned allow).

And yes, I do know (or presume to know :worship:) most of their features, but I find appropriate that their actual Authors would illustrate them in their own words. :cheers:

:(
Wonko

#8 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 13 May 2011 - 05:38 PM

thanks a lot. Now I have enough data for studying the subject.

You're welcome, I'm sure.

...could you please complete the info by listing the features/characteristics of the so called miniport type driver, in comparison to filedisk/ramdisk drivers.

A Windows NT SCSI Miniport driver is not mutually exclusive to file-backed, sector-mapped, or RAM disk drivers.
  • A RAM disk driver can be a SCSI miniport driver
  • A file-backed disk driver can be a SCSI miniport driver
  • A sector-mapped disk driver can be a SCSI miniport driver
  • A RAM disk driver can be a driver which is not a SCSI miniport driver
  • A file-backed disk driver can be a driver which is not a SCSI miniport driver
  • A sector-mapped disk driver can be a driver which is not a SCSI miniport driver
A SCSI miniport driver is supposed to be constrained to only using the SCSIPORT.SYS library routines. Since many SCSI "storage controller" drivers have many common operations, it makes sense that some of this commonality is pushed out into the common SCSIPORT.SYS driver library.

  • WinVBlock is not a SCSI miniport driver. It is a PnP driver (so its devices are in Device Manager)
  • Firadisk, the last time I checked, has both SCSI miniport and non-SCSI-miniport code. It is a PnP driver (so its devices are in Device Manager)

If I'm right, that type of driver is what Wonko would desire to have since a lot of time........instead of virtual disk driver.......

"Instead of" doesn't make sense, since the two are not mutually exclusive. A driver can be a SCSI miniport driver and a virtual disk driver.

Now at least both of the three of us are on the same page, right? :thumbsup:

#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 May 2011 - 05:50 PM

Now at least both of the three of us are on the same page, right? :worship:

Yep :thumbsup: .

And for the record this is post #9 on this thread, which can be referred to using the link:
http://reboot.pro/14.../strong></span>

:(

:cheers:
Wonko

#10 ambralivio

ambralivio

    Frequent Member

  • Advanced user
  • 195 posts
  •  
    Italy

Posted 13 May 2011 - 08:29 PM

Yep :thumbsup: .

And for the record this is post #9 on this thread, which can be referred to using the link:
http://reboot.pro/14.../strong></span>

:rofl:

:cheers:
Wonko


Wonko,

are you maybe recommending to close the thread ?

Really I do not understand your (often dry) ironical sense , even if you should be aware that, being Italian (and from the South side), I could have a bigger irony than you.
Anyway, thanks a lot for your support.

A special thanks to Shao.I appreciated a lot your kindness and clarification.

ambralivio

#11 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 13 May 2011 - 08:53 PM

Wonko,

are you maybe recommending to close the thread ?

I doubt it. He noted earlier that I said "both" when there were 3 scenarios instead of 2. Then I made a joke about it by saying "both" for 3 things again. Then he responded that his post #9 could be navigated-to using a link which ends with 8. He bolded #9 in his post, and he highlighted the 8 in red, to try to emphasize the contrast between the two numbers.

#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 May 2011 - 03:56 PM

Sure. :rofl:
Still kidding :thumbsup: , ...and wait until you get to first Sector of a disk, which is CHS 0/0/1 or LBA 0 .... :w00t: :cheers:

:cheers:
Wonko

#13 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 20 February 2012 - 11:26 AM

A RAM disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually stored in memory.

An example might be the type of disk mapped by Grub4DOS while "map --mem" is used.

A file-backed disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually stored in a file.

An example might be the type of disk mapped by Grub4DOS while "map" is used without "--mem".

A sector-mapped disk is a virtual disk where the data contents of the sectors making up the virtual disk are actually mapped to sectors on another disk.

What could an example be?

#14 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 10 May 2012 - 03:33 AM

What could an example be?


As I am still unanswered, I am reviving this old thread re-quoting myself.

I found wimb saying here

Xp Setup in TXT and GUI mode hangs at filecopy when the Image file is file-backed.
So the XP IMG file must be sector-mapped for me and then everything is OK.


Can anyone please clarify how are file-backed & sector-backed filedisks are different?

#15 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 10 May 2012 - 06:04 AM

Can anyone please clarify how are file-backed & sector-backed filedisks are different?

The given Link does not work, but you have to look here
http://reboot.pro/98...300#entry126715

Sha0 will be the best to give explanation, but unfortunately he is not seen here for long time.
Anyway with WinVBlock driver a sector mapped FILEDISK is working always OK for me.

:cheers:

#16 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 10 May 2012 - 06:10 AM

The given Link does not work, but you have to look here
http://reboot.pro/98...300#entry126715


Thanks for pointing out. I fixed the link in my post.

Sha0 will be the best to give explanation, but unfortunately he is not seen here for long time.
Anyway with WinVBlock driver a sector mapped FILEDISK is working always OK for me.


Nope, you didn't get my query. I need not wait for Mr. Miller because you are also the person who can answer. My question is not at all tied up with WinVBlock or Firadisk, rather it's much more basic. Probably more fundamental which you might think someone asking here. :P

I rephrase my question,
  • How do you prepare a sector-mapped filedisk?
  • How do you prepare a file-backed filedisk?


#17 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 10 May 2012 - 06:41 AM

IMG_XP_Create.exe or VHD_XP_Create.exe are programs that can make (empty) FILEDISK.
Such Image files are in all aspects constructed just like a harddisk with one partition.
So they have MBR with partition table and the FILEDISK is ending on cylinder boundary.

Sector-mapped Or file-backed FILEDISK have the same construction.
It is only in the way the driver internally adresses the disk via Grub4dos.
That is why Sha0 has to give the explanation, since he knows what the driver is doing differently in both cases and will have the feeling about it.

As I see it a sector-mapped FILEDISK is just a contiguous number of sectors that have the construction of a harddisk with one partition.
And I can understand that everything is working then as in a normal hardisk.
I never got the feeling of why it would be needed to address in grub4dos menu differently and what the file-backed feature was doing.
For me file-backed in grub4dos menu was for WinVBlock driver and XP always giving troubles .....
So I decided to use only the simple sector-mapped adressing in Grub4dos menu.

:cheers:

#18 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 10 May 2012 - 06:51 AM

@wimb

Even after your detailed reply, idea is a bit hazy to me.

IF, a SECTOR-mapped filedisk is an EXACT replica of the bits & bytes on the sectors of a hard-disk partition, then what a FILE-backed filedisk is?

#19 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 10 May 2012 - 07:08 AM

@wimb

Even after your detailed reply, idea is a bit hazy to me.

IF, a SECTOR-mapped filedisk is an EXACT replica of the bits & bytes on the sectors of a hard-disk partition, then what a FILE-backed filedisk is?

The construction for both is the same.
The difference is internally in how the WinVBlock driver via grub4dos menu will work.
But I don't know the details for that.
I only experienced that sector-mapped addressing is working OK, whereas file-backed addressing is giving troubles.

#20 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 10 May 2012 - 08:09 AM

IMG_XP_Create.exe or VHD_XP_Create.exe are programs that can make (empty) FILEDISK.


Though I have never used these tools, I preseume these are what above tools do:
  • Given the size of the VHD, it rounds it off to nearest multiple of cluster size.
  • Depending upon the filesystem, it adds a standard MBR code, possibly with magic signature.
  • Fabricates the partition table.
  • Depending upon the filesystem, it adds required number of hidden sectors.
  • Depending upon the filesystem, it adds required number of reserved sectors.
  • Depending upon the filesystem, it adds a standard VBR code, possibly with magic signature.
  • Depending upon the filesystem, it adds required number of bytes allocated for root directory.
  • It adds up calculated number of bytes from step #1.
  • All the bytes are either 0-filled or created as a sparse file on NTFS systems.
This is how your tools, I guess, creates a FILE-backed filedisk.
Please correct me even if I am completely wrong.


Doesn't MBRBatch work on the same principle, i.e. doesn't it also create a FILE-backed SECTOR-mapped filedisk?


For structural explanation of SECTOR-mapped FILE-backed filedisks, let's wait for Sha0 to turn up.


For me file-backed in grub4dos menu was for WinVBlock driver and XP always giving troubles .....
So I decided to use only the simple sector-mapped adressing in Grub4dos menu.


Where are the "separate" options for FILE-backed & SECTOR-mapped filedisks in grub4DOS menu?

#21 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 10 May 2012 - 08:35 AM

For structural explanation of SECTOR-mapped filedisks, let's wait for Sha0 to turn up.

What I am using is sector-mapped FILEDISK which I understand how it works.
What Sha0 should explain is how file-backed FILEDISK is working with his driver and which I don't use.

So you have made some confusion by your statements in which you put it reversed.

My programs make indeed FILEDISK in a comparable way as mbrbatch of jaclaz is doing,
allthough in his case initially the disk signature bytes were missing in the MBR.

My program creates:
MBR with XP-mbr bootcode derived from dmadmin.dll and add disk signature bytes and constructed partition table.
The filedisk has 63 reserved sectors as in normal XP before the actual partition begins.
Partition always ends as in normal XP precisely at a cylinder boundary.

The rest is done by formatting the partition with NTFS compression.
which creates the NTFS bootsector and FileSystem.

:cheers:

#22 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 10 May 2012 - 10:44 AM

What I am using is sector-mapped FILEDISK which I understand how it works.
What Sha0 should explain is how file-backed FILEDISK is working with his driver and which I don't use.

So you have made some confusion by your statements in which you put it reversed.


I strikethrough-ed my errors & corrected the original post above.

My programs make indeed FILEDISK in a comparable way as mbrbatch of jaclaz is doing,
allthough in his case initially the disk signature bytes were missing in the MBR.

My program creates:
MBR with XP-mbr bootcode derived from dmadmin.dll and add disk signature bytes and constructed partition table.
The filedisk has 63 reserved sectors as in normal XP before the actual partition begins.
Partition always ends as in normal XP precisely at a cylinder boundary.


Very nicely explained :clap: Got the entire picture.

Just a couple of questions:

The rest is done by formatting the partition with NTFS compression.
which creates the NTFS bootsector and FileSystem.


Thought seemingly unrealated, are you using WinAPI to mount & format the virtual disk or your app is taking care of the formatting itself?

AND, what still unanswered is

For me file-backed in grub4dos menu was for WinVBlock driver and XP always giving troubles .....
So I decided to use only the simple sector-mapped adressing in Grub4dos menu.


Where are the "separate" options for FILE-backed & SECTOR-mapped filedisks in grub4DOS menu?

#23 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 10 May 2012 - 11:09 AM

After mounting the Image file in ImDisk Virtual drive, then simply format.com is used.

You find the different grub4dos menu entries in
http://reboot.pro/13..._25#entry121029
http://reboot.pro/13...100#entry121506

#24 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 11 May 2012 - 03:48 AM

After mounting the Image file in ImDisk Virtual drive, then simply format.com is used.


Got it.

You find the different grub4dos menu entries in
http://reboot.pro/13..._25#entry121029
http://reboot.pro/13...100#entry121506


:dubbio:

#25 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 11 May 2012 - 05:30 AM

Better here

http://reboot.pro/81...225#entry101891

http://reboot.pro/81...275#entry119816

:cheers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users