aboutsummarylogtreecommitdiffstats
path: root/README.md
blob: 01e4ca618ccb38c46060bac1c630ae1f5443a310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# arch-unified-kernel-image-hooks

* Save a backup copy of the currently-booted unified kernel image UEFI entry
* Update the unified kernel image when the microcode gets updated

## Notes

* Ensure that your EFI System Partition has enough available space to save an extra copy of each unified kernel image that you boot into.
* The tool only works on local disks, which is probably what you have. Network EFI images are not backed up.
* The tool currently supports images generated by mkinitcpio. Pull requests for other initramfs generators welcome.

## Setup

1. [Configure Unified Kernel Image creation](https://wiki.archlinux.org/title/Unified_kernel_image)
2. Install the package. (`unified-kernel-image-hooks`)
3. `systemctl enable unified-kernel-image-backup.service`
4. Add the UEFI boot entry.  
   Examples (change --disk, --part, and --loader as necessary):
   ```
   efibootmgr -v --create --disk /dev/sda --part 1 --label 'Arch Linux (last booted kernel)' --loader '\EFI\ARCH\linux-x64-last.efi'
   ```
   ```
   efibootmgr -v --create --disk /dev/nvme0n1 --part 1 --label 'Arch Linux (last booted kernel)' --loader '\EFI\ARCH\linux-x64-last.efi'
   ```
5. To create the first backup entry, either reboot, or run:
   ```
   /usr/libexec/unified-kernel-image-hooks/unified-kernel-image-backup.sh
   ```

## License

GPL2