Setting up LVM on GPT-labeled disks
This document describes how to set up a system booting from a logical volume in Alpine using lvm2 and GPT-labeled disks.
Begin by booting from Alpine installation media in the usual way. Log in as `root`, run `setup-alpine`, and answer `none` when asked to choose a disk.
We need to install some tools:
Now we can create the partition table:
unit MiB mkpart 1 1 256 name 1 boot set 1 legacy_boot on mkpart 2 256 100% set 2 lvm on
Now, exit `parted` and reboot to force a reread of the partition table (for some reason `partprobe` doesn't work here).
Once you've rebooted, run through `setup-alpine` again.
Install some more necessary bits:
Create a PV, VG, and a LV for the root partition:
Create file systems:
Mount the file systems in position:
Now you can run `setup-disk` to install Alpine:
Finally, install `syslinux` (note that we are installing to `/dev/sda`, *not* `/dev/sda1`):
Reboot and enjoy your new Alpine installation!