Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Mar 2006 10:31:59 -0500
From:      Matt Kucenski <mkucenski@mac.com>
To:        freebsd-firewire@freebsd.org
Subject:   Access Mac in Target Disk Mode
Message-ID:  <3135653.1141918319959.JavaMail.mkucenski@mac.com>

next in thread | raw e-mail | index | archive | help
I am attempting to access a Macintosh computer in Target Disk Mode (i.e. as an external hard drive) over firewire with no success.  I am wondering if there is anyone out there who has tried this or if someone with more firewire experience can help me figure out what is going on.

When I make the firewire connection:

Mar  2 17:24:47 Matt kernel: fwohci0: BUS reset
Mar  2 17:24:47 Matt kernel: fwohci0: node_id=0xc800ffc1, gen=2, CYCLEMASTER mode
Mar  2 17:24:47 Matt kernel: firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me)
Mar  2 17:24:47 Matt kernel: firewire0: bus manager 1 (me)
Mar  2 17:24:47 Matt kernel: firewire0: New S800 device ID:001124fffee4b4cc
Mar  2 17:24:48 Matt kernel: da5 at sbp0 bus 0 target 0 lun 0
Mar  2 17:24:48 Matt kernel: da5: <AAPL  > Removable Simplified Direct Access SCSI-3 device
Mar  2 17:24:48 Matt kernel: da5: 50.000MB/s transfers
Mar  2 17:24:48 Matt kernel: da5: Attempt to query device size failed: NOT READY, Medium not present
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): CAM Status: SCSI Status Error
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): SCSI Status: Check Condition
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): NOT READY asc:3a,0
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): Medium not present
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): Unretryable error
Mar  2 17:24:48 Matt kernel: Opened disk da5 -> 6
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): CAM Status: SCSI Status Error
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): SCSI Status: Check Condition
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): NOT READY asc:3a,0
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): Medium not present
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): Unretryable error
Mar  2 17:24:48 Matt kernel: Opened disk da5 -> 6
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): CAM Status: SCSI Status Error
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): SCSI Status: Check Condition
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): NOT READY asc:3a,0
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): Medium not present
Mar  2 17:24:48 Matt kernel: (da5:sbp0:0:0:0): Unretryable error
Mar  2 17:24:48 Matt kernel: Opened disk da5 -> 6

When I try to access da5 with something like 'dd if=/dev/da5 of=./test.img bs=8192':

dd: /dev/da5: Device not configured

and I get more of the "medium not present" and "unretryable error" messages.

'camcontrol devlist' shows:

<AAPL  >                           at scbus1 target 0 lun 0 (pass6,da5)
<BELKIN USB 2 HS-CF 3.23>          at scbus5 target 0 lun 0 (pass0,da0)
<BELKIN USB 2 HS-MS 3.23>          at scbus5 target 0 lun 1 (pass1,da1)
<BELKIN USB 2 HS-SM/XD 3.23>       at scbus5 target 0 lun 2 (pass2,da2)
<BELKIN USB 2 HS-SD/MMC 3.23>      at scbus5 target 0 lun 3 (pass3,da3)
<TEAC DVD+RW DV-W58E D.0J>         at scbus7 target 0 lun 0 (cd0,pass4)
<Kingston DataTraveler 2.0 1.00>   at scbus13 target 0 lun 0 (pass5,da4)

'fwcontrol -c 0' shows:

first quad: 0x0404e1b1 info_len=4 crc_len=4 crc=0xe1b1(OK)
bus_name: 0x31333934
irmc:0 cmc:0 isc:0 bmc:0 pmc:0
cyc_clk_acc:0 max_rec:11 max_rom:0
generation:12 link_spd:3
EUI64: 00-11-24-ff-fe-e4-b4-cc
root_directory: len=0x0008(8) crc=0xe36d(OK)
03(I:03) 000a27 module_vendor_ID:
81(L:01) 00000d text_leaf: len=3 crc=0xb542(OK) AAPL
0c(I:0c) 0083c0 node_capabilities:
04(I:04) 020000 hardware_version:
17(I:17) 54444d model_ID:
81(L:01) 00000d text_leaf: len=6 crc=0xa7ba(OK) Target Disk Mode
d1(D:11) 000013 unit_directory: len=7 crc=0xeb0f(OK)
        12(I:12) 00609e unit_spec_ID:
        13(I:13) 010483 unit_sw_version: SBP-2
        38(I:38) 00609e command_set_spec_ID:
        39(I:39) 0104d8 command_set:
        3a(I:3a) 401e08 unit_characteristics:
        14(I:14) 0e0000 logical_unit_number:
        54(C:14) 004000 management_agent: offset=0x4000(16384)
d1(D:11) 00001a unit_directory: len=7 crc=0xcf6d(OK)
        12(I:12) 00609e unit_spec_ID:
        13(I:13) 010483 unit_sw_version: SBP-2
        38(I:38) 00609e command_set_spec_ID:
        39(I:39) 0104d8 command_set:
        3a(I:3a) 401e08 unit_characteristics:
        14(I:14) 0e0000 logical_unit_number:
        54(C:14) 004020 management_agent: offset=0x4020(16416)

Linux does not have any problems accessing the drive (the same dd command works fine):

Scanning for device 7 0 0 0 ...
OLD: Host: scsi7 Channel: 00 Id: 00 Lun: 00
  Vendor: AAPL     Model: FireWire Target  Rev: 0000
  Type:   Direct-Access                    ANSI SCSI revision: 03
Scanning for device 7 0 1 0 ...
OLD: Host: scsi7 Channel: 00 Id: 01 Lun: 00
  Vendor: AAPL     Model: FireWire Target  Rev: 0000
  Type:   Direct-Access                    ANSI SCSI revision: 03

Linux appears to be recognizing two targets on the Mac, but FreeBSD is only showing one.  My guess is that for some reason FreeBSD is not making both targets accessible and the second one is the one I need to access the hard drive data.  In fact when in Linux I had /dev/sde and /dev/sdf (I believe).  I wasn't able to use dd on sde, but was sdf.  I'm not sure why the Mac is showing two targets.

I am using 6-STABLE from about a month ago.  Does anyone have any thoughts on this problem?  I am interested in making this work because I use FreeBSD for computer forensics work and occasionally need to make images of Macintosh computers.  Many of Apple's newer systems are a pain to disassemble to remove the hard drive.  I would prefer to stay with FreeBSD and not have to switch to Linux to create the disk images.

Thanks,
-Matt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3135653.1141918319959.JavaMail.mkucenski>