From 401d6120afab4498f8aa8209a382f07eaef7e536 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Sat, 18 Apr 2020 19:04:05 -0400 Subject: improved install, build, and ntfs after testing --- build.sh | 2 ++ install.sh | 18 +++++++++--------- packages | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index ce104f2..bcbbf38 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,8 @@ if [ ! -e work/pacman ]; then fi sed 's:#.*$::' services | xargs systemctl enable +cd $(dirname "$(readlink -f "$0")") + ip link export USE=czar grep "^$USE" /etc/passwd || useradd -m $USE diff --git a/install.sh b/install.sh index eb6b81f..0191d86 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ if [ $(id -u) -ne 0 ] then echo "Please run as root" exit fi -SCRIPTPATH=$(dirname "$(readlink -f "$0")") +export SCRIPTPATH=$(dirname "$(readlink -f "$0")") if [ -z $1 ]; then echo "Which drive?" read DRIVE @@ -18,11 +18,11 @@ xargs -n1 echo | sed 1q | rev | cut -c 2- | rev ))" umount $DRIVE* if [ ! -e installed ]; then - parted $DRIVE mklabel gpt - parted $DRIVE mkpart fat32 0 512M - parted $DRIVE set 1 esp on - parted $DRIVE mkpart ext4 512M -30G - parted $DRIVE mkpart ntfs -30G -0 + parted $DRIVE -- mklabel gpt + yes ignore | parted $DRIVE -- mkpart fat32 0 512M + parted $DRIVE -- set 1 esp on + yes ignore | parted $DRIVE -- mkpart ext4 512M -30G + parted $DRIVE -- mkpart ntfs -30G -0 yes | mkfs.vfat ${PART}1 yes | mkfs.ntfs ${PART}3 cryptsetup luksFormat ${PART}2 @@ -41,7 +41,8 @@ if [ ! -e installed ]; then pacstrap /mnt base || exit 1 genfstab -U /mnt >> /mnt/etc/fstab - cp -r . /mnt + + sudo install -d . /mnt/root/dotfiles sed "s|%%UUID%%|$(blkid ${PART}2)|" src/etc/default/grub.orig > src/etc/default/grub touch installed else @@ -50,7 +51,6 @@ else mount ${PART}1 /mnt/efi fi arch-chroot /mnt << EOF - cd dotfiles - sh build.sh + sh /root/dotfiles/build.sh EOF echo "DONE! You should set passwords, move around ssh keys, etc." diff --git a/packages b/packages index bf1a9d7..c0e765e 100644 --- a/packages +++ b/packages @@ -67,6 +67,7 @@ pulseaudio-bluetooth # FS exfat-utils e2fsprogs +ntfs-3g lvm2 cryptsetup -- cgit