Create UEFI secureboot USB: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This article explains how to create an UEFI boot USB with parted and gummiboot. | |||
In this example we will use {{Path|/dev/sdX}}. This will be different depending on your system. | |||
== Create GPT boot partition == | |||
{{ | Install {{Pkg|parted}} | ||
{{Cmd | apk add parted }} | |||
Create a single UEFI boot partitions. | |||
{{warning| This will erase all content of your {{Path|/dev/sdX}}. Make sure that you use correct device.}} | |||
= | {{Cmd | parted --script /dev/sdX mklabel gpt | ||
parted --script --align{{=}}optimal /dev/sdX mkpart ESP fat32 1MiB 100% | |||
parted --script /dev/sdX set 1 boot on }} | |||
== Create fat32 filesystem == | |||
Create a fat32 system with the name `Alpine`. | |||
{{Cmd | mkfs.vfat -n ALPINE /dev/sdX1 }} | |||
== Copy content of ISO image to filesystem == | |||
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. | |||
{{Cmd | mount -t vfat /dev/sdX1 /mnt | |||
cd /mnt | |||
uniso < /path/to/alpine-3.8.2-x86_64.iso }} | |||
== Unmount the partition == | |||
Finally umount the disk | |||
{{Cmd | cd ~ && umount /mnt}} | |||
{{ | |||
[[Category:Installation]] | [[Category:Installation]] |
Revision as of 14:00, 30 December 2018
This article explains how to create an UEFI boot USB with parted and gummiboot.
In this example we will use /dev/sdX. This will be different depending on your system.
Create GPT boot partition
Install parted
apk add parted
Create a single UEFI boot partitions.

parted --script /dev/sdX mklabel gpt parted --script --align=optimal /dev/sdX mkpart ESP fat32 1MiB 100% parted --script /dev/sdX set 1 boot on
Create fat32 filesystem
Create a fat32 system with the name `Alpine`.
mkfs.vfat -n ALPINE /dev/sdX1
Copy content of ISO image to filesystem
It is possible to mount the iso image and copy files with cp or rsync and it is also possible to use 7z to extract content from the iso. In this example I will use the uniso utility from alpine-conf package.
mount -t vfat /dev/sdX1 /mnt cd /mnt uniso < /path/to/alpine-3.8.2-x86_64.iso
Unmount the partition
Finally umount the disk
cd ~ && umount /mnt