No reason you couldn't do this. If you have already enabled remote login for ssh or screen sharing then you are good to go! If not then as you say use target mode to amend the settings. No real reason to install a server grade hard drive, although if it has the original hard drive in it then you might want to consider replacing it with a new one before you trust your data on it.
S.M.A.R.T is a monitoring system for HDD and SSD implemented in the firmware of a drive using two different standards: ATA and SCSI.
SMART data is usually written to a special service part of the platter/flash storage unit.
All modern interface standards and the underlying protocols (SCSI, FireWire, USB – with USB-(S)ATA-Bridges, eSATA, Thunderbolt, SAS) are basically capable of transmitting SMART-data.
SMART data is not actively transmitted to hosts, but has to be queried by the host-OS, applications or drivers.
Depending on the OS, the SMART application, the drivers and the build-in hardware the success of those queries may vary broadly. BTW to retrieve SMART data from external USB/FireWire-drives attached to Macs use this kext driver (compatibility list).
As a result Target Disk Mode doesn't 'bypass' SMART at all, because SMART is implemented in the hard disk. It's hard to say in general if operating systems (or application and drivers) are locking out failing disks based on SMART data.
I doubt that at all because
- SMART isn't very reliable
- the implemented attributes varies between manufacturers and hard drive models
- the meanings and interpretations of the attributes and their values varies between manufacturers
At least i don't know of any such OS or application.
It's rather the OS in conjunction with the firmware and the (failing) hard disk itself which 'lockout' a device.
Best Answer
Yes, there are absolutely no problems with that:
Plug the Thunderbolt cable to both Macs;
Start the broken Mac in Target Disk Mode by pressing T during startup;
Plug a USB drive or insert a DVD with the installing image of CentOS to your second Mac;
Start the second Mac by holding option (Alt) at the startup and select the CentOS drive to boot it;
Complete the installation process paying attention to not wipe your second Mac's HDD but installing the OS on the broke one;
Create a user account with password, not just root;
After installing everything, reboot both Macs normally;
Connect the broke Mac with a Ethernet cable to the same network of your second Mac or you can just run a cable directly to it;
Find out what's the IP address of your broke Mac by looking at your Gateway interface or type
arp -a
in the terminal;Use a SSH client and connect to the IP address of the broke Mac logging with the account you created earlier and then type the password:
ssh youruser@192.168.1.20
.Enjoy your new server!