[Parted-maintainers] Bug#239816: bug#16134: libparted Atari partition table support
Michael Schmitz
schmitzmic at gmail.com
Sat Oct 15 21:02:46 UTC 2016
Hi Adrian,
Am 16.10.2016 um 08:32 schrieb John Paul Adrian Glaubitz:
> On 10/15/2016 09:15 PM, Michael Schmitz wrote:
>> good to see you managed to fix the libparted issues!
>
> Thanks. I just happened to be in the situation that I'm writing a guide
> how to set up a minimal Debian/m68k system on ARAnyM from scratch.
>
>>> Ah, it works after enabling byte-swapping in ARAnyM :).
>>
>> Did you write the table on the host and then had to byte swap to get it
>> read in ARAnyM?
>
> Correct. I created an empty image, mapped it to /dev/loop0 using losetup
> and ran my patched version of parted to create an Atari partition table
> plus two partitions for the system and swap.
>
> In ARAnyM, I had to enable byte-swapping as otherwise the partitions
> were not recognized.
>
>> Just checked - Atari byte order disk image files of IDE disks don't need
>> byte swapping. Host native byte order ones do, that suggests your
>> partition table is in host native order. To get it to work in ARAnyM out
>> of the box, and more importantly on real hardware the partition table
>> would need to be written to the disk image with byte swapping.
>
> Wouldn't ARAnyM or a real Atari write the data byte-swapped to the
> disk anyway? I would expect that parted just uses the host order
Correct - running parted on Atari or ARAnyM would write the data in the
correct order without a swap option. It's just preparing disk images on
another system (and then using dd to copy that image to a physical disk)
that would need a different byte order.
> which is why I had to byte-swap the disk image when using it in
> ARAnyM. But I think we could add the byte-swapping later if
> necessary.
You mean when creating a disk image from the loopback device, or when
copying the image to disk? That might be a more generic way to handle
the weird Atari IDE byte order (including creating filesystems on the
image and copying data over).
Best leave the code as is for now until we've had a chance to test. I'll
have to get a scratch disk for testing anyway.
Cheers,
Michael
>> Note that SCSI disks don't need byte swapping so if you want to support
>> both targets, libparted would need a byte swap option ...
>
> Ok, good to know.
>
> Adrian
>
More information about the Parted-maintainers
mailing list