On 11/4/22 2:56 AM, Christian Corti via cctalk wrote:
Short answer: ImageDisk
ACK
For FAT/DOS disks, I have a small script that creates
both an .imd file
and a .zip file of the disk contents,
Nice!
I think that's in the same ball park as I would have assumed I'd do if
someone had asked me this time last week.
essentially this:
DRV=/dev/fd0
DOSDRV="a:"
# Create both .imd and .dd image
Why the two types of image?
I assume that .imd is ImageDisk's native format.
I understand the raw sector by sector (byte by byte?) .dd image.
Aside: Does that mean that ImageDisk's /image/ is not the same sbs / bbb
image that a dd image is?
I assume that ImageDisk's format contains the same type of data,
possibly organized differently and / or compressed thus making the .imd
not directly usable by VM hypervisors or loopback mounts the same way
that a .dd image is.
imd -i1 -R -a -d $DRV -r "$NAME.imd"
# Compress
pigz -9 "$NAME.imd"
# Create directory listing
mdir -i "$NAME.imd.dd" -a/ > "$NAME.dir"
# Extract contents from .dd
mkdir "$NAME"
mcopy -i "$NAME.imd.dd" -smpv :: "$NAME/"
# ZIP contents
cd "$NAME"
zip -r "../$NAME.zip" .
# Remove temporary files
cd ..
rm -rf "$NAME"
rm -f "$NAME.imd.dd"
Interesting.
I'm going to have to look at the man pages to completely grok the
commands that you're using. The thing that stands out to me as the
biggest unknown is where the $NAME.imd.dd file is coming from. It seems
as if img (the main ImageDisk command?) is creating $NAME.imd file.
Does it also create $NAME.imd.dd file at the same time?
I like using mcopy (from mtools?) to extract the files to create a zip.
Nice technique.
--
Grant. . . .
unix || die