KBNLresearch / ipmlab

Image Portable Media Like A Boss
Apache License 2.0
3 stars 1 forks source link

Image with null bytes created on empty floppy drive #18

Closed bitsgalore closed 2 years ago

bitsgalore commented 2 years ago

Tested with Windows 10, running in VM.

Expected behavior:

Actual behavior:

This ONLY happens while floppy drive is connected via write blocker. Interestingly, the size of the empty image file always seems to correspond to the size of the most recently processed disk. Looks like the write blocker generates an empty buffer based on most recently attached medium, and exposes that to the OS.

It is possible to identify this from the log file created by Aaru, e.g. ???cic.xml lists total number of blocks:

<?xml version="1.0"?>
<CICMMetadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <BlockMedia>
    <Image format="Raw disk image (sector by sector copy)" offset="0">270afede-23c0-11ed-b708-0800272c26ff.img</Image>
    <Size>1474560</Size>
    <Manufacturer>NEC</Manufacturer>
    <Model>USB UF000x</Model>
    <Interface>USB</Interface>
    <PhysicalBlockSize>512</PhysicalBlockSize>
    <LogicalBlockSize>512</LogicalBlockSize>
    <LogicalBlocks>2880</LogicalBlocks>

Then in ???resume.xml:

<?xml version="1.0"?>
<DicResume xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <BadBlocks>
    <Block>0</Block>
    <Block>1</Block>
    <Block>2</Block>
                ::
                ::
    <Block>2877</Block>
    <Block>2878</Block>
    <Block>2879</Block>
  </BadBlocks>

While testing without a write blocker, I noticed that Ipmlab was often unable to detect floppy after 1st attempt at reading with empty floppy drive. Could be virtualisation issue, as when this happened I was also unable to access the drive from the command line (directory listing).

bitsgalore commented 2 years ago

Update: this also happens on Linux. Without write blocker behavior is as expected (Ipmlab detects floppy drive is empty and prompts user).

bitsgalore commented 2 years ago

Most likely duplicate of:

https://github.com/KBNLresearch/ipmlab/issues/26

Closing this one.