IDE HD transfer

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

Post Reply
midimark
Atariator
Atariator
Posts: 22
Joined: Sat Jan 09, 2021 7:48 pm

IDE HD transfer

Post by midimark »

Hello, I am trying to get access to a couple of old IDE drives from my no longer working Falcon. I got a IDE to USB adapter and tried with Linux and Windows but nothing came up. A Mac recognized the IDE but couldn't read it and only left me the option of initializing the disk, which would erase everything.
My question is, would an emulator, like Hattari, be able to read the files on the old IDE drive if it is connected by USB?
Thanks,
Mark
ojanhk
Atarian
Atarian
Posts: 6
Joined: Thu Jun 18, 2020 2:03 pm

Re: IDE HD transfer

Post by ojanhk »

Hi, safest way would be to do a disk image first and use it with the emulator. If something goes wrong, you will just have to do a new image.
If your Mac recognizes the disk but can’t read it’s most likely because of the filesystem format used on the disk, but at list it can be seen.
To do a disk image on the Mac, first identify on which device the IDE is mounted: open terminal, use “diskutil list” to have a list of disks.
Once you get the disk, just use dd to make a disk image and mount this image in the emulator.
mikro
Hardware Guru
Hardware Guru
Posts: 2365
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: IDE HD transfer

Post by mikro »

Sure. At least in Linux / Mac OS X world where the disk device is just a special file.

Setup Hatari (or Aranym) so you are sure you can read / boot two IDE images and then just replace the second one with real disk (like /dev/sdc for instance). You may need to change access permissions to your disk device before that, though.
User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 961
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: IDE HD transfer

Post by mfro »

midimark wrote: Sun Feb 14, 2021 3:13 pm My question is, would an emulator, like Hattari, be able to read the files on the old IDE drive if it is connected by USB?
It probably would (you can point Hatari at physical devices) but I'd try that on an imaged copy of the device contents only.
It's just too easy to to do something wrong and destroy your valuable disk contents.

When you plug in your USB device the IDE drive is connected to on Linux, a new disk device should come up (watch syslog). Depending on your computer configuration, this will be /dev/sdc or something. Although Linux doesn't understand the Atari partition table, it should be possible to image the whole device using dd. Watch your steps, dd is called "disk destroyer" for a reason.

Once you have an image on your Linux machine, just start up hatari using the --ide-master command line switch pointing to that image file.
Last edited by mfro on Sun Feb 14, 2021 4:52 pm, edited 1 time in total.
midimark
Atariator
Atariator
Posts: 22
Joined: Sat Jan 09, 2021 7:48 pm

Re: IDE HD transfer

Post by midimark »

Thanks for your responses, I have limited skill with this stuff, but will try and learn.
The IDE disk (under Linux) appears in Gparted as /dev/sdc so Linux is at least recognizing that there is a Hard disk there.
Would I go to the terminal and "dd" /dev/sdc? Not sure how the command would work to create an image file.
Thanks
User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 961
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: IDE HD transfer

Post by mfro »

Yes. Make sure you have enough space for the whole disk on the Linux side, then do

Code: Select all

dd if=/dev/sdc of=falcon.img bs=1M
from a terminal window. Patience, this will take a while, but you should end up with a falcon.img file that is an exact copy of the disk contents.
Then try starting hatari with

Code: Select all

hatari --ide-master falcon.img
If all goes well, this should come up with your newly copied disk image just as your Falcon did before.
joska
Hardware Guru
Hardware Guru
Posts: 5017
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: IDE HD transfer

Post by joska »

Depending on which Linux distro you are using you might have to sudo to read the harddisk device.

Code: Select all

sudo dd if=/def/sdc of=falcon.img bs=1M
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
midimark
Atariator
Atariator
Posts: 22
Joined: Sat Jan 09, 2021 7:48 pm

Re: IDE HD transfer

Post by midimark »

wow! Thanks so much for this.
Now to get Hatari going...
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2360
Joined: Sun Jul 31, 2011 1:11 pm

Re: IDE HD transfer

Post by Eero Tamminen »

mfro wrote: Sun Feb 14, 2021 4:49 pm Then try starting hatari with

Code: Select all

hatari --ide-master falcon.img
If all goes well, this should come up with your newly copied disk image just as your Falcon did before.
Hard disk driver on that image may only work with specific CPU (68000 vs 030) or machine type, so one should also set suitable machine type (e.g. --machine falcon). If one uses EmuTOS (coming with Hatari binary releases) instead of original TOS, then that doesn't matter because EmuTOS supports all hard disks types directly and ignores the driver on the HD image.
midimark
Atariator
Atariator
Posts: 22
Joined: Sat Jan 09, 2021 7:48 pm

