Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2]   Go Down

Author Topic: Target Disk Mode - can’t see all the drives  (Read 16440 times)

joevt

  • 128 MB
  • ****
  • Posts: 139
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #20 on: August 12, 2023, 09:29:14 PM »

That is because a subroutine is invoked that provides an interface to and mounts the drive on the FW bus - a place the drive would never see normally.
The drive is an ATA drive and is therefore not on the FireWire bus.

The only thing on the FireWire bus is the two Macs. One Mac is running Mac OS X. The other Mac is running Open Firmware.

Open Firmware is reading/writing to block devices (ATA, SCSI, etc.) from the Open Firmware device tree according to commands sent over Fire Wire from the other Mac. Any block device should work. It just needs a read and write command according to the Open Firmware spec.

It doesn't even bother to send over the drive's icon - only a generic icon or no icon at all appears on the receiving end.
If the drive's icon is not on the disk then there's nothing to send. If you want a volume to have an icon, Mac OS X will look for a .VolumeIcon.icns file in the root directory of a volume. The root directory also needs to have its Custom Icon flag set.

I suspect that makes all of the above Open Firmware ideas moot because the Target machine never really even loads the OS. It just connects the drive and displays the FW symbol onscreen.
Correct. Open Firmware just passes info about the list of block devices it has made available through the FireWire Target Disk Mode interface. Open Firmware displays the FW symbol onscreen to show that the Mac is in FireWire Target Disk Mode. I'm not sure if the disk appears as a FireWire disk (using FireWire mass storage device driver) or as a special block device in Mac OS X. If it was the former then it would appear in Windows and Linux as well.

On Intel Macs, EFI does the job of presenting block devices over FireWire, USB, or Thunderbolt Target Disk Modes. Macs that support multiple Target Disk Modes will show an icon for each supported connection type until you connect a Mac with one of the supported connection types - then only the icon for that connection type remains.

Holding the option key at boot as I suggested is a method to determine if a drive is accessible to Open Firmware, since Open Firmware is also responsible for the Startup Manager UI. If a startup volume is accessible to Open Firmware, then the entire disk (block device) that contains the startup volume (partition) should be accessible by FireWire Target Disk Mode. If the disk is not in the default list of drives to be included for FireWire Target Disk Mode, then the default list needs to be overridden by creating a new list in the aapl,tdm-units nvram variable using setenv in Open Firmware or nvram in Mac OS X.
Logged

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1615
  • active member
Re: Target Disk Mode - can’t see all the drives
« Reply #21 on: August 12, 2023, 11:12:22 PM »

Wow…… Just, Wow…

I going to make two points and then I'll never address this subject again, I swear!

per·spec·tive | pərˈspektiv |
True understanding of the relative importance of things; a sense of proportion: we must keep a sense of perspective about what he's done.
Phrases
put something into perspective
correctly regard something in terms of relative importance:
these expenses may seem high, but they need to be put into perspective.

AND:

The spinning drive in the front bay has Tiger on it. The rear drives have Leopard and OS 9. I use OS 9 to run Rebirth RB 338 and Leopard to run (Propellerheads) Recycle and Reason 4. The spinning HD is big so has a stash of samples and loops that I wanted to transfer to the Macbook (Leopard 10.5.8) which also has Reason 4 on it. I’m away for a week and wanted to take the Macbook to do learn some more of the Reason workflow and thought that it would be handy a quick to use TDM, neber having used it before

Sometimes we all (including ME) need to remember that not everyone is a wannabe code monkey and / or wants to dig into the bowels of their computer (especially if they never have before) to accomplish a simple task. This poor dude is a musician who just wanted a simple answer and we proceeded to drag him through "Macintosh OS 301" instead of giving him what he really needed.

AND, after all that?
ofcourse I could and did in the end use a USB stick - but it bothered me that I could onle see the one drive so thought I’d ask the community…!

He took the shortest, most direct path to accomplish the task. I therefore submit that wayneh69 is clearly the smartest guy in the room.


