I'm trying to recover the password of an old iMac, couldn’t boot to Recovery though. So I went into single user mode to access the files, which worked. I have an external hard drive that is formatted as Mac OS Extended (Journaled) to put the files I'm looking for on the iMac into the drive. I copied them and I went to my computer to access it. But now my drive isn't mounting!
When I did the copy I ran the command cp <file> /dev/disk1s2
. When I try to mount it on the other computer to see the files, I tried mounting it through the command line with diskutil mountDisk /dev/disk2
and diskutil mount /dev/disk2s2
. Both commands gave me an error saying that the disk failed to mount. I also tried mounting it through Disk Utility but nothing happens.
I need those files because it contains the password of the computer. How am I going to see the files?
Best Answer
Your
cp
destroyed whatever filesystem there was on the external disk because you copied to the device itself without mounting it first. To fix:mkdir /Volumes/mydisk; mount /dev/disk1s2 /Volumes/mydisk
)cp files /Volumes/mydisk/
)umount /Volumes/mydisk
)