qubes-linux-template-builder/scripts_archlinux/01_install_core.sh
Marek Marczykowski d13a4eff88 archlinux: do not use additional sudo inside scripts_archlinux/*
The whole build process is started as root (check Makefile), so there is
no need for additional sudo. This makes some things much simpler
(for example appending to some files).
2013-04-28 22:50:18 +02:00

27 lines
771 B
Bash
Executable File

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