info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-mtools] mformat 4.0.33 broken?


From: Alain Knaff
Subject: Re: [Info-mtools] mformat 4.0.33 broken?
Date: Tue, 21 Mar 2023 23:55:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

Hi,

Currently we were at version 4.0.42 (and now 4.0.43).

I couldn't reproduce the issue with 4.0.42, nor with 4.0.43. Could you
check whether you still experience the problem with a current version?

Also, when including scripts or other program code, either attach it,
or, if you include it inline, make sure that your that your mail client
does not mess up long lines.

Thanks,

Alain


On 25/02/2023 20:56, Alexey Frunze wrote:
> I've heard of mtools several times over the years but never used it myself
> until recently.
>>From the get go I ran into some odd problems.
> Here's my script to create an HDD image with a FAT partition:
> ----8<----
> # based on example at
> https://bochs.sourceforge.io/doc/docbook/user/diskimagehowto.html
> # broken     mtools 4.0.33-1+really4.0.32-1build1 (Ubuntu 22.04 jammy =
> Deian bookworm)
> # functional mtools 4.0.18-2+b1                   (Ubuntu 16.04 xenial =
> Debian stretch)
> 
> PWD=$(pwd)
> 
> BASE=hdd10mb
> IMG=$PWD/$BASE.img
> CFG=$PWD/$BASE.cfg
> 
> 
> echo "drive c: file=\"$IMG\" partition=1" > $CFG
> export MTOOLSRC=$CFG
> 
> 
> dd if=/dev/zero of=$IMG bs=1M count=10
> 
> echo init
> mpartition -I -s 63 -t 20 -h 16 c:
> 
> echo create
> mpartition -cpv -s 63 -t 20 -h 16 c:
> 
> echo activate
> mpartition -a c:
> 
> echo format
> mformat c:
> ----8<----
> 
> When running the above on Ubuntu 22.04 LTS I'm getting this output with an
> error from mformat:
> ----8<----
> 10+0 records in
> 10+0 records out
> 10485760 bytes (10 MB, 10 MiB) copied, 0.00907886 s, 1.2 GB/s
> init
> Warning: no active (bootable) partition present
> create
> sectors: 63 heads: 16 20480
> *Partition 1
>   active=80
>   start: h=1 s=1 c=0
>   type=0x4
>   end: h=15 s=63 c=19
>   start=63
>   nr=20097
> 
> The following command will recreate the partition for drive C:
> mpartition -c -b 63 -l 20097 -t 20 -h 16 -s 63 -b 63 C:
> activate
> format
> Weird: read size (19585) not a multiple of sector size (512)
> buffer_flush: short write
> Error writing boot sector
> ----8<----
> 
> There's a strange coincidence that 19585 = 20097 - 512.
> 20097 is in sectors, whereas 512 is in bytes.
> 
> Anyway... If I manually install an older version of mtools, 4.0.18
> (using a .deb from https://packages.debian.org/stretch/amd64/mtools/download
> ),
> everything seemingly works.
> 
> Alexey
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]