This script is made for Ubuntu derivatives, but should work on all Linux Distribution which supports lvm and ext4.
This shell script is for partitioning of LVM Installations. The Linux Mint and Ubuntu Installer didn't allow self-partitioning of LVM Installations. But i want to split some things like the home directory for easier changes afterwards.
Amount of Space | Purpose |
---|---|
40 GB | / (root) |
30 GB | /programs (For flatpak and snap) |
1 GB | swap |
other 80% of free space | /home |
If you already have created LVM partitions e.g. from Ubuntu 20.04, then you can skip until 4. In the Linux Live Environment:
- create 3 Partitions without a file system
- 1GB Big (efi Partition)
- 2 MB BIOS Grub Partition (not needed if you only use EFI)
- The last one should be the free space which is left.
- Edit script 22.04-live-1.sh and insert the variable partition. Put in the location of the in 1.2 created partition. (biggest one)
- execute 22.04-live-1.sh (This will create 4 LV root, home, programs, swap)
- Start Installation
- choose root as Mount Point /
- choose programs as Mount Point /programs
- choose swap as swap
- choose home as Mount Point /home
- After Installation execute 22.04-live-2.sh (This will change that flatpak and snap make use of the programs partition)
( If you use a USB-Stick with Ventoy, you can Inject the script file in the Ubuntu Live Enviroment -> https://www.ventoy.net/en/doc_live_injection.html )
The partition-vX.tar.gz file is ready for use with ventoy. (The File will appear in /home [Thats because every distribution has it's own username]) Just create on the ISO Partition a directory ventoy and create a File named ventoy.json with a content like this
{
"injection": [
{
"image": "/nameofyouriso.iso",
"archive": "/partition-vX.tar.gz"
}
]
}
replace nameofyouriso with the name of your iso file and partition-vX with your actual version! Copy your iso and the partition-vX.tar.gz to the iso Partition.