Just another simple and minimal Arch Linux installer
- Use the original Arch Linux installation image
- Use minimal but sufficient setup
- Use the most automated installation and configuration process
- UEFI and BIOS compatible GPT disk layout and bootloader (used GRUB2): you can use the disk with the installed system in another computer with UEFI or BIOS without any changes in most use cases
- Detect user timezone automatically
- Btrfs subvolumes
- Add new user with
sudo
for granting administrator privileges to a user - Login for
root
user is disabled by default - Used NetworkManager for manage connections
You should boot from Arch Linux installation image, download installer binary, set executable permission, and run it:
# Download https://github.com/shimarulin/archi/releases/latest/download/archi
# with Curl
curl -L https://git.io/JGRV3 --output archi
# or Wget
wget https://git.io/JGRV3 -O archi
# Mark the file as executable
chmod +x archi
# Run
./archi
If you move the disc after installation to another computer with UEFI, do not forget to generate a new UEFI menu item (/dev/sda
- your disk with installed Arch Linux):
efibootmgr -c -d /dev/sda -p 2 -L "Arch Linux" -l "\EFI\BOOT\BOOTX64.EFI"
Run in project root to set Git hooks directory:
git config core.hooksPath .hooks
To extend Cargo functionality I'm use https://github.com/killercup/cargo-edit. To compile it, you need to install the openssl development package.
For example, libssl-dev
on Ubuntu:
sudo apt install libssl-dev && cargo install cargo-edit
or openssl-devel
on Fedora.
Install development tools:
cargo install cargo-edit cocogitto cargo-bump
From dtolnay/thiserror#192 (comment):
cargo clean
- https://lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html
- https://github.com/johnthagen/min-sized-rust
Cargo.toml:
# Release optimization
[profile.release]
opt-level = 'z' # Optimize for size.
lto = true
panic = 'abort'
Shell command:
cargo build --release && strip target/release/archi
docker run -v $PWD:/volume -w /volume -t clux/muslrust cargo build
See more on https://github.com/clux/muslrust
- Add default VirtualBox Network:
- File > Tools > Network Manager > Host-only Networks > Create (you will get
vboxnet0
) - Select
vboxnet0
Properties > DHCP Server > Enable Server
- File > Tools > Network Manager > Host-only Networks > Create (you will get
- Setup VM Network: VM's Settings > Network > Adapter 2 > select Host-only Adapter (vboxnet0)
- Run VM and load guest OS:
- Setup password:
passwd
- Start the SSH service in the guest OS is not running, start it (
systemctl start sshd
) - Show IP on host OS:
ip addr show
, get IP for vboxnet0 (192.168.43.91, for example)
- Setup password:
- Connect from host:
ssh -o 'IdentitiesOnly=yes' [email protected]
scp -o 'IdentitiesOnly=yes' ./archi [email protected]:/root/