#!/bin/sh # bash script to be runned on installation with chroot # takes as an argument the root password to be set INSTALL_LOCATION="192.168.1.42" # 3.3 Time Zone ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime # 3.4 Localization echo "en_US.UTF8-8 UTF-8" >> /etc/locale.gen #locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf # 3.5 Network config echo "$2" > /etc/hostname # 3.6 initramfs # this is not necesary # 3.7 root password echo "root:$1" | chpasswd #echo "set root password to $1" # 3.8 bootloader grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg # 4 finalize # curl the installation script curl $INSTALL_LOCATION/xabs.sh > /home/xabs.sh # cleanup rm /home/post-chroot.sh