From 47d2a917765672da5f7bb2281b2b11bf0e51597e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 25 Nov 2019 14:48:35 +0100 Subject: [PATCH] Add unfinished script to create alpine linux uefi boot stick --- alpine-build-uefi-stick.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 alpine-build-uefi-stick.sh diff --git a/alpine-build-uefi-stick.sh b/alpine-build-uefi-stick.sh new file mode 100755 index 0000000..c2bb95d --- /dev/null +++ b/alpine-build-uefi-stick.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Nico Schottelius, 12019-11-25 + +set -e + +echo "incomplete script: partition table, size" +exit 1 + +version=3.10.3 +tmpdir=$(mktemp -d) + +file=alpine-standard-${version}-x86_64.iso +url=http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/$file + +uefifile=${file%.iso}.efi + +# FIXME: get this from the ISO and round up a bit - size in MiB +uefisize=200 + +wget -c "$url" + +# cretae the output file +dd if=/dev/zero of=${uefifile} bs=1M count=${uefisize} + +mkdir "$tmpdir/iso" +mkdir "$tmpdir/efi" + +mkfs.vfat -F32 ${uefifile} + +mount -o loop "${file}" "$tmpdir/iso" +mount -o loop "${uefifile}" "$tmpdir/efi" + +cd "$tmpdir/iso" +tar c . | ( cd "$tmpdir/efi"; tar xv ) + +umount "$tmpdir/iso" "$tmpdir/efi" + +# FIXME: create partition!!