2
3
Fork
You've already forked pflaster
0
fedora (re-)installer for lvm+ext4 and luks+lvm+ext4
  • Shell 99.8%
  • jq 0.1%
Leonhard Bromoloron cef997d94d update update-fedora
2026年07月11日 20:39:36 +03:00
mnt/sysroot update update-fedora 2026年07月11日 20:39:36 +03:00
root split off late.tgz ; configurable dracut modules 2026年02月14日 21:01:45 +01:00
testdata allow not creating a user 2026年03月15日 22:07:26 +01:00
usr/bin fix regressions 2026年04月30日 23:22:21 +03:00
var/tmp/install disk state can be running or live 2026年07月09日 16:09:48 +02:00
.gitignore fix a regression and add qemu instructions 2026年06月07日 13:37:41 +02:00
.ugrep fix a regression and add qemu instructions 2026年06月07日 13:37:41 +02:00
get-config make cmdline configuration easier 2026年04月09日 16:36:23 +02:00
get-packages configurable: package selection, default partition sizes 2026年02月12日 14:21:05 +01:00
install translate license and tz config 2026年05月04日 10:15:45 +02:00
Makefile add config confirmation 2026年02月21日 22:00:39 +01:00
manual.cfg fix regression plain_lvm 2026年05月12日 22:02:54 +03:00
qemurun add qemu instructions for installing on multiple drives 2026年06月10日 09:08:17 +02:00
README.md add qemu instructions for installing on multiple drives 2026年06月10日 09:08:17 +02:00
serve offer luks unlocking when pvroot exists 2026年02月11日 17:46:42 +01:00

📌 This is an experimental fedora installer.
📌 ABSOLUTELY NO WARRANTY. Running this may erase all your data.

Quickstart1

  1. Start the grub menu of the "anyboot" installer2 .
  2. Press "e" to edit the installer's kernel command line parameters.
  3. Add inst.ks=https://repo.akusari.net/pflaster/manual.cfg, then continue the boot.

Dev mode3

After cloning, run the following on the "controller" device:

make && ./serve

This should print an IP4 address in the local network (if it doesn't, you may have to modify the serve script). Write down the address, and append "/manual.cfg". For example: http://192.168.178.22:3001/manual.cfg.

Now start the installer and pass inst.ks=http://192.168.178.22:3001/manual.cfg on the installer's grub cmdline. To start the installer, you can use an installation medium, or boot the "everything" iso directly on a VM.

Features

Current features are:

  1. preserve /home on reinstalling luks+lvm4
  2. systemd-boot by default5
  3. swap partition with zswap by default6
  4. tpm2 unlocking by default7

Notes

  • Based on the "Everything" fedora spin
  • KDE tested with f44
  • "minimal" tested with f43 and f44
  • Charming the snake: the entire installation happens in "%pre"
  • bash, not python

ext4+lvm

Simple single-disk partitioning:

sda 25.9G disk
├─sda1 1020M part /boot/efi
└─sda2 24.9G part
 ├─linux-root 20.7G lvm /
 ├─linux-home 8G lvm /home
 └─linux-swap 3.9G lvm [SWAP]

The "data" partition (sda2 above) can be on a separate "data disk":

sda 25.9G disk
└─sda1 1023M part /boot/efi
sdb 25.3G disk
└─sdb1 12G part
 ├─vg2-root 4.5G lvm /
 ├─vg2-home 6G lvm /home
 └─vg2-swap 1.2G lvm [SWAP]

You can omit the gpt label on the data disk. In this case, the whole disk is used as an lvm physical volume:

sda 25.9G disk
└─sda1 1023M part /boot/efi
sdb 25.3G disk
├─vg-root 3.8G lvm /
├─vg-home 12.4G lvm /home
└─vg-swap 1016M lvm [SWAP]

ext4+lvm+luks

The LVM on the "data" partition can be encrypted

sda 25.9G disk
├─sda1 1020M part /boot/efi
└─sda2 24.9G part
 └─luks-3e1e86e9-5371-4ee3-806b-2a08f98888a8 24.9G crypt
 ├─linux-root 12.8G lvm /
 ├─linux-swap 4G lvm [SWAP]
 └─linux-home 8G lvm /home

Of course, an encrypted data partition can also be on a separate drive:

sda 25.9G disk
└─sda1 1023M part /boot/efi
sdb 25.3G disk
└─sdb1 12G part
 └─luks-251b3169-c0b8-438c-b0a1-ff3c2bc66c2c 12G crypt
 ├─vg-root 4.5G lvm /
 ├─vg-swap 1.2G lvm [SWAP]
 └─vg-home 6G lvm /home

Alternatively an entire disk can be encrypted. The efi partition cannot be encrypted though, so you need at least two storage devices for this setup.

sda 25.9G disk
└─sda1 1023M part /boot/efi
sdb 25.3G disk
└─luks-5b5e79ab-0c09-4b92-9089-f19704d2b376 25.3G crypt
 ├─vg-root 10G lvm /
 ├─vg-swap 2.6G lvm [SWAP]
 └─vg-home 12.6G lvm /home

raid support

The whole "data" structure can be on raid partitions

sda 25.3G disk
├─sda1 1023M part /boot/efi
└─sda2 24.3G part
 └─md0 24.3G raid1
 ├─vg2-root 9.5G lvm /
 ├─vg2-home 12.1G lvm /home
 └─vg2-swap 2.5G lvm [SWAP]
sdb 25.3G disk
└─sdb1 24.3G part
 └─md0 24.3G raid1
 ├─vg2-root 9.5G lvm /
 ├─vg2-home 12.1G lvm /home
 └─vg2-swap 2.5G lvm [SWAP]

Note, the EFI partition cannot be on raid.

If you have at least three disks, the raid members can be physical disks:

sda 25.9G disk
└─sda1 1023M part /boot/efi
sdb 25.3G disk
└─md0 25.3G raid1
 ├─vg-root 10G lvm /
 ├─vg-home 12.6G lvm /home
 └─vg-swap 2.6G lvm [SWAP]
sdc 25.3G disk
└─md0 25.3G raid1
 ├─vg-root 10G lvm /
 ├─vg-home 12.6G lvm /home
 └─vg-swap 2.6G lvm [SWAP]

Downloading the iso

If you're not using iPXE, you need to download an "iso file". On fedoraproject.org, find the "Miscellaneous Downloads" section. Click on "Learn more". This will take you to the Miscellaneous Downloads page. Click on "Fedora Everything" and select the appropriate ISO file for your system (if in doubt, it's probably x86_64). Somewhat confusingly, the file is called "Network Install" on this page, yet this ISO file is suitable for creating a regular "offline" installation medium.

Installation via installation medium

If you're not using iPXE or a VM, you need to create an "installation medium" from the iso file. For example, a dispensable usb drive. There are plenty of tutorials for this on the internet8 .

When you boot the installation medium, you will see a black "grub menu". Press the up or down arrow key to cancel the timeout. Then, navigate to the first option "Install Fedora". Press "e" to edit this boot option's kernel command line.

At the end of the line starting with "linux", add a parameter inst.ks=http://192.168.178.22:3001/manual.cfg, assuming your http server runs on 192.168.178.22. Confirm with F10 or C-x and wait for the installer to start.

installing on qemu

The qemurun script can be used to start up anaconda:

sudo dnf install qemu-system-x86 qemu-img edk2-ovmf
mkdir datadir
qemu-img create -f raw datadir/sda.img 16G
./qemurun --drive datadir/sda.img --iso ~/Downloads/f44.iso

There's also a guide on developer.fedoraproject.org9 .

Installing with iPXE

Configure kernel and initrd (you probably need to host these files in your own network):

kernel http://192.168.178.22:3001/vmlinuz inst.ks=http://192.168.178.22:3001/manual.cfg
initrd http://192.168.178.22:3001/initrd.img

If you have secure boot enabled (hopefully in f45), you also need to configure a shim:

shim http://192.168.178.22:3001/BOOTX64.EFI

When everything is configured, start the installation:

boot

Read more about iPXE: iPXE commands, iPXE installation and EFI.


  1. Thanks for hosting this, akusari! ↩︎

  2. You may have to create an installation medium first. Press F1, F2, F9, F12, Escape, Enter or some other key early in the boot process to enter the grub menu. ↩︎

  3. For dev mode, qemu is recommended. ↩︎

  4. The "luks_lvm" storage profile can preserve a separate /home partition, if the encrypted partition is wrapping an lvm. By contrast, blivet cannot preserve data on an encrypted partition, see Unlocked LUKS and bug 2019455. ↩︎

  5. https://bugzilla.redhat.com/show_bug.cgi?id=2402975 ↩︎

  6. https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html ↩︎

  7. when using the "luks_lvm" storage module ↩︎

  8. On Linux, you can simply do cat some.iso > /dev/sdx in a root shell. Before you run this, run lsblk to check if sdx is really the usb drive. In the lsblk output, a usb drive will have a 1 in the RM ("removable") column. It should not have any mounted partitions. All the data on it will be lost. ↩︎

  9. https://developer.fedoraproject.org/tools/virtualization/setting-up-fedora-workstation-vm-on-qemu-using-uefi.html ↩︎