commit 169edc5c49a9dd36938c9580223f858839d0011e Author: Mikaƫl Cluseau Date: Wed Feb 6 14:34:03 2019 +1100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d4f12e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/output +/chroot diff --git a/assets/build-image b/assets/build-image new file mode 100755 index 0000000..7c378b7 --- /dev/null +++ b/assets/build-image @@ -0,0 +1,42 @@ +#! /bin/bash + +set -ex + +out=/output/grub-intel.raw + +if [ -e $out ]; then + rm $out +fi + +# create the file +truncate -s2100M $out + +# partition it +sgdisk \ + --new=0:4096:+2G --typecode=0:EF00 -c 0:boot \ + --new=0:0:+2M --typecode=0:EF02 -c 0:BIOS-BOOT \ + --hybrid=1:2 --print $out + +dev=$(losetup --find --show --partscan $out) +trap "losetup -d $dev" EXIT + +devmap=/tmp/devmap +cat >$devmap <