Someone told me I have two faults… I don't listen and some other shit they were rattling on about…
Logged

joevt

  • 128 MB
  • ****
  • Posts: 139
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #22 on: August 13, 2023, 03:41:21 AM »

Wow…… Just, Wow…
Count to 10 and take a deep breath.

I going to make two points and then I'll never address this subject again, I swear!
It's ok if you want to address this subject again, when you have something interesting or useful to add.

Sometimes we all (including ME) need to remember that not everyone is a wannabe code monkey and / or wants to dig into the bowels of their computer (especially if they never have before) to accomplish a simple task. This poor dude is a musician who just wanted a simple answer and we proceeded to drag him through "Macintosh OS 301" instead of giving him what he really needed.
This is a public forum. Sometimes a code monkey will appear and will want to learn or try something new. No one is dragging anyone around. We are exchanging ideas and suggestions and knowledge. All of which can be ignored if you like.

AND, after all that?
ofcourse I could and did in the end use a USB stick - but it bothered me that I could onle see the one drive so thought I’d ask the community…!

He took the shortest, most direct path to accomplish the task. I therefore submit that wayneh69 is clearly the smartest guy in the room.
I'm glad he found a solution and can move on and go about his day. He said he was bothered by the issue and might try some of the ideas next week. Or maybe he won't. That's ok too.

Maybe he or someone else in the future will come back to this thread and try something different to discover why Target Disk Mode doesn't see all the drives, what drives it can see, and how to make it see all the drives. I think the first two of those three questions are answered. The third just needs testing. Then the thread can end.  :)
Logged

ssp3

  • 512 MB
  • *****
  • Posts: 986
Re: Target Disk Mode - can’t see all the drives
« Reply #23 on: August 13, 2023, 04:48:40 AM »

I admire your patience, joevt.
Logged
If you're not part of the solution, you're part of the problem.

wayneh69

  • 16 MB
  • ***
  • Posts: 21
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #24 on: August 13, 2023, 06:30:28 AM »

Well - I am coning to the end of my week away (you’ll all be pleased to hear) so will try some of the suggestions next week! Love passion shown here - kudos to all
Logged

wayneh69

  • 16 MB
  • ***
  • Posts: 21
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #25 on: August 16, 2023, 09:26:01 AM »

Hmm - I booted to the startup manager on the MDD - all three drives are showing. On the Macbook, when connected in TDM to the MDD the “diskutil” commmand only lists the OS9 disk - this is the master on the MDD. No other drives show up. The optical drive on the MDD when loaded does not show up either. However, the MDD can see the optical drive of the Macbook when I put that machine into TDM.

I’ve kind of reached a dead end right now. I did boot into open firmware, but I got scared that I might brick my machine as I have zero knowledge and experience of it so I’m not going to mess.

Ultimately I can live with it but - as has been said here, maybe someone with the right skills, patience and motivation can eventually get to the bottom of this.

Thanks for trying though
Logged

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1615
  • active member
Re: Target Disk Mode - can’t see all the drives
« Reply #26 on: August 16, 2023, 03:35:12 PM »

Hmm - I booted to the startup manager on the MDD - all three drives are showing. On the Macbook, when connected in TDM to the MDD the “diskutil” commmand only lists the OS9 disk - this is the master on the MDD. No other drives show up. The optical drive on the MDD when loaded does not show up either. However, the MDD can see the optical drive of the Macbook when I put that machine into TDM.

I’ve kind of reached a dead end right now. I did boot into open firmware, but I got scared that I might brick my machine as I have zero knowledge and experience of it so I’m not going to mess.

Ultimately I can live with it but - as has been said here, maybe someone with the right skills, patience and motivation can eventually get to the bottom of this.

Thanks for trying though

Hmm…………
Logged

joevt

  • 128 MB
  • ****
  • Posts: 139
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #27 on: August 16, 2023, 04:24:35 PM »

