diff options
| author | Craig Jennings <craigmartinjennings@gmail.com> | 2024-02-26 16:11:01 -0600 |
|---|---|---|
| committer | Craig Jennings <craigmartinjennings@gmail.com> | 2024-02-26 16:11:01 -0600 |
| commit | 43dc7da4467753d34c6d707cee82b52c0764a104 (patch) | |
| tree | 027a92ecd3c6bbb7aad01399868c56694af81d2c /zfssetup | |
| parent | e4c1951ac9612b6856826a9825341acf3b4de3b1 (diff) | |
adjusting whitespace for readability
Diffstat (limited to 'zfssetup')
| -rwxr-xr-x | zfssetup | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -39,11 +39,13 @@ SWAPSIZE=4 # Set swap size in GB RESERVE=1 # Set how much space to leave at the end of disk, minimum 1GB ### --------------------------- Erase Disk ------------------------- + echo ""; echo "### Erasing Disk" blkdiscard -f "${DISK}" || true # discard all sectors on flash-based storage sgdisk --zap-all "${DISK}" # clear the disk ### ------------------------- Partition Disk ------------------------ + echo ""; echo "### Partitioning Disk" parted --script --align=optimal "${DISK}" -- \ mklabel gpt \ @@ -57,6 +59,7 @@ parted --script --align=optimal "${DISK}" -- \ set 5 legacy_boot on ### ---------------------- Setup Encrypted Swap --------------------- + echo ""; echo "### Encrypted Swap" for i in ${DISK}; do cryptsetup open --type plain --key-file /dev/random "${i}"-part4 "${i##*/}"-part4 @@ -129,6 +132,7 @@ zfs create \ rpool/archlinux # --------------------- Create System Datasets -------------------- + echo ""; echo "### Creating System Datasets" zfs create -o canmount=noauto -o mountpoint=/ rpool/archlinux/root zfs mount rpool/archlinux/root @@ -148,6 +152,7 @@ mount -t zfs rpool/archlinux/var/lib "${MNT}"/var/lib mount -t zfs rpool/archlinux/var/log "${MNT}"/var/log # ---------------------- Format And Mount ESP --------------------- + echo ""; echo "### Format And Mount ESP" for i in ${DISK}; do mkfs.vfat -n EFI "${i}"-part1 @@ -159,6 +164,7 @@ mkdir -p "${MNT}"/boot/efi mount -t vfat -o iocharset=iso8859-1 "$(echo "${DISK}" | sed "s|^ *||" | cut -f1 -d' '|| true)"-part1 "${MNT}"/boot/efi ### -------------------------- Install Base ------------------------- + echo ""; echo "### Installing Base" # install packages with pacstrap pacstrap "${MNT}" \ @@ -190,6 +196,7 @@ cp -v /etc/resolv.conf "${MNT}"/etc # ----------------------------- Chroot ---------------------------- # copy second part of this script to the new system + echo ""; echo "### Copying script then chrooting" sed '1,/^#part2$/d' `basename $0` > "${MNT}"/root chroot "${MNT}" /usr/bin/env DISK="${DISK}" /root/stage2.sh @@ -331,7 +338,6 @@ find /boot/efi/ -maxdepth 1 -mindepth 1 -type d -print0 \ find "${espdir}" -maxdepth 1 -mindepth 1 -type d -print0 \ | xargs -t -0I '{}' sh -vxc "find /boot/efis/ -maxdepth 1 -mindepth 1 -type d -print0 | xargs -t -0I '[]' cp -r '{}' '[]'" - ### ----------------------- Config Environment --------------------- # required software @@ -379,6 +385,7 @@ cd "$build_dir" && sudo -u "$username" makepkg --noconfirm -si ### ------------------------- Enable ZFS Services ---------------------- # add kernel modules + pacman -S --noconfirm zfs-dkms # enable zfs services |
