feat(systemd-repart): fix ESP. now its booting
This commit is contained in:
parent
af78f1c930
commit
6899203860
3 changed files with 11 additions and 4 deletions
|
@ -18,6 +18,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
mtools
|
||||
];
|
||||
|
||||
env = {
|
||||
SYSTEMD_REPART_MKFS_OPTIONS_VFAT = "-S 512 -c";
|
||||
};
|
||||
|
||||
systemd = patosPkgs.systemd.out;
|
||||
kernel = patosPkgs.kernel.kernel;
|
||||
initrd = patosPkgs.initrd.out;
|
||||
|
|
|
@ -18,15 +18,19 @@ $systemd/usr/bin/ukify build \
|
|||
|
||||
cp ${systemd}/usr/lib/systemd/boot/efi/systemd-bootx64.efi boot/
|
||||
|
||||
echo "timeout 1" > boot/loader.conf
|
||||
echo -e "title PatOS Platform\nefi /EFI/Linux/patos-linux.efi" > boot/patos.conf
|
||||
|
||||
cat <<EOF > repart.d/10-esp.conf
|
||||
[Partition]
|
||||
Type=esp
|
||||
Format=vfat
|
||||
SizeMinBytes=96M
|
||||
SizeMaxBytes=96M
|
||||
SplitName=-
|
||||
CopyFiles=/boot/patos-x64.efi:/EFI/Linux/patos-x64.efi
|
||||
CopyFiles=/boot/systemd-bootx64.efi:/EFI/BOOT/BOOTX64.EFI
|
||||
CopyFiles=/boot/patos-x64.efi:/EFI/Linux/patos-linux.efi
|
||||
CopyFiles=/boot/loader.conf:/loader/loader.conf
|
||||
CopyFiles=/boot/patos.conf:/loader/entries/patos.conf
|
||||
EOF
|
||||
|
||||
cat <<EOF > repart.d/10-root.conf
|
||||
|
@ -41,7 +45,7 @@ EOF
|
|||
$systemd/usr/bin/systemd-repart \
|
||||
--no-pager \
|
||||
--empty=create \
|
||||
--size=1G \
|
||||
--size=auto \
|
||||
--definitions=./repart.d \
|
||||
--root=$out \
|
||||
patos-$version.raw
|
||||
|
|
|
@ -33,7 +33,6 @@ pkgs.writeShellApplication {
|
|||
-smp 8 \
|
||||
-m 4G \
|
||||
-display none \
|
||||
-nographic \
|
||||
-chardev "stdio,id=char0,mux=on,logfile=$state/console.log,signal=off" \
|
||||
-serial chardev:char0 \
|
||||
-mon chardev=char0 \
|
||||
|
|
Loading…
Add table
Reference in a new issue