mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-08-16 11:04:01 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2acd4cb88 | ||
|
|
e4447e0a2a | ||
|
|
7d971bbb88 | ||
|
|
ef9e9dc133 |
+23
-2
@@ -193,9 +193,18 @@ exit 101
|
||||
POLICY_RC_D
|
||||
chmod 0755 "${ROOTFS}/usr/sbin/policy-rc.d"
|
||||
|
||||
# (3) tmpfs at /boot/firmware (raspi-firmware postinst needs mountpoint)
|
||||
# (3) tmpfs at /boot/firmware (raspi-firmware postinst needs mountpoint).
|
||||
# 512M: must fit kernel + initrd (~50-100M arm64) + dtbs + overlays + bootloader.
|
||||
# 64M was too small — v2.13.6 hit ENOSPC during initramfs-tools postinst.
|
||||
mkdir -p "${ROOTFS}/boot/firmware"
|
||||
mount -t tmpfs -o size=64M,mode=0755 tmpfs "${ROOTFS}/boot/firmware"
|
||||
mount -t tmpfs -o size=512M,mode=0755 tmpfs "${ROOTFS}/boot/firmware"
|
||||
|
||||
# (4) /proc + /sys inside the chroot — raspi-firmware's update-initramfs hook
|
||||
# uses findmnt which reads /proc/mounts. Without these, postinst fails
|
||||
# silently with "findmnt: can't read /proc/mounts" before chmod/chown errors
|
||||
# show. Matches build-live-usb.sh's pattern (lines 277-278).
|
||||
mountpoint -q "${ROOTFS}/proc" || mount -t proc proc "${ROOTFS}/proc"
|
||||
mountpoint -q "${ROOTFS}/sys" || mount -t sysfs sysfs "${ROOTFS}/sys"
|
||||
|
||||
ok "Chroot safety net installed"
|
||||
|
||||
@@ -902,6 +911,14 @@ KIOSKSVC
|
||||
chroot "${ROOTFS}" systemctl enable secubox-kiosk.service \
|
||||
|| err "systemctl enable secubox-kiosk.service failed"
|
||||
|
||||
# Belt-and-suspenders: `systemctl enable` under SYSTEMD_OFFLINE in a qemu
|
||||
# chroot doesn't always materialise the WantedBy symlink (observed in
|
||||
# v2.13.7). Create it explicitly so the next assertion passes regardless
|
||||
# of whether systemctl's offline behaviour wrote the link itself.
|
||||
install -d "${ROOTFS}/etc/systemd/system/graphical.target.wants"
|
||||
ln -sf "/etc/systemd/system/secubox-kiosk.service" \
|
||||
"${ROOTFS}/etc/systemd/system/graphical.target.wants/secubox-kiosk.service"
|
||||
|
||||
# Build-time assertion (#433): verify EVERY kiosk artefact made it into
|
||||
# the rootfs before Step 7's rsync. If any of these is missing, the .img
|
||||
# would ship without kiosk despite the CI logging "Kiosk mode installed".
|
||||
@@ -1182,6 +1199,10 @@ ok "Pi bootloader configured"
|
||||
# (which was Step 5.4's enable secubox-kiosk.service, already done by here).
|
||||
log "Removing chroot safety net (systemctl wrapper, policy-rc.d, /boot/firmware tmpfs)"
|
||||
|
||||
# (4) umount /proc + /sys (chroot no longer needs them)
|
||||
umount -lf "${ROOTFS}/proc" 2>/dev/null || true
|
||||
umount -lf "${ROOTFS}/sys" 2>/dev/null || true
|
||||
|
||||
# (3) umount tmpfs /boot/firmware (Step 7 mounts the real BOOT partition there)
|
||||
umount "${ROOTFS}/boot/firmware" 2>/dev/null || warn "tmpfs /boot/firmware was not mounted"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user