First of all there are several prerequisites for installing Linux on your PS2, please note that this guide is aimed at installation on a slim PS2, if you have a fat PS2 you should download and install the copy of Sony's PS2 Linux here: [link] (https://sourceforge.net/projects/kernelloader/files/Sony%20Linux%20Toolkit/) Also note that the machine used to test this guide was a PS2 model SCPH-79001 (silver special edition) and thus it is safe to assume this should work on any model of PS2 lower than SCPH-90000 (the model SCPH-90000 and later cannot be softmodded, and thus you will not be able to launch a Linux bootloader.)
1.) A software mod for your PS2, such as the FreeMCBoot OS, or a modchip, as you will need a way to launch your bootloader.
2.) A memory card of at least 8MB, but preferably 16MB, 32MB or 128MB to ensure you have ample space. This MC will permanently hold your boot loader configuration, Linux kernel, and RamDisk. Since your FreeMCBoot installation will take up approx. 4.5MB on it's respective MC, plus the Kernel, RamDisk, and config file together will take up at least 7MB (up to 9.5MB if you choose to include the generic RamDisk as well) and you only have two MC slots, unless you are willing to use a MC port expansion you will likely need the extra space provided by an above-average size MC to store your saved games.
3.) A USB disk of at least 8GB (either a USB flash drive or external IDE/SATA HDD/SSD will work)
4.) Access to an existing install of a Debian based system (while making this guide I used Debian 8), if you are on a macOS or Windows system I recommend using VirtualBox, but make sure you install the guest additions to more easily transfer the required files.
5.) A USB 1.1 or 2.0 keyboard. While Sony's PS2 Linux, and the BlackRhino Linux live DVD come with an on screen keyboard, this installation will use Debian 5, which requires a proper physical keyboard.
Once you've met these prerequisites go ahead and proceed with the installation steps as follows:
1.) Download these files:
vmlinux_v11.gz
and the modules package [link] (https://sourceforge.net/projects/kernelloader/files/Linux%202.6/Linux%202.6%20Test%20Files%20Version%2011/)
initrd.usb2.gz
[link] (https://sourceforge.net/projects/kernelloader/files/Initial%20RAM%20Disc/Initrd%20for%20booting%20from%20USB%20memory%20stick/initrd.usb2.gz/download)
kloader3.0.elf
[link] (https://sourceforge.net/projects/kernelloader/files/Kernelloader/Kernelloader%203.0/kloader3.0.elf/download)
The Debian 5 installation files [link] (https://sourceforge.net/projects/kernelloader/files/Debian%205.0/debian-lenny-mipsel-v1.tgz/download)
2.) Copy the files vmlinux_v11.gz
, initrd.usb2.gz
, and kloader3.0.elf
to a flash drive formatted as FAT32, plug it into your PS2, and copy them to a folder named kloader
on your MC of choice (must have at least 7MB free). If there isn't enough space you can copy kloader3.0.elf
to a second MC, but I recommend keeping the files together if possible.
3.) Connect the USB disk you have selected for Linux installation to your existing Debian machine. Create an MS-DOS partition table on the disk.
4.) Open a terminal, start a root shell (sudo -i, or su). Run fdisk /dev/sdX
where X is your USB disk's identifier. Delete all existing partitions on the USB disk, create one new primary partition that leaves 1GB of free space left of the disk (i.e. if you have an 8GB disk, you should use +7168M
as the end cylinder option). Create a secondary partition of 1GB (+1024M
as the end cylinder option), and change it's type to swap (t
, followed by 2
, and finally 82
). Then use w
to write changes to disk.
5.) Run mkswap /dev/sdX2
where X is your USB disk's identifier. Then run mkfs.ext2 -I 128 /dev/sdX1
. Be sure to include the -I 128
option, it is required.
6.) Once the filesystems have been created, mount your USB disk's first partition under /media/usb/. Create a directory called install
in the directory you just mounted the disk on.
7.) Create a folder named debian
on your Debian machine, and place all of the files you downloaded in step 1 into it. The next several steps will be commands for ease of writing.
8.) cp -R /path/to/folder/debian/* /media/usb/install/
9.) cd /media/usb/
10.) tar -xzf install/debian-lenny-mipsel-v1.tgz
11.) cp install/vmlinux_v11.gz boot/; cp install/initrd.usb2.gz boot/
12.) bunzip2 install/linux-2.6.35.4-mipsel-ps2-modules-v11.tar.bz2
13.) tar -xf install/linux-2.6.35.4-mipsel-ps2-modules-v11.tar
14.) nano etc/fstab
and change ext3
to ext2
. Save the file and exit (ctrl-x
, y
, enter
)
15.) Unmount your USB disk with umount /dev/sdX1
16.) Unplug your USB disk. Turn on your PS2, plug your USB keyboard in to USB port 2, and start uLaunchELF. NOTE: do not plug in your USB disk yet, as the PS2 cannot natively read ext2 disks, and it will cause PS2 to hang on boot.
17.) In uLaunchELF, navigate to mc0:/kloader/
or mc1:/kloader/
if you placed the boot loader on your second MC in step 2. Run kloader3.0.elf
, watch the bottom of the screen, and when Autobooting in 3...
appears, press a button on your controller, or a key on the USB keyboard. A boot configuration menu should appear.
18.) Go to the bottom of the menu using the arrow keys on your USB keyboard, and select Advanced Menu
. Go to Select Kernel>Memory Card X>kloader>vmlinux_v11.gz
then Select Init RAM disk>Memory Card X>kloader>initrd.usb2.gz
. Turn Autoboot
off.
19.) Go to Configuration Menu
at the bottom of the current page, make sure Use SBIOS from TGE
, TGE for SBIOS New Modules
, Enable hard disk and network
, Patch libsd (enable USB)
are all enabled, and Enable IOP debug output
is disabled.
20.) Go to Module List
and make sure that rom0:LIBSD
is enabled.
21.) Go back to the Configuration Menu
and select Edit Kernel Parameter
and add the line newroot=/dev/sda1
(NOTE: pressing enter will save change and return to the Configuration Menu, so use a space after the existing line instead, and press enter once you have added this line.)
22.) Go back to Advanced Menu
, and then Boot Menu
, Select Save Config on MC0
.
23.) Insert your USB disk into your PS2's USB port 1, go to Advanced Menu
, and select Boot Current Config
.
24.) Debian should boot now, when you reach the login screen use root
as the login. The root user does not have a password by default, and there are no other users, so now you need to fix both. Run adduser yourusername
and enter the needed info (omit personal details if you want), and a user will automatically be created.
25.) Type exit
, and login as your new user with the login info you set. Run su
to enter a root shell, then run passwd root
and set a password for the root account. Make sure it is something you can remember! This version of Debian doesn't come with sudo preinstalled, you will need access to the root account until you can change that.
26.) Finally, while you are still in a root shell, run nano /etc/apt/sources.list
and change the existing source to deb archive.debian.org/debian lenny main
so that you can install packages via a network if needed.
27.) Networking will not function by default, to enable it add
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
to the file /etc/network/interfaces
, plug in an ethernet cable, and reboot the PS2 into Linux again.
28.) Now that networking is up and running, you should install sudo
for improved security when performing administrative tasks. This is Debian so log in to your user, drop to a root shell and run apt-get update && apt-get upgrade && apt-get install sudo
(There will be several packages needing updates so be sure not to omit those commands.).
29.) You have sudo installed now, but you aren't in the sudoers file, so while in the root shell run visudo /etc/sudoers
, and under
##
## User privilege specification
##
root ALL=(ALL) ALL
add the line
yourusername ALL=(ALL) ALL
Save your changes to the sudoers file, log out, and log back in.
The base installation is now complete. Any other customization you want to make can be done as you would with any other Linux distro. If you want to install the PS2SDK for developing PS2 specific software you can find the source here: [link] (https://github.com/ps2dev/ps2sdk) If you try to compile it on the PS2 it will run out of memory and hang, so make sure to set up the build environment on your main machine, and copy files to the Debian USB manually or via a network in order to get them on the PS2 for testing. The PS2 controller will not work as a mouse, so I recommend a USB hub for both the mouse and keyboard (if that is not an option mousekeys can be activated as usual with Alt+Shift+Num Lock
). Thanks for reading, and I hope this helped someone looking to install Linux on their PS2. I had tried for months to get this working, and have very recently done so, thus decided to try and make it easier for others wanting to do the same.