PS2 HDD Decryption Helper

PS2 PS2 HDD Decryption Helper 2024-12-04

@Megoosa In yours specific case, best will be APA-Jail type-A, which is option A, and modifying lines:

206:
Code:
echo -e "device ${DEVICE}\ninitialize yes\nmkpart __.recovery 128M CFS\nmkpart +OPL 128M PFS\nmkpart __.POPS 25G PFS\nls -l\nexit" | cat | sudo "${TOOLKIT_PATH}/apps/PFS Shell.elf"
219:
Code:
echo -e ",27904MiB,17\n,,07" | sudo sfdisk ${DEVICE}
27904 came from: (25*1024)+2304
2304 came from: 2048+128+128 (basic partitions + recovery + fallback opl)
 
Last edited:
I'll give this a try tomorrow :adoration:

Earlier this day I did the modification to line 206 myself, but not that one on 219, so the POPS partition end up being overwritten by the exFAT one.

I also observed that somewhere in the PFS Shell part when the APA partitions are listed, the __.POPS was not a single large one but a couple of 4096MB chucks and some empty@ chucks.

Tomorrow I'll do both modifications and see the results.
 
PFS Shell showing not only partitions but sub-partitions from which partition is assembled. It marks them with @ symbol.
Good luck. ^^

- - -
BTW: I found on YT some nice video tutorial if anyone feels better to watch instead reading:


I watched it fully and my only three cents are that:
Code:
sudo systemctl stop udisks2
sudo systemctl disable udisks2
It is quite an overkill. You can disable auto mounting in Nemo settings (if we talking about Linux Mint with Cinnamon specifically). Service which he started at the end, will not make to show "OPL" because additional step is required: "sudo partprobe /dev/sdx". But anyway, I do not recommend to kill udisks2 in the first place. ^^

