chore: make erofs with --all-root flag

This commit is contained in:
Lars Sjöström 2025-02-27 00:02:22 +01:00
parent 7365ef8918
commit 57f83bd4ac
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -22,6 +22,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
env = {
# vfat options won't efi won't find the fs otherwise.
SYSTEMD_REPART_MKFS_OPTIONS_VFAT = "-S 512 -c";
SYSTEMD_REPART_MKFS_OPTIONS_EROFS = "--all-root";
};
systemd = patosPkgs.systemd.out;

View file

@ -1,7 +1,8 @@
set -ex -o pipefail
### create directory structure
mkdir -p $out/etc/repart.d $out/dev $out/proc $out/sys $out/tmp $out/root $out/run $out/boot $out/mnt $out/home $out/srv $out/var/tmp
mkdir -p $out/etc/repart.d $out/dev $out/proc $out/sys \
$out/tmp $out/root $out/run $out/boot $out/mnt $out/home $out/srv $out/var/tmp
ln -sf /usr/bin $out/bin
ln -sf /usr/bin $out/sbin
ln -sf /usr/lib $out/lib
@ -18,6 +19,7 @@ rm -f $out/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service
rm -f $out/usr/lib/systemd/ukify
rm -f $out/usr/bin/ukify
rm -f $out/usr/lib/udev/rules.d/90-vconsole.rules
ln -s /run/systemd/resolve/stub-resolv.conf $out/etc/resolv.conf
cat <<EOF > $out/etc/os-release
NAME=PatOS