Re: IDE HD transfer

Post by midimark »

just installed Hatari on Ubuntu 20.
I am amazed!
Would be interested in what Falcon programs work.
Would the same procedure work with CDs as well as old hard drives?
Thanks for all the help.
Mark
stween
Retro freak
Retro freak
Posts: 12
Joined: Sat Mar 07, 2015 6:38 am

Re: IDE HD transfer

Post by stween »

Hello; jumping into this recent topic rather than creating my own, I have an old Falcon drive that I'd like to capture while it still spins. Tonight I unstuck the drive heads that probably haven't moved in 10+ years. The wonderful part is that the Falcon boots with this drive now!

I've used a USB to SATA, then SATA to IDE converter to image an Atari HD in the past -- the HD that was in my STE. So I know I'd basically want to use dd to grab a byte-for-byte copy of the disk and be done.

The Falcon drive isn't showing up in a manner that Linux is happy with though. Instead of spotting an 80MB drive, it gives me this:

Code: Select all

[ 6399.049379] usb 1-2: New USB device found, idVendor=0984, idProduct=0040, bcdDevice= 1.08
[ 6399.049385] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6399.049389] usb 1-2: Product: SATAWire        
[ 6399.049392] usb 1-2: Manufacturer: Apricorn
[ 6399.049395] usb 1-2: SerialNumber: 424342325A4A562020202020
[ 6399.055593] usb-storage 1-2:1.0: USB Mass Storage device detected
[ 6399.056580] scsi host8: usb-storage 1-2:1.0
[ 6400.069549] scsi 8:0:0:0: Direct-Access     Apricorn SATAWire         1.08 PQ: 0 ANSI: 4
[ 6400.070613] sd 8:0:0:0: Attached scsi generic sg0 type 0
[ 6400.071055] sd 8:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 6400.071516] sd 8:0:0:0: [sda] Using 0xffffffff as device size
[ 6400.071539] sd 8:0:0:0: [sda] 4294967296 512-byte logical blocks: (2.20 TB/2.00 TiB)
[ 6400.071861] sd 8:0:0:0: [sda] Write Protect is off
[ 6400.071869] sd 8:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 6400.073134] sd 8:0:0:0: [sda] No Caching mode page found
[ 6400.073150] sd 8:0:0:0: [sda] Assuming drive cache: write through
[ 6400.096971] sd 8:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 6400.097412] sd 8:0:0:0: [sda] Using 0xffffffff as device size
[ 6400.101779] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.101789] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.101799] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.101808] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.101818] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.101830] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.102315] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.102323] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.102332] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.102340] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.102347] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.102354] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.102790] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.102796] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.102802] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.102811] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.102816] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.102823] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.102841] ldm_validate_partition_table(): Disk read failed.
[ 6400.103270] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.103276] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.103283] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.103292] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.103297] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.103304] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.103745] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.103752] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.103759] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.103766] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.103772] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.103778] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.104238] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.104249] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.104265] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.104285] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.104297] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.104313] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.104778] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.104785] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.104792] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.104799] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.104805] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.104811] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.104912] Dev sda: unable to read RDB block 0
[ 6400.105347] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.105353] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.105360] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.105367] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.105373] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.105379] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.105829] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.105836] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.105842] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.105849] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 6400.105854] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.105860] Buffer I/O error on dev sda, logical block 0, async page read
[ 6400.106298] sd 8:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6400.106304] sd 8:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
[ 6400.106310] sd 8:0:0:0: [sda] tag#0 Add. Sense: Invalid command operation code
[ 6400.106315] sd 8:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 18 00 00 00 08 00 00
[ 6400.106321] blk_update_request: critical target error, dev sda, sector 24 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6400.106328] Buffer I/O error on dev sda, logical block 3, async page read
[ 6400.107178]  sda: unable to read partition table
[ 6400.108149] sd 8:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 6400.108921] sd 8:0:0:0: [sda] Using 0xffffffff as device size
[ 6400.109660] sd 8:0:0:0: [sda] Attached SCSI disk
Any attempts to dd the /dev/sda that shows up, or to point Hatari at /dev/sda and see if it magically finds something, all lead to a generic input/output error.

So my question is, what's do distinct about the Falcon drive that it absolutely does not want to be read on Linux (or Mac, or Windows)? Since the drive spins, I'd willing to suspect my two-layers of adapter to get it running. Does anybody have a good USB to IDE adapter they've successfully used in the past? Alternatively, have you run across the errors above and still gotten data out?
stormy
Atari Super Hero
Atari Super Hero
Posts: 936
Joined: Tue Jan 26, 2016 12:39 pm