In the comment section (sorry, I don't have YT account to answer), I found question like:
free hdd boot can support the APA -GPT format?
The answer is no, but PS2BBL also not supporting it and both not need to. That's the magic here. :D

I found also that issue with permissions plagued another user. I wondering what is the source of that because I cannot reproduce it. :/
i am having problems with file permisions. especially with hdd exploiter, i am using linux mint live cd , i dont have a linux mint installation
BTW: LiveCD is also Installation media. But installing Linux will not fix that problem I believe.
 
Last edited:
The modifications to the script works fine, I now have a APA-Jail drive with both 25GB for POPStarter games and the rest in a large exFAT for PS2 games :flustered:

I use MX Linux and disabling automounting in Thunar was enough.


PFS Shell gave this in the end:
Code:
# Start (sector)  Code      Size         Timestamp  Name
       0        0001     128MB  2025-03-23 08:09  __mbr
 0x40000        0100     128MB  2025-03-23 08:09  __net/
 0x80000        0100     256MB  2025-03-23 08:09  __system/
0x100000        0100     512MB  2025-03-23 08:09  __sysconf/
0x200000        0100    1024MB  2025-03-23 08:09  __common/
0x400000        0101     128MB  2025-03-23 08:09  __.recovery
0x440000        0100     128MB  2025-03-23 08:09  +OPL/
0x480000        0000     256MB  2025-03-23 08:09  __empty%
0x500000        0000     512MB  2025-03-23 08:09  __empty%
0x600000        0100    1024MB  2025-03-23 08:09  __.POPS@
0x800000        0100    4096MB  2025-03-23 08:09  __.POPS/
0x1000000        0100    4096MB  2025-03-23 08:09  __.POPS@
0x1800000        0100    4096MB  2025-03-23 08:09  __.POPS@
0x2000000        0100    4096MB  2025-03-23 08:09  __.POPS@
0x2800000        0100    4096MB  2025-03-23 08:09  __.POPS@
0x3000000        0100    4096MB  2025-03-23 08:09  __.POPS@
Why there's some "empty%" 256MB+512MB? That's just wasted space?
 
It is rounding to 1GiB chunk. Purpose of "__empty" partitions is been a placeholder like above or deleted partitions.

Why there's some "empty%" 256MB+512MB? That's just wasted space?
It just enlighten me today, that those (all with % symbol in listing) you should also include in script calculation on line 219.

In future updates, I will try to add option with custom partitions adding, which also do all the calculations magic automatically. But for that I need application which will return for me last LBA for last partition in APA chain (which currently not exist).
 
So now some part of the POPS partition is overwritten by the exFAT one?

I already filled the POPS partition with about 6GB and the exFAT with 90GB of games :culpability: Is it possible to fix this without destroying the data?
 
Last edited:
Unfortunately, no, it need to be recreated. I'm sorry, it was quite late when I responded in that day and forgot about chunks alignments.

But to confirm I'm right, Open this disk in IsoBuster on Windows and check "Last LBA" of last partition in APA chain (in your case: "__.POPS"). IsoBuster will shows both APA and MBR/GPT at once so keep that in mind (simplest way: right button click on main view where all partitions arte listed, on top bar, and add "Last LBA" and "Type"). This will tell you if ending matches to "OPL" starting (should be one sector difference between).
 
Yes, it's overleaping :confusion: :
m5dJo9Sl.png



I adjusted line 219 to "28672" and formatted a fresh drive. Then there's 1MB unallocated between them, which I think is fine:
0PUdsUUl.png


And I saw that if I use the same script to format a smaller HDD of 80GB instead of 250GB, the __POPS chucks are 2048MB instead of 4096MB.
Code:
# Start (sector)  Code      Size         Timestamp  Name
       0        0001     128MB  2025-03-25 13:04  __mbr
 0x40000        0100     128MB  2025-03-25 13:04  __net/
 0x80000        0100     256MB  2025-03-25 13:04  __system/
0x100000        0100     512MB  2025-03-25 13:04  __sysconf/
0x200000        0100    1024MB  2025-03-25 13:04  __common/
0x400000        0101     128MB  2025-03-25 13:04  __.recovery
0x440000        0100     128MB  2025-03-25 13:04  +OPL/
0x480000        0000     256MB  2025-03-25 13:04  __empty%
0x500000        0000     512MB  2025-03-25 13:04  __empty%
0x600000        0100    1024MB  2025-03-25 13:04  __.POPS@
0x800000        0100    2048MB  2025-03-25 13:04  __.POPS/
0xc00000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x1000000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x1400000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x1800000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x1c00000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x2000000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x2400000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x2800000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x2c00000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x3000000        0100    2048MB  2025-03-25 13:04  __.POPS@
0x3400000        0100    2048MB  2025-03-25 13:04  __.POPS@
 
That's the reason why user cannot use disk images which came from different size disk, as form of backup restoration. This chunks calculations will resulting in such case, the APA corruption, sooner or later. Just FYI. ^^

This is super popular method among Youtubers and Reddits which leading straight to huge data loss.
 
Does adjusting the script for a POPStarter partition only work for some sizes? I tried a POPStarter partition of 9GB on a 80GB drive. And did the same modifications on line 206 and 219. But the partitions are overleaping.

206 is:
Code:
echo -e "device ${DEVICE}\ninitialize yes\nmkpart __.recovery 128M CFS\nmkpart +OPL 128M PFS\nmkpart __.POPS 9G PFS\nls -l\nexit" | cat | sudo "${TOOLKIT_PATH}/apps/PFS Shell.elf"

and 219 is:
Code:
echo -e ",12288MiB,17\n,,07" | sudo sfdisk ${DEVICE}

I input 12288 because if I add the partition list of PFS Shell up, it's 12288MB:
Code:
# Start (sector)  Code      Size         Timestamp  Name
       0        0001     128MB  2025-03-27 08:50  __mbr
 0x40000        0100     128MB  2025-03-27 08:50  __net/
 0x80000        0100     256MB  2025-03-27 08:50  __system/
0x100000        0100     512MB  2025-03-27 08:50  __sysconf/
0x200000        0100    1024MB  2025-03-27 08:50  __common/
0x400000        0101     128MB  2025-03-27 08:50  __.recovery
0x440000        0100     128MB  2025-03-27 08:50  +OPL/
0x480000        0000     256MB  2025-03-27 08:50  __empty%
0x500000        0000     512MB  2025-03-27 08:50  __empty%
0x600000        0100    1024MB  2025-03-27 08:50  __.POPS@
0x800000        0100    2048MB  2025-03-27 08:50  __.POPS/
0xc00000        0100    2048MB  2025-03-27 08:50  __.POPS@
0x1000000        0100    2048MB  2025-03-27 08:50  __.POPS@
0x1400000        0100    2048MB  2025-03-27 08:50  __.POPS@

But, if I view the drive in Isobuster, the __.POPS partition and exFAT one is overleaping each other :concern::
lWlBdjh.png


How is this possible? Did I make a miscalculation?
 
Or there is possibility that IsoBuster miscalculating it (a bug with mixed PC/PS2 partition tables?). I will investigate that later, when I wil got some cool tool which allows me to add custom partitions adding. :} For now my head stick to XEB project (themes and XEB PUPPY).
 
DLC-1. A small update for version 2024-12-04:
  • v1.1 of PS2 HDD Keygen.sh
  • v1.2 of PS2 USB-SIO Formatter.sh
  • v1.1 of R4D Installer.sh
  • v1.6 of Tools Installer.sh
[+] added two more ata commands to dump HDD ID (thanks to user dev_console)
[+] added dedicated formatting for SD cards for SD2PSX family and MCP2, plus hide few tools job reporting
[+] added installer for R4D
[F] fixed pfsfuse compiling and one code typo (thanks to user Burroughss)
 

Attachments

Last edited:

Similar threads

Back
Top