Linux, a PS2 and Samba: Dancing through ethernet
February 9, 2024
So, a while ago, I decided to give a second life to my PS2. I wanted it to load games from my PC using OPL, but I couldn't find a lot of up-to-date info on that (the guide I was using was from 2018). I tried for some days and wasn't able get it working, the setup I had made testing this really uncomfortable, so eventually I gave up, got into other stuff, and put the console back on the shelf.
But recently, I gave it another go. It took me some hours, but thanks to this post I was able to get it working! So yeah, I wanted to share my configs and make this little guide to save someone the time if they want to do the same in the (near) future.
Samba setup
The way the OPL connects to the PC is with the SMB1 protocol, this is the same protocol that Windows used for shared folders (and Linux supports too). That makes sense, it was convenient I guess.
Nowadays both Linux and Windows have deprecated this protocol and have disabled it by default, most probably because it was insecure. Great!
So yeah, until they move to a better protocol, continue at your own risk!
Make sure to have Samba installed:
- Debian/Ubuntu:
sudo apt install samba samba-common-bin
- Fedora:
sudo dnf install samba
- Arch:
sudo pacman -S samba
Write this config in the /etc/samba/smb.conf
config file (with root):
[global]
security = user
passwd program = /run/wrappers/bin/passwd %u
invalid users = root
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/%m.log
max log size = 1000
server min protocol = CORE
client min protocol = CORE
client max protocol = SMB3
map to guest = Bad User
usershare allow guests = yes
name resolve order = lmhosts bcast host wins
security = user
guest account = nobody
[ps2]
available = yes
browseable = yes
comment = ps2
guest ok = yes
path = /var/ps2
public = yes
read only = no
Create the /var/ps2
directory (with root, too) and make sure that is readable and writable for all users! (a sudo chmod 0777 -R /var/ps2/
should do it).
Initially I had this in my home, and while the directory itself had the correct permissions, my home did not, and in OPL I got a "Cannot open SMB share" error. So I just moved it to /var/ps2
and it worked! Why /var
? Immutable distros generally don't allow writing to the root file system, except for paths like /etc
, /home
and this one.
Finally, enable and start samba with systemctl enable --now smb
.
Network config
I have my PS2 connected directly to my computer with an Ethernet cable, so I had to set up the IPs manually. The 2018 guide still applies here, but to summarize:
- Open the network config for your desktop environment
- Add a new "Wired Ethernet" network
- Go to the IPv4 tab, set the Method to "Manual", add a new IP like this:
Address Netmask Gateway 192.168.1.2 255.255.255.0 0.0.0.0 - And tick the "IPv4 is required for this connection" box.
As an optional step, if you want to use the internet while the PS2 is connected, click the button labeled "Routes" and tick the "Use only for resources on this connection" checkbox.
In OPL, change the Network Settings to this, then Reconnect:
PS2 | |
---|---|
IP | 192.168.1.10 |
Netmask | 255.255.255.0 |
Gateway | 192.168.1.1 |
DNS Server | 192.168.1.1 |
SMB Server | |
Address type | IP |
Address | 192.168.1.2 |
Port | 445 |
Share | ps2 |
User | GUEST |
Password |
That's pretty much it
...now I need to figure out how to run OPL Manager with wine. Eh, not that it makes much of a difference.
I'm currently replaying Sonic Heroes on the console, yes, I know the Gamecube version is the better one (and it shows), but I don't care! >:D. I'm currenly on Mystic Mansion, which has been a bit of a pain, mainly because I suck, but secondly because this game has the worst pause menu ever, which made me restart the whole level on accident multiple times!
Anyways, its been fun! Thank you for reading!