parent
df3a42da4b
commit
dc8ed2a774
3 changed files with 34 additions and 11 deletions
pkgs/rootfs
|
@ -57,6 +57,7 @@ Environment=SYSTEMD_REPART_MKFS_OPTIONS_BTRFS=--nodiscard
|
|||
ExecStart=
|
||||
ExecStart=systemd-repart --dry-run=no --generate-crypttab=/run/crypttab --generate-fstab=/run/fstab
|
||||
EOF
|
||||
ln -sf ../systemd-repart.service ./usr/lib/systemd/system/initrd-root-fs.target.wants/systemd-repart.service
|
||||
|
||||
# gen initrd
|
||||
find . -print0 | cpio --null --owner=root:root -o --format=newc | xz -9 --check=crc32 > ../initrd.xz
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
patosPkgs,
|
||||
version,
|
||||
runCommand,
|
||||
...
|
||||
}:
|
||||
let
|
||||
defaultPassword = "patos";
|
||||
|
@ -13,10 +12,11 @@ runCommand "patos-rootfs"
|
|||
{
|
||||
inherit version;
|
||||
|
||||
buildInputs = [
|
||||
pkgs.glibc
|
||||
pkgs.binutils
|
||||
buildInputs = with pkgs;[
|
||||
glibc
|
||||
binutils
|
||||
];
|
||||
|
||||
}
|
||||
''
|
||||
### create directory structure
|
||||
|
@ -29,13 +29,16 @@ ln -sf /usr/lib $out/lib64
|
|||
ln -sf ../proc/self/mounts $out/etc/mtab
|
||||
|
||||
### install systemd
|
||||
echo "Installing systemd"
|
||||
cp -Pr ${patosPkgs.systemd}/* $out/
|
||||
find $out -type d -exec chmod 755 {} \;
|
||||
rm -rf $out/usr/include
|
||||
rm -rf $out/usr/sbin
|
||||
ln -sf /usr/bin $out/usr/sbin
|
||||
rm -f $out/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service
|
||||
# enable in ramdisk instead
|
||||
rm -f $out/usr/lib/systemd/system/sysinit.target.wants/systemd-repart.service
|
||||
rm -f $out/usr/lib/systemd/system/initrd-root-fs.target.wants/systemd-repart.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
|
||||
|
@ -71,8 +74,8 @@ cat <<EOF > $out/etc/repart.d/10-esp.conf
|
|||
[Partition]
|
||||
Type=esp
|
||||
Format=vfat
|
||||
SizeMaxBytes=160M
|
||||
SizeMinBytes=160M
|
||||
SizeMaxBytes=96M
|
||||
SizeMinBytes=96M
|
||||
EOF
|
||||
|
||||
cat <<EOF > $out/etc/repart.d/20-root-a.conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue