Many of you guys still prefer using Windows/Mac to install PS4 Linux distros. This does require repackaging PS4 Linux distros as Etcher/Rufus images (img.xz). While some distros are already available in that format, many aren’t. So, this limits users to 2 major installation methods:-
In this tutorial, I will show you how you’d make Rufus/Etcher images of PS4 Linux distros. These steps will technically work for any PS4 Linux distro available. The method I will explain in this tutorial is one of the many methods available to repackaging PS4 Linux distros in img.xz format. For people still unversed, this means that you can even use your Windows or Mac systems to install PS4 Linux distros. All you need is a small application called Balena Etcher or Rufus.
Video Tutorial: Make Rufus/Etcher images (img.xz) of PS4 Linux distros
Or, if you prefer a textual tutorial, keep reading.
How to make Rufus/Etcher images (img.xz) of PS4 Linux distros?
Let us first look into the requirements.
Requirements
- Linux machine (PC or Virtual machine)
- Note: Both of these will work, but, I prefer a Virtual machine, because of the flexibility it provides. In this tutorial, I will be relying on a virtual machine running Fedora 40. Remember, to do it faster, we will not be installing Linux on the Virtual machine or PC. Instead, we will run the live version of the Linux distro.
- Linux ISO (Download here)
- Note: For this tutorial, I will be using Fedora 40 (LXDE recommended). You may try other distros as well. Also, make sure you download the ISO with Live OS support, not the exclusive installer version (netinst on Fedora, for example)
- Windows PC (if using Virtual machine)
- VirtualBox (if using Virtual machine. Download here)
- PS4 Linux distro (Download here)
- PS4 Linux kernel (Download here)
- PS4 Linux initram (Download here)
- USB drive(s)
- Other essentials for running PS4 Linux
Now, let us look at the whole process step-by-step.
Step 1. Prepare Virtual Machine
Step 1.1. Install and setup VirtualBox
- Install VirtualBox.
- Download VirtualBox Extension Pack. To do that, go to the Download page, scroll down and under VirtualBox [version] Oracle VM VirtualBox Extension Pack, click on All supported platforms. This will download the latest Extension pack.
- Install Extension pack by opening it and agreeing to the terms.
Step 1.2. Setup Virtual Machine for Distro installation
- Start VirtualBox.
- Click on New and provide any name for the Virtual Machine (VM), for example PS4Linux.
- Select Type and Version according to the distro you are going to install (Optional). Since I am going to install Fedora, I choose Linux under Type and Fedora (64-bit) under Version. Click Next.
- Choose RAM. I would suggest you to assign atleast 2GB (2048 MB) of RAM. Since the packing process is resource dependent, I recommend a higher amount of RAM, maybe 8-16GB is possible. Once set, click Next.
- Ensure Create a virtual hard disk now is selected and click Create.
- In this step, choose VDI or VHD and click Next.
- Choose Fixed size and click Next.
- Here, set the storage capacity you would like to assign. To be safe, assign 25-30GB and click Create.
- Once the VM has been created, you will find it on the left pane. So, here, we have PS4Linux listed. Click on it and on top right, click on Settings.
- Click on Storage and then click on the disk icon which says Empty. Browse to the distro ISO and select it.
- Go to USB and tick on Enable USB Controller and make sure USB 3.0 (xHCI) Controller is selected.
- Optionally, go to System, and choose the Processor tab. Increase the number of Processor(s) if you have a multi-core CPU. This will make the repacking go faster.
Now, the virtual machine is ready for installation.
Step 2. Setup Virtual Machine and unpack PS4 Linux distro
Step 2.1. Copy PS4 Linux distro to USB
- On your host machine (example, Windows), copy the downloaded PS4 Linux distro (.tar.xz or .tar.gz) to a USB drive. For the sake of this tutorial, we will assume, the file is called ps4linux.tar.xz. Keep the USB drive plugged in.
Step 2.1. Start Virtual machine & setup USB drive
- On VirtualBox, click on the VM (in this case, PS4Linux) and click Start on top right.
- On boot, choose Start Fedora-LXDE-Live 40 by pressing on the up arrow key on keyboard. Depending on the distro you have chosen, the option to choose might be slightly different.
- On the bottom right, right click on the USB icon and choose the plugged-in USB drive containing the PS4 Linux distro archive. Check on the Virtual machine if the USB is connected and if you are able to see the copied distro archive.
Step 2.2. Install Gparted & setup the drives
- Install Gparted (distro-specific instructions).
- Open a terminal and type
sudo gparted
. Press Enter. This will bring up the Gparted interface. - On top right, select the virtual hard drive we set up in Step 1.2, sub-step 8. It should say unallocated. Also make a note of the device identifier, for example, /dev/sda. We will need this later.
- Go to Device on the top menu, and click on Create Partition Table…
- Choose msdos and click on Apply.
- Click on Unallocated and create a new partition by clicking on the new folder icon on top left.
- Change the File system to fat32 and the New size to 50. Click on Add.
- Click on Unallocated and create a new partition by clicking on the new folder icon on top left.
- Change the File system to ext4, if not already that and for the label, type psxitarch. Please note that this changes according to the initramfs image you are using. When done, click on Add.
- Then, click on the green tick on the top pane and click on Apply.
- Close gparted.
Step 2.3. Extract PS4 Linux distro to virtual hard drive
- Open the partition named psxitarch (or other) that we created in Step 2.2, sub-step 8. Copy the complete path to that partition from the address bar above. On Fedora 40, it would be /run/media/liveuser/psxitarch.
- Open the USB drive on the Virtual machine. Make sure the distro archive, in our case, ps4linux.tar.xz is still there.
- Open a terminal in that folder, type
sudo tar -xvJpf ps4linux.tar.xz -C
followed by the location of the psxitarch partition and--numeric-owner
. So, in my case, the command would look like this –sudo tar -xvJpf ps4linux.tar.xz -C /run/media/liveuser/psxitarch --numeric-owner
. Once done, press Enter. - While the extraction takes place, you can copy the kernel and initram to the 50MB FAT32 partition of the virtual hard drive. This is recommended if this distro is for personal use. If you plan to release the image publicly, I recommend keeping the 50MB partition empty giving the end user option to choose his own kernel and initram.
Wait for the extraction to complete. Then, move onto the final step.
Step 3. Pack PS4 Linux distro for Etcher/Rufus installation
- Open the USB drive on the Virtual machine and then open a terminal within it.
- Type
sudo fdisk -l /dev/sda
. Remember to replace /dev/sda with the device identifier we got in Step 2.2, sub-step 3. Then, press Enter. - Assuming your device is sda1, make a note of the value under End for /dev/sda2. In this example, let’s assume the value is 62914459. Now, add 1 to that number, which gives us 62914460, i.e., 62914459 + 1. Make a note of that number.
- Type
sudo dd if=/dev/sda bs=512 conv=sparse,sync,noerror count=62914460 status=progress | xz -9e > ps4linux.img.xz
. Remember to replace /dev/sda with the device identifier we got in Step 2.2, sub-step 3. Also, rename ps4linux.img.xz to anything you like. Also, make sure the value after count= is the one we calculated in the earlier step. Finally, also make sure the USB drive has enough space to hold the packed image. When satisfied, press Enter.
Depending on the distro’s size, the VM’s specs – RAM, Processor count, etc., this might take from 1 hour to a few hours. Once the process is complete, your USB drive will have a file by the name ps4linux.img.xz.
Step 4. Install PS4 Linux distros using Rufus/Etcher
We already have a detailed tutorial on installing PS4 Linux distros using Rufus/Balena Etcher. Check that out for installation steps.
Conclusion
Using these steps, you can easily make Rufus/Etcher images for PS4 Linux distros. If you’d like to share these images, make a thread on the forums and I will share your download links/mirrors with credits.
Leave a Reply