transfered existing blog into a new hugo project
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: rEFInd
|
||||
slug: refind
|
||||
date: 2017-06-02T20:56:04-06:00
|
||||
.. tags: linux,uefi,boot,secureboot,bootloader
|
||||
.. category:
|
||||
.. link:
|
||||
.. description:
|
||||
draft: false
|
||||
---
|
||||
|
||||
Booting linux requires a [boot loader](https://wiki.archlinux.org/index.php/Category:Boot_loaders). I chose to use [rEFInd](http://www.rodsbooks.com/refind/index.html) vs GRUB or systemd boot. [Installing](https://wiki.archlinux.org/index.php/REFInd#Installation) is easy once the partitioning is setup. My partition scheme is a vfat esp partition of 512MB a ext2 boot partition 512MB and the rest of the disk for root on btrfs encrypted with dm-crypt and LUKS. This works for a bootable usb as well as internal drive. BTRFS was chosen for the subvolume feature. In the BTRFS root I create a /archroot and /home subvolume. On major system changes/upgrades I snapshot the /archroot subvolume to /archroot-date making a rollback simpler.
|
||||
|
||||
<!--more-->
|
||||
|
||||
To configure kernels for rEFInd add a file called refind_linux.conf in the same folder(/boot) as the kernel(s). Add kernel command lines here.
|
||||
|
||||
#refind_linux.conf
|
||||
"Boot with standard options" "root=UUID=123456 rw rootfstype=btrfs rootflags=subvol=arch acpi_backlight=video initrd=/intel-ucode.img initrd=initramfs-linux.img i915.enable_psr=0"
|
||||
"Boot to single-user mode" "root=UUID=123456 single"
|
||||
"Boot with minimal options" "root=UUID=123456"
|
||||
|
||||
additional options for LUKS would be added here.
|
||||
change subvol=arch to subvol=arch-date to boot from snapshot
|
||||
|
||||
btrfs commands that I use frequently:
|
||||
|
||||
mount /dev/sdaX /mnt #mount the btrfs root(not /)
|
||||
cd /mnt #change to the btrfs root
|
||||
btrfs subvolume snapshot name-of-subvolume(arch) name-of-snapshot(arch-date)
|
||||
|
||||
update: Figured out how refind determines which kernel to boot automatically, it's the one with the most [recent date](https://sourceforge.net/p/refind/discussion/general/thread/87eec9bd/#6f53). Thinking about putting a hook into pacman or something to run touch on vmlinuz after kernel upadtes.
|
||||
Reference in New Issue
Block a user