Resizing VFLASH Storage Device

From PS3 Developer wiki
Jump to navigation Jump to search

Introduction

I tried first to remove GameOS HDD region, then created a smaller one and used the free space to create one new HDD region for Linux. But every time i did it, OFW removed it again at the next boot and reformatted the HDD. So i decided to use VFLASH because GameOS doesn't touch it.

VFLASH is a virtual device, as the name already suggests. VFLASH is the region #1 on the HDD of PS3. By default, VFLASH is only 256 MB. And it has one free region, region #7, which is currently not used by HV or GameOS.

First, i resized the VFLASH. By doing this, you will loose your data on HDD but NOT on VFLASH !!! VFLASH data remains untouched. Resizing VFLASH doesn't cause corruption of data already installed there !!! So backup your GameOS data from UFS2 partition before you will do it.

After resizing VFLASH, GameOS will reformat the HDD again but with a little difference :-) It will have less HDD space now because i made VFLASH larger.

First step is to dump the partition table of HDD. Second step is to remove GameOS partitions. Then resize VFLASH by modifying the partition table and writing it back to HDD. The last step is creating new VFLASH region.

I did all these steps from a Linux with my kernel booted by BootOS but it's not necessary and can be easily done from GameOS itself. I implemented my dual boot on 3.41 PS3 from GameOS before SONY took it away.

Dumping HDD Partition Table

  • Partition table is stored on first sectors of HDD
  • Dump it with my ps3disk Linux kernel driver or with GameOS and HV call lv1_storage_read
# dd if=/dev/ps3da of=partition_table_old.bin bs=512 count=2

Removing GameOS Partitions From HDD

There are actually 2 methods i used to do these. First method is to modify the HDD partition table directly. The second method is to use my PS3 Linux kernel and ps3stormgr kernel module.

1. Method

2. Method

  • You will need my ps3stormgr Linux kernel module and ps3stor-utils

Patching HDD Partition Table

Adding New VFLASH Region