Install ArchBang on USB for UEFI

arch_compArchBang 14.06.2013 got released one week back. I was looking for a Linux distro for UEFI and this seemed to be it. I have never used any Arch based distro before so thought of trying it out. I tried to get the USB ready on Ubuntu. Here is how I could boot it from USB on a UEFI based laptop:

  1. Download the 64-bit version – archbang-14.06.2013-x86_64.iso. Extract the iso to a directory using archive manager or mount it somewhere. On Ubuntu archive mounter can do that automatically for you when you click on an iso file. You need to copy the files to your USB later.
  2. Connect your pen drive. Run GParted (you may have to install it from synaptic as it doesn’t come by default). Be very careful about selecting the correct device in the upper right corner of GParted main window (e.g. for me it was /dev/sdb). Then go to Device menu ▸ Create Partition Table. Expand Advanced. In the drop-down menu select gpt. Apply. Once the operation is over you have a USB with GPT partition table.
  3. Now you need to install the filesystem on the device. Create a FAT32 filesystem on the device using GParted – select the pen drive (should show unallocated at this point), right click and click New. Choose your options in the next window. Set the device label as ARCHBANG. Once again, be very careful to select the right device.
  4. Your pen drive is ready now. Open it and copy all the files from the iso mounted in Step 1.
  5. Download the rEFind deb package. Open it using archive manager and extract usr/share/refind-x.x.x/refind/refind_x64.efi. Rename it to bootx64.efi and overwrite the EFI/boot/bootx64.efi file on the pendrive.
  6. Create a new file refind.conf in the pen drive under EFI/boot/ (at same place as bootx64.efi). Copy the following content in it. Got it from the Arch wiki and slightly modified it. The important point is to use the same label as archisolabel that you used in Step 3 e.g. I used ARCHBANG.
timeout 5

showtools about,reboot,shutdown,exit
# scan_driver_dirs EFI/tools/drivers_x64
scanfor manual,internal,external,optical

scan_delay 1
dont_scan_dirs EFI/boot

max_tags 0
default_selection "ArchBang UEFI USB"

menuentry "ArchBang UEFI USB" {
loader /arch/boot/x86_64/vmlinuz
initrd /arch/boot/x86_64/archiso.img
ostype Linux
graphics off
options "archisobasedir=arch archisolabel=ARCHBANG add_efi_memmap"

menuentry "UEFI x86_64 Shell v2" {
loader /EFI/shellx64_v2.efi
graphics off

menuentry "UEFI x86_64 Shell v1" {
loader /EFI/shellx64_v1.efi
graphics off

Now you are done! Unmount the USB. Keep it plugged it. Reboot your laptop and boot from the USB. Make sure USB device boot is enabled in UEFI settings. In my case I also had to reconnect the pen drive to the USB 2.0 port as it didn’t boot when plugged-in to a USB 3.0 port.

To set brightness for my laptop on ArchBang:

echo 5 > /sys/class/backlight/acpi_video0/brightness
//check /sys/class/backlight directory for your option

2 thoughts on “Install ArchBang on USB for UEFI”

Leave a Reply

Your email address will not be published. Required fields are marked *