Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After much research and testing, I relearned the general procedure for building a bootable Linux system, which is what I needed. I've done this several times in the past, but it was a long time ago and things have changed.

  1. boot live image
  2. assemble MD, unlock LUKS, LVM check, etc.
  3. build target system in chroot jail
    1. mount /newroot ../boot ../boot/efi and ../var, at least
    2. mount -t sysfs sysfs /newroot/sys
    3. mount -t proc none /newroot/proc
    4. mount -t bind /dev /newroot/dev
    5. mount -t bind /run /rnewroot/run
  4. chroot /newroot
    1. from inside jail, fix stuff as needed (/etc/fstab /etc/crypttab /etc/mdadm.conf /etc/lvm/ etc.)
  5. and, fix grub2 CMDLINE env var with new kernel parameters
    1. dracut --print-cmdline will output a minimal set of parameters. This is super helpful as it's hard to know what your distro needs and to keep up with latest kernel options. Moreover, saves you the trouble of tracking down UUIDs for luks/md devices!
  6. build new grub2 config
    1. grub2-mkconfig [-o <path for="" bios="" or="" efi="" cfg="" file="" as="" needed="">]
  7. install grub2, if necessary
    1. for BIOS grub2-install
    2. for EFI, distro dependent
    3. dnf reinstall grub-efi grub-efi-modules shim?
  8. regen intird/initramfs boot image
    1. dracut