Hmm - I booted to the startup manager on the MDD - all three drives are showing. On the Macbook, when connected in TDM to the MDD the “diskutil” commmand only lists the OS9 disk - this is the master on the MDD. No other drives show up. The optical drive on the MDD when loaded does not show up either. However, the MDD can see the optical drive of the Macbook when I put that machine into TDM.

I’ve kind of reached a dead end right now. I did boot into open firmware, but I got scared that I might brick my machine as I have zero knowledge and experience of it so I’m not going to mess.
Since all three drives appear in the Startup Manager on the MDD, it means that all of them are usable from Open Firmware and probably also FireWire Target Disk Mode (baring some bug in TDM).

For those that do want to mess, the commands in http://macos9lives.com/smforum/index.php/topic,6819.msg52145.html#msg52145 have no chance to brick. They are there for gathering info for the setenv aapl,tdm-units command.

On the MDD, diskutil list can get the partition number of the HFS volumes of each disk.
For a specific disk, the pdisk command can be used to get more info from the partition map and to verify the Apple Partition Map numbers match the diskutil numbers.
Code: [Select]
pdisk -l /dev/disk3 # or whatever the disk number is

To list the files on partition 17 (decimal) of hd, append a colon and the partition number in hex:
Code: [Select]
dir hd0:11

Another command in Mac OS X that might be useful is
Code: [Select]
ioreg
The IO Registry path of a disk can help to determine the Open Firmware path of the disk.

If you set a disk as the default startup disk in the Startup Disk preferences panel in Mac OS X, then type
Code: [Select]
nvram -p
It may show the Open Firmware path of the disk in the boot-device nvram variable. You can also see that nvram variable in Open Firmware using printenv.


For G4 MDD, I believe these are the devaliases referring to disks:
Code: [Select]
hd                  /pci@f4000000/ata-6@d/disk@0
cd                  /pci@f2000000/mac-io@17/ata-3@20000/disk@0
zip                 /pci@f2000000/mac-io@17/ata-3@20000/disk@1
ide0                /pci@f2000000/mac-io@17/ata-3@20000/disk@0
ide1                /pci@f2000000/mac-io@17/ata-3@20000/disk@1
ultra0              /pci@f4000000/ata-6@d/disk@0
ultra1              /pci@f4000000/ata-6@d/disk@1
ultra2              /pci@f2000000/mac-io@17/ata-4@1f000/disk@0
ultra3              /pci@f2000000/mac-io@17/ata-4@1f000/disk@1
cd1                 /pci@f2000000/mac-io@17/ata-3@20000/disk@1

This is the list of supported TDM disks:
cd:0,cd1:0,zip:0,ultra3:0,ultra2:0,ultra1:0,hd:0

The zip devalias might not exist but that doesn't matter if the cd1 dev alias exists since it is the same path and the TDM code appears to be smart enough to skip invalid paths.

ide0, ide1, ultra0 are duplicates of other paths.

Either the missing disk is not among the devaliases, or the list of supported TDM disks is only
cd:0,hd:0

The list is determined by the product-family value. It needs to be 2 or 4 to get the full list of supported TDM disks.
2 and 4 refer to PowerMac and RackMac but 0 also refers to PowerMac.
product-family is the 4 most significant bits of the 16-bit product-id. Neither value is a property, so they can't be seen by ioreg in Mac OS X. You have to get their value in Open Firmware like this:
Code: [Select]
product-id
.
product-family
.
Logged

wayneh69

  • 16 MB
  • ***
  • Posts: 21
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #28 on: August 17, 2023, 02:52:21 AM »

Ok….

All my drives appear in the devalias list.

The product family value appears to be 2

Logged

joevt

  • 128 MB
  • ****
  • Posts: 139
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #29 on: August 17, 2023, 04:09:36 PM »

All my drives appear in the devalias list.
For each one, what is the device path and partition number as shown in boot-command nvram variable?
What's the boot device path for the one that doesn't work with TDM?

Check in Mac OS X that the aapl,tdm-units nvram variable exists and is blank:
Code: [Select]
sudo nvram aapl,tdm-units

