Since the days of PS3 Linux PlayStation sceners have been Upgrading PS4 Hard Drives, Installing Linux on PS4 and working on various Linux Homebrew Projects including @zecoxao's (Twitter) latest guide on Mounting a PlayStation 4 (PS4) HDD in Linux on a PC for those interested. 
This comes following his previous Tutorial to Download PS4 PKGs on the Latest PlayStation 4 Firmware, check it out below from PSDevWiki.com: Mounting HDD in Linux
== Step by Step Guide (CUH-1200 and above)
Download: PS4_HDD_Decryption_Helper_(2022-10-31).7z (4.36 KB)
Spoiler: Depreciated
Below are further details and the changelogs from Berion, to quote: PS4 HDD Decryption Helper - Bunch of bash scripts for automate PS4 HDD decryption, mounting and unmounting.
Big thanks for @rj017 for painful QA phase and for @Thefirebeast for EAP and samples from his console!
Bunch of bash scripts for automate PS4 HDD decryption, mounting and unmounting.
Wouldn't it be a better idea to create a tutorial for a live distribution with more recent Linux kernel? My Kernel is 5.3.0.
Or a ready to go virtual machine package?
Have attached RW ufs.ko module for Kernel 5.3.0-24-generic. Build it on Ubuntu 19.10 Cinnamon Remix. It's compatible with the live environment iso "cinnamonremix-19.10-all.20191204.iso".
Download: ufs.ko_5.3.0-24-generic.zip (779.5 KB)
PS4 HDD Decryption Helper (2022-10-31)
Cheers to @HydrogenNGU via Twitter for the heads up on this!

This comes following his previous Tutorial to Download PS4 PKGs on the Latest PlayStation 4 Firmware, check it out below from PSDevWiki.com: Mounting HDD in Linux
- Unlike the PS3, where every part of perconsole security (including the HDD) is dictated by the eid_root_key, the PS4 has two perconsole keys for the HDD, one is handled by SAMU (we cannot obtain this key atm) and the other is handled by the South Bridge / AEOLIA / BELIZE (which we can obtain)
- Here I describe the steps to mount your hdd on the pc using the cryptmount utility on Linux
- EAP HDD Key (check in your kernel dump and in magic.h kern_off_eap_hdd_key offset)
- Linux Distro (i'm using xubuntu live for this)
- cmtab file
- cmtab file can be as follows (example for xubuntu live)
Code:
# /etc/cryptmount/cmtab - encrypted filesystem information for cryptmount
# try 'man 8 cryptmount' or 'man 5 cmtab' for more details
user {
dev=/dev/sda27
dir=/home/xubuntu/Desktop/user
flags=user,nofsck
fstype=ufs mountoptions=ro,noatime,noexec,ufstype=ufs2
cipher=aes-xts-plain64
keyfile=/home/xubuntu/Desktop/eap.bin
keyformat=raw
}
- if your key in the kernel dump looks like this:
Code:
D2 60 86 B3 8B D2 D3 5A EC 76 DB DE 50 30 00 40
15 D6 AE 04 44 3D A8 59 4B 03 3C 1F 0A DD FA 6B
- then the correct key will be:
Code:
40 00 30 50 DE DB 76 EC 5A D3 D2 8B B3 86 60 D2
6B FA DD 0A 1F 3C 03 4B 59 A8 3D 44 04 AE D6 15
- after the key file eap.bin is created and the user folder is also created in the Desktop, install cryptmount
Code:
sudo apt install cryptmount
- and then mount your partition
Code:
sudo cryptmount user
- In this case the cmtab will have a small change
Code:
# /etc/cryptmount/cmtab - encrypted filesystem information for cryptmount
# try 'man 8 cryptmount' or 'man 5 cmtab' for more details
user {
dev=/dev/sda27
dir=/home/xubuntu/Desktop/user
flags=user,nofsck
fstype=ufs mountoptions=ro,noatime,noexec,ufstype=ufs2
cipher=aes-xts-plain64
ivoffset=111669149696
keyfile=/home/xubuntu/Desktop/eap.bin
keyformat=raw
}
- where iv offset is a number of partition - 1 << 32
- here it'll be (27-1)<<32=111669149696
Download: PS4_HDD_Decryption_Helper_(2022-10-31).7z (4.36 KB)
Spoiler: Depreciated
Below are further details and the changelogs from Berion, to quote: PS4 HDD Decryption Helper - Bunch of bash scripts for automate PS4 HDD decryption, mounting and unmounting.
Big thanks for @rj017 for painful QA phase and for @Thefirebeast for EAP and samples from his console!
Bunch of bash scripts for automate PS4 HDD decryption, mounting and unmounting.
- Unpack them in Your home dir, don't change any folder or file names.
- Drop EAP Key into /keys dir as "eap_key.bin".
- Drop ufs (optionally) kernel module in apps dir.
- Run mounter script.
- Have fun under /storage (root privileges needed).
- Run umounter script.
Wouldn't it be a better idea to create a tutorial for a live distribution with more recent Linux kernel? My Kernel is 5.3.0.
Or a ready to go virtual machine package?
Have attached RW ufs.ko module for Kernel 5.3.0-24-generic. Build it on Ubuntu 19.10 Cinnamon Remix. It's compatible with the live environment iso "cinnamonremix-19.10-all.20191204.iso".
Download: ufs.ko_5.3.0-24-generic.zip (779.5 KB)
PS4 HDD Decryption Helper (2022-10-31)
- added PS4 HDD Mounter Micro which will mount only user partition (consider "full Mounter" as unsafe because using untested file systems settings for FAT family partitions)
- moved readme to docs dir
Cheers to @HydrogenNGU via Twitter for the heads up on this!