From 3072a476604c7484073091da88b55caad68c8076 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 14 May 2013 09:41:47 +0200 Subject: trying to reduce size in pacstrap small fixes around systemd --- archauto.sh | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) (limited to 'archauto.sh') diff --git a/archauto.sh b/archauto.sh index 4bca008..4ef0962 100755 --- a/archauto.sh +++ b/archauto.sh @@ -37,50 +37,53 @@ mount ${INSTALL_DRIVE}${PARTITION_ROOT} ${MOUNT_PATH} export http_proxy=http://192.168.1.12:3128 -pacstrap ${MOUNT_PATH} base +pacstrap ${MOUNT_PATH} filesystem grep findutils coreutils glibc bash pacman mkinitcpio kernel26 -arch-chroot /mnt pacman --noconfirm -S grub-bios -arch-chroot /mnt grub-install --target=i386-pc --recheck ${INSTALL_DRIVE} -cp /mnt/usr/share/locale/en@quot/LC_MESSAGES/grub.mo /mnt/boot/grub/locale/en.mo -sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="modprobe.blacklist=cirrus"/g' /mnt/etc/default/grub -sed -i 's/GRUB_GFXMODE=auto/GRUB_GFXMODE=text/g' /mnt/etc/default/grub -sed -i 's/#GRUB_TERMINAL_OUTPUT=console/GRUB_TERMINAL_OUTPUT=console/g' /mnt/etc/default/grub +arch-chroot ${MOUNT_PATH} pacman --noconfirm -S grub-bios +arch-chroot ${MOUNT_PATH} grub-install --target=i386-pc --recheck ${INSTALL_DRIVE} +cp ${MOUNT_PATH}/usr/share/locale/en@quot/LC_MESSAGES/grub.mo ${MOUNT_PATH}/boot/grub/locale/en.mo +# disable quiet mode, set text mode instead of graphical mode +# also ban cirrus KVM +# set correct path of systemd binary (symlink /sbin/init has gone) +sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="modprobe.blacklist=cirrus init=\/usr\/lib\/systemd\/systemd"/g' ${MOUNT_PATH}/etc/default/grub +sed -i 's/GRUB_GFXMODE=auto/GRUB_GFXMODE=text/g' ${MOUNT_PATH}/etc/default/grub +sed -i 's/#GRUB_TERMINAL_OUTPUT=console/GRUB_TERMINAL_OUTPUT=console/g' ${MOUNT_PATH}/etc/default/grub -arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg +arch-chroot ${MOUNT_PATH} grub-mkconfig -o /boot/grub/grub.cfg -genfstab -p /mnt >> /mnt/etc/fstab +genfstab -p ${MOUNT_PATH} >> ${MOUNT_PATH}/etc/fstab -sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /mnt/etc/locale.gen -arch-chroot /mnt locale-gen -echo LANG=en_US.UTF-8 > /mnt/etc/locale.conf +sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' ${MOUNT_PATH}/etc/locale.gen +arch-chroot ${MOUNT_PATH} locale-gen +echo LANG=en_US.UTF-8 > ${MOUNT_PATH}/etc/locale.conf -ln -s /usr/share/zoneinfo/Europe/Zurich /mnt/etc/localtime -arch-chroot /mnt hwclock --systohc --utc +ln -s /usr/share/zoneinfo/Europe/Zurich ${MOUNT_PATH}/etc/localtime +arch-chroot ${MOUNT_PATH} hwclock --systohc --utc -echo "archiso" > /mnt/etc/hostname +echo "archiso" > ${MOUNT_PATH}/etc/hostname -arch-chroot /mnt systemctl enable dhcpcd@ens3.service +arch-chroot ${MOUNT_PATH} systemctl enable dhcpcd@ens3.service -arch-chroot /mnt sh -c "echo 'root:xx' | chpasswd" +arch-chroot ${MOUNT_PATH} sh -c "echo 'root:xx' | chpasswd" # switch off signature for now -arch-chroot /mnt sed -i 's/^SigLevel.*/SigLevel = Never/g' /etc/pacman.conf +arch-chroot ${MOUNT_PATH} sed -i 's/^SigLevel.*/SigLevel = Never/g' /etc/pacman.conf # monitord needs netstat -arch-chroot /mnt pacman --noconfirm -S net-tools +arch-chroot ${MOUNT_PATH} pacman --noconfirm -S net-tools # we use 'git' to manage our promises -arch-chroot /mnt pacman --noconfirm -S git-core +arch-chroot ${MOUNT_PATH} pacman --noconfirm -S git-core -arch-chroot /mnt pacman --noconfirm -U http://10.0.2.2:8080/qdbm-1.8.78-1-x86_64.pkg.tar.xz -arch-chroot /mnt pacman --noconfirm -U http://10.0.2.2:8080/cfengine-3.4.2-3-x86_64.pkg.tar.xz +arch-chroot ${MOUNT_PATH} pacman --noconfirm -U http://10.0.2.2:8080/qdbm-1.8.78-1-x86_64.pkg.tar.xz +arch-chroot ${MOUNT_PATH} pacman --noconfirm -U http://10.0.2.2:8080/cfengine-3.4.2-3-x86_64.pkg.tar.xz # install rules for the machine from git # enable cfengine -arch-chroot /mnt systemctl enable cf-execd -arch-chroot /mnt systemctl enable cf-monitord -arch-chroot /mnt systemctl enable cf-serverd +arch-chroot ${MOUNT_PATH} systemctl enable cf-execd +arch-chroot ${MOUNT_PATH} systemctl enable cf-monitord +arch-chroot ${MOUNT_PATH} systemctl enable cf-serverd echo "Done." -- cgit v1.2.3-54-g00ecf