Hacker News new | ask | show | jobs
by EvanAnderson 944 days ago
I never really used Mac machines, but I always appreciated "target disk mode". This sounds similar, albeit over a network (which could simply be a straight-thru cable between Ethernet NICs on two machines).

Edit: Yeah. I forgot about actually saying what "target disk mode was". There's a child post that mentions it, so I'll refrain. I will say that I saw it used in imaging computers in a college computer lab setting back in the early 2000's. I definitely wished my PCs could've done it. It looked like a very handy feature. Presumably it would make fixing OS boot issues easier, as well as just harvesting files off a machine that was otherwise not operating properly due to OS issues.

6 comments

For a while (2009-2014) iMacs also had 'target display mode,' where you could connect your iMac to another machine and it would act as a display. [1]

[1] https://support.apple.com/en-ca/HT204592

There's a lot of reasons I think this is going to be a badass system, but I note that the upcoming Minisforum V3 tablet has DisplayPort-IN, and I think this should just be a semi-standard capability everywhere.

With USB4 especially, it's like: these computers have crazy huge bidirectional throughput. Why why why would we not have one of the most obvious easy to do pipes, a way to let video data in?

> Why why why would we not have one of the most obvious easy to do pipes, a way to let video data in?

Because HDMI and DisplayPort use HDCP to prevent us from copying the data we're viewing for future use. I'm interested in how the tablet is going to work with HDCP as the whole point of closing the analog hole goes away if I can...

Oh, it's just a passthrough.

Diskomater appears to be an open source, platform agnostic version of this underlying technology!

In case, like me, "Target Disk Mode" is not something you're familiar with:

> People also ask What is the target disk mode? If you have two Mac computers with USB, USB-C or Thunderbolt ports, you can connect them so that one of them appears as an external hard disk on the other. This is called target disk mode. Note: If either of the computers has macOS 11 or later installed, you must connect the two computers using a Thunderbolt cable.

Sidenote: Thunderbolt cables are special USB-C cables, i.e. the wire between your Mac and the USB-C power brick.

I remember using Target Disk Mode on my iBook G4 over FireWire cables! Very useful for copying large amounts of data before gigabit Ethernet was common place.
> Sidenote: Thunderbolt cables are special USB-C cables, i.e. the wire between your Mac and the USB-C power brick.

Not exactly - that is only sort-of valid for Thunderbolt 3 and its successor/merger USB-C 4. TB1 and 2 used the Mini DisplayPort connector.

TB3/4 use the USB-C connector, but unlike USB-C, at longer lengths (per standard: 0.5m [1], but there longer passive cables as well, e.g. [2]) are the cable isn't passive or semi-passive (cables supporting USB-C PD for higher currents/voltages contain "marker" chipsets in the plugs) - it's an "active" cable with special transmission/driver circuitry to achieve tolerable signal integrity.

[1] https://en.wikipedia.org/wiki/Thunderbolt_(interface)#Thunde...

[2] https://www.amazon.de/Cable-Matters-Zertifiziertes-Thunderbo...

Pedantic (but important) footnote: it's USB4. It's not USB 4.0, it's not USB-C 4, it's just USB4. https://www.usb.org/usb4
Network boot? I think this project is genius - considering it’s solving an interesting problem and not reinventing the wheel.

I was half-expecting a Go or Rust utility but so pleasantly surprised to find a bunch of configurations, and that’s it!

Never really fully understood what systemd does. It’s basically the star of the show here. Is it an alternative to init? I honestly thought it was a user level service designed to provide a lightweight abstraction around cgroups and init. I haven’t looked into it too deep - but I have a feeling my assumption is wrong.

The service is written in C and resides at https://github.com/systemd/systemd/blob/main/src/storagetm/s...
Careful, this is prime flame-war material.

systemd is an init system plus various other tools/infrastructure for managing a system.

To be somewhat pedantic systems is an init system, but under the umbrella project of systemd, you'll find bootloaders, DNS resolvers, log forwarders, DHCP clients, network configuration tools, login session managers, the whole lot. Almost all of these components are independent of the init system, but integrate very well with it.
Target disk mode + firewire was wonderful.

If your machine was screwed up, you could plug another machine into it in target disk mode and boot off that (external) "drive" and fix your machine. Or you could easily copy files on/off your machine at firewire speeds.

In comparison, PCs in that era were always troublesome to administer, requiring disk cloning software or sometimes linux. (although they universally boot from USB now, which helps)

Target disk mode over thunderbolt 2 and 3 is also supported by the relevant mac hardware.

Target disk mode is also supported on mac laptops that are older than firewire; the original target disk mode is over scsi and is supported by the first powerbooks, the powerbook 1xx series.

you could do that in linux using usb networking and then sharing files (or block whole devices) over that connection. NFS, SMB or even iSCSI.

I think that iSCSI is involved here, as "target" reminds me of the iSCSI terminology.

I guess that (as usual) mac os just hides a lot of the details and gives you a nice gui to do that automatically.

On the Macs that supported it the feature was invoked by holding a key during power-on. On the "client" the target disk mode machine appeared as a Firewire-attached disk. It was very slick.

I'd love to have my PC laptop have the same kind of functionality. Need to troubleshoot an OS boot issue-- just plug the unit into a working PC and the disks show up as local devices. Unlock the full disk encryption and go to town. All the convenience of extracting the disk and connecting to another machine without cracking the case.

Need to troubleshoot an OS boot issue-- just plug the unit into a working PC and the disks show up as local devices.

Or you could just boot from a far more convenient USB drive with a live OS.

I've done a ton of "boot a rescue disk" because I'm usually too lazy to pull the disk. Particularly with oddball hardware, it always feels like I'm struggling with drivers or missing tools. When I do pull the disk and plug it into my daily driver machine it feels like stuff goes much more quickly because I've got all the tools I'm used to.

It's all counterfactuals anyway-- nothing like target disk mode will ever happen on the PC platform.

Apple solutions is better.
If you have another machine at hand and the wire. A pendrive fits in a wallet and works even in the middle of nowhere. Both solutions have their pro and cons.
I will say that I saw it used in imaging computers in a college computer lab setting back in the early 2000's. I definitely wished my PCs could've done it.

In that exact same setting, I've seen PCs use PXE for the same purpose.

For sure. For one-offs plugging in a machine and having it act like a removable disk would be a lot easier than orchestrating a DHCP server and TFTP server (plus boot images) to support PXE. For mass numbers of machines, though, PXE is very handy. (I haven't kept up with PXE in the UEFI era to know how its changed/kept up. Everything I did with it-- netbooting tiny Linux distros to image machines, primarily, was back in the Windows XP thru 7 days.)