diff options
Diffstat (limited to 'parautinst-chroot')
-rw-r--r-- | parautinst-chroot | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/parautinst-chroot b/parautinst-chroot new file mode 100644 index 0000000..ad51f64 --- /dev/null +++ b/parautinst-chroot @@ -0,0 +1,32 @@ +#!/bin/bash + +red='\e[31m' # Red +cyan_bg='\e[46m' # Cyan background +txtrst='\e[0m' # Text Reset + +info() { echo -e ${cyan_bg}PARAUTINST chroot:${txtrst} "$@" ; } + +error() { echo -e ${cyan_bg}PARAUTINST chroot error:${txtrst} "$@" 1>&2 ; exit 1 ; } + +info Setting system config files +echo "${hostname}" > /etc/hostname +ln -s "${timezone}" /etc/localtime +echo "${locale}" >> /etc/locale.gen +echo "KEYMAP=${keymap}" > /etc/vconsole.conf +locale-gen + +if (( $virtio )) ; then + info "Recreating initramfs to add virtio modules" + sed -i 's/MODULES=\"\"/MODULES="virtio_blk virtio_pci virtio_net"/' /etc/mkinitcpio.conf +fi + +mkinitcpio -p linux-libre + +info "Setting root password" +passwd + +info "Installing Grub 2" +grub-install --recheck /dev/"${hdd}" + +info "Configuring Grub 2" +grub-mkconfig -o /boot/grub/grub.cfg |