Jump to content











Photo
- - - - -

How to make firadisk recognize a sector mapped disk without switching to file backed one?

sector mapped disk firadisk winvblock

  • Please log in to reply
16 replies to this topic

#1 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 07 January 2017 - 11:53 AM

I want to boot windows with a vhd image which exists in an ext4 partition, I mapped the image file directly, obviously firadisk cannot recognize it, not without necessary information.
 
And I found that both firadisk and WinVBlock need parameters to assign a path to the sector mapped file, I guess this actually switched to ordinary file backed virtual disk, but my image file is stored in an ext4 partition, there can't be a path of it in windows file system.
 
I read that Karyonix talked about an idea in WinVBlock main thread, that use BIOS INT13 drive number for identification: http://reboot.pro/to...block/?p=101439

 

 

 

Another method for backing-disk identification by using INT13 drive number (as seen from NTLDR). 
  • Save drive number pair in registry 
    key = "whatever\BackingDisk", value = drive number of sector-mapped disk, type REG_DWORD, data = drive number of backing disk.
    example. value "80" data 0x90
  • In GRUB4DOS map backing disk as drive number specified in registry
    map (hd0,0)/aaaa.img (0x80)
    map (hd0) (0x90)
  • When driver read drive map slot, it see drive number 0x80. 
    Driver read registry value "80". It get data 0x90 which is drive number of backing disk. 
    Driver enumerate all disk on system and send IOCTL_DISK_GET_DRIVE_GEOMETRY_EX to each of them.
    If the returned diskdetectioninfo->DetectionType==DetectInt13 and diskdetectioninfo->DriveSelect == drive number of backing disk, we have found the backing disk.

 

But I didn't find implementations neither in firadisk nor WinVBlock, and I'm not a native English speaker, reading such a lot of posts is really tough for me, although I've been sitting reading almost half a day, so I decide to ask for help.
 
Thanks for reading, more if anyone would help. :heh:

Edited by fightingcat, 07 January 2017 - 11:55 AM.


#2 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 07 January 2017 - 12:20 PM

Another problem, when I tried to install WinVBlock using the inf file of it in windows 8.1, I got blue screen. All files are included in same folder, should I copy them to system drivers and inf folder first?



#3 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 January 2017 - 01:05 PM

The post you referred to was within a "brainstorming session" with all people trying to find suitable ways, they represent - more than anything else - ideas, proposals and "free exchange" of them.

I don't think  that most of those ideas were actually implemented in Winvblock or Firadisk.

 

Maybe there can be other ways, what is your problem?

I mean why do you need Firadisk (or Winvblock)?

Can't you map the extents of the .vhd to an empty partition slot?

 

:duff:

Wonko



#4 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 07 January 2017 - 03:45 PM

The post you referred to was within a "brainstorming session" with all people trying to find suitable ways, they represent - more than anything else - ideas, proposals and "free exchange" of them.

I don't think  that most of those ideas were actually implemented in Winvblock or Firadisk.

 

Maybe there can be other ways, what is your problem?

I mean why do you need Firadisk (or Winvblock)?

Can't you map the extents of the .vhd to an empty partition slot?

 

:duff:

Wonko

 

My problem is my .vhd file is in a Linux ext4 partition, it's not supported by windows file system, so I can't mount it or map it whatever other way than sector mapped disk. 



#5 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 January 2017 - 04:24 PM

My problem is my .vhd file is in a Linux ext4 partition, it's not supported by windows file system, so I can't mount it or map it whatever other way than sector mapped disk. 

If the .vhd file is contiguous you can map it to a partition alright (provided that you have an empty partition slot in the MBR).

The problem might be to have the .vhd file as a contiguous extent :unsure:.

 

IF the .vhd file is contiguous, you can use the blocklist command in grub4dos (which understand ext partitions fine) to enumerate the start an length, then use partnew to create a partition entry in an empty slot of the MBR.

 

:duff:

Wonko



#6 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 07 January 2017 - 06:08 PM

If the .vhd file is contiguous you can map it to a partition alright (provided that you have an empty partition slot in the MBR).

The problem might be to have the .vhd file as a contiguous extent :unsure:.

 

IF the .vhd file is contiguous, you can use the blocklist command in grub4dos (which understand ext partitions fine) to enumerate the start an length, then use partnew to create a partition entry in an empty slot of the MBR.

 

:duff:

Wonko

 

Is this affecting partition table permanently?


Edited by fightingcat, 07 January 2017 - 06:08 PM.


#7 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 January 2017 - 06:31 PM

Is this affecting partition table permanently?

Yes, but - on the other hand - it should be possible to re-set it from the booted Windows, as soon as the system is booted and the volume is mounted, the "indexing" in the MBR loses most of its relevance.

 

:duff:

Wonko



#8 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 07 January 2017 - 07:56 PM

Yes, but - on the other hand - it should be possible to re-set it from the booted Windows, as soon as the system is booted and the volume is mounted, the "indexing" in the MBR loses most of its relevance.

 

:duff:

Wonko

 

Thanks for your time, I'll have a try.



#9 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 07 January 2017 - 10:09 PM

Emmm....The problem might be ------ you cannot create large contiguous files with the ext4 filesystem, and I am afraid, you can't do it even with any Linux-specific filesystems currently available. grub4dos 0.4.6a supports mapping of fragmented files, with upto 32 fragments. Does firadisk also support it? Can anyone confirm?

 

