How to turn off spindle of internal HDD on MacBook from command line?
to disable the drive from mounting during boot :

Find the uuid of the drive (in terminal):

diskutil info /Volumes/[name]


Then create a new file called /etc/fstab and in it put

UUID=34DFD44D-489C-1C22-01D8-DFDF288C102F none hfs rw,noauto 0 0


just replace the UUID above with the actual UUID of the drive.

Use the following command to view a list of drives/partitions

diskutil list


And then issue the mount command to mount the drive

sudo mount /dev/disk1s1 /Volumes/DriveName


Obviously change the disk id and mount folder to suit your system.