blob: b01a833bf2d22e0b3940526076fbb56b95564b82 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# EFI Sync
Automatically install your kernel and initrd into the EFI when your Slackware system is updated.
```
Usage: ./efi-sync {install|watch}
- install: install the kernel and initrd into your EFI.
- watch: install on updates to your kernel
```
`efi-sync watch` watches your kernel path for updates. Your EFI will be updated once
one is detected and the package commands have completed.
For systems using an initial ram disk (initrd), `efi-sync watch` watches
/lib/modules and /lib/firmware for updates. Your system is assumed to use one
if '/etc/mkinitrd.conf' is present on start. Once changes are detected, the
initrd file is recreated using 'mkinitrd' and with the result installed into
the EFI.
You will need to manually install the initrd if it was recreated outside of
this program.
## Project To Do's
Planned improvements and known bugs are listed on the project's
[todo](https://git.server.ky/slackcoder/efi-sync/tree?h=todo) branch.
## Installation
Run the following are root to install this command:
```
cp efi-sync /usr/local/sbin/efi-sync
chown root:root /usr/local/sbin/efi-sync
chmod +x /usr/local/sbin/efi-sync
```
The efi-sync will need to be integrated to start automatically on your system.
## Configuration
The command looks for configuration at /etc/efi-sync.conf.
Here is an example with the default values:
```
# The kernel path to watch.
KERNEL=/boot/vmlinuz
# The path to the EFI kernel.
EFI_KERNEL=/boot/efi/Slackware/vmlinuz
# The path for the initial ram disk to install.
INITRD=/boot/initrd.gz
# The path to the EFI's initial ram disk.
EFI_INITRD=/boot/efi/Slackware/initrd.gz
```
If you want the initial ram disk updated, ensure /etc/mkinitrd.conf exists and
is configured correctly.
### Testing
To test everything is working correctly:
```
slackpkg -batch=on -default_answer=y upgrade --reinstall kernel-huge
# You should confirm the recent update with this output.
date -r /boot/efi/EFI/Slackware/vmlinuz
```
For initrd updates:
```
slackpkg -batch=on -default_answer=y upgrade --reinstall kernel-firmware
# You should confirm the recent update with this output.
date -r /boot/efi/EFI/Slackware/initrd.gz
```
|