New README

This commit is contained in:
Roey Darwish Dror 2019-06-22 20:13:54 +03:00
parent 77a934d4e6
commit 099c796c2c

View File

@ -1,29 +1,24 @@
# 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](http://valleycat.org/linux/arch-usb.html) article. The USB drive
should be bootable both by UEFI and legacy boot.
Almost every live Linux distribution out there is meant for a specific purpose, whether it's data
rescue, privacy, penetration testing or anything else. There are some more generic distributions
but all of them are based on squashfs, meaning that changes don't persist reboots.
ALMA is meant for those who wish to have a **mutable** live environment. It installs Arch
Linux into a USB or an SD card, almost as if it was a hard drive. Some configuration is applied in
order to minimize writes to the USB and making sure the system is bootable on both BIOS and UEFI
systems.
Upgrading your packages is as easy as running `pacman -Syu` (or [Topgrade](https://github.com/r-darwish/topgrade/)) while the system is
booted. This tool also provides an easy chroot command, so you can keep your live environment up to
date without having to boot it. Encrypting the root partition is as easy as providing the `-e` flag
## 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
``` shell
sudo alma create /dev/disk/by-id/usb-Generic_USB_Flash_Disk-0:0
```
@ -34,30 +29,13 @@ removable devices or loop devices. As a precaution, ALMA will not wipe non-remov
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
Not specifying any path will cause ALMA to interactively prompt the user for a removable device.
``` shell
sudo alma chroot /dev/disk/by-id/usb-Generic_USB_Flash_Disk-0:0
```
## Presets
### 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](http://valleycat.org/linux/arch-usb.html). The last
partition will be formatted as ext4
1. 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
1. Generate initramfs without the `autodetect` hook
1. Set NetworkManager to start at boot
1. Install GRUB in both legacy and UEFI modes
Reproducing a build can be easily done using a preset file. Presets file are simple TOML file which
contain a list of packages to install, a post-installation script and environment variables required
by the preset. See the presets directory for examples.
## Similar projects