2013-01-25 08:07:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-04-19 00:20:29 +00:00
|
|
|
set -e
|
|
|
|
|
2013-02-16 16:17:42 +00:00
|
|
|
echo "Mounting archlinux install system into mnt_archlinux_dvd..."
|
2013-04-19 00:20:53 +00:00
|
|
|
mkdir -p mnt_archlinux_dvd
|
2013-04-28 20:50:18 +00:00
|
|
|
mount $CACHEDIR/root-image.fs mnt_archlinux_dvd
|
2013-01-25 08:07:01 +00:00
|
|
|
|
|
|
|
echo "Creating chroot bootstrap environment"
|
|
|
|
|
2013-04-28 20:50:18 +00:00
|
|
|
mount --bind $INSTALLDIR mnt_archlinux_dvd/mnt
|
|
|
|
cp /etc/resolv.conf mnt_archlinux_dvd/etc
|
2013-01-25 08:07:01 +00:00
|
|
|
|
|
|
|
echo "-> Initializing pacman keychain"
|
2013-04-28 20:50:18 +00:00
|
|
|
./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
|
2013-01-25 08:07:01 +00:00
|
|
|
|
|
|
|
echo "-> Installing core pacman packages..."
|
2013-04-28 20:50:18 +00:00
|
|
|
./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ sh -c 'pacstrap /mnt base'
|
2013-01-25 08:07:01 +00:00
|
|
|
|
2014-08-01 10:41:55 +00:00
|
|
|
echo "--> Removing non required linux kernel (can be added manually through a package)"
|
|
|
|
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc linux
|
|
|
|
|
2013-01-25 08:07:01 +00:00
|
|
|
echo "-> Cleaning up bootstrap environment"
|
2013-04-28 20:50:18 +00:00
|
|
|
umount mnt_archlinux_dvd/mnt
|
2013-01-25 08:07:01 +00:00
|
|
|
|
2013-04-28 20:50:18 +00:00
|
|
|
umount mnt_archlinux_dvd
|
2013-01-25 08:07:01 +00:00
|
|
|
|
2013-02-16 16:17:42 +00:00
|
|
|
cp $SCRIPTSDIR/resolv.conf $INSTALLDIR/etc
|