My MacBook pro shut down due to an error, and now I can't log in again. I've tried creating an image using Disk Utility but it fails every time. I have my hard drive connected to my MacBook but when I type "ls Volumes" into the command line using single user mode. Nothing but the "Macintosh HD" is available. I thought this was odd due the fact that I am capable of accessing my hard drive when using the Disk Utility tool. Any suggestions on how I could access my files and copy them over to an external hard drive before I reset my computer.
On newer OS it's far better to boot to Recovery HD or Internet Recovery and then open terminal to validate that things are mounted and running properly.
From there, you can use Disk Utility and / or Terminal to copy files off a non-bootable OS.
The benefit here is the system boots more fully on new Mac, avoids needing to know if you have T2 chip / FileVault and also mounts the attached drives when you start Terminal from the utilities menu.
Old school single user mode is still valid for non-T2 machines and if you can get past FileVault full disk encryption with a known admin / unlock account and password.
I ended up booting to Internet Recovery although I could probably also have booted to Recovery HD. I mounted the main drive Macintosh HD, and then copied what I needed to copy from the terminal. My main problem in this case was that I was unaware of how to mount a disk in single user mode and unaware of the fact that you could write in terminal from Disk Utility.