IMHO, if you would not like to trouble yourself, you could use an MS filesystem(FAT32 or NTFS), or simply a whole (raw) partition for your IMG(so it will be contiguous for sure).



#10 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 08 January 2017 - 02:45 AM

Fragmented or contiguous file mappings in GRUB4DOS should not affect Firadisk.
Firadisk does not use all of them.

File-based drive in Firadisk is accessed through filesystem in Windows.
It is possible to use fragmented file with Firadisk but only on Windows filesystem.

#11 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 January 2017 - 12:30 PM

Emmm....The problem might be ------ you cannot create large contiguous files with the ext4 filesystem, and I am afraid, you can't do it even with any Linux-specific filesystems currently available. grub4dos 0.4.6a supports mapping of fragmented files, with upto 32 fragments. Does firadisk also support it? Can anyone confirm?

 

IMHO, if you would not like to trouble yourself, you could use an MS filesystem(FAT32 or NTFS), or simply a whole (raw) partition for your IMG(so it will be contiguous for sure).

That's exactly the issue.

 

The good Linux guys are still essentially in denial mode when you talk of defragging, but seemingly with ext4 *something* has been done towards the possibility of defragmenting, with e4defrag, but of course YMMV. :(

 

@Karyonix

Hi, nice to "see" you.

 

The issue here remains, to use a partition entry the file MUST be contiguous (and this won't need Firadisk at all).

 

Most probably it would be possible to add an ext4 filesystem driver (ext2fsd) to the Windows and thus allow firadisk access to the image, but I presume it would be complicated (for no real reason).

 

I mean WHY there is the *NEED* to have the image on an ext4 system?

 

:duff:

Wonko



#12 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 08 January 2017 - 04:38 PM

Just because I don't want have any other partition, just single one ext4 partition. When my windows files grows, I hope I can resize the .vhd instead of resizing a partition, which may cause a lot of data moving.



#13 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 08 January 2017 - 04:43 PM

Fragmented or contiguous file mappings in GRUB4DOS should not affect Firadisk.
Firadisk does not use all of them.

File-based drive in Firadisk is accessed through filesystem in Windows.
It is possible to use fragmented file with Firadisk but only on Windows filesystem.

 

Is that possible firadisk support sector mapped disk the way like your earlier idea?

And thank you for your excellent work. (Same for sha0)



#14 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 January 2017 - 05:21 PM

Just because I don't want have any other partition, just single one ext4 partition. When my windows files grows, I hope I can resize the .vhd instead of resizing a partition, which may cause a lot of data moving.

Well, this is filed (in my perverted mind) under "fancies", there is little actual *need* nor enough *reasons* to make such a complex setup.

 

BTW in the case of resizing a .vhd you will surely have fragmentation (which again notwithstanding what the good Linux guys think, is not at all a good idea).

 

Let's take some time thinking about it.

 

If (when) you will need to resize (grow) the .vhd, you will need enough free space on the ext4 partition to allow the growing.

Two possibilities:

1) you will have enough free space because your files did not use it

2) you will have to delete some files to gather the free space

 

If #1, then you can make the .vhd (actually the partition) already large enough.

If #2 there are two cases:

2a) your files are meaningless and thus you can delete them

2b) your files have some importance and you need to copy them to some other media

If #2a, then you can make the .vhd (actually the partition) already large enough and avoid filling the disk with meaningless data

If #2b, then you can get another disk to copy the data to it, thus freeing the ext4 partition, but then, if the data are movable, you can make the .vhd (actually the partition) already large enough and use it to store these files ...

 

But of course it is just me (I am notoriously a grumpy old bastard ;)).

 

:duff:

Wonko



#15 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 09 January 2017 - 08:55 AM

wow, that was really complex, it took me a while to understand(my poor English reading ability).

What you said It make sense, but I still want that dynamic way, and I am a nonsensible guy(maybe this is the problem :blink:  ).

And sorry I can't reply in time, I just replied and put it aside and forgot about it, oh my chaotic timetable.


Edited by fightingcat, 09 January 2017 - 08:55 AM.


#16 fightingcat

fightingcat
  • Members
  • 9 posts
  •  
    China

Posted 09 January 2017 - 08:38 PM

Emmm....The problem might be ------ you cannot create large contiguous files with the ext4 filesystem, and I am afraid, you can't do it even with any Linux-specific filesystems currently available. grub4dos 0.4.6a supports mapping of fragmented files, with upto 32 fragments. Does firadisk also support it? Can anyone confirm?

 

IMHO, if you would not like to trouble yourself, you could use an MS filesystem(FAT32 or NTFS), or simply a whole (raw) partition for your IMG(so it will be contiguous for sure).

 

Oh my... I didn't notice this repost before, and I didn't know that make files contiguous is difficult for linux fs, so apparently I asked a stupid question... I realized that once I read your reply at wuyou.net, thank you for your explanation.

thanks all of you, sorry I didn't understand, anyone should not make such mistake as I did.

 

end of the story.



#17 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 10 January 2017 - 11:02 AM

Don't worry too much, no need to be sorry. :)

 

:duff:

Wonko







Also tagged with one or more of these keywords: sector mapped disk, firadisk, winvblock

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users