2019-02-24 07:06:10 -05:00
|
|
|
**hashboot** hashes all files in `/boot` and the MBR to check them during early
|
|
|
|
boot. It is intended for when you have encrypted the root partition but not the
|
|
|
|
boot partition. The checksums and a backup of the contents of `/boot` are stored
|
|
|
|
in `/var/lib/hashboot` by default. If a checksum doesn't match, you have the
|
|
|
|
option to restore the file from backup.
|
2015-10-17 17:45:49 -04:00
|
|
|
|
2019-03-29 18:08:03 -04:00
|
|
|
If there is a core- or libreboot BIOS and [flashrom](https://flashrom.org/)
|
|
|
|
installed, **hashboot** can check the BIOS for modifications too.
|
2019-02-24 08:25:57 -05:00
|
|
|
|
2019-06-20 11:57:07 -04:00
|
|
|
We moved our code to
|
|
|
|
[schlomp.space](https://schlomp.space/tastytea/hashboot) but we keep the
|
|
|
|
[GitHub-repo](https://github.com/tastytea/hashboot) as a mirror.
|
|
|
|
|
2015-10-17 17:23:50 -04:00
|
|
|
# Install
|
2019-02-24 06:29:59 -05:00
|
|
|
|
2019-03-29 18:16:46 -04:00
|
|
|
## Packages
|
|
|
|
|
|
|
|
### Void Linux
|
|
|
|
|
2019-06-20 13:52:15 -04:00
|
|
|
``` shell
|
2019-03-29 18:16:46 -04:00
|
|
|
xbps-install -S hashboot
|
|
|
|
```
|
|
|
|
|
2019-06-20 13:52:15 -04:00
|
|
|
### Gentoo Linux
|
2019-03-29 18:16:46 -04:00
|
|
|
|
|
|
|
Ebuilds are available via the
|
|
|
|
[tastytea repository](https://schlomp.space/tastytea/overlay).
|
|
|
|
|
2019-06-20 13:52:15 -04:00
|
|
|
``` shell
|
2019-03-29 19:26:41 -04:00
|
|
|
emerge -a sys-apps/hashboot
|
|
|
|
rc-update add hashboot boot
|
|
|
|
```
|
|
|
|
|
2019-05-12 12:37:42 -04:00
|
|
|
### Arch Linux
|
|
|
|
|
2019-06-20 13:52:15 -04:00
|
|
|
Use the [package from AUR](https://aur.archlinux.org/packages/hashboot/).
|
|
|
|
|
|
|
|
## Manual
|
2019-05-12 12:37:42 -04:00
|
|
|
|
|
|
|
### Any distro
|
|
|
|
|
2019-06-20 11:57:07 -04:00
|
|
|
The releases on
|
|
|
|
[schlomp.space](https://schlomp.space/tastytea/hashboot/releases) are
|
|
|
|
PGP-signed. The key-ID is `F7301ADFC9ED262448C42B64242E5AC4DA587BF9`
|
|
|
|
(`242E5AC4DA587BF9`).
|
|
|
|
|
2015-10-17 18:03:22 -04:00
|
|
|
* Make hashboot executable
|
2019-03-29 18:08:03 -04:00
|
|
|
* Place hashboot anywhere in ${PATH}
|
2015-10-17 17:23:50 -04:00
|
|
|
* Install the appropriate init script
|
2019-06-20 08:36:52 -04:00
|
|
|
* If applicable, copy `hooks/kernel-postinst` to /etc/kernel/post{inst,rm}.d/zzz-hashboot
|
2019-03-29 18:08:03 -04:00
|
|
|
(make sure it is called after all other hooks)
|
|
|
|
* To generate the manpage, install [asciidoc](http://asciidoc.org/) and run
|
|
|
|
`build_manpage.sh`.
|
2015-10-17 17:23:50 -04:00
|
|
|
|
|
|
|
# Usage
|
2019-03-29 18:08:03 -04:00
|
|
|
|
|
|
|
* First run creates a configuration file. Select the desired checkroutines
|
|
|
|
* Run `hashboot index` to generate checksums and a backup for /boot and MBR
|
|
|
|
* Run `hashboot check` to check /boot and MBR
|
|
|
|
* Run `hashboot recover` to replace corrupted files with the backup
|
2015-10-17 17:23:50 -04:00
|
|
|
|
|
|
|
# Notes
|
2019-02-24 06:29:59 -05:00
|
|
|
|
2015-10-17 17:57:38 -04:00
|
|
|
* You can't use the openrc/sysv init scripts with parallel boot.
|
2019-03-29 18:54:42 -04:00
|
|
|
* The systemd and SysVinit init scripts have not been tested in a while, but
|
|
|
|
will probably work.
|
2019-02-24 06:29:59 -05:00
|
|
|
|
|
|
|
# License
|
|
|
|
|
|
|
|
```PLAIN
|
2019-02-24 09:30:04 -05:00
|
|
|
"THE HUG-WARE LICENSE" (Revision 2):
|
|
|
|
teldra <teldra@rotce.de> and tastytea <tastytea@tastytea.de> wrote this.
|
2019-03-29 18:08:03 -04:00
|
|
|
As long as you retain this notice you can do whatever you want with this.
|
2019-02-24 09:30:04 -05:00
|
|
|
If we meet some day, and you think this is nice, you can give us a hug.
|
2019-02-24 06:29:59 -05:00
|
|
|
```
|