Skip to content

Instantly share code, notes, and snippets.

@nicholastay
Last active March 8, 2020 06:19
Show Gist options
  • Save nicholastay/82c313ef4b7bef6d724134cecbb5b16c to your computer and use it in GitHub Desktop.
Save nicholastay/82c313ef4b7bef6d724134cecbb5b16c to your computer and use it in GitHub Desktop.

My own notes for USB arch setups. Will update as more things happen or whatever.

Prerequisites

  • arch-install-scripts or live usb
  • gdisk
  • f2fs-tools
  • dosfstools

Partitioning

# gdisk /dev/sdX

  • 2MB EF02
  • 500MB EFI
  • Maybe some 0700 data (assuming we will have this as sdX3)
  • Rest as 8300
    • Set this to 0700, then set attribute hidden in expert menu if don't want Windows popup

LUKS setup

We won't be using LVM as probably too small drive to really care for partitioning.

# cryptsetup -y -v luksFormat /dev/sdX4
# cryptsetup open /dev/sda2 archusb

Format

  • EFI: # mkfs.fat -F32 /dev/sdX2
  • Data: # mkfs.fat -F32 /dev/sdX3
  • Linux: # mkfs.f2fs /dev/mapper/archusb

Mounting

  • mkdir /mnt/usb
  • mount /dev/mapper/archusb /mnt/usb
  • mkdir /mnt/usb/boot
  • mount /dev/sdX2 /mnt/usb/boot
  • (optional) mkdir -p /mnt/usb/mnt/data && mount /dev/sdX3 /mnt/usb/mnt/data

Setting up

# pacstrap /mnt base base-devel linux linux-firmware vim

Important kernel config

Ensure /etc/mkinitcpio.conf, HOOKS has keyboard keymap before autodetect. Also, make sure udev block filesystems is all together in a block as written - this will ensure USB devices are loaded properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment