PS2 SMB with a Raspberry Pi 4 in 2024

How to configure Raspberry Pi 4 to create a SAMBA server and access the games on your PlayStation 2!

PS2 SMB with a Raspberry Pi 4 in 2024
Photo by Denise Jans / Unsplash

As a software engineer by profession, my world revolves around coding and creating innovative digital solutions. However, when I'm not immersed in the complexities of software development, I find myself diving into another passion of mine: gaming. My love for video games is not just limited to the latest releases; in fact, I have a profound appreciation for vintage gaming consoles. My collection boasts treasures like the Super Nintendo Entertainment System (SNES), Nintendo 64, Game Boy, and several others. Each console is a gateway to nostalgia and a testament to the evolution of gaming. In this article, I'm excited to share how I blend my technical skills with my gaming hobby, particularly through my recent project involving the PlayStation 2 (PS2) and a Raspberry Pi 4 in the year 2024 to create a Samba server to read the games over the network.

We will need:

  • PlayStation 2 with OPL
  • Raspberry Pi (I used 4)
  • Ethernet cable (don't need to be crossover)
  • HDD (optional just to put all the games)

Setup Raspberry Pi 4

Raspberry Pi Imager to create Raspberry Pi card

First of all, we need to format the SDCARD to use in our Raspberry, I recommend the Pi Imager to create the image. It's straightforward; choose the device, the operating system (I used and recommend the Raspberry Pi OS) and choose the storage (SDCARD).

Raspberry Pi OS version

Now we can put the SDCARD in the Rasp and boot the system, finish all the initial setup.

Samba server

Now we need to create our shared folder to access via OPL. Samba is an open-source software suite that provides seamless file and printer-sharing capabilities between Windows, Linux, and macOS systems within a network. It enables these diverse systems to communicate with each other by implementing the SMB/CIFS protocol.

Let's install the Samba, open the LXTerminal, and type:

sudo apt install samba -y

After finishing, we need to create or mount our shared folder where we will put all the games, we can use a USB device (HDD, pen drive, etc) or just use the SDCARD space. For this example, I will use an HDD with a USB adapter, just plug it and the OS will mount automatically.

HDD mounted on system

Now we need to get the path to the OPL folder in our device, just open the device that you plugged in and copy the path.

HDD path

If you will not use an external device, just create a folder and put the games ISO in the DVD folder.

Now let's configure the sharing file, you can install a code editor in your OS or just use nano to edit files in the terminal.
We need to open the smb.conf and edit some things, but is easier to create a new one, so let's move the original file and download a new one:

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf-bkp

Now we will download the new file, I hosted in the GitHub gist, it's a modification of an original file with a small modification (ntlm line):

sudo wget https://shorturl.at/dvQST -O /etc/samba/smb.conf

This file has a lot of configs that make the SMB work on PS2,lets edit it:

sudo nano /etc/samba/smb.conf

In the bottom of the file, we got this:

[PS2]
comment = PlayStation 2
path = /media/user/DISK/PS2
browsable = yes
guest ok = yes
public = yes
available = yes
read only = no
veto files = /._*/.apdisk/.AppleDouble/.DS_Store/.TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/Temporary Items/Thumbs.db/
delete veto files = yes

The comment is just a comment (seriously?), it's for the system that shows this info. The path is one of the most important lines here, we need to tell what folder we want to share, just paste the path that we copied before (HDD or the new folder). The other option is just for permissions.
Save the file (CTRL + o) and exit from nano (CTRL + x).

To finish our sharing server, we just need to config the user, we will use the current (logged) user to connect to the SMB, to do that we need "create" the user on the samba:

sudo smbpasswd -a username

Replace "username" to your current user. You will be asked to create a new password; you can create a different password for the sharing (simpler or smaller).
Now restart the services:

sudo service smbd restart
sudo service nmdb restart

Static IP

To connect the PS2 to the Raspberry Pi with the cable we need to set a static IP to the ethernet network on Rasp, it's very easy on Raspberry Pi OS, just click on the WIFI icon > Advanced Options > Edit connections.

Edit network connections

On the next screen choose the connection in "Ethernet" section and click on the gear icon:

Edit ethernet configurations

Now click on IPv4 Tab and configure on this way:

Setup IPv4

The network mask/subnet mask with "24" corresponds to "255.255.255.0", here is an explanation.
Save the config, connect the cable on PS2 and Raspberry, and let's go to the OPL.

OPL Settings

Turn on your PS2 on OPL and go to Network Settings, put your configs like that:

OPL network settings

On -PS2- section is our network config for the PlayStation 2, put the Address type to static and choose a different IP, the other info you will repeat from the Raspberry network configuration.
The - SMB Server - section is the config to connect to the Rasp, put the address type to IP and put the IP that we set previously, the port we don't need to change, the Share options is the name of share that we create on Samba config file (PS2), the user is the user that we use to log in on the Rasp, and the password is the one that we create when adding the user to Samba.

Now click on the "Reconnect" option and check if there's no error message, go back to your games list and check!

Bonus

You can use the OPL PC Tools to download the cover and background for your games and get a beautiful UI on your PS2!

OPL PC Tools
OPL Pc Tools preview

Check it out here.

Any question? comment and let's talk!