|
@@ -117,7 +117,7 @@ function preChrootStep {
|
|
|
mkswap -U clear --size $SWAPSIZE --file /mnt/swapfile >> $LOGFILE 2>&1 || exit $?
|
|
mkswap -U clear --size $SWAPSIZE --file /mnt/swapfile >> $LOGFILE 2>&1 || exit $?
|
|
|
swapon /mnt/swapfile >> $LOGFILE 2>&1 || exit $?
|
|
swapon /mnt/swapfile >> $LOGFILE 2>&1 || exit $?
|
|
|
|
|
|
|
|
- PACSTRAPPKGS="base linux linux-firmware linux-headers networkmanager efibootmgr vim sudo sed git"
|
|
|
|
|
|
|
+ PACSTRAPPKGS="base linux linux-firmware linux-headers networkmanager efibootmgr vim sudo sed git lvm2"
|
|
|
|
|
|
|
|
printf "Checking CPU manufacturer\n" | tee -a $LOGFILE
|
|
printf "Checking CPU manufacturer\n" | tee -a $LOGFILE
|
|
|
CPU=$(lscpu | grep "^Vendor ID:" | awk '{ print $3 }')
|
|
CPU=$(lscpu | grep "^Vendor ID:" | awk '{ print $3 }')
|
|
@@ -172,13 +172,13 @@ function chrootStep {
|
|
|
systemctl start NetworkManager >&2 || exit $?
|
|
systemctl start NetworkManager >&2 || exit $?
|
|
|
|
|
|
|
|
printf "Add decryption kernel options\n" | tee -a $LOGFILE
|
|
printf "Add decryption kernel options\n" | tee -a $LOGFILE
|
|
|
- LUKSUUID=$(blkid | grep ${ROOTPART} | sed -E 's/^.*\bUUID\b="(\S+)".*$/\1/') || exit $?
|
|
|
|
|
|
|
+ LUKSUUID=$(blkid | grep "${ROOTPART}" | sed -E 's/^.*\bUUID\b="(\S+)".*$/\1/') || exit $?
|
|
|
mkdir -p /etc/cmdline.d >&2 || exit $?
|
|
mkdir -p /etc/cmdline.d >&2 || exit $?
|
|
|
echo "rd.luks.name=${LUKSUUID}=cryptlvm root=/dev/VolGroup1/root rw rootfstype=ext4 rd.shell=0 rd.emergency=reboot" > /etc/cmdline.d/root.conf
|
|
echo "rd.luks.name=${LUKSUUID}=cryptlvm root=/dev/VolGroup1/root rw rootfstype=ext4 rd.shell=0 rd.emergency=reboot" > /etc/cmdline.d/root.conf
|
|
|
|
|
|
|
|
printf "Add LUKS related hooks to mkinitcpio.conf" | tee -a $LOGFILE
|
|
printf "Add LUKS related hooks to mkinitcpio.conf" | tee -a $LOGFILE
|
|
|
for OPT in systemd keyboard sd-vconsole sd-encrypt lvm2; do
|
|
for OPT in systemd keyboard sd-vconsole sd-encrypt lvm2; do
|
|
|
- sed -i -E '/^HOOKS=.*\b'$OPT'\b/!/s/^(.*)\)$/\1 '$OPT'\)/' /etc/mkinitcpio.conf >&2 || exit $?
|
|
|
|
|
|
|
+ sed -i -E '/^HOOKS=.*\b'$OPT'\b/!s/^(HOOKS=.*)\)$/\1 '$OPT'\)/' /etc/mkinitcpio.conf >&2 || exit $?
|
|
|
done
|
|
done
|
|
|
|
|
|
|
|
printf "Rebuild kernel\n" | tee -a $LOGFILE
|
|
printf "Rebuild kernel\n" | tee -a $LOGFILE
|
|
@@ -216,8 +216,7 @@ DISK="${DISK}" \
|
|
|
HOSTNAME="${HOSTNAME}" \
|
|
HOSTNAME="${HOSTNAME}" \
|
|
|
USERNAME="${USERNAME}" \
|
|
USERNAME="${USERNAME}" \
|
|
|
PASSWORD="${PASSWORD}" \
|
|
PASSWORD="${PASSWORD}" \
|
|
|
- SSH_PUB="${SSH_PUB}" \
|
|
|
|
|
- SSH_PRIV="${SSH_PRIV}" \
|
|
|
|
|
|
|
+ ROOTPART="${ROOTPART}" \
|
|
|
arch-chroot /mnt /$(basename $0) chroot 2>> $LOGFILE | tee -a $LOGFILE
|
|
arch-chroot /mnt /$(basename $0) chroot 2>> $LOGFILE | tee -a $LOGFILE
|
|
|
if (( ${PIPESTATUS[0]} > 0 )); then
|
|
if (( ${PIPESTATUS[0]} > 0 )); then
|
|
|
exit ${PIPESTATUS[0]}
|
|
exit ${PIPESTATUS[0]}
|