Skip to content

Instantly share code, notes, and snippets.

@cmaureir
Created March 4, 2013 17:41
Show Gist options
  • Save cmaureir/5084007 to your computer and use it in GitHub Desktop.
Save cmaureir/5084007 to your computer and use it in GitHub Desktop.
Arch UEFI
Source: https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface
Create UEFI bootable USB from ISO
-----------------------------------
Note: The instructions below are specifically for Archiso/official media; Archboot preparation is identical, with this refind.conf instead of the one mentioned below (which is for Archiso) and without the filesystem label requirement.
Note: The USB can use either MBR or GPT partition table (so it is fine to use an already partitioned USB). The filesystem should be either FAT32 (recommended) or FAT16. FAT12 is designed for floppy drives and therefore not recommended for USB drives.
First create a partition table and at most one partition in the USB. Mount the ISO image from the Arch Linux download page.
# mkdir -p /mnt/{usb,iso}
# mount -o loop archlinux-2012.12.01-dual.iso /mnt/iso
Then create a FAT32 filesystem in the partition on the USB (unmount before if necessary) with LABEL as used in the Archiso configuration. Obtain the label from /mnt/iso/loader/entries/archiso-x86_64.conf; this is used by the archiso hook in initramfs to identify the udev path to the installation media. mkfs.vfat is part of package dosfstools.
# awk 'BEGIN {FS="="} /archisolabel/ {print $3}' /mnt/iso/loader/entries/archiso-x86_64.conf | xargs mkfs.vfat -F32 /dev/sdXY -n
Mount the newly created FAT32 USB partition, and copy the contents of the installation media to the USB media.
# mount /dev/sdXY /mnt/usb
# cp -a /mnt/iso/* /mnt/usb
# sync
# umount /mnt/{usb,iso}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment