Jump to content
sguerrini97

Mounting PS3 hdd on newer Linux kernels

Recommended Posts

Posted (edited)

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
Posted (edited)

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

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

Share this post


Link to post
Share on other sites

Thanks a lot

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

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

Share this post


Link to post
Share on other sites
Posted (edited)
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

@sguerrini97 would it be possible to upload a vm with UFS rw support? something small, like what @3141card did, with easy to use scripts :)
i think it'd be nice and much less time consuming than compiling the stuff ourselves

Share this post


Link to post
Share on other sites

one question it work on virtual machine or no?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×