Troubleshooting & reference

Start with the boot log

cat /run/scraplinux/boot.log
cat /var/log/boot.log     # from a previous boot

Every boot records, for every service: that it was considered, whether it started, and if not, its actual stderr output.

"failed to initialize dbus" from a D-Bus service

Anything that registers itself on the system bus at startup - pipewire, bluetoothd, a display manager - can hit any of these three, found one at a time by adding boot logging and reading what it said:

1. /var/run did not exist. A client built on ell (bluez, historically iwd) checks /var/run/dbus specifically, not /run/dbus. Fixed by adding /var/run -> ../run and /var/lock -> ../run/lock as merged-filesystem symlinks.

2. The netdev group did not exist. A D-Bus policy file granting members of netdev access to a bus name failed with Unknown group "netdev" - and dbus-daemon does not fail to start over this, it discards the policy and continues, so dbus looked healthy while the dependent service quietly couldn't claim its bus name. Fixed by adding netdev as a real system group.

3. No machine ID had ever been generated. dbus-daemon --system refuses to start at all without /etc/machine-id. Fixed by generating one on /etc/rc.d/dbus's first start.

service status dbus
ls -l /etc/machine-id
readlink /var/run
grep netdev /etc/group

A service is enabled but never starts

Check the boot log first - a service that's enabled but has no executable script at /etc/rc.d/<name> is reported explicitly (no executable /etc/rc.d/name) rather than silently doing nothing.

Chroot backspace moves the cursor instead of deleting

A target root has no terminfo database yet - the shell's line editor doesn't know what the terminal actually sends for erase, and backspace (which sends ^?) doesn't match what the editor expects (^H). scraplinux-chroot runs stty sane erase ^? explicitly before starting a shell, which needs no terminfo at all.

Ping fails with a permission error as a normal user

busybox's ping unconditionally opens a raw socket, which needs CAP_NET_RAW or root. ScrapLinux ships busybox setuid-root with /etc/busybox.conf granting ping specifically to root and the wheel group - every other applet busybox marks BB_SUID_MAYBE (mount, findfs, traceroute) is explicitly denied in the same file, since an unlisted MAYBE-tagged applet stays fully root for any caller otherwise.

scraps environment variables

VariableDefaultWhat it does
SCRAPS_ROOT/work on another root instead of / (an extracted tarball, a chroot)
SCRAPS_CONF/etc/scraps/scraps.confalways host-absolute, even under SCRAPS_ROOT - a target's own copy is for its future use, not read during a cross-root install
SCRAPS_REPOD/etc/scraps/repos.dsame host-absolute rule as SCRAPS_CONF
SCRAPS_CACHE/var/cache/scrapsdownloaded packages, fetched sources, build scratch
SCRAPS_YESunsetskip confirmation prompts
SCRAPS_FORCEunsetoverride a dependency or pkg.save[] refusal
SCRAPS_STYLEscraplinuxoutput style - see packages

scraps-strap's whole reason for existing is that SCRAPS_CONF/SCRAPS_REPOD stay host-absolute under SCRAPS_ROOT by default - correct when a live ScrapLinux session with real config at /etc/scraps is installing; wrong when the host is some other live Linux with no /etc/scraps at all, which is why it passes both explicitly.

Quick reference

/etc/scraplinux/*.confthe six declarative files - see configuration
/etc/scraplinux/conf.libthe shared reader/writer for them
scrapspackages: install, remove, build from source, snapshot, roll back
scraplinux-rebuildmake the system match the declared config
scraplinux rollbackgo back to an earlier generation
scraplinux-shella throwaway environment with packages in it
scraplinux-chrootenter an installed system with the kernel filesystems bound
/etc/scraps/keysthe public keys a repository index has to be signed with
/run/scraplinux/boot.logwhat actually happened during the last boot
More: scraplinux linux docs · install · configuration · packages · kernels & generations · networking, desktops & init