Jump to content











Photo

Buidling/modifying floppy images with mtools (as replacement for WinImage/Imdisk/...)


  • Please log in to reply
32 replies to this topic

#26 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 2 weeks ago

After years of "silence", (upstream) mtools has been updated recently (version 4.0.20 released during 2018Nov).

It would be nice to have an updated port to Windows of the latest version of mtools.


FWIW, the new text added to the "NEWS" file since version 4.0.18 is:
 

v4_0_20
    - initialize directory entries to 0
    - bad message "Too few sectors" replaced with "Too many sectors"
    - apostrophe in mlabel no longer causes generation of long entry
    - option to fake system date for file creation using the
    SOURCE_DATE_EPOCH environment variables

    - can now be compiled with "clang" compiler
    - fallback function for strndup, for those platforms that don't have it
    - fixed a number of -Wextra warnings

    - new compressed archive formats for uz/lz

    - allow to specify number of reserved sectors for FAT32.
    - file/device locking with timeout (rather than immediate failure)
    - fixed support for BPB-less legacy formats.
    - removed check that disk must be an integer number of tracks.

    - removed .eh/.oh macros from manual pages
v4_0_19
    - Fix for short file names starting with character 0xE5
    (by remapping it to 0x5)
    - mpartition: Partition types closer to what Microsoft uses
    - mformat: figure out LBA geometry as last resort if geometry
    is neither specified in config and/or commandline, nor can be
    queried from the device
    - mformat: use same default cluster size by size as Microsoft
    for FAT32
    - additional sanity checks
    - document how cluster size is picked in mformat.c man page
    - document how partition types are picked in mpartition.c man page


#27 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 2 weeks ago

And only a few days after upstream released version 4.0.20, we now have mtools 4.0.21.
 
Improvements since the 4.0.20 release are:

  - Fixed compilation for MingW
  - After MingW compilation, make sure executable has .exe extension
  - Addressed compiler warnings
  - Fixed length handling in character set conversion (Unicode file
    names)
  - Fixed matching of character range, when containing Unicode
    characters (mdir "c:test[α-ω].exe")
  - Fixed initialization of my_scsi_cmd constructor


#28 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted A week ago

v4_0_22
	- Fixed -f flag for mformat (size is KBytes, rather than sectors)
	- Fixed toupper/tolower usage (unsigned char rather than plain signed)



#29 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 2 days ago

v4_0_23
- Address lots of compiler warnings (assignments between different types)
- Network speedup fixes for floppyd (TCP_CORK)
- Typo fixes
- Explicitly pass available target buffer size for character set conversions

Anyone willing to port an updated version to Windows?



#30 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted A day ago

Anyone willing to port an updated version to Windows?


Only out of curiosity, which actual improvements (in functionality) are there in these new versions?

It seems to me like the only meaningful one is that about FAT32 "reserved sectors" :dubbio: (for which BTW I could have some practical use).

Nothing seemingly that could better the experience when creating floppy images, though.

Apart the several betterings :) for compiling it (which are "transparent" for the final user) the other features seem more like better auto-complete of missing parameters (nice but not "vital" for advanced users).

I'll check how "current available compiled version" behaves with FAT32 reserved sectors, anyway (I cannot remember any issues with it, but possibly never actually used the switch :unsure:)

:duff:
Wonko

P.S.: Confirmed an option "-R" has been seemingly added to the new version (it is missing in the 4.018 version).:
http://www.gnu.org/s...ls.html#mformat

 

 

R

Sets the number of reserved sectors for this filesystem. This must be at least 1 for non-FAT32 disks, and at least 3 for FAT disks (in order to accommodate the boot sector, the info sector and the backup boot sector).

 



#31 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted A day ago

Only out of curiosity, which actual improvements (in functionality) are there in these new versions?


IMHO, the following items could be of interest to users.


_ bad message "Too few sectors" replaced with "Too many sectors"
is somewhat relevant to users in some cases.

_ "fixed support for BPB-less legacy formats"
might be a nice curiosity, perhaps to people (such as Wonko) using spreadsheets to build uncommon and/or old types of floppy images ;). But, I admit I don't remember whether Wonko's spreadsheet included "BPB-less legacy formats".

_ removed check that disk must be an integer number of tracks
should ease or allow for more flexibility in custom sizes (and thus, in custom FAT parameters).

_ mpartition: Partition types closer to what Microsoft uses.

_ mformat: figure out LBA geometry as last resort if geometry is neither specified in config and/or commandline, nor can be queried from the device.

_ mformat: use same default cluster size by size as Microsoft for FAT32
should hopefully ease/improve compatibility when using images in different scenarios / OSes / VMs.


There are items related to Unicode file names, and compiling in MingW. The latter might help when porting mtools to Windows; while the former can be relevant to users.


Now, regarding "allow to specify number of reserved sectors for FAT32", this is new in 4.0.20, and older versions of mtools were not able to set a different value than what was hard-coded. I think this item provides some additional flexibility, especially for users that like to "tinker" with special / rare / uncommon images - we know at least a couple of those here in reboot.pro, don't we? :)

When mtools 4.0.18 was released (a few years ago), it already supported setting specific/custom values for 'cylinders', 'heads' and 'sectors_per_track', but not for 'reserved_sectors'. In contrast, back then, dosfstools already had the 'reserved_sectors' feature but not the possibility of setting custom CHS values. I have not checked dosfstools lately (currently in github), so perhaps these values can be customized in more recent versions.

Anyway, even if others disagree with my above opinion, I still hope for some developer to achieve a Windows port of a newer/recent mtools version and share it here.

Even if not for mtools, it would be nice to see signs from Icecube again.

Regards,
Ady.

Slightly off-topic: Although parts of the mtools documentation has been updated, unfortunately the 'fat_size_calculation.pdf' document has not been updated/corrected since 2010, FWIW.

#32 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted A day ago

Even if not for mtools, it would be nice to see signs from Icecube again.


Yep, it's a lot of time he is not around and he was a precious resource both for his knowledge and for his attention to everything happening in the Linux world that could have some use among us non-primarily Linux people.

About mtools (specifically for mformat), it remains (the old version 4.018) good enough for floppy and superfloppies (FAT12 and possibly FAT16) but it has a number of "missing" or poorly implemented features for FAT32, at least in the quick tests I just made, besides the new addition of the -R parameter some other iIMHO needed features (not mentioned in the new versions changes) seems missing.

General:
there seems to be no way to set the "drive number" (offset 0x40) either 00 for floppy or 80 for hard disk

FAT32 specific:
It seems like the tool is made for a 2 sectors bootrecord, with the first one being the actual code+BPB and the second one containing the RRaA/rrAa data.
I made a couple tests, sector LBA 2 misses the "magic Bytes" 55AA using the XP/7 bootsector (/nt52 in bootsect.exe) and the third sector (which goes on 13th sector or relative LBA12 on XP/7) is not written (maybe it is expected a particular form for the source bootrecord. :unsure:
Also in my quick tests the copy of the bootrecord (left to the default offset of sector 6) is only one sector long, i.e. sector 7 misses the copy of the RRaA/rrAa data.

Nothng that cannot be manually fixed/corrected, of course :).

:duff:
Wonko

#33 tinybit

tinybit

    Gold Member

  • Developer
  • 1086 posts
  •  
    China

Posted 21 hours ago

Buidling ----> Building

 

Emm... Could this be fixed in the title,please?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users