Partitions: Difference between revisions

From Vita Developer wiki
Jump to navigation Jump to search
(PCH-1008 2.52 GB / PCH-1108 2.55 GB)
 
(3 intermediate revisions by one other user not shown)
Line 91: Line 91:
|}
|}
=== Partition Code ===
=== Partition Code ===
The partition code uniquely identifies the partition to its function. It is related to [[SceKernelModulemgr#Partition Code]] but the meaning of the code is still unknown.
The partition code uniquely identifies the partition to its function.


It is related to [[SceKernelModulemgr#Partition Code]] but the meaning of the code is still unknown.
=== Partition Type ===
The partition type code indicates the file system used or if there is no file system (for example, in the case of a [[SLB2]] archive).
{| class="wikitable"
{| class="wikitable"
|-
|-
! Code
! Code
! Name
! Location Seen
! Description
! Description
|-
| 0x0
|
|
| empty partition
|-
| 0x1
|
| Internal
| first eMMC partition, some data, [[IdStorage]]?
|-
| 0x2
|
| Internal
| [[SLB2]] [[Boot Sequence|Boot loaders]]
|-
| 0x3
| os0
| Internal
| Main OS partition, contains kernel [[Libraries#Kernel|libraries]]
|-
| 0x4
| vs0
| Internal
| Contains [[Libraries#System Applications|system applications]] & libraries
|-
| 0x5
| vd0
| Internal
| [[Registry]] and error history
|-
|-
| 0x6
| 0x6
| tm0
| FAT16
| Internal
| Unknown, has an empty folder <code>nphome</code>
|-
|-
| 0x7
| 0x7
| ur0
| exFAT
| Internal
| User resources, [[LiveArea]] cache, database, & other stuff
|-
|-
| 0x8
| 0xDA
| ux0
| Raw data
| Memory Card
| [[Memory Card]]
|-
| 0x9
| gro0
| Game Card
| [[Game Card]]
|-
| 0xA
| grw0
| Game Card
| [[Game Card]] writable area
|-
| 0xB
| ud0
| Internal
| [[Updater]] copied here before reboot
|-
| 0xC
| sa0
| Internal
| Dictionary and font data
|-
| 0xD
|
| External
| Some data on [[Memory Card]] & [[Game Card]]
|-
| 0xE
| pd0
| Internal
| [[Welcome Park]] and welcome video
|}
|}


=== Partition Active ===
Some partitions (specifically <code>os0</code> and the boot loaders) have a shadow redundant copy. On update, only the inactive partition is written to and finally the active partition is swapped. For partitions that do not use this feature, this value is ignored.


===================================================
== Default Partitions ==
Updated Table
===================================================




{| class="wikitable"
{| class="wikitable"
! Name
! Name
! Size
! PartitionSize
! Code
! Code
! Format
! Type
! Location
! Physical
! Description
! Description
|-
|-
Line 212: Line 148:
|-
|-
| [[Files_on_the_PS_Vita#os0|os0]]
| [[Files_on_the_PS_Vita#os0|os0]]
| 15.96 MB
| 15.96MB
| 0x3
| 0x3
| [https://en.wikipedia.org/wiki/File_Allocation_Table#FAT16 FAT16]
| [https://en.wikipedia.org/wiki/File_Allocation_Table#FAT16 FAT16]
Line 254: Line 190:
|-
|-
| [[Files_on_the_PS_Vita#ur0|ur0]]
| [[Files_on_the_PS_Vita#ur0|ur0]]
| 2.55 GB
| 2.52 or 2.55 GB
| 0x7
| 0x7
| [https://en.wikipedia.org/wiki/ExFAT exFAT]
| [https://en.wikipedia.org/wiki/ExFAT exFAT]
Line 264: Line 200:
| 0x8
| 0x8
| [https://en.wikipedia.org/wiki/ExFAT exFAT]
| [https://en.wikipedia.org/wiki/ExFAT exFAT]
|  
| [[Memory_Card]]
| Memory Card
| User Storage, commonly used for homebrew
|-
|-
| [[Files_on_the_PS_Vita#vd0|vd0]]
| [[Files_on_the_PS_Vita#vd0|vd0]]
Line 285: Line 221:
| 0x9
| 0x9
|  
|  
| [[Media#PS_Vita_Gamecards]]
| [[Game_Card]]
| Read-Only partition of the Game Card
| Read-Only partition of the Game Card
|-
|-
Line 292: Line 228:
| 0xA
| 0xA
|  
|  
| [[Media#PS_Vita_Gamecards]]
| [[Game_Card]]
| Read-Write partition of the game card if supported (for storing save games, patches and DLC of the game to cartridge).
| Read-Write partition of the game card if supported (for storing save games, patches and DLC of the game to cartridge).
|}
|}
=== Partition Type ===
The partition type code indicates the file system used or if there is no file system (for example, in the case of a [[SLB2]] archive).
{| class="wikitable"
|-
! Code
! Description
|-
| 0x6
| FAT16
|-
| 0x7
| exFAT
|-
| 0xDA
| Raw data
|}
=== Partition Active ===
Some partitions (specifically <code>os0</code> and the boot loaders) have a shadow redundant copy. On update, only the inactive partition is written to and finally the active partition is swapped. For partitions that do not use this feature, this value is ignored.

Latest revision as of 00:43, 17 June 2022

All devices on the Vita are partitioned the same way. Logical block size is 512 bytes and the first logical block is the master block which defines the partition table along with other information. Because of block level encryption, the master block is also encrypted along with everything else and cannot be seen if the device is dumped from an external dumper.

Master Block[edit | edit source]

The first block (512 bytes) provides a partition table as well as auxiliary information to the block management drivers.

Offset Size Information
0x0 0x20 Magic string "Sony Computer Entertainment Inc."
0x20 0x4 Version ? (0x3)
0x24 0x4 Size of device in blocks
0x28 0x28 ?
0x50 0x11 - 0x110 Partition entries (there are 0x10 partitions at most (derived from code and data structure of SdStor driver))
0x160 0x5E unknown (zeros)
0x1BE 0x10 unknown (may contain some data) (In standard MBR this area corresponds to Partition Entry)
0x1CE 0x10 unknown (must contain zeros) (In standard MBR this area corresponds to Partition Entry)
0x1DE 0x10 unknown (must contain zeros) (In standard MBR this area corresponds to Partition Entry)
0x1EE 0x10 unknown (must contain zeros) (In standard MBR this area corresponds to Partition Entry)
0x1FE 0x2 0xAA55 signature

Partition Entries[edit | edit source]

Each partition entry is 17 bytes long. Offset 0x0 means end of table.

Offset Size Information
0x0 0x4 Partition offset (blocks)
0x4 0x4 Partition size (blocks)
0x8 0x1 Partition code
0x9 0x1 Partition type
0xA 0x1 Partition active
0xB 0x4 Flags ? seen: 0x00000F1F, 0x00000F0F, 0x00000FFF, 0x??????55, 0x00000F4F
0xF 0x2 ?

Partition Code[edit | edit source]

The partition code uniquely identifies the partition to its function.

It is related to SceKernelModulemgr#Partition Code but the meaning of the code is still unknown.

Partition Type[edit | edit source]

The partition type code indicates the file system used or if there is no file system (for example, in the case of a SLB2 archive).

Code Description
0x6 FAT16
0x7 exFAT
0xDA Raw data

Partition Active[edit | edit source]

Some partitions (specifically os0 and the boot loaders) have a shadow redundant copy. On update, only the inactive partition is written to and finally the active partition is swapped. For partitions that do not use this feature, this value is ignored.

Default Partitions[edit | edit source]

Name PartitionSize Code Type Physical Description
0x0 raw EMMC empty partition
0x1 raw EMMC first eMMC partition, some data IdStorage?
0x2 raw EMMC SLB2 Boot loaders
os0 15.96MB 0x3 FAT16 EMMC The “main” OS files. Includes all the kernel libraries and the most important user libraries. There is always two copies of this for redundancy and updating will only update the inactive partition and the active flag is swapped.
pd0 303.91 MB 0xE exFAT EMMC Welcome Park and Intro Video. It is also the “preinst” PUP update.
sa0 95.95 MB 0xC FAT16 EMMC The “bulky” data like fonts and handwriting information. Why is it a separate partition? Because it makes updates smaller. Your “systemdata” PUP provides the update for this partition.
sd0 FAT16 Unique to DEVKITs? (Needs confirmation on this). Used for sdcard storage (updates).
tm0 31.95 MB 0x6 FAT16 EMMC eMMC-NAND npdrm partition.
ud0 255.91 MB 0xB FAT16 EMMC When you update the Vita, the update file is copied here and the system reboots.
ur0 2.52 or 2.55 GB 0x7 exFAT EMMC NAND is the remaining user data that is structured similarly to the memory card (it shares almost the same directory structure). App icon layout for example is found here.
ux0 varies 0x8 exFAT Memory_Card User Storage, commonly used for homebrew
vd0 31.95 MB 0x5 FAT16 EMMC Registry and error history
vs0 255.73 MB 0x4 FAT16 EMMC Rest of the OS including all the system apps, the main shell, and the remaining user libraries.
gro0 varies 0x9 Game_Card Read-Only partition of the Game Card
grw0 varies 0xA Game_Card Read-Write partition of the game card if supported (for storing save games, patches and DLC of the game to cartridge).