henrikstengaard / hst-imager

Hst Imager is an imaging tool to read and write disk images to and from physical drives
MIT License
24 stars 2 forks source link

Proposed feature #1 - Fill the partition with a percentage of the disk space available #2

Closed roc-eab closed 2 years ago

roc-eab commented 2 years ago

The * option is really useful, because it fills the remainder of an image with the final paritition. For instance, when the DH0 is 100MB the DH1 takes the rest of the space, regardless how large the image is.

Maybe I am little "old-style" but as a matter of precaution, I tend to use the 99% of the remainder of the disk to avoid "final cylinder" issues.

If you feel appropriate, would it be possible adding the possibility to fill with a given percentage (say 99%) instead of the 100% of the space?

Thank you for your consideration.

henrikstengaard commented 2 years ago

Size in percentage is already supported, but might not have been fully tested for all commands.

Current version supports for example adding a partition sized 20% of Rigid Disk Block Size: hst.imager rdb part add test.vhd DH0 PFS3 20%

Just released a fix minutes ago, that allows initializing Rigid Disk Block sized 50% of disk: hst.imager rdb init test.vhd --size 50%

roc-eab commented 2 years ago

Downloaded the new version 952: Works like a champ, many thanks 👍

This is the full sequence, if it could be useful to others. I use it in powershell so no issues likewise using indivual commands in the Terminal CMD, however ,if you use a DOS batch mind the "--size 99%", because batches interpret the % as its command so use --size 99%%

hst.imager.exe blank WB3x.hdf 32GB hst.imager.exe rdb init WB3x.hdf --size 99% hst.imager.exe rdb fs add WB3x.hdf pfs3aio PDS3 hst.imager.exe rdb part add WB3x.hdf DH0 PDS3 500MB --bootable --max-transfer 130560 --buffers 80 --boot-priority 1 hst.imager.exe rdb part add WB3x.hdf DH1 PDS3 * --max-transfer 130560 --buffers 80 hst.imager.exe rdb part format WB3x.hdf 1 Workbench hst.imager.exe rdb part format WB3x.hdf 2 Data hst.imager.exe rdb info WB3x.hdf