For all three drives, try this in Mac OS X (replace hd with the devalias for the first of the three drives)
Code: [Select]
sudo nvram aapl,tdm-units=hd:0
Restart into TDM. On the other Mac, verify that only that one drive is mounted in TDM by itself.

Repeat for the second drive that works. Does it appear by itself also?

Do that for the two working drives will prove that aapl,tdm-units works has an affect.

Then repeat for the third drive that doesn't work. Does it appear by itself or is it still not working? If it does appear, then it means there could be a problem if the drive is not specified by itself or if it is not first in the list. In that case, you could try setting aapl,tdm-units to all devices, but have the problem device first in the list.
For example if the problem device is ultra2, then change the order like this:
Code: [Select]
sudo nvram aapl,tdm-units=ultra2:0,cd:0,cd1:0,zip:0,ultra3:0,ultra1:0,hd:0
Logged

wayneh69

  • 16 MB
  • ***
  • Posts: 21
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #30 on: August 18, 2023, 01:21:04 AM »

when I type sudo nvram aapl,tdm-units in terminal, I het an error (-1) code saying the variable does not exist.

Not sure if I am trying this wrong - ??
Logged

wayneh69

  • 16 MB
  • ***
  • Posts: 21
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #31 on: August 18, 2023, 02:10:36 AM »

nvram: Error (-1) getting variable - 'aapl,tdm-units'

 :(
Logged

joevt

  • 128 MB
  • ****
  • Posts: 139
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #32 on: August 18, 2023, 08:24:13 PM »

I think that might be a standard error for empty nvram variables? I would have to setup my Quad G5 to find out.

You can use nvram -p to show all nvram variables. It might include the empty variables or it might not.

printenv in Open Firmware should show all the nvram variables including empty ones.
Logged

wayneh69

  • 16 MB
  • ***
  • Posts: 21
  • New Member
Re: Target Disk Mode - can’t see all the drives
« Reply #33 on: August 19, 2023, 10:02:41 AM »

This is now fixed!

The problem - in summary, was that in target disk mode and connected to a MacBook, my PowerMac MDD only mounted the boot disk (HD)  and not the other two physical drives installed or either of the CD drives.

The solution: having established in OS X terminal (nvram -p) that there was no command to tell the MDD which drives were available in TDM (and I am assuming that it defaults to drive designated HD in the absence of this), as per @joevt instructions I added the missing drives to a TDM list using the command (in OS X)

sudo nvram aapl,tdm-units=cd:0,hd:0,ultra1:0,ultra2:0

The three drives and CD are now all mounted on the desktop when the MDD is restarted in TDM. I should add ultra 3 and the second CD drive for completeness.

I guess so long as you know it defaults to the HD, for practical purposes this might not be an issue and it may even be desirable not to have to wait for all the physical drives to mount, but in case you don't see your CD or you are using a drive as a backup storage device - it is useful too have the option.

Huge thanks to all who have commented in this thread and super big thanks to @joevt!
Logged

DieHard

  • Staff Member
  • 2048 MB
  • ******
  • Posts: 2439
Re: Target Disk Mode - can’t see all the drives
« Reply #34 on: August 19, 2023, 10:35:46 AM »

Quote
sudo nvram aapl,tdm-units=cd:0,hd:0,ultra1:0,ultra2:0

Wow !  Damn that's cool... one of the sexiest commands I've ever seen; time to get printed T-Shirts made... think the wife will wear one ?
Logged

ssp3

  • 512 MB
  • *****
  • Posts: 986
Re: Target Disk Mode - can’t see all the drives
« Reply #35 on: August 19, 2023, 11:15:44 AM »

joevt is da man!

----
Speaking of T-shirts and similar stuff and a bit of OT.
An old childhood friend of mine owns a boat named .. see pic  ;D
Logged
If you're not part of the solution, you're part of the problem.
Pages: 1 [2]   Go Up

Recent Topics