PS3 Halp! Dev_flash

I didn't say it is Your fault, I said when such things happening. Well, You cannot discuss with math. ;) But take in mind that CellOS deciding what to do and when. I know few cases when he killed FAT32 or even UFS2 beyond repair (second one cannot be repair anyway outside PS3).

- - -
I don't know what this error could even means. Quite enigmatic. But since it is SSD, it is possible that some communication issues on SSD controller side. Just guessing.

If this happen again, You could check this:
instead of restart, turn it off completely by power switch on the back or power surge for few seconds (to remove everything from all volatile memory types), and turn on everything again. It is possible that this message appears again, which point to SSD compatibility issue.
 
Last edited:
As far as SSD I'm not sure what the problem is when I first put it in it was taking 10 or 12 seconds before it was recognized at all and then I rebuilt the database and file system and then it gives me intermittent error of no storage but no more delayed startup. I thought it may be because it has no dram. Maybe I should just get an sshd. I know the PS3 can't use full potential of SSD but it did fix the games I had problems with like The last of Us loading from the drive.

I'm really surprised anything worked at all trying to read that drive because I don't know much about Linux. And I didn't exactly have an ideal setup... I had to take the disk drive out of my computer and use its port for the PS3 drive and then run the Linux image from my phone. :sem blush:
Screenshot_20230116-142348-127~2.png
 
@Berion I was wondering why I still couldn't mount hdd1 partition? I tried a new SSD drive and it is the same... I can only decrypt and mount gameOS as hdd0 on this NAND console. drivemapper won't let me mount the other partition. or hdd3. This is a CECHE01
Screenshot_20230119_034350.png
 
Last edited:
If You would be able to upload Your HDD image + ERK (but in parts no larger than ~40GiB), I can see what is wrong and fix it if problem lies in script.

What thing neglecting You to confirm by uppercase YES?

BTW: Are You doing everything by hand, do You? Try this toolkit. It simplifying things:
https://www.psx-place.com/resources/ps3-hdd-decryption-helper.1293/
After mounting what You can mount, put here what "PS3 HDD Reporter.sh" returned.

I'm really surprised anything worked at all trying to read that drive because I don't know much about Linux.
I'm also Linux's apprentice. ^^

And I didn't exactly have an ideal setup... I had to take the disk drive out of my computer and use its port for the PS3 drive and then run the Linux image from my phone. :sem blush:
Sounds normal to me. :)
 
If You would be able to upload Your HDD image + ERK (but in parts no larger than ~40GiB), I can see what is wrong and fix it if problem lies in script.

What thing neglecting You to confirm by uppercase YES?
I had to confirm YES because it said there was a DOS filesystem found? Maybe because the SATA adaptor has firmware on it to be used with external storage device?

I didn't use a HDD image but connected the disk directly to sata using an adaptor from external usb shell. Also I tried the automated script and couldn't get it it to work properly I forget the error, but can try again and let you know.
 
@Berion
I tried the script again, I get the same error I have to map the hdd1 to hdd0 manually for the "gameOS" files to be decrypted, hdd2 still will not mount.

error.png
error2.png
error3.png
error4.png
error6.png
 
Last edited:
I had to confirm YES because it said there was a DOS filesystem found?
What command You put in terminal? You don't need to confirm anything until You want fix or check filesystem (FAT32). That's why I asked. It is not normal if You give this partition to mount by mount app.

Maybe because the SATA adaptor has firmware on it to be used with external storage device?
I don't see any correlation.

I didn't use a HDD image but connected the disk directly to sata using an adaptor from external usb shell.
You didn't, You don't need to but You could make image and send it to me if You are interesting nature of this issue. Or if You are patient, then we can try it solve it online. :P

Also I tried the automated script and couldn't get it it to work properly I forget the error, but can try again and let you know.

On newest Ubuntu/Mint You need replace in all *.sh scripts:
Code:
~/
by
Code:
${HOME}/
For unknown to me reason, old variable no longer returned proper home path like on other distributions or older versions. I will update this when I finished, so meanwhile You can try this solution (but anyway, this is not Your issue).

I tried the script again, I get the same error I have to map the hdd1 to hdd0 manually for the "gameOS" files to be decrypted, hdd2 still will not mount
Loading custom UFS module is optional. It is needed for writing permission on UFS2 partition (dev_hdd0), otherwise it will me in read only mode.

- - -

However, this error is completely surprise! WTH? Could You send me Your ERK and this file?
Code:
sudo dd if=/dev/sdb of=/home/mint/ps3hdd_enc.bin bs=16M count=1 progress=status
Eventually without ERK but this file:
Code:
sudo dd if=/dev/mapper/ps3hdd-bs of=/home/mint/ps3hdd_dec.bin bs=16M count=1 progress=status
I prefer first because I wondering if You don't have leftovers from MBR. For unknown reason not always CellOS overwriting beginning of storage, sometimes it leaving untouched part of first two sectors.

- - -

On last screen You doing wrong mount. You trying mount ps3hdd2 mapper as UFS2 while it have FAT32. This will not work.
 
Last edited:
What command You put in terminal?
this prompt shows up with script or trying to mount manually as soon as I choose the ps3 hdd. This "DOS" dialogue shows up on a new SSD that was never formatted with windows as well. I just didn't now if this SATA adapter I was using was causing a conflict? I will try to create an .IMG but am running out of space :topsy turvy:
Here are the files you requested along with ERK key.
https://mega.nz/folder/4zZBEaBL#wfyTcv9VwX7ugOnun2uisw
IMG_20230120_213726404.jpg
mounterror2.png
 
@Berion I managed to get both mounted but only contents of "gameos" show any content. I had to mount both manually as the script will not mount either one but will decrypt. I used 'mount -t ufs -o ufstype=ufs2,ro /dev/mapper/ps3hdd1 /home/mint/ps3/storage/hdd/dev_hdd0' to mount to hdd0 and 'mount -t vfat /dev/mapper/ps3hdd2/home/mint/ps3/storage/hdddev_hdd1' to mount to hdd1 folder.
mountvflasherr.png
 
I think I've made silly mistake somewhere in the script, so rather nothing alarming. I've never tested NAND HDDs more than decryption alone because I never have any. Maybe it is just typo somewhere, I will look into it in this upcoming week. Promise.

And thank You for Your time and lot of effort with all this stuff. I appreciate it! ^^
 
I think I've made silly mistake somewhere in the script, so rather nothing alarming. I've never tested NAND HDDs more than decryption alone because I never have any. Maybe it is just typo somewhere, I will look into it in this upcoming week. Promise.

And thank You for Your time and lot of effort with all this stuff. I appreciate it! ^^
Awesome, So for me is the 2Gb partition supposed to be empty on NAND?
Thank you as well for your time troubleshooting this with me and the opportunity to learn more about linux :)
 
Oh, as I expected, that was my foolish mistake. I blindly copied some section from NOR mounts and forgot to edit mapper numbers. I believe, this will fix the issue, replace this:
Code:
  1)
     sudo cryptsetup create -c bswap16-ecb -d /dev/zero ps3hdd-bs $DEVICE
     sudo cryptsetup create -c aes-cbc-null -d ~/ps3/keys/ata_key.bin -s 192 ps3hdd /dev/mapper/ps3hdd-bs
     sudo kpartx -a /dev/mapper/ps3hdd
     sudo mount -t ufs -o ufstype=ufs2,ro /dev/mapper/ps3hdd2 ~/ps3/storage/hdd/dev_hdd0
     sudo mount -t vfat /dev/mapper/ps3hdd3 ~/ps3/storage/hdd/dev_hdd1
     if ! lsmod | grep ufs > /dev/null 2>&1; then
       sudo mount -t ufs -o remount,ufstype=ufs2,rw /dev/mapper/ps3hdd2 ~/ps3/storage/hdd/dev_hdd0
       else sleep 0
     fi
     lsblk -b $DEVICE -o NAME,SIZE,FSTYPE,MOUNTPOINT
     echo
     sudo ls -la /dev/mapper | grep ps3
     break;;
by this:
Code:
  1)
     sudo cryptsetup create -c bswap16-ecb -d /dev/zero ps3hdd-bs $DEVICE
     sudo cryptsetup create -c aes-cbc-null -d ~/ps3/keys/ata_key.bin -s 192 ps3hdd /dev/mapper/ps3hdd-bs
     sudo kpartx -a /dev/mapper/ps3hdd
     sudo mount -t ufs -o ufstype=ufs2,ro /dev/mapper/ps3hdd1 ~/ps3/storage/hdd/dev_hdd0
     sudo mount -t vfat /dev/mapper/ps3hdd2 ~/ps3/storage/hdd/dev_hdd1
     if ! lsmod | grep ufs > /dev/null 2>&1; then
       sudo mount -t ufs -o remount,ufstype=ufs2,rw /dev/mapper/ps3hdd1 ~/ps3/storage/hdd/dev_hdd0
       else sleep 0
     fi
     lsblk -b $DEVICE -o NAME,SIZE,FSTYPE,MOUNTPOINT
     echo
     sudo ls -la /dev/mapper | grep ps3
     break;;
 
