PS2 OPL SMB Linux Configuration Guide

Discussion in 'OpenPS2Loader (OPL)' started by amirzaim, Sep 3, 2018.

  1. 207
    74
    32
    amirzaim

    amirzaim Member

    Joined:
    May 7, 2018
    Messages:
    207
    Likes Received:
    74
    Trophy Points:
    32
    Gender:
    Male
    Location:
    Chicken Coop, Sanhok
    Well, I have configured it out how to use OPL SMB with Linux desktop and before that I have been searching around on how to connect it properly with suitable SMB configs (usually from OPL Raspberry Pi config) and samba often changing config properties which makes some of existing SMB config obsolete and can't be used. Here's how to configure it:

    1. SMB installation
    Install latest version of samba packages in Linux desktop.
    For Ubuntu:
    Code:
    sudo apt install samba samba-common-bin
    For Arch Linux:
    Code:
    sudo pacman -Syyu samba
    NOTE: Some Linux distros does not provide SMB config file which is usually located at /etc/samba/smb.conf. You might need to install extra package that includes smb.conf file (usually auto config) or just grab my config file which I pasted here below (for manual setup method, see this link here: https://wiki.manjaro.org/index.php?title=Using_Samba_in_your_File_Manager).

    2. Configuring the smb.conf file.
    Open up smb.conf file from /etc/samba directory with root permissions and add some lines below:
    Code:
    [global]
    client min protocol = SMB3
    client max protocol = SMB3
    lanman auth = yes
    keepalive = 0
    smb port = 455
    
    Well, putting client min protocol = SMB3 and client max protocol = SMB3 will fixes Failed To Mount Windows Share problem where your OPL successfully connects it but no game list shown, even the shared folder does not have its newly-created subfolders when connected.
    [Reference:https://www.medo64.com/2017/12/solving-failed-to-mount-windows-share/]

    NOTE: If you're using NTFS partition, see this link here below for confguring NTFS permissions in fstab: https://askubuntu.com/questions/342791/file-permissions-wont-change

    Then, set up the PS2 SMB shared folder as below (you can put other name as you like as the SMB config in Windows)
    Code:
    [PS2SMB]
       comment = PS2 SMB
        path = /home/amirzaim/PS2SMB
        browseable = yes
        read only = no
        guest ok = yes
        public = yes
        available = yes
    After configuring smb.conf file, run testparm and systemctl restart smb nmb to see whether your smb.conf file is configured correctly or not.

    3. Connecting it with PS2
    First, set up the IP address according to the configuration example below. You can keep your current config unchanged if you're using SMB Windows before and set it up in Linux without much hassle.
    For PC
    Code:
    IP  : 192.168.1.2
    Netmask :  255.255.255.0 (Linux will convert into value 24)
    Gateway : 192.168.1.1
    For OPL
    Code:
    -PS2-
    IP type : Static
    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 : PS2SMB
    User: GUEST
    Password: 
    
    Then, connect the SMB and make sure the subfolder inside the shared SMB folder were created. Next, you will need to change the permission to allow you to put some stuffs inside the PS2 Shared folder by running some of commands like this below:
    Code:
    cd ~/PS2SMB
    sudo chmod 777 DVD #run this command for the rest of the subfolder by renaming "DVD" into another folder
    Now, you can put some stuffs after giving full access permission to these subfolders. After that, reconnect it back in OPL and you will see the game list on the OPL.
    That's all...

    PS: You can download my smb.conf file here and you will need to do some changes like changing the username into your username.
     

    Attached Files:

    Tupakaveli, Neal Cullum and jolek like this.
  2. 207
    74
    32
    amirzaim

    amirzaim Member

    Joined:
    May 7, 2018
    Messages:
    207
    Likes Received:
    74
    Trophy Points:
    32
    Gender:
    Male
    Location:
    Chicken Coop, Sanhok
    Known issues:

    1. Connected to the SMB network but no game lists appeared.

    - This is possible issue of SMB services not enabled automatically just after samba installed, so you will need to enable it manually. Please refer to the wiki of your current Linux distro on how to enable samba SMB/NMB services.

    Example:
    Code:
    systemctl enable smb nmb
    systemctl start smb nmb

    2. VMC write bug on ext4 partition SMB network.

    - I'm just found the bug on OPL where it took longer time to write save game into VMC when using SMB with ext4 partition. You might need to use PS2 memory card or just connect it to the NTFS partition SMB folder where possible.
     
  3. 452
    755
    147
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    452
    Likes Received:
    755
    Trophy Points:
    147
    Location:
    Singapore
    Home Page:
    If the user is using a router, then it becomes possible to use DHCP instead, hence avoiding the need for static IP configuration.

    Since we just use the SMB protocol to issue file I/O requests, which will be handled by your SMB server on behalf of OPL, there is no way for OPL to directly have an issue with the ext4 filesystem.

    If it is possible to achieve normal writing speeds when another PC is connected to the SMB server instead, perhaps it has got to do with how VMC support will always write data in units of 512 bytes (which is very small). Perhaps the filesystem driver is not caching writes...

    For a really long time, the homebrew SMB driver (SMBMAN) had the WritethroughMode option set for the WriteMode field of the SMB Write_AndX command.
    If you're interested in trying to solve this, I can upload a test that has this option removed. Perhaps sometime later on.
    Since it will not write through, it means that you must not switch off/reset the PS2 without using IGR. This hence also means that it will have to be a test with a fix for the existing bug, which prevents VMC from being closed when IGR is invoked.
     
  4. 207
    74
    32
    amirzaim

    amirzaim Member

    Joined:
    May 7, 2018
    Messages:
    207
    Likes Received:
    74
    Trophy Points:
    32
    Gender:
    Male
    Location:
    Chicken Coop, Sanhok
    VMC bug on ext4 partition is really annoyed me though, but it only seems that POPStarter has no issue save/load VMCs from this particular partition.
     
  5. 452
    755
    147
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    452
    Likes Received:
    755
    Trophy Points:
    147
    Location:
    Singapore
    Home Page:
    But software like POPS is different. They have full control over the PlayStation 2 console, and hence can do additional caching.

    Please try this: https://www.sendspace.com/file/2jldu7
    The full pull request is here: https://github.com/ifcaro/Open-PS2-Loader/pull/144

    This patch set also attempt to address the issue with OPL being unable to unmount the VMCs & disc images before shutdown. I am no longer able to commit time to do testing, so it may not work (although I hope it will just work...).

    EDIT: replaced file.
    EDIT 2018/09/26: replaced file again.
    EDIT 2018/09/27: replaced file again.
    EDIT 2018/09/29: replaced file again.
     
    Last edited: Sep 29, 2018

Share This Page