Setting up disks manually
This material is work-in-progress ... Do not follow instructions here until this notice is removed. |
You may have complex needs that aren't handled automatically by the Alpine Setup Scripts. In those cases, you'll need to prepare your disks manually.
RAID =
setup-disk
will automatically build a RAID array if you supply the -r switch, or if you specify more than one device.
If you instead want to build your RAID array manually, see Setting up a software raid1 array. Then you can add additional layers of encryption and/or LVM, or just assemble the RAID array, and supply the /dev/mdi device directly to setup-disk. When you're finished, be sure to disassemble the RAID array before rebooting.
Encryption
See Setting up encrypted volumes with LUKS. Then you can add an additional layer of LVM, or just unlock the volume you've created (using cryptsetup luksOpen ...
), and supply the /dev/mapper/something device directly to setup-disk. When you're finished, be sure to relock the volume (using cryptsetup luksClose ...
) before rebooting.
LVM
setup-disk
will automatically build and use volumes in a LVM group if you supply the -L switch.
If you instead want to build your LVM system manually, see Setting up Logical Volumes with LVM. Then vgchange -ay
, format and mount your volumes, and supply the root mountpoint to setup-disk. When you're finished, be sure to
umount ... vgchange -an
before rebooting.
Dual-booting
See Install to HDD with dual-boot
Other needs
Setting up swap
- create partition with type "linux swap" (82)
mkswap /dev/sda2
echo -e "/dev/sda2 none swap sw 0 0" >> /mnt/etc/fstab
swapon /dev/sda2
Then
free
will show how much swap space is available.
If you prefer maximum speed, you don't need configure any raid devices for swap. Just add 2 swap partitions on different disks and linux will stripe them automatically. The downside is that at the moment one disk fails, the system will go down. For better reliability, put swap on raid1.
See also setup-cryptswap.