cnvogelg / amitools

Various tools for using AmigaOS programs on other platforms
258 stars 72 forks source link

Not possible to pack files back to CF card #115

Closed bni closed 4 years ago

bni commented 4 years ago

Im using macOS, and unpacking from the CF card works fine.

xdftool /dev/disk2 unpack .

However writing my changes back doesn't work:

xdftool /dev/disk2 pack AmigaOS 'pack AmigaOS' IOError: can't overwrite existing image file

xdftool /dev/disk2 write README does work however

I tried to wipe the contents, using these commands: rdbtool /dev/disk2 init rdbtool /dev/disk2 add bs=4096 size=100% bootable

But same error when trying to pack

cnvogelg commented 4 years ago

did you try -f ?

bni commented 4 years ago

That got me another error message:

$ rdbtool /dev/disk2 info PhysicalDisk: 0 61118 31292928 14Gi heads=16 sectors=32 block_size=512 LogicalDisk: 1 61118 31292416 14Gi rdb_blks=[0:511,#512] used=[hi=1,#2] cyl_blks=512 Partition: #0 'DH0' 1 61118 31292416 14Gi 100.00% DOS3/0x444f5303 blk_longs=128, sec/blk=8, surf=16, blk/trk=32 fs_block_size=4096 max_transfer=0xffffff mask=0x7ffffffe num_buffer=30 bootable pri=0 automount $ xdftool -f /dev/disk2 pack AmigaOS 'pack AmigaOS' IOError: can't create rdisk. use rdbtool first

MBeijer commented 4 years ago

When using rdf, you need to define which partition to pack to: xdftool -f /dev/disk2 open part=DH0 + pack AmigaOS

On Tue, Oct 22, 2019 at 10:16 PM Björn Nilsson notifications@github.com wrote:

That got me another error message:

$ rdbtool /dev/disk2 info PhysicalDisk: 0 61118 31292928 14Gi heads=16 sectors=32 block_size=512 LogicalDisk: 1 61118 31292416 14Gi rdb_blks=[0:511,#512] used=[hi=1,#2 https://github.com/cnvogelg/amitools/issues/2] cyl_blks=512 Partition: #0 'DH0' 1 61118 31292416 14Gi 100.00% DOS3/0x444f5303 blk_longs=128, sec/blk=8, surf=16, blk/trk=32 fs_block_size=4096 max_transfer=0xffffff mask=0x7ffffffe num_buffer=30 bootable pri=0 automount $ xdftool -f /dev/disk2 pack AmigaOS 'pack AmigaOS' IOError: can't create rdisk. use rdbtool first

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cnvogelg/amitools/issues/115?email_source=notifications&email_token=ACC5VBLHOVJUABR3MS3RZXLQP5NRPA5CNFSM4JDTXD5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7BR5Y#issuecomment-545134839, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACC5VBI7ARNB6QNWFNQKZD3QP5NRPANCNFSM4JDTXD5A .

bni commented 4 years ago

That was it. Thanks for your help

cnvogelg commented 4 years ago

Just to improve the experience here: 02fb212 adds support to pack into a partition even without open... (pack now behaves like the other xdftool commands and implicitly uses the first partition image in an rdb)

Please test :)

bni commented 4 years ago

I can confirm that it works now without open, assuming you have one partition only I guess.