Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

r-darwish/alma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALMA - Arch Linux Mobile Appliance

This tool installs Arch Linux into a USB drive, making it a customized live Arch Linux bootable drive. It was inspired by this article. The USB drive should be bootable both by UEFI and legacy boot.

Installation

You can either build the project using cargo build or install the alma package from AUR.

Requirements

This tool should be ran from an exiting Arch Linux installations. It depends on the following tools:

  • sgdisk
  • partprobe
  • Arch install scripts
  • mkfs.fat
  • mkfs.ext4
  • Optional: cryptsetup

Dependencies will be handled for you if you install alma from AUR.

Usage

Creation

sudo alma create /dev/disk/by-id/usb-Generic_USB_Flash_Disk-0:0

This will wipe the entire disk and create a bootable installation of Arch Linux. You can use either removable devices or loop devices. As a precaution, ALMA will not wipe non-removable devices.

After the installation is done you can either boot from it immediately or use arch-chroot to perform further customizations before your first boot.

Chrooting to exiting Live USB

sudo alma chroot /dev/disk/by-id/usb-Generic_USB_Flash_Disk-0:0

Flags

  • -p / --extra-packages - Specify extra packages to install. For example: -p htop tmux
  • -i / --interactive - Drop you into interactive chroot to perform further customization
  • -e / --encrypted-root - Encrypt the root filesystem.

What exactly does it do?

This tool doesn't aspire to be a generic installer for Arch Linux. Instead, it does the minimum steps required to create a bootable USB with a few tweaks.

  1. Partition the disk as suggested here. The last partition will be formatted as ext4
  2. Bootstrap the system using pacstrap -c. The -c flag will use the host's cache instead the drive's cache, which will speed up things when you create multiple drives. This tool will install the base system, grub, intel-ucode and NetworkManager
  3. Generate initramfs without the autodetect hook
  4. Set NetworkManager to start at boot
  5. Install GRUB in both legacy and UEFI modes

Similar projects