What machine is it?
When did it last work?
What os was installed on it?
Did you set it up to dual boot?
Would have been interesting if you did
/sbin/fsck -fy
lets see what these commands do [ pictures of each result]:
ls -ld /
ls
diskutil list
df
reports back
did a google search on:
mac device is write locked
https://www.tonymacx86.com/threads/device-is-write-locked.175158/
R