Re: IDE HD transfer

Post by stormy »

Atari drives are byte swapped so they can't be 'browsed' through a file manager if that makes sense. If you're using a Linux distro using gnome it's easier to just load the gnome disk manager, select the drive then click 'create disk image' and then use that image in Hatari.
Falcon CT60e 060 - 256mb ram - Phantom bus and DSP accelerated // Atari TT - Thunder and Storm IDE 64mb ram - Lightning VME - USB LAN - ATI Mach64 2mb
stween
Retro freak
Retro freak
Posts: 12
Joined: Sat Mar 07, 2015 6:38 am

Re: IDE HD transfer

Post by stween »

Yeah, my problem is a step or two before that.

Various hosts detect that a drive has been connected, but then absolutely cannot get useful information from the drive itself. There's a bunch of failed results, illegal requests, etc, in the dmesg log above. The system ultimately decides it's a huge device, not 80MB. I imagine it's the drive, and not the filesystem(s), that tells the host about these parameters. Note that I can't even use dd on /dev/sda; it just gives me an illegal I/O error.

That implies to me (a layperson), that since the drive spins and is readable on the Falcon, that it's actually my double-adapter at fault. This double-adapter works well on another Atari-era hard drive, so I suspect a bad interaction between the Falcon drive and my USB-SATA-IDE bridge. So are there good USB-IDE bridges out there, or am I totally wrong on my reading of the logs?
User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 961
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: IDE HD transfer

Post by mfro »

I have seen very similar errors with USB devices that didn't get sufficient power from the host.

How do you power your drive?
joska
Hardware Guru
Hardware Guru
Posts: 5017
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: IDE HD transfer

Post by joska »

What mfro said. If this is the original drive in your Falcon it's 25+ years old, and will draw a lot more current than modern drives. Does it spin up correctly? Or does it spin up and down repeatedly?
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
stween
Retro freak
Retro freak
Posts: 12
Joined: Sat Mar 07, 2015 6:38 am

Re: IDE HD transfer

Post by stween »

Hm, could be something in that, yeah.

The drive is pulling whatever the USB interface can provide. The drive itself does spin up and the heads move so it has sufficient power to run the actual drive mechanism. But yeah, maybe I should figure out how to pull power from elsewhere.
stween
Retro freak
Retro freak
Posts: 12
Joined: Sat Mar 07, 2015 6:38 am

Re: IDE HD transfer

Post by stween »

joska wrote: Mon Jun 07, 2021 9:13 am What mfro said. If this is the original drive in your Falcon it's 25+ years old, and will draw a lot more current than modern drives. Does it spin up correctly? Or does it spin up and down repeatedly?
Alright, tried the SATA-IDE interface via an external power source. The drive still spins and the heads move. But, although the dmesg output is less verbose and error-filled, Linux still gets a bad read on the drive size:

Code: Select all

[10794.963153] usb 1-2: new high-speed USB device number 22 using xhci_hcd
[10795.116571] usb 1-2: New USB device found, idVendor=152d, idProduct=2338, bcdDevice= 1.00
[10795.116577] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[10795.116581] usb 1-2: Product: USB to ATA/ATAPI bridge
[10795.116584] usb 1-2: Manufacturer: JMicron
[10795.116587] usb 1-2: SerialNumber: BCB288000000
[10795.123711] usb-storage 1-2:1.0: USB Mass Storage device detected
[10795.124014] scsi host8: usb-storage 1-2:1.0
[10796.293176] scsi 8:0:0:0: Direct-Access     Conner P eripherals 84MB       PQ: 0 ANSI: 5
[10796.294363] scsi 8:0:0:0: Attached scsi generic sg0 type 0
[10796.295547] sd 8:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[10796.295761] sd 8:0:0:0: [sda] 72057594037927936 512-byte logical blocks: (36.9 EB/32.0 EiB)
[10796.296087] sd 8:0:0:0: [sda] Write Protect is off
[10796.296095] sd 8:0:0:0: [sda] Mode Sense: 28 00 00 00
[10796.296464] sd 8:0:0:0: [sda] No Caching mode page found
[10796.296476] sd 8:0:0:0: [sda] Assuming drive cache: write through
[10796.322168] sd 8:0:0:0: [sda] Attached SCSI disk
That's 0x0100000000000000. I'm not so sure of what to make of that, or how to work beyond it. Also, I don't have a good way to power a 2.5" IDE drive directly to eliminate the SATA-IDE adapter as the problem on that part.

/dev/sda exists but I can't dd from it (0 byte read).
Post Reply

Return to “Hardware”