Add unfinished script to create alpine linux uefi boot stick
This commit is contained in:
parent
315131c3ad
commit
47d2a91776
1 changed files with 38 additions and 0 deletions
38
alpine-build-uefi-stick.sh
Executable file
38
alpine-build-uefi-stick.sh
Executable file
|
@ -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!!
|
Loading…
Reference in a new issue