Use the system and userdata partition on Android with LVM
Created by: ollieparanoid
The current layout is using only the system partition, in the following way:
/dev/install # system partition (or external sd card)
/dev/installp1 # unencrypted boot partition with kernels and initramfs files (not used yet, should be used by a bootloader at some point, so you could select the kernel you want to boot)
/dev/installp2 # encrypted root partition
New idea for the non-sdcard-installation, to make more use of the existing partitions, but not changing the partition layout (so it stays compatible with other Android ROMs!):
- use lvm over the /dev/installp2 and the userdata partition, so we have one big partition
- encrypt that partition with cryptsetup
- directly put the root partition on top of that
There has been some discussion in IRC, if we should split up the home and root partition, like in traditional GNU/Linux installations. The advantage is, that you can re-install everything on your root partition without touching /home. The disadvantage is, that you would need to specify the size in advance and can't change the size of root or home afterwards (except with another lvm layer, which makes it more complicated).
My proposal: do the new layout, with one root partition first. If there is demand for the extra home partition, we could add an option for that later.
As always, this is open for discussion, please share your opinion :)