aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-04-18 19:04:05 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-04-18 19:04:05 -0400
commit401d6120afab4498f8aa8209a382f07eaef7e536 (patch)
tree75fe6bcd943ec37ca1ad2e0fdd37330d95a57e9b
parent29c18a3cdecc1d25ab6e6b9a25dc8ddbe1445741 (diff)
improved install, build, and ntfs after testing
-rwxr-xr-xbuild.sh2
-rwxr-xr-xinstall.sh18
-rw-r--r--packages1
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