/etc/98-busybox.conf configures the prompt and TERM.
PR #3326 stopped sourcing /etc/profile, which meant the
prompt no longer includes the HOSTNAME.
Additionally, #3326 removed code which unhides the cursor.
This allows us to use the default debug-shell.service provided
by systemd and cut down on custom made services. This will also
always provide a debug shell as there is no reason we shouldn't
have access to one.
journald on systemd versions up to 242 don't close the persistent
journal files on shutdown which leads to a harmless but annoying
Failed unmounting message during shutdown
https://github.com/systemd/systemd/issues/867
Set LazyUnmount=yes on the persistent log mount unit as a temporary
workaround until systemd is updated to 243 or newer.
Signed-off-by: Matthias Reichl <hias@horus.com>
The ancient approach of symlinking /var/log to /storage/log doesn't
play nice with systemd as it doesn't setup proper dependencies and
unmounting /storage during shutdown may fail because systemd doesn't
know that it's needed for /var/log.
Use a conditional bind mount instead so systemd can automatically
create proper dependencies and unmount filesystems in the correct order.
Also store the persistent logfiles on /storage in a .cache/log
directory instead of log to avoid confusing users - users can access
logfiles via /var/log.
Note: we can't use tmpfiles.d to create the .cache/log directory on
/storage because that would run after local-fs.target but we need
the .log directory before that so it has to be done via a one-shot
service.
Signed-off-by: Matthias Reichl <hias@horus.com>
to have a full set of binaries in the init process as early as possible
it now mounts the squashfs direct after mounting /flash.
there is also a hook /flash/post-sysroot.sh for custom scripting.
i will use this e.g. for lvm2 and cryptsetup in the init process,
because they are very big and i dont like them in initramfs.
Copying SYSTEM to RAM eats up precious memory that'd be better used
for kernel filesystem cache and other things and can takes quite some
time on slower storage devices like SD cards.
Instead of having two options to define a minimum RAM size (below
which SYSTEM won't be copied) and the "noram" option (which disables
copying completely) reverse the logic and use a single "toram" option
which users can set on kernel command line if they want SYSTEM copied
to RAM.
Signed-off-by: Matthias Reichl <hias@horus.com>
The current stop timeout of 5 seconds is way too low and
leads to systemd frequently killing kodi while it's still
shutting down. This is really bad since it can potentially
lead to corrupted files or databases and should be avoided
at all costs.
eg plain kodi 18.4 setup with only pvr.hts installed takes
about 6 seconds to stop on RPi4.
Increase the stop timeout to 30 seconds to allow proper shutdown
on slower systems.
While that is still a lot lower than the 90 seconds
systemd default it should both be enough for very slow systems
and also for us and users to notice kodi issues - in which case
those issues have to be investigated.
Signed-off-by: Matthias Reichl <hias@horus.com>
add drop-in to set DefaultDependencies=no on /flash mount. This
removes the Conflicts=umount.target and /flash won't be unmounted
by systemd. systemd-shutdown will then later remount it ro and
try to unmount it.
Signed-off-by: Matthias Reichl <hias@horus.com>