57744b984e
Currently, when postmarketOS fails to boot up, retrieving any information necessary to root cause the issue is non-trivial, requiring building a custom initramfs with debug-shell enabled and then manually copying out data. Let's improve the situation by exporting logs automatically on boot failure. This is safer than just exposing a root shell but still provides a whole lot of useful info that should make duplicating and triaging issues much easier for developers. This commit implements the functionality and includes some generally useful data. We then generate a README and expose files for each command/log as well as an archive that can be easily attached to a GitLab issue. To help with triaging, also record the version of the postmarketos-initramfs package and hash the init.sh and init_functions.sh files. For testing purposes, you can trigger the log recovery mode on-time by creating an empty file named ".pmos_export_logs" in the /boot partition. Signed-off-by: Caleb Connolly <caleb@connolly.tech>
26 lines
858 B
Text
26 lines
858 B
Text
# Maintainer: Mark <clashclanacc2602@gmail.com>
|
|
pkgname=postmarketos-mkinitfs-hook-netboot
|
|
pkgver=4.1.3
|
|
pkgrel=0
|
|
pkgdesc="Netboot postmarketOS using nbd feature"
|
|
url="https://postmarketos.org"
|
|
depends="devicepkg-utils postmarketos-mkinitfs"
|
|
source="
|
|
netboot.sh
|
|
netboot.modules
|
|
"
|
|
arch="noarch"
|
|
license="GPL-2.0-or-later"
|
|
options="!check" # No tests
|
|
|
|
package() {
|
|
install -Dm644 "$srcdir"/netboot.sh \
|
|
"$pkgdir"/usr/share/mkinitfs/hooks/netboot.sh
|
|
install -Dm644 "$srcdir"/netboot.modules \
|
|
"$pkgdir"/usr/share/mkinitfs/modules/30-netboot.modules
|
|
}
|
|
|
|
sha512sums="
|
|
c681d0c39eecd9fe5d284e07f9c6f79e41085628abe1c645b8ea3cc4e621fd603fca9db4a555fa689a3268925cb6d23c12baa98986baed452375acd1e3fe26b1 netboot.sh
|
|
3c9c812a6cd25640e6cf4d722cff6c6356d5666ec6009b4c65f89e62211cc406d2cd09e0fdda6b1c1906ee32c3854988ab701cee8811208e3ef666f09e638568 netboot.modules
|
|
"
|