<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Invidian</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Invidian"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Invidian"/>
	<updated>2026-04-26T14:53:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_UEFI_seureboot_USB&amp;diff=17246</id>
		<title>Create UEFI seureboot USB</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_UEFI_seureboot_USB&amp;diff=17246"/>
		<updated>2020-04-21T17:50:02Z</updated>

		<summary type="html">&lt;p&gt;Invidian: Invidian moved page Create UEFI seureboot USB to Create UEFI secureboot USB: There is a typo in the title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Create UEFI secureboot USB]]&lt;/div&gt;</summary>
		<author><name>Invidian</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_UEFI_secureboot_USB&amp;diff=17245</id>
		<title>Create UEFI secureboot USB</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_UEFI_secureboot_USB&amp;diff=17245"/>
		<updated>2020-04-21T17:50:02Z</updated>

		<summary type="html">&lt;p&gt;Invidian: Invidian moved page Create UEFI seureboot USB to Create UEFI secureboot USB: There is a typo in the title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create an UEFI boot USB with parted and rEFInd. Unfortunately the version of GRUB that ships with ALpine Linux did not work and Gummiboot only worked on one of two machines I tested. I will submit a PR for a rEFInd package and update these instructions to simplify them given time.&lt;br /&gt;
&lt;br /&gt;
In this example we will use {{Path|/dev/sdX}} and $HOME. This will be different depending on your system. Substitute the paths in the examples below as necessary.&lt;br /&gt;
&lt;br /&gt;
== Create GPT boot partition ==&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|parted}}&lt;br /&gt;
{{Cmd | apk add parted }}&lt;br /&gt;
&lt;br /&gt;
Create a single UEFI boot partitions.&lt;br /&gt;
{{warning| This will erase all content of your {{Path|/dev/sdX}}. Make sure that you use correct device.}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd | parted --script /dev/sdX mklabel gpt&lt;br /&gt;
 parted --script --align{{=}}optimal /dev/sdX mkpart ESP fat32 1MiB 100%&lt;br /&gt;
 parted --script /dev/sdX set 1 boot on }}&lt;br /&gt;
&lt;br /&gt;
== Create fat32 filesystem ==&lt;br /&gt;
&lt;br /&gt;
Create a fat32 system with the name `Alpine`.&lt;br /&gt;
&lt;br /&gt;
{{Cmd | mkfs.vfat -n ALPINE /dev/sdX1 }}&lt;br /&gt;
&lt;br /&gt;
== Copy content of ISO image to filesystem ==&lt;br /&gt;
&lt;br /&gt;
It is possible to mount the iso image and copy files with {{codeline|cp}} or {{codeline|rsync}} and it is also possible to use {{codeline|7z}} to extract content from the iso. In this example I will use the {{codeline|uniso}} utility from {{Pkg|alpine-conf}} package.&lt;br /&gt;
&lt;br /&gt;
{{Cmd | mount -t vfat /dev/sdX1 /mnt&lt;br /&gt;
 cd /mnt&lt;br /&gt;
 uniso &amp;lt; /path/to/alpine-3.8.2-x86_64.iso }}&lt;br /&gt;
&lt;br /&gt;
== Create MOK Key ==&lt;br /&gt;
{{Cmd | openssl req -new -x509 -newkey rsa:2048 -keyout $HOME/alpine_local.key -out $HOME/alpine_local.crt -nodes -days 3650 -subj &amp;quot;/CN{{=}}Alpine Local CA/&amp;quot;&lt;br /&gt;
 openssl x509 -in $HOME/alpine_local.crt -out $HOME/alpine_local.cer -outform DER}}&lt;br /&gt;
&lt;br /&gt;
== Download and install rEFInd ==&lt;br /&gt;
Download the binary zip file of rEFInd from http://www.rodsbooks.com/refind/getting.html. In this example we will use the current  version of rEFInd, refind-bin-0.11.4.zip. There may be a more recent version of rEFInd available when you download.&lt;br /&gt;
&lt;br /&gt;
{{Cmd | cd /mnt/efi/boot&lt;br /&gt;
 unzip /path/to/refind-bin-0.11.4.zip&lt;br /&gt;
 mv refind-bin-0.11.4/refind/* .&lt;br /&gt;
 rm -rf refind-bin-0.11.4}}&lt;br /&gt;
&lt;br /&gt;
== Copy signed shim ==&lt;br /&gt;
Download Matthew J. Garrett&#039;s signed shim from http://www.codon.org.uk/~mjg59/shim-signed/shim-signed-0.2.tgz. In this example we  assume it is stored in your users download directory. Substitute the paths in the example below as necessary.&lt;br /&gt;
&lt;br /&gt;
{{Cmd | cd /mnt/efi/boot&lt;br /&gt;
 gunzip -c /path/to/shim-signed-0.2.tgz &amp;amp;#124; tar x --strip-components{{=}}1 --no-same-owner}}&lt;br /&gt;
&lt;br /&gt;
== Install Shim and Certificate ==&lt;br /&gt;
{{Cmd | cp $HOME/alpine_local.cer /mnt/efi/boot&lt;br /&gt;
 cp /mnt/efi/boot/refind_x64.efi /mnt/efi/boot/grubx64.efi&lt;br /&gt;
 cp /mnt/efi/boot/shim.efi /mnt/efi/boot/bootx64.efi }}&lt;br /&gt;
&lt;br /&gt;
== Sign the Bootloader and kernel with your key ==&lt;br /&gt;
{{Cmd | sbsign --key $HOME/alpine_local.key --cert $HOME/alpine_local.crt /mnt/efi/boot/grubx64.efi&lt;br /&gt;
 mv /mnt/efi/boot/grubx64.efi.signed /mnt/efi/boot/grubx64.efi&lt;br /&gt;
 sbsign --key $HOME/alpine_local.key --cert $HOME/alpine_local.crt /mnt/boot/vmlinuz-vanilla&lt;br /&gt;
 mv /mnt/boot/vmlinuz-vanilla.signed /mnt/boot/vmlinuz-vanilla}}&lt;br /&gt;
&lt;br /&gt;
== Unmount the partition ==&lt;br /&gt;
Finally umount the disk&lt;br /&gt;
{{Cmd | cd ~ &amp;amp;&amp;amp; umount /mnt}}&lt;br /&gt;
&lt;br /&gt;
== Install the Keys and Enroll Hash ==&lt;br /&gt;
Insert the USB into the target PC and boot. When prompted select to enroll key, navigate to alpine_local.cer and add it. Then select enroll hash navigate to efi/boot/grubx64.efi select it and add the hash. Now reboot and given a bit of luck it should launch alpine. This step is a bit more complex than it needs to be due to the binary distribution of refind already being signed by the authors key. Once rEFInd is packaged it should simplify this step.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Invidian</name></author>
	</entry>
</feed>