APA Conversion using xRhino 2.2.21-pre1-xr7 Kernel Mini-HOWTO 1.0
Created: September 16, 2006
Last edited: September 16, 2006
REVISION HISTORY:
1.0 September 16, 2006 Initial revision
OVERVIEW:
This Mini-HOWTO will show you how to upgrade to the xRhino 2.2.21-pre1-xr7 kernel and repartition your hard-drive using the APA partition scheme. During this process you will need to make a full backup of your PS2 Linux installation and transfer it to another computer (or PS2) running an FTP server. The backup procedure described here uses unpartitioned space on your hard-drive, you will need about 25% to 50% of your drive unpartitioned. You will also require approximately 4MB of free space on your PS2 Linux memory card for the new kernel.
There are four major steps in this procedure:
INSTRUCTIONS:
Installing the xRhino 2.2.21-pre1-xr7 kernel
- Download kernel-binaries-2.2.21-pre1-xr7.tar.gz and xrinitfs_v2.gz.
- Unpack the kernel binaries:
tar -zxvf kernel-binaries-2.2.21-pre1-xr7.tar.gz
cd kernel-binaries-2.2.21-pre1-xr7
- Mount the memory card and copy the new kernel:
mount /mnt/mc00
cp vmlinux /mnt/mc00/xrvmlinux
- Copy the new kernel modules:
cp -R lib /
- Copy the ram disk filesystem to your memory card:
cp xrinitfs_v2.gz /mnt/mc00/xrinitfs.gz
- Add a new entry to your PS2 Linux boot menu:
vi /mnt/mc00/p2lboot.cnf
When the file opens, press the down arrow key until you reach the last line, press End to move to the end of the line, press Esc A to enter append mode, press Enter to create a new line, then append the following lines:
"xRhino" xrvmlinux "" 203 /dev/hda1 "" xRhino Kernel
"xrinitfs" xrvmlinux xrinitfs.gz 203 /dev/ram0 "" xRhino Kernel initfs
Press Esc to exit append mode, then : w Enter to write the file, then : q enter to quit
- Unmount the memory card and restart PS2 Linux:
umount /mnt/mc00
reboot
- When your PS2 reboots, select the new xRhino boot option. Verify that you can log in as root and that everything appears to be in order.
- If you are using xwindows, make the following changes:
cd /dev
mkdir input
mv mouse mouse-221
mknod input/mice c 13 63
mknod input/js0 c 13 0
mknod input/js1 c 13 1
mknod input/js2 c 13 2
mknod input/js3 c 13 3
mknod input/event0 c 13 64
mknod input/event1 c 13 65
mknod input/event2 c 13 66
mknod input/event3 c 13 67
ln -s input/mice mouse-xr7
ln -s mouse-xr7 mouse
Please see the posts by ppietro, janosek, speedeight and hparissi for additional information.
Making a full backup of your PS2 Linux installation
- Reboot again, this time choose the xRhino Kernel initfs boot option.
- Log in as root, there is no password.
- Create a new partition on your hard-drive to temporarily hold the backup files:
fdisk /dev/hda
Press p to print the partition table, it should look something like this:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 4162 2097616+ 83 Linux
/dev/hda2 4163 19386 7672896 5 Extended
/dev/hda5 4163 4423 131512+ 82 Linux swap
Press n to create a new partition.
Press l for logical partition.
Press Enter for default first cylinder.
Type +4096M and then Enter to create a 4GB partition.
Press p to print the new partition table, it should look something like this:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 4162 2097616+ 83 Linux
/dev/hda2 4163 19386 7672896 5 Extended
/dev/hda5 4163 4423 131512+ 82 Linux swap
/dev/hda6 4424 12746 4194760+ 83 Linux
Take note of the new device name, in this case /dev/hda6.
Press w to write the new partition table to disk and exit.
- Format the new partition:
mke2fs /dev/hda6
- Create mount points for your linux installation and temporary partitions:
mkdir /mnt/hda1
mkdir /mnt/hda6
- Mount the partitions:
mount /dev/hda1 /mnt/hda1
mount /dev/hda6 /mnt/hda6
- Verify that your contents of your linux installation are visible at /mnt/hda1:
ls /mnt/hda1
- Copy the ps2fdisk utility to your linux installation:
cp /usr/sbin/ps2fdisk /mnt/hda1/usr/sbin
- Compress your linux installation files:
cd /mnt/hda1
tar cvzf /mnt/hda6/backup.tar.gz *
For a graphical workstation installation this took 32 minutes, the file size was 233MB
- Now you need to transfer the backup file from the PS2, I used FTP to transfer the file to a Windows workstation running War FTP Daemon, another, possibly simpler, option would be FileZilla Server.
I'm not going to explain command line ftp in this tutorial, but be sure to set the transfer mode to binary, and using the HASH command gives you a progress indicator.
The upload took 54.9 seconds. It would be a good idea to verify the integrity of the archive on the remote system, if you are running Windows, you can download the Win32 GNU utilities, or use a program such as WinRAR.
Re-partitioning your hard-drive
- Now you may format your drive with the APA partition scheme using any one of a number of programs, for example the Sony HDD Utility Disc, or the DMS HDD Format Utility.
Once you have formatted your hard-drive, reboot your PS2 and choose the xRhino Kernel initfs boot option. Login as root, with no password.
- Create the new partitions:
ps2fdisk
Press n to create a new partition
Press 1 for the first partition.
Press l for linux native filesystem type.
Type 2048 and press Enter for a 2GB partition.
Type / and press Enter for the comment string.
Press n to create a new partition
Press 2 for the second partition.
Press s for linux swap filesystem type.
Type 128 and press Enter for a 128MB partition.
Type swap and press Enter for the comment string.
Press n to create a new partition.
Press 3 for the third partition.
Press l for linux native filesystem type.
Type 2048 and press Enter for a 2GB partition.
Press Enter for the comment string.
Press w to write the new partition table and exit.
- Format the new partitions:
mke2fs /dev/hda1
mke2fs /dev/hda3
- Create the new swap partition:
mkswap /dev/hda2
swapon /dev/hda2
- Create mount points for your linux installation and temporary partitions:
mkdir /mnt/hda1
mkdir /mnt/hda3
- Mount the partitions:
mount /dev/hda1 /mnt/hda1
mount /dev/hda3 /mnt/hda3
Restoring your PS2 Linux installation
Now you need to transfer the backup file back to the PS2. Using FTP the download took 149 seconds.
unpack your linux installation files:
cd /mnt/hda1
tar zxvpf /mnt/hda3/backup.tar.gz
It took 4 minutes 25 seconds to decompress the archive.
Verify that you can see your installation at /mnt/hda1:
ls /mnt/hda1
Unmount the temporary partition:
umount /dev/hda3
Delete the temporary partition:
ps2fdisk
Type d and press Enter to delete a partition.
Type 3 and press Enter for the partition number.
Type w and Enter to write the partition table and exit.
Change the location of your swap partition:
vi /mnt/hda1/etc/fstab
About the 3 lines down you should see the line that mounts the swap partition, it starts like this:
/dev/hda5 none swap
Change hda5 to hda2 and save the changes.
Unmount your linux installation and restart PS2 Linux:
cd /
umount /dev/hda1
reboot
Verify that all went well:
Choose the xRhino Kernel boot option and log in as you usually would.