qubes-linux-template-builder/scripts_archlinux/01_install_core.sh
Marek Marczykowski afc68b641c archlinux: keep downloaded files in $CACHEDIR (new variable)
Do not download anything directly in template-builder root. Also do not
download and extract archlinux iso if existing file is current.
2013-02-16 22:51:01 +01:00

24 lines
776 B
Bash
Executable File

#!/bin/sh
echo "Mounting archlinux install system into mnt_archlinux_dvd..."
sudo mount $CACHEDIR/root-image.fs mnt_archlinux_dvd
echo "Creating chroot bootstrap environment"
sudo mount --bind $INSTALLDIR mnt_archlinux_dvd/mnt
sudo cp /etc/resolv.conf mnt_archlinux_dvd/etc
echo "-> Initializing pacman keychain"
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --init
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --populate
echo "-> Installing core pacman packages..."
sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ sh -c 'pacstrap /mnt base'
echo "-> Cleaning up bootstrap environment"
sudo umount mnt_archlinux_dvd/mnt
sudo umount mnt_archlinux_dvd
cp $SCRIPTSDIR/resolv.conf $INSTALLDIR/etc