chore: add subvolumes state partition
This commit is contained in:
parent
e907d0d3d3
commit
55ac59e2b3
1 changed files with 5 additions and 5 deletions
|
@ -90,10 +90,14 @@ cat <<EOF > $out/etc/repart.d/40-var.conf
|
|||
[Partition]
|
||||
Type=var
|
||||
Format=btrfs
|
||||
MakeDirectories=/var/lib/confexts /var/.snapshots
|
||||
MountPoint=/var
|
||||
Label=patos-state
|
||||
Encrypt=tpm2
|
||||
EncryptedVolume=patos-state:none:tpm2-device=auto,luks,discard
|
||||
Subvolumes=/var/lib/confexts /var/.snapshots
|
||||
MountPoint=/var/lib/confexts:subvol=/var/lib/confexts
|
||||
MountPoint=/var/.snapshots:subvol=/var/.snapshots
|
||||
SizeMinBytes=1G
|
||||
Minimize=off
|
||||
FactoryReset=yes
|
||||
|
@ -134,9 +138,6 @@ cp -P ${lvm2}/lib/udev/rules.d/* $out/usr/lib/udev/rules.d/
|
|||
cp -Pr ${btrfs}/bin/* $out/usr/bin/
|
||||
cp -Pr ${btrfs}/lib/* $out/usr/lib/
|
||||
|
||||
##FIXME(remove later): install mkfs.erofs bin
|
||||
cp -P ${erofsUtils}/bin/mkfs.erofs $out/usr/bin/
|
||||
|
||||
### install tpm2 tools
|
||||
# For TPM debugging
|
||||
# cp -P ${tpm2Tools}/bin/* $out/usr/bin/
|
||||
|
@ -159,13 +160,12 @@ cp $out/usr/share/factory/etc/vconsole.conf $out/etc/
|
|||
#Ephemeral machine-id until registration
|
||||
ln -sf /run/machine-id $out/etc/machine-id
|
||||
|
||||
|
||||
# remove pkgconfig
|
||||
rm -rf $out/usr/lib/pkgconfig
|
||||
|
||||
### Find and install all shared libs
|
||||
find $out -type f -executable -exec ldd {} \; | awk '{print $3}' | \
|
||||
grep -v util-linux-2 | grep -v systemd | grep -v glibc | grep -v tpm2 | grep -v devmapper | \
|
||||
grep -v systemd | grep -v glibc | grep -v tpm2 | grep -v devmapper | \
|
||||
sort -u | xargs -I {} cp {} $out/usr/lib/
|
||||
find $out -type f -executable -exec chmod 755 {} \;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue