Atari Partition table support added to GNU parted (Unix/Linux partition tool)

All about the serious stuff.

Moderators: Mug UK, Zorro 2, Moderator Team

User avatar
marcello
Atari freak
Atari freak
Posts: 52
Joined: Thu May 03, 2012 9:23 pm

Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby marcello » Thu Jul 26, 2018 6:48 am

While browsing some random debian stuff, I noticed that libparted and the associated parted tools have Atari Partition table support added two years ago: https://bugs.debian.org/cgi-bin/bugrepo ... 239816#246

This means it is quite easy to access hard disk images, as you can display the partition table, you can easily find the sector limits of each partition and mount them. As far I know using mtools you can only inspect floppy disk images, not paritioned devices.

I wrote a sum up on how to use that in my blog:
http://meta.libera.cc/2018/07/inspectin ... image.html
STMint, try Unix on your 68000 Atari http://subsole.org/st_mint

ThorstenOtto
Captain Atari
Captain Atari
Posts: 364
Joined: Sun Aug 03, 2014 5:54 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby ThorstenOtto » Thu Jul 26, 2018 8:47 am

marcello wrote:As far I know using mtools you can only inspect floppy disk images, not paritioned devices.


Sure you can, look at /etc/mtools.conf:

Code: Select all

# First SCSI hard disk partition
drive c: file="/dev/sda1"


If all else fails, and you know where the partition starts, you can always create a loop device with an appropriate offset, and use that instead.

mikro
Atari God
Atari God
Posts: 1678
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby mikro » Thu Jul 26, 2018 9:21 am

Wow, I had no idea. Thank you for sharing!

I'm wondering why [c]fdisk couldn't get the same feature? That way it would be even easier to handle Atari disk images.

User avatar
marcello
Atari freak
Atari freak
Posts: 52
Joined: Thu May 03, 2012 9:23 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby marcello » Fri Jul 27, 2018 3:50 pm

ThorstenOtto wrote:
marcello wrote:As far I know using mtools you can only inspect floppy disk images, not paritioned devices.


Sure you can, look at /etc/mtools.conf:

Code: Select all

# First SCSI hard disk partition
drive c: file="/dev/sda1"


If all else fails, and you know where the partition starts, you can always create a loop device with an appropriate offset, and use that instead.


Actually for me that's the main interest of the atari support in parted, it can give me partition offsets on disk images, so I can do a loopback mount of the partition ( see the blog post)

It was interesting to see that the Atari table partition support was added by Debian to parted with the aim of reviving the Debian 68k port. I am curious to see of this will happen ( anyway I just have a STE )
STMint, try Unix on your 68000 Atari http://subsole.org/st_mint

User avatar
leech
Atari God
Atari God
Posts: 1157
Joined: Tue Dec 01, 2015 3:26 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby leech » Wed Sep 12, 2018 7:50 am

Is this still working? Tried to use parted to see my Falcon drive, but it didn't recognize any partitions on it.
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (VBXE, U1MB, Stereo POKEY)
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

User avatar
marcello
Atari freak
Atari freak
Posts: 52
Joined: Thu May 03, 2012 9:23 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby marcello » Fri Sep 14, 2018 10:59 pm

leech wrote:Is this still working? Tried to use parted to see my Falcon drive, but it didn't recognize any partitions on it.


I tested myself with a hard disk partitioned with the Atari Hard Disk tools, and it worked.
Maybe your disk was partitioned with a non standard tool ?
STMint, try Unix on your 68000 Atari http://subsole.org/st_mint

User avatar
leech
Atari God
Atari God
Posts: 1157
Joined: Tue Dec 01, 2015 3:26 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby leech » Sat Sep 15, 2018 8:39 pm

marcello wrote:
leech wrote:Is this still working? Tried to use parted to see my Falcon drive, but it didn't recognize any partitions on it.


I tested myself with a hard disk partitioned with the Atari Hard Disk tools, and it worked.
Maybe your disk was partitioned with a non standard tool ?

I partitioned it with HDDriver (probably version 9.x something)

Need to find the option for looking at the byte swapped thing or something. But two of the partitions are ext2, so I should be able to read those, I'd think.
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (VBXE, U1MB, Stereo POKEY)
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

User avatar
marcello
Atari freak
Atari freak
Posts: 52
Joined: Thu May 03, 2012 9:23 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby marcello » Sun Sep 16, 2018 11:20 am

I guest the problem is not the FS on the partitions, but the detection of the partitition table.
What is the output of the following command, where /dev/sdX is the block device pointing to your disk

disktype /dev/sdX

does a partition table is recognized here ?

example on a disk with Minix installed:
disktype minix.backup.img

--- minix.backup.img
Regular file, size 64.85 MiB (68000000 bytes)
ATARI ST partition map
Partition 1: 15 MiB (15728640 bytes, 30720 sectors from 2, bootable)
Type "GEM" (Standard GEMDOS)
FAT16 file system (hints score 3 of 5, ATARI ST bootable)
Volume size 14.93 MiB (15652864 bytes, 15286 clusters of 1 KiB)
Partition 2: 15 MiB (15728640 bytes, 30720 sectors from 30722)
Type "GEM" (Standard GEMDOS)
FAT16 file system (hints score 3 of 5)
Volume size 14.93 MiB (15652864 bytes, 15286 clusters of 1 KiB)
Partition 3: 1 MiB (1048576 bytes, 2048 sectors from 61442)
Type "GEM" (Standard GEMDOS)
FAT12 file system (hints score 2 of 5)
Volume size 1023 KiB (1047552 bytes, 1023 clusters of 1 KiB)
Partition 4: 31.00 MiB (32504832 bytes, 63486 sectors from 63490)
Type "BGM" (Big GEMDOS)
FAT16 file system (hints score 2 of 5)
Unusual sector size 1024 bytes
Volume size 31.00 MiB (32503808 bytes, 15871 clusters of 2 KiB)
STMint, try Unix on your 68000 Atari http://subsole.org/st_mint

User avatar
leech
Atari God
Atari God
Posts: 1157
Joined: Tue Dec 01, 2015 3:26 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby leech » Sun Sep 16, 2018 11:14 pm

Code: Select all

sudo disktype /dev/sdg

--- /dev/sdg
Block device, size 118.2 GiB (126963679232 bytes)


Looks like this might work though.

[code]
disktype Falcon.raw

--- Falcon.raw
Regular file, size 118.2 GiB (126963679232 bytes)
ATARI ST partition map
Partition 1: 972.7 MiB (1019902464 bytes, 1991997 sectors from 2, bootable)
Type "BGM" (Big GEMDOS)
Partition 2: 972.7 MiB (1019934720 bytes, 1992060 sectors from 1991999)
Type "BGM" (Big GEMDOS)
Partition 3: 9.537 GiB (10240473600 bytes, 20000925 sectors from 3984059)
Type "LNX" (Unknown)
Ext4 file system
UUID 7B59529F-0847-417E-945E-4484591EF2BA (DCE, v4)
Volume size 9.537 GiB (10240466944 bytes, 2500114 blocks of 4 KiB)
Partition 4: 106.8 GiB (114676853760 bytes, 223978230 sectors from 23984984)
Type "LNX" (Unknown)
FAT32 file system (hints score 4 of 5)
Volume size 106.7 GiB (114564956160 bytes, 13984980 clusters of 8 KiB)
Ext2 file system
UUID 59397FF1-A1AC-4786-956C-EBD22E2C7B16 (DCE, v4)
Volume size 106.8 GiB (114676850688 bytes, 27997278 blocks of 4 KiB)
[\code]
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (VBXE, U1MB, Stereo POKEY)
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

User avatar
leech
Atari God
Atari God
Posts: 1157
Joined: Tue Dec 01, 2015 3:26 pm

Re: Atari Partition table support added to GNU parted (Unix/Linux partition tool)

Postby leech » Sun Sep 16, 2018 11:18 pm

And look at this.

Code: Select all

parted Falcon.raw
GNU Parted 3.2
Using /media/jfergus/Emulation/Falcon.raw
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                               
Model:  (file)
Disk /media/jfergus/Emulation/Falcon.raw: 127GB
Sector size (logical/physical): 512B/512B
Partition Table: atari
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1024B   1020MB  1020MB  primary               boot
 2      1020MB  2040MB  1020MB  primary
 3      2040MB  12.3GB  10.2GB  primary  ext2
 4      12.3GB  127GB   115GB   primary  ext2


So indeed the raw image is happy.
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (VBXE, U1MB, Stereo POKEY)
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)


Social Media

     

Return to “Applications”

Who is online

Users browsing this forum: No registered users and 5 guests