Jump to content
sguerrini97

Mounting PS3 hdd on newer Linux kernels

Recommended Posts

Hi there. Recently i wanted to mount my PS3 hdd on my linux PC and I had some headache trying to port glevand's dm-bswap16 to newer kernels.

 

Eventually I gave up with the kernel module and I started looking for something else, in the end I bumped into Network Block Devices.

I forked nbdcpp from dsroche on github and I replicated the behavior of the glevand's kernel module by swapping bytes every 16 bit words.

 

Please keep in mind that this code has not been tested deeply, if you care about your data make a backup of your hard drive before using the tool.

 

Usefull informations (keys and fat/slim differences):

 

You can find my fork here: https://github.com/sguerrini97/nbdcpp

git clone https://github.com/sguerrini97/nbdcpp

cd nbdcpp

make bswap16

 

To mount ps3 hdd (slim console, /dev/sdc is the ps3 hdd, run as root):

./makedev bswap16 /dev/sdc
cryptsetup create -c aes-xts-plain64 -d ./hdd_key.bin -s 256 ps3hdd_crypt /dev/nbd0
kpartx -a /dev/mapper/ps3hdd_crypt
mount -t ufs -o ufstype=ufs2,ro /dev/mapper/ps3hdd_crypt2 /mnt

 

To safely remove ps3 hdd (run as root):

umount /mnt
kpartx -d /dev/mapper/ps3hdd_crypt
cryptsetup remove ps3hdd_crypt
./stop-nbd0

 

Video:

 

Edit: in case you need to mount vflash (slim console, run as root)

cryptsetup create -c aes-xts-plain64 -d ./vflash_key.bin -s 256 -p 8 vflash_crypt /dev/mapper/ps3hdd_crypt1
kpartx -a /dev/mapper/vflash_crypt
mount /dev/mapper/vflash_crypt2 /mnt/dev_flash
mount /dev/mapper/vflash_crypt3 /mnt/dev_flash2
mount /dev/mapper/vflash_crypt4 /mnt/dev_flash3

# do your stuff ...

umount /mnt/dev_hdd0
umount /mnt/dev_flash
umount /mnt/dev_flash2
umount /mnt/dev_flash3
kpartx -d /dev/mapper/vflash_crypt
cryptsetup remove vflash_crypt
Edited by sguerrini97

Share this post


Link to post
Share on other sites

ah this is great, I've been looking for the best way to dump rap files from my slim PS3 without having to create a full backup of the HDD.

 

edit:

after some reading, I don't believe PS3s that can't install CFW can avail of this, as you can't dump the required keys.

Edited by Zer0xFF

Share this post


Link to post
Share on other sites
On 4/30/2018 at 7:24 PM, Zer0xFF said:

ah this is great, I've been looking for the best way to dump rap files from my slim PS3 without having to create a full backup of the HDD.

 

edit:

after some reading, I don't believe PS3s that can't install CFW can avail of this, as you can't dump the required keys.

Yeah, you need a way to dump your eid root key (or ata keys directly) in order to use this. 

 

13 hours ago, king6340 said:

who try it interesting news for linux users it is my dream mount ps3 hdd on pc

Mounting HDD on PC is old news, but the usual way of doing it was broken for new linux kernels. By the way there's also a Windows tool by 3141card to read the hdd.

 

6 hours ago, fastar said:

Thanks a lot

You are welcome :)

Share this post


Link to post
Share on other sites
5 hours ago, king6340 said:

what is version linux ubuntu in video i try 18.04 but it give error and what is version of kernel

I tried this on Ubuntu 16.04 kernel 4.13.0. Please post the errors you are getting, you are probably missing nbd-client package, read the readme.

Edited by sguerrini97

Share this post


Link to post
Share on other sites

I was trying to create a virtual machine image and I found out that there are problems with new versions of nbd-client and probably some other tools too (I tried with debian stretch and ubuntu 18.04). For now everything seems to work with ubuntu 16.04. I will look for another way when I have some free time..

Share this post


Link to post
Share on other sites

Hey, I've been looking for ways to mount my HDD, but this is the most clear (and recent) explanation I've found!

I have a HDD from a fat PS3 that I'm trying to get the xRegistry file from. Would you happen to know the steps to mount a fat PS3 HDD in Linux, by any chance?
Thanks so much!

Share this post


Link to post
Share on other sites
Guest lacsaP

hello,

I have a question about the option -d ./hdd_key.bin passed to cryptsetup : how to get the key file hdd_key.bin, directly from the PS3 by booting under Linux ?

regards.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...