Awesome, So for me is the 2Gb partition supposed to be empty on NAND?
Thank you as well for your time troubleshooting this with me and the opportunity to learn more about linux :)

Hmm, You have mixed up some things. ;) Look, we have "three memory type" series of PS3: 256MiB NAND, 16MiB NOR and 16GiB eMMC. In first case, on HDD are two partitions, main (dev_hdd0) and cache (dev_hdd1). Some user data is put inside eFlash section of NAND memory which You can see on console mounted under dev_flash, dev_flash2 and dev_flash3 (few other aren't mounted at all because are raw).

Later, Sony replaced NAND by NOR which have a lot smaller capacity, so they moved some missing stuff to HDD as a partition, which we calling VFLASH (name came from virtual flash). VFLASH have eFlash and other partitions (sub-partitions: dev_flash, dev_flash2, dev_flash3 and few other). So in this case we have three partitions and from one them some sub partitions.

Latest models which came with eMMC instead of NAND or NOR, are not hacked yet low level enough to say how it looks their logic structure but we assuming (blindly) that eMMC is like NAND but eFlash has been enlarged by VHDD (virtual hdd) which contains what HDD normally contain as partition with sub partitions in the same way as it was done in NOR case.

PS3 can also use OtherOS installed on HDD so add to the equation additional partition. It is optional, because OtherOS is/was optional.

What memory type have each model, You can see in Flash column:
https://www.psdevwiki.com/ps3/SKU_Models
 
Oh, as I expected, that was my foolish mistake. I blindly copied some section from NOR mounts and forgot to edit mapper numbers. I believe, this will fix the issue, replace this...
it worked! :) Just to clarify hdd1 contents are empty still but mounted properly, is there nothing in this directory on ceche01?
Also I updated the unmounter script to reflect the proper directory "/ps3/storage/hdd/dev_XXXX" Now everything works as it should, Though I noticed both mounted folders automatically open upon running script now "GameOS" partition is viewable even without elevated root privilege. (please see video)
https://mega.nz/file/Q2gAUDKQ#EcvWyFB9g4p18rm6bHrMNix5jc9TFuHwff3sjJUm-qg
I was curious as well is there anyway to enable UFS module for my kernel version? 5.4.0-91-generic

fixedmount.png
 
Last edited:
Thanks for the report. But still You have monit about dos blah blah. I don't know why, it shouldn't be there and straight away proceed to mounting, so no warning and no confirmation. Viewing without root permissions is also strange. I have no idea why.

In next PS3 HDD Decrypter Helper update I will add script for compiling bswap16-ecb and ufs modules. It works already but... for unknown to me reason, UFS is still without write permission (so for some reason it ignoring kernel config). For now I gave up with this and will release script as is. So the answer is no unfortunately. However, there is compiled module in tutorial thread for default kernel of Ubuntu 19.10 (and all its flavors which using the same version as base distribution) or You can ask @DUDUŚ, he is more advanced than me in Linux and maybe he could compile this cursed ufs.ko for You. ^^ In addition You could ask on Ubuntu forum or other communication channel if they would not distributing Ubuntu with ufs write by default. There is no reason this option is turned off. UFS filesystems support are all in experimental stage, yet works in PS3 and PS4 case fine, also user must specify during mounting that he need rw (default is ro), so there is no way user could do it without knowing about it and break anything by accident.

dev_hdd1 is always empty on all models if console was turned off properly in GameOS. This partition is used by games for quick cache storing (i.e inside Your dump I retrieved some Uncharted icons - this is why Your dump almost no compressed, because almost whole space was overwritten by compressed/encrypted game data ;)). Also is used by updater. If You would ever stuck with boot loop after fw install attempt, then You need mount it and delete all contents (copied fw etc.) - without ERK the only solution would be format entire drive.
 
Last edited:
@Berion UFS module is Linux is still experimental, especially with write support.
@Iridule Grab here. you must translate it. instead of cloning repo use /usr/src/linux folder. after compilation module unload old module by sudo rmmod ufs
 
Experimental but works fine, just slow. And to enable write, it must be pass with parram to rw, so it is totally safe to enable write by default. I hate when someone deciding what is best for me...
 
Experimental but works fine, just slow. And to enable write, it must be pass with parram to rw, so it is totally safe to enable write by default. I hate when someone deciding what is best for me...

I agree. But this behaviour seems to be the norm when we talk about uncommon, propietary file systems. It happens the same when mounting drives with NTFS.

Although, I believe with NTFS support comes out of the box with current distros, but I'm not sure. Before you would be required to install other stuff to gain RW support.
 
Back
Top