[Top][All Lists]

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

Re: [Info-mtools] What does it take to support FAT12 dialects?

From: Alain Knaff
Subject: Re: [Info-mtools] What does it take to support FAT12 dialects?
Date: Mon, 7 Jun 2021 12:39:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

Hi Alex,

On 07/06/2021 11:35, Alexander Huemer wrote:
> Many thanks for this!
> I did some testing, this seems to work as intended.
> E.g.

Glad to hear this!

>> ~/src/_readonly/mtools/mtools-4.0.28/minfo -i 
>> /tmp/24.img\|data_map=1s,zero31s,28s,skip1s
>> ~/src/_readonly/mtools/mtools-4.0.28/mdir -i 
>> /tmp/24.img\|data_map=1s,zero31s,28s,skip1s -a ::
>> ~/src/_readonly/mtools/mtools-4.0.28/mcopy -i 
>> /tmp/24.img\|data_map=1s,zero31s,28s,skip1s -a :: .
> The parameters of the command below were suggested by `minfo`.
>> ~/src/_readonly/mtools/mtools-4.0.28/mformat -C -T 4800 -h 2 -s 30 -H 
>> 1710948352 -i "/tmp/foo.img|data_map=1s,zero31s,28s,skip1s" ::
> What I did not yet figure out is how I can write all files in a local 
> directory (e.g. from a previous `mcopy` call from an images file to the 
> disk) into an image file. This probably has little to do with the 
> but is simple lack of understanding on my end.
> I tried this:
>> ~/src/_readonly/mtools/mtools-4.0.28/mcopy -i :: * 
>> /tmp/foo.img\|data_map=1s,zero31s,28s,skip1s

Hmmm, weird. For some reason the command line looks all jumbled up 
(parameters in random order). I am not sure whether this was executed  
this way, or whether it happened while pasting into the mail.

In case it was indeed executed in this order, could you try whether it 
works better in order:

~/src/_readonly/mtools/mtools-4.0.28/mcopy -i 
/tmp/foo.img\|data_map=1s,zero31s,28s,skip1s * ::

> But get this response:
>> File "/tmp/foo.img|data_map=1s,zero31s,28s,skip1s/AEAOTHER.PUR" exists, 
>> overwrite (y/n) ?
> The image definitely has no content.

The broken command line ended up writing the files over the image file, 
rather than into it.

Due to a bug in mcopy (will be fixed), it didn't notice the attempt of 
writing multiple files into a single destination file (rather than 
directory) in this case, and thus tried to write each file from current 
directory in turn over the image file.

> It didn't exist before I created it 
> with `mformat`.
> What am I doing wrong here?

Order of parameters.

Is important, especially in copy commands :-)

You could end up accidentally overwriting the source with the intended 
destination :-)

> -Alex



reply via email to

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