REVISION HISTORY:
1.0 September 18, 2006 Initial revision
OVERVIEW:
This Mini-HOWTO will show you how to 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.
There are four major steps in this procedure:
INSTRUCTIONS:
Installing the new 2.2.1 kernel with APA support
gzip -d vmlinux.gz
mount /mnt/mc00 cp vmlinux /mnt/mc00
cp initfs.gz /mnt/mc00
vi /mnt/mc00/p2lboot.cnfWhen 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 line:
"initfs" vmlinux initfs.gz 203 /dev/ram0 "" initfsPress Esc to exit append mode, then : w Enter to write the file, then : q enter to quit
umount /mnt/mc00 reboot
Making a full backup of your PS2 Linux installation
fdisk /dev/hdaPress 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 swapPress n to create a new partition.
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 LinuxTake note of the new device name, in this case /dev/hda6.
mke2fs /dev/hda6
mkdir /mnt/hda1 mkdir /mnt/hda6
mount /dev/hda1 /mnt/hda1 mount /dev/hda6 /mnt/hda6
ls /mnt/hda1
cp /usr/sbin/ps2fdisk /mnt/hda1/usr/sbin
cd /mnt/hda1 tar cvzf /mnt/hda6/backup.tar.gz *For a graphical workstation installation this took 32 minutes, the file size was 233MB
Re-partitioning your hard-drive
ps2fdiskPress n to create a new partition
mke2fs /dev/hda1 mke2fs /dev/hda3
mkswap /dev/hda2 swapon /dev/hda2
mkdir /mnt/hda1 mkdir /mnt/hda3
mount /dev/hda1 /mnt/hda1 mount /dev/hda3 /mnt/hda3
Restoring your PS2 Linux installation
cd /mnt/hda1 tar zxvpf /mnt/hda3/backup.tar.gzIt took 4 minutes 25 seconds to decompress the archive.
ls /mnt/hda1
umount /dev/hda3
ps2fdiskType d and press Enter to delete a partition.
vi /mnt/hda1/etc/fstabAbout the 3 lines down you should see the line that mounts the swap partition, it starts like this:
/dev/hda5 none swapChange hda5 to hda2 and save the changes.
cd / umount /dev/hda1 reboot