Partition Layout

The main SD card image is split into three sections

Device             Start     End  Sectors  Size Id Type
NextPi_1)          8192    98045    89854 43.9M  c W95 FAT32 (LBA)
NextPi_2)         98304 21069823 20971520   10G 83 Linux
NextPi_3)      21069824 27361279  6291456    3G  b W95 FAT32
NextPi_4)      27361280 29458431  2097152    1G 83 Linux

1) /boot                    -- DietPi defaults and system files
2) /                        -- EXT4 master filesystem, read only
3) /mnt/nextpiuser_internal -- User read write, aliased to /NextPi
3) /PCache                  -- NextPi managed Persistent Cache folder 

Also, not listed above:
5) /ram                     -- User read write, erased every reboot
And, optionally:
6) /mnt/dongle              -- If found, /dev/sda1 or /dev/sda - mounted at boot

Partitions are managed via Partition UIDs to prevent USB devices from preventing
 boot.

Partition 1
-----------
This is mounted RW as a requirement of DietPi (and thus NextPi) -- DO NOT change
 or add files in this partition, automatic system updaters will potentially
 fail, and almost definitely will overwrite your changes during routine updates.

Partition 2 
-----------
This is mounted RO, and is the System ROM -- this can only be edited after
 enabling RW mode with nextpi-admin_enable. As of NextPi2 the space constraints
 of this partition are massively reduced, therefore adding your own packages via
 the "usual debian methods" is possible, but is still highly discouraged due to
 the potential conflicts and misconfigurations it could cause.  If you plan to
 do this please ensure you understand the repercussions.  To help mitigate this
 happening "by accident" the "apt"-get tool is aliased to a message telling you
 to explicitly perform the action with a fully qualified pathname.
 
Some example media files have been included in NextPi2 to allow for NextBASIC
 (and other languages, of course) developers to have a bunch of example music,
 and sound FX, to use in thir own games.  These are "stock files" that can be 
 presumed to be on all installations of NextPi2, and can be played using the 
 builtin tools by game developers in their own games, and treated as a stock 
 asset library. See /docs/rpi/linux/media.txt for the assosicated licenses
 and credits. ( also found on NextPi in /boot/media.LICENSE )
 
Partition 3
-----------
This is bound (mount -o bind) to /NextPi for easier system management and
 system emulation, later, for developers. This is the "User Persistent"
 partition - 3GB of space on an empty install - and is designed for users to
 create/mainage their own files upon.
It is FAT32 to enable a "regular PC" to recover files from the card in the
 "worst case" senario of a unrecoverable crash, corrupt operating system, 
 or similar.
 
Partition 4
-----------
This is mounted RO, and is the System Persistent Cache -- this should only
 be edited using the nextpi_cache CLIAPI. These APIs are responsible for 
 automatically clearing space, moving files in and out of the cache, and
 maintaining a catalog of the filename-to-hashedname bucket lookups.

Remember -- flash storage wears out the more you write to it, and the SD in
 the Pi is a "fixed item" so we'd like it to last as long as possible,
 therefore we use "Extreme Overprovisioning" as an attempt to mitigate this.

Suggested Operations

Mostly, it is expected you would use /ram - a 240M RAM drive, volatile, and 
 therefore lost between power cycles - this is best used for "runtime" scratch
 storage for games, etc.  You can, for games that need to "install" media to
 pi, use this to limit read-write cycles, and optionally use the nextpi-cache
 CLIPAPI move these to a permenant location, but this comes at the "cost" of
 needing filenames to be translated and cached to the PCache versions.  You can
 precompute the PCache bucket and filenames, and hard code these into your game
 too.
