From 2f279241a20ae481d2a0bb2f6463267c7a64e2ce Mon Sep 17 00:00:00 2001
From: Jens Nolte <git@queezle.net>
Date: Wed, 12 Jan 2022 02:58:10 +0100
Subject: [PATCH] Fix gpt header hole

---
 bin/install-pinephone | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/install-pinephone b/bin/install-pinephone
index 106e790..a64029b 100755
--- a/bin/install-pinephone
+++ b/bin/install-pinephone
@@ -43,10 +43,13 @@ readonly bootloader_partition="/dev/disk/by-partuuid/$bootloader_partition_uuid"
 readonly luks_partition="/dev/disk/by-partuuid/$luks_partition_uuid"
 
 
+sudo wipefs -a $target_disk
+
 # 2MB header hole
 sudo nix shell nixpkgs#vboot_reference -c cgpt create -p 4096 $(realpath $target_disk)
+sudo nix shell nixpkgs#vboot_reference -c cgpt boot -p $(realpath $target_disk)
 
-sudo sfdisk $target_disk --append <<EOF
+sudo nix shell nixpkgs/nixos-21.05#util-linux -c sfdisk $target_disk --append <<EOF
   unit: sectors
   sector-size: 512
 
-- 
GitLab