Partitions: Difference between revisions
No edit summary Tags: mobile edit mobile web edit |
CelesteBlue (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
== Master Block == | == Master Block == | ||
The first block (512 bytes) provides a partition table as well as auxiliary information to the block management drivers. | The first block (512 bytes) provides a partition table as well as auxiliary information to the block management drivers. | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | ! Offset | ||
! Size | ! Size | ||
Line 19: | Line 20: | ||
| 0x24 | | 0x24 | ||
| 0x4 | | 0x4 | ||
| Size of device in blocks | | Size of device in blocks (ex: 0x71A000 blocks -> * 0x200 bytes per block = 0xE3400000 = 3 812 622 336 bytes = 3.81 GB) | ||
|- | |- | ||
| 0x28 | | 0x28 | ||
| 0x8 | | 0x8 | ||
| | | full of zeroes - maybe padding | ||
|- | |- | ||
| 0x30 | | 0x30 | ||
| 0x4 | | 0x4 | ||
| Second Loader offset ( | | Second Loader offset in blocks (ex: 0x6070 -> * 0x200 bytes per block = 0xC0E000 bytes = 12 MB from MBR start) | ||
|- | |- | ||
| 0x34 | | 0x34 | ||
| 0x4 | | 0x4 | ||
| Second Loader size ( | | Second Loader size in blocks (ex: 0x6F -> * 0x200 bytes per block = 0xDE00 bytes = 56kB) | ||
|- | |- | ||
| 0x38 | | 0x38 | ||
| | | 0x4 | ||
| ? | | ? (ex: 0x600) | ||
|- | |||
| 0x3C | |||
| 0x4 | |||
| ? (ex: 0x400) | |||
|- | |||
| 0x40 | |||
| 0x4 | |||
| ? (ex: 0x600) | |||
|- | |||
| 0x40 | |||
| 0x4 | |||
| ? (ex: 0x10000) | |||
|- | |||
| 0x48 | |||
| 0x8 | |||
| full of zeroes - maybe padding | |||
|- | |- | ||
| 0x50 | | 0x50 | ||
| 0x11 | | 0x110 (0x11 per partition * 10 partitions) | ||
| [[Partitions#Partition Entries|Partition entries]] (there are 0x10 partitions at most (derived from code and data structure of SdStor driver)) | | [[Partitions#Partition Entries|Partition entries]] (there are 0x10 partitions at most (derived from code and data structure of SdStor driver)) | ||
|- | |- | ||
Line 67: | Line 84: | ||
== Partition Entries == | == Partition Entries == | ||
Each partition entry is 17 bytes long. Offset 0x0 means end of table. | Each partition entry is 17 bytes long. Offset 0x0 means end of table. | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | ! Offset | ||
! Size | ! Size | ||
Line 96: | Line 114: | ||
| 0xB | | 0xB | ||
| 0x4 | | 0x4 | ||
| Flags ? seen: <code> | | Flags ? seen: <code>0x00000555</code>, <code>0x00000F0F</code>, <code>0x00000F1F</code>, <code>0x00000F4F</code>, <code>0x00000FFF</code> | ||
|- | |- | ||
| 0xF | | 0xF | ||
Line 102: | Line 120: | ||
| ? | | ? | ||
|} | |} | ||
=== Partition Code === | === Partition Code === | ||
The partition code uniquely identifies the partition to its function. It is related to [[SceKernelModulemgr#Partition Code]] | |||
The partition code uniquely identifies the partition to its function. It is related to [[SceKernelModulemgr#Partition Code]]. | |||
{| class="wikitable" | {| class="wikitable" | ||
! Code | ! Code | ||
! Name | ! Name | ||
Line 119: | Line 139: | ||
| | | | ||
| Internal | | Internal | ||
| first eMMC partition, some data, [[IdStorage]] | | first eMMC partition, some data, [[IdStorage]] | ||
|- | |- | ||
| 0x2 | | 0x2 | ||
Line 129: | Line 149: | ||
| os0 | | os0 | ||
| Internal | | Internal | ||
| Main OS partition, contains kernel [[ | | Main OS partition, contains kernel [[Module#Kernel|libraries]] | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| vs0 | | vs0 | ||
| Internal | | Internal | ||
| | | [[Libraries#System Applications|system applications]] & libraries | ||
|- | |- | ||
| 0x5 | | 0x5 | ||
Line 144: | Line 164: | ||
| tm0 | | tm0 | ||
| Internal | | Internal | ||
| | | NpDrm, Marlin and DevKit/TestKit activations files | ||
|- | |- | ||
| 0x7 | | 0x7 | ||
Line 159: | Line 179: | ||
| gro0 | | gro0 | ||
| Game Card | | Game Card | ||
| [[Game Card]] | | [[Game Card]] read-only area | ||
|- | |- | ||
| 0xA | | 0xA | ||
Line 169: | Line 189: | ||
| ud0 | | ud0 | ||
| Internal | | Internal | ||
| [[Updater]] copied here before reboot | | [[Updater]] application and PUP copied here before reboot | ||
|- | |- | ||
| 0xC | | 0xC | ||
Line 188: | Line 208: | ||
=== Partition Type === | === 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). | 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 | ||
! Description | ! Description | ||
Line 205: | Line 226: | ||
=== Partition Active === | === 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. | 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. | ||
[[Category:System]] | [[Category:System]] |
Revision as of 14:42, 21 August 2018
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
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 (ex: 0x71A000 blocks -> * 0x200 bytes per block = 0xE3400000 = 3 812 622 336 bytes = 3.81 GB) |
0x28 | 0x8 | full of zeroes - maybe padding |
0x30 | 0x4 | Second Loader offset in blocks (ex: 0x6070 -> * 0x200 bytes per block = 0xC0E000 bytes = 12 MB from MBR start) |
0x34 | 0x4 | Second Loader size in blocks (ex: 0x6F -> * 0x200 bytes per block = 0xDE00 bytes = 56kB) |
0x38 | 0x4 | ? (ex: 0x600) |
0x3C | 0x4 | ? (ex: 0x400) |
0x40 | 0x4 | ? (ex: 0x600) |
0x40 | 0x4 | ? (ex: 0x10000) |
0x48 | 0x8 | full of zeroes - maybe padding |
0x50 | 0x110 (0x11 per partition * 10 partitions) | 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
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: 0x00000555 , 0x00000F0F , 0x00000F1F , 0x00000F4F , 0x00000FFF
|
0xF | 0x2 | ? |
Partition Code
The partition code uniquely identifies the partition to its function. It is related to SceKernelModulemgr#Partition Code.
Code | Name | Location Seen | Description |
---|---|---|---|
0x0 | empty partition | ||
0x1 | Internal | first eMMC partition, some data, IdStorage | |
0x2 | Internal | SLB2 Boot loaders | |
0x3 | os0 | Internal | Main OS partition, contains kernel libraries |
0x4 | vs0 | Internal | system applications & libraries |
0x5 | vd0 | Internal | Registry and error history |
0x6 | tm0 | Internal | NpDrm, Marlin and DevKit/TestKit activations files |
0x7 | ur0 | Internal | User resources, LiveArea cache, database, & other stuff |
0x8 | ux0 | Memory Card | Memory Card |
0x9 | gro0 | Game Card | Game Card read-only area |
0xA | grw0 | Game Card | Game Card writable area |
0xB | ud0 | Internal | Updater application and PUP 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 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).
Code | Description |
---|---|
0x6 | FAT16 |
0x7 | exFAT |
0xDA | Raw data |
Partition Active
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.