index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-07-06 21:02:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 21:02:03 +0000 |
commit | 0c57871f3b3832e31c0c835a671064364c2e9575 (patch) | |
tree | 5fe159d12713f48af46d4c339b265f24d38f5858 /README.md | |
parent | 067b31b1aa7f0111f164dfda486adbe565d6a1a9 (diff) | |
parent | f840f9e714d9f7d2fcb601c46079978f7a20df71 (diff) |
-rw-r--r-- | README.md | 142 |
@@ -1,125 +1,85 @@ -# <img src="logo.png" alt="drawing" width="200"/> -A guided/automated [Arch Linux](https://wiki.archlinux.org/index.php/Arch_Linux) installer. +# <img src="https://github.com/Torxed/archinstall/raw/annotations/docs/logo.png" alt="drawing" width="200"/> +Just another guided/automated [Arch Linux](https://wiki.archlinux.org/index.php/Arch_Linux) installer with a twist. +The installer also doubles as a python library to access each individual installation step for customized installs. +Pre-built ISO's can be found here which autostarts archinstall *(in a safe guided mode)*: https://hvornum.se/archiso/ * archinstall [discord](https://discord.gg/cqXU88y) server * archinstall guided install ISO's: https://hvornum.se/archiso/ + * archinstall on [#archinstall@freenode (IRC)](irc://#archinstall@FreeNode) -# How-to / Usecases +# Usage ## Run on Live-CD (Binary) # wget https://gzip.app/archinstall # chmod +x archinstall; ./archinstall -## Run on Live-CD (Python): +This downloads and runs a "compiled" *(using nuitka)* version of the project.<br> +It defaults to starting a guided install with some safety checks in place. - # wget https://raw.githubusercontent.com/Torxed/archinstall/master/archinstall.py - # pacman -S --noconfirm python; python archinstall.py +## Run on Live-CD with Python: -This will start a guided install.<br> -Add `--default` for a unattended minimalistic installation of Arch Linux. + # wget https://raw.githubusercontent.com/Torxed/archinstall/master/installer.py + # pacman -S --noconfirm python; python install.py -> **Creating your own ISO:** Follow [ArchISO](https://wiki.archlinux.org/index.php/archiso)'s guide on how to create your own ISO or use a pre-built [guided ISO](https://hvornum.se/archiso/) to skip the python installation step, or to create auto-installing ISO templates. Further down are examples and cheat sheets on how to create different live ISO's. - -# Features - - * User guided install of Arch Linux *(Like most other distros have)* - * `AUR` package support. - * Unattended install of Arch Linux - * Profile / Template based installs - * Full disk encryption, locale/region settings and customizable application selection - * YubiKey support for disk and root password *(TBD / next release)* - * <strike>Supports offline-installation of Arch Linux</strike> - * Never creates or leave post-install/service scripts *(usually used to finalize databases etc)* - -**Default Installation Contains:** Encrypts drive, btrfs filesystem, `linux` kernel, nano, wpa_supplicant *(and dialog)* - -# Examples: +This will start a guided install with the same safety checks as previous.<br> - * `./archinstall --profile=workstation --drive=/dev/sda` - Installs the [workstation](https://github.com/Torxed/archinstall/blob/master/deployments/workstation.json) template on the drive `/dev/sda` +## Run using PIP and Python module: -# [Build a Arch Linux ISO to autorun archinstall](https://github.com/Torxed/archinstall/wiki/Autorun-on-Arch-Live-CD) + # pip install archinstall + # python -m archinstall -More options for the built ISO: +Again, a guided install starts with safety checks.<br> +This assumes tho that Python and Pip is present (not always the case on the default Arch Linux ISO), see above for pre-built ISO's containing Python+pip -### [Unattended install of a profile](https://github.com/Torxed/archinstall/wiki/Unattended-install-of-a-profile) +## Scripting an installation -### [User guided install (DEFAULT)](https://github.com/Torxed/archinstall/wiki/User-guided-installation-(DEFAULT)) +Assuming you're building your own ISO and want to create an automated install process.<br> +This is probably what you'll need, a minimal example of how to install using archinstall as a Python library. -### [Custom web-server for deployment profiles](https://github.com/Torxed/archinstall/wiki/Custom-web-server-for-deployment-profiles) +```python +import archinstall, getpass -### [Rerunning the installation](https://github.com/Torxed/archinstall/wiki/Rerunning-the-installation) -# Some parameters you can give it +hdd = archinstall.select_disk(archinstall.all_disks()) +disk_password = getpass.getpass(prompt='Disk password (won\'t echo): ') - --drive=</dev/sdX> - Which drive to install arch on, if absent, the first disk under /dev/ is used +with archinstall.Filesystem(hdd, archinstall.GPT) as fs: + fs.use_entire_disk('luks2') + with archinstall.Luks2(fs) as crypt: + if hdd.partition[1]['size'] == '512M': + raise OSError('Trying to encrypt the boot partition for petes sake..') - --minimal - Starts a minimal installation, and skips looking for profiles. - - --size=100% (Default) - Sets the size of the root filesystem (btrfs) - - --start=513MiB (Default) - Sets the starting location of the root partition - (TODO: /boot will take up space from 1MiB - <start>, make sure boot is no larger than 513MiB) - - --password=0000 (Default) - Which disk password to use, - --password="<STDIN>" for prompt of password - --password="<YUBIKEY>" for setting a unique password on the YubiKey and use that as a password - (NOTE: This will wipe/replace slot 1 on the YubiKey) + key_file = crypt.encrypt(hdd.partition[1], password=disk_password, key_size=512, hash_type='sha512', iter_time=10000, key_file='./pwfile') + unlocked_crypt_vol = crypt.mount(hdd.partition[1], 'luksloop', key_file) - --aur-support (default) + with archinstall.Installer(unlocked_crypt_vol, hostname='testmachine') as installation: + if installation.minimal_installation(): + installation.add_bootloader() - --pwfile=/tmp/diskpw (Default) - Which file to store the disk encryption password while sending it to cryptsetup - - --hostname=Arcinstall (Default) - Sets the hostname of the box - - --country=all (Default) - Default mirror allocation for fetching packages. - If network is found, archinstall will try to attempt and guess which country the - install originates from, basing it off GeoIP off your public IP (uses https://hvornu.se/ip/ for lookups) - - --packages='' (Default) - Which additional packages to install, defaults to none. - (Space separated as it's passed unchanged to `pacstrap` - - --user=<name> - Adds an additional username to the system (default group Wheel) - - --post=reboot (Default) - After a successful install, reboots into the system. Use --post=stay to not reboot. + installation.add_additional_packages(['nano', 'wget', 'git']) + installation.install_profile('desktop') - --unattended - This parameter causes the installation script to install arch unattended on the first disk + installation.user_create('anton', 'test') + installation.user_set_pw('root', 'toor') - --profile=<name> - For instance, --profile=workstation will install the workstation profile. + installation.add_AUR_support() +``` - --profiles-path=https://example.com/profiles - Changes the default path the script looks for deployment profiles. - The default path is 'https://raw.githubusercontent.com/Torxed/archinstall/master/deployments' +This installer will perform the following: - --rerun="Name of step in profile" - Enables you to skip the format, encryption and base install steps. - And head straight for a step in the profile specified. - (Useful for debugging a step in your profile) + * Prompt the user to select a disk and disk-password + * Proceed to wipe said disk + * Sets up a default 100% used disk with encryption + * Installs a basic instance of Arch Linux *(base base-devel linux linux-firmware btrfs-progs efibootmgr)* + * Installs and configures a bootloader + * Install additional packages *(nano, wget, git)* + * Installs a network-profile called `desktop` *(more on network profiles in the docs)* + * Adds AUR support by compiling and installing [yay](https://github.com/Jguer/yay) - --localtime="Europe/Stockholm" (Default if --country=SE, otherwise GMT+0) - Specify a localtime you're used to. - -Deployment profile structs support all the above parameters and more, for instance, custom arguments with string formatting. -See [deployments/workstation.json](https://github.com/Torxed/archinstall/blob/net-deploy/deployments/workstation.json) for examples. - -# Contact - -IRC: `#archinstall@FreeNode` +> **Creating your own ISO:** Follow [ArchISO](https://wiki.archlinux.org/index.php/archiso)'s guide on how to create your own ISO or use a pre-built [guided ISO](https://hvornum.se/archiso/) to skip the python installation step, or to create auto-installing ISO templates. Further down are examples and cheat sheets on how to create different live ISO's. ## End note - ![description](description.jpg) +![description](https://github.com/Torxed/archinstall/raw/annotations/docs/description.jpg)
\ No newline at end of file |