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: 54
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: 417
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
Hardware Guru
Hardware Guru
Posts: 1779
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: 54
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: 1178
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: 54
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: 1178
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: 54
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: 1178
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: 1178
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)

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

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

Postby marcello » Thu Sep 20, 2018 7:21 pm

Great, if you follow the tutorial at http://meta.libera.cc/2018/07/inspectin ... image.html, you should be able to read the content of your partitions.
STMint, try Unix on your 68000 Atari http://subsole.org/st_mint

User avatar
1st1
Atari Super Hero
Atari Super Hero
Posts: 797
Joined: Mon May 07, 2012 11:48 am

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

Postby 1st1 » Thu Sep 20, 2018 7:28 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.


Falcon! IDE? Byteswap!
Power without the Price. It's not a bug. It's a feature. _/|\_ATARI

1040STFM in PC-Tower (PAK68/2, OvrScn, 4 MB, 1GB SCSI, CD-ROM...) * 2x Falcon 030 32GB/14MB+ScrnBlstrIII * 2x TT030 73GB/20MB+Nova * 520/1040STFM * 520/1040STE * 260/520ST/+ * some Mega ST * 2x Mega STE 500MB/4MB+M.CoCo * Stacy * STBook * SLM605 * SLM804 * SLM605 * SMM804 * SH 204/205 * Megafile 30/44/60 * SF314 * SF354 * 5x Pofo * PC3

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

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

Postby leech » Thu Sep 20, 2018 8:55 pm

1st1 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.


Falcon! IDE? Byteswap!

Ha, yeah so the reason I am using this program is to byteswap it. I snagged a raw copy, which I can see the partitions on now, and am attempting to write it back to the disk. I may have gotten it to write back in Windows, something was funky with the drive or the USB adapter, not sure which.
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: 1178
Joined: Tue Dec 01, 2015 3:26 pm

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

Postby leech » Fri Sep 21, 2018 1:47 am

Does the falcon's IDE require it to be byte swapped? I always thought that it didn't have to be.
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (VBXE, U1MB, Stereo POKEY)
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

JeanMars
Atari freak
Atari freak
Posts: 53
Joined: Fri Apr 09, 2010 5:15 pm
Location: France
Contact:

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

Postby JeanMars » Fri Sep 21, 2018 6:46 am

Hi all,

is there a way to edit the img file and change its content from Linux or Windows?
Or simply a tool to extract/generate the .img from an existing Linux or Windows folder?

Thanks,
Jean

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

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

Postby ThorstenOtto » Fri Sep 21, 2018 3:48 pm

JeanMars wrote:is there a way to edit the img file and change its content from Linux or Windows?
Jean


Yes of course, if you can mount it, you can access the files just as normal.

JeanMars
Atari freak
Atari freak
Posts: 53
Joined: Fri Apr 09, 2010 5:15 pm
Location: France
Contact:

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

Postby JeanMars » Fri Sep 21, 2018 10:13 pm

Anything for Windows (except a Linux Virtual Machine :-)) ?

JeanMars
Atari freak
Atari freak
Posts: 53
Joined: Fri Apr 09, 2010 5:15 pm
Location: France
Contact:

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

Postby JeanMars » Sun Sep 23, 2018 7:57 am

Hi,

I gave it a try on Linux (CentOS7 and raspbian) but both give this output on disktype command:
disktype easymint_c.img

--- easymint_c.img
Regular file, size 250 MiB (262144000 bytes)
FAT16 file system (hints score 3 of 5)
Unusual sector size 4096 bytes
Volume size 249.9 MiB (261988352 bytes, 31981 clusters of 8 KiB)
and then:
sudo parted easymint_c.img print
Error: /home/pi/video_nas/tmp/easymint_c.img: unrecognised disk label

I'm trying to edit C drive from easymint distribution.

Any idea?
Thanks,
Jean

User avatar
marcello
Atari freak
Atari freak
Posts: 54
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 28, 2018 9:22 am

Hi Jean
it looks what you is a partition image, not the whole disk image.

-> FAT16 file system (hints score 3 of 5)

try to mount it with
mount -o loop easymint_c.img /mnt
STMint, try Unix on your 68000 Atari http://subsole.org/st_mint


Social Media

     

Return to “Applications”

Who is online

Users browsing this forum: No registered users and 8 guests