Commit 67adf281 authored by Leo Le Bouter's avatar Leo Le Bouter

debian.package: dracut --force, add EFI boot entry once

Also, only btrfs needs mountpoint if filesystem is mounted.
parent 381d699a
...@@ -14,7 +14,7 @@ include dracut-conf-template.mk ...@@ -14,7 +14,7 @@ include dracut-conf-template.mk
uefi-boot-metadata-collect-agent/boot/efi/uefi-boot-metadata-collect-agent.efi: db.crt db.key db.cer uefi-boot-metadata-collect-agent/boot/efi/secboot.cer uefi-boot-metadata-collect-agent/boot/efi/uefi-boot-metadata-collect-agent.efi: db.crt db.key db.cer uefi-boot-metadata-collect-agent/boot/efi/secboot.cer
mkdir -p /tmp/dracut-empty mkdir -p /tmp/dracut-empty
echo "$${dracut_conf}" > dracut.conf echo "$${dracut_conf}" > dracut.conf
sudo dracut -c dracut.conf --confdir /tmp/dracut-empty --uefi-output $@ sudo dracut --force -c dracut.conf --confdir /tmp/dracut-empty --uefi-output $@
sudo chmod 755 $@ sudo chmod 755 $@
rm -rfv /tmp/dracut-empty rm -rfv /tmp/dracut-empty
......
#!/bin/sh #!/bin/bash
EFI_DEV=$(mount | grep -Po '^.+(?= on /boot/efi )') EFI_DEV=$(mount | grep -Po '^.+(?= on /boot/efi )')
ROOT_DEV=$(mount | grep -Po '^.+(?= on / )') ROOT_DEV=$(mount | grep -Po '^.+(?= on / )')
efibootmgr --create --disk "$EFI_DEV" --label 'UEFI metadata-collect-agent' --loader /uefi-boot-metadata-collect-agent.efi if ! efibootmgr --disk "$EFI_DEV" --verbose | grep "uefi-boot-metadata-collect-agent.efi"; then
efibootmgr --create --disk "$EFI_DEV" --label 'UEFI metadata-collect-agent' --loader /uefi-boot-metadata-collect-agent.efi
fi
e2label / "ROOT" || true e2label "$ROOT_DEV" "ROOT" || true
btrfs filesystem label / "ROOT" || true btrfs filesystem label / "ROOT" || true
reiserfstune -l "ROOT" / || true reiserfstune -l "ROOT" "$ROOT_DEV" || true
xfs_admin -L "ROOT" / || true xfs_admin -L "ROOT" "$ROOT_DEV" || true
cryptsetup config --label="ROOT" / || true cryptsetup config --label="ROOT" "$ROOT_DEV" || true
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment