Skip to content

Scripts to automate the install of Arch Linux

Notifications You must be signed in to change notification settings

tokcum/ArchInstaller

 
 

Repository files navigation

Introduction

ArchInstaller is a bash script to automate the installation and initial configuration of Arch Linux. arch-install.sh should be run from the Arch Linux install ISO.

Features

  • It works for me.
  • Automated installation of base Arch Linux.
  • Extensive filesystem support. Auto detects and configure SSDs and TRIM:
    • bfs
    • btrfs
    • ext{2,3,4}
    • f2fs
    • jfs
    • nilfs2
    • ntfs
    • reiserfs
    • xfs
  • Works on PCs (x86 and x86_64) and Raspberry Pi (no filesystem options on the Pi).
  • On x86_64 desktops the multi-lib repository is automatically enabled and multilib-devel automatically installed.
  • Automated installation of your preferred desktop environment, or none at all.
    • Cinnamon
    • GNOME
    • KDE
    • LXDE
    • MATE
    • XFCE
  • Automated hardware detection and driver installation. See below.
  • Installations can be sped up via the use of an NFS cache. See below.
  • Power management "out of the box".
  • Swap is provided via ZSWAP only.
  • Adheres to the Arch principle of K.I.S.S.

Limitations

  • Heavily biased toward my own preferences and may not suit your needs.
  • Does not support UEFI. I don't have any UEFI hardware to test on.
  • Only simple partition recipes are available.

Install Arch Linux

Boot the Arch Linux install ISO and clone ArchInstaller.

loadkeys uk
wifi-menu
dhcpcd
pacman -Syy --noconfirm git
git clone https://github.com/flexiondotorg/ArchInstaller.git
cd ArchInstaller

Edit the users.csv file to suite your requirements, see users.example for reference. Run the install script, for example.

PC

./arch-install.sh -d sda -p bsrh -w pA55w0rd -n myhost.example.org

Raspberry Pi

The Raspberry Pi mode doesn't do any disk partitioning so the partition options are redundant on the Pi.

./arch-install.sh -w pA55w0rd -n myhost.example.org

You can get help with the following.

./arch-install.sh -h

Hardware Detection

arch-install.sh will probe the PCI and USB bus for vendor and device codes and then automatically execute the corresponding scripts in hardware/{pci,usb}.

arch-install.sh will also use dmidecode to probe your computer for the fields below and automatically execute the corresponding scripts in hardware/system.

  • Product Name
  • Version
  • Serial Number
  • UUID
  • SKU Number

The facilities to customise the install any given hardware requirements, right down to a specific tweak for a unique computer. See the scripts I've already created, they are good references to get you started.

NFS Cache

arch-install.sh can use an existing pacman cache on an existing host to speed up the installation time. If you already have a host running Arch Linux this is how you can share your pacman cache via NFS.

sudo pacman -S nfs-utils

Add the following to /etc/exports.

/var/cache/pacman/pkg   *(rw,no_root_squash)

To start the NFS server, use:

systemctl start rpc-idmapd.service rpc-mountd.service

To start NFS automatically on every boot, use:

systemctl enable rpc-idmapd.service rpc-mountd.service

When you execute arch-install.sh pass in the -c argument, for example:

./arch-install.sh -d sda -p bsrh -w pA55w0rd -n myhost.example.org -c myexistinghost:/var/cache/pacman/pkg

If you provide arch-install.sh an NFS cache it will add that cache to /etc/fstab on the installed system.

Power Management

Power management is fairly complete right now, although SATA ALPM is disabled due to the risk of data corruption.

* <https://bugs.launchpad.net/ubuntu/+source/linux/+bug/539467>
* <https://wiki.ubuntu.com/Kernel/PowerManagementALPM>

I've opted to use cpupower and TLP for CPU frequency and power management.

The following are useful sources of reference.

FONT and FONT_MAP

Read the following to understand how to tweak the FONT and FONT_MAP settings in arch-install.sh.

TODO

Power Management TODO

The following still needs attention.

  • Suspend hook for /dev/mmcblk0

Video drivers TODO

About

Scripts to automate the install of Arch Linux

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%