#!/bin/sh ############################################################################### # This script let you install ArchLinux on a dedibox # # # # # ############################################################################### ############################################################################### # Edit the following variables # ############################################################################### # Mirror on which we will download the packages (no trailing slash) MIRROR=ftp://mir1.archlinuxfr.org # Path tot the current repo (on the mirror, no trailing slash) CURRENT=/archlinux/current/os/i686 # Devices to mount (to get / , /boot , /home at least) #DEVS=(/dev/sda3 /dev/sda1 /dev/sda5 /dev/sda6) # Mout points for devices (same order that devices) #MOUNTS=(/ /boot /var /home) # Where to store temporary install files (the directory is created and removed) TMP=/mnt/install # Path where is mounted the new Arch instal (no trailing slash) ARCHPATH=/mnt # File to save outputs LOG=install.log ############################################################################### # You do not need to edit anything below these line # ############################################################################### # Create temporary directory mkdir -p $TMP cd $TMP # Get the base package list (minus lilo and grub) wget $MIRROR$CURRENT/setup/packages.txt #cat packages.txt | grep 'base/' | grep -v 'lilo' | grep -v 'grub' | sed -e "s/base/$MIRROR$CURRENT/g" > base PKGLIST=`cat packages.txt | grep 'base/' | grep -v 'lilo' | grep -v 'grub' | sed -e "s/base//g"` for i in $PKGLIST do echo "$MIRROR$CURRENT$i" >> base done # Download base packages wget -i base # Extract pacman package (to get pacman.static) tar xfz pacman-*.pkg.tar.gz # Create dummy pacman.conf echo "[options] HoldPkg = pacman glibc [current] Server = file://$TMP " > pacman.conf # install base packages usr/bin/pacman.static -A *.pkg.tar.gz -r $ARCHPATH --config pacman.conf # Remove temporary directory cd - rm -rf $TMP