diff --git a/README.md b/README.md index af1c3c1..32d6c20 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,27 @@ #### Features -- LUKS/LVM setup -- Package & Session selection -- Full device auto partition +- Minimal dependencies. +- LUKS and/or LVM support. +- Btrfs and subvolume support. +- Full device auto partitioning. +- Mirror country selection and sorting. +- Self updating with persistent settings. +- Background base install process while you customize. +- Choose kernel, file system, bootloader, packages, sessions, shell, login manager, etc. + #### Requirements -- `dialog` displays user interactive dialogs. -- `rsync` copies the live base during install. -- `parted` partition management and querying info. -- `arch-install-scripts` simple chroot setup with arch-chroot -- `awk`, `sed`, `curl`, `coreutils`, `findutils`, `util-linux` misc tasks throughout the install. +- `awk` +- `sed` +- `curl` +- `dialog` +- `parted` +- `coreutils` +- `findutils` +- `util-linux` +- `arch-install-scripts` #### Manual Installation diff --git a/installer b/installer index da0b282..17cad6a 100755 --- a/installer +++ b/installer @@ -2059,8 +2059,9 @@ install_background() install_mirror_country fi - yesno "Background Install" "$_bginstall" "Pacstrap" "Copy ISO" || PACSTRAP=0 - + if hash rsync > /dev/null 2>&1; then + yesno "Background Install" "$_bginstall" "Pacstrap" "Copy ISO" || PACSTRAP=0 + fi ( install_mirrorlist > /tmp/bgout 2>&1 @@ -2445,6 +2446,25 @@ btrfs_name() return 0 } +btrfs_subvols() +{ + local part="$1" + local mntp="${MNT}$2" + local mvol='' + + btrfs_name "\nEnter a name for the initial subvolume on $part." || return 1 + mvol="$SUBVOL" + [[ $mntp == "$MNT" ]] && BTRFS_MNT="rootflags=subvol=$mvol" + btrfs subvolume create "$mntp/$mvol" > /dev/null 2> "$ERR" + errshow 0 "btrfs subvolume create $mntp/$mvol" || return 1 + umount_dir "$mntp" || return 1 + select_mntopts 'btrfs' && [[ $MNT_OPTS ]] && MNT_OPTS+=',' + mount -o ${MNT_OPTS}subvol=${mvol} "$part" "$mntp" 2> "$ERR" + errshow 0 "mount -o ${MNT_OPTS}subvol=${mvol} $part $mntp" || return 1 + btrfs_extsubvols "$mntp" "$mvol" || return 1 + msg "Btrfs Setup Complete" "\nCreated subvolumes:\n\n$(ls -R "$mntp/$mvol")" +} + btrfs_extsubvols() { local mntp="$1" @@ -2469,25 +2489,6 @@ btrfs_extsubvols() return 0 } -btrfs_subvols() -{ - local part="$1" - local mntp="${MNT}$2" - local mvol='' - - btrfs_name "\nEnter a name for the initial subvolume on $part." || return 1 - mvol="$SUBVOL" - [[ $mntp == "$MNT" ]] && BTRFS_MNT="rootflags=subvol=$mvol" - btrfs subvolume create "$mntp/$mvol" > /dev/null 2> "$ERR" - errshow 0 "btrfs subvolume create $mntp/$mvol" || return 1 - umount_dir "$mntp" || return 1 - select_mntopts 'btrfs' && [[ $MNT_OPTS ]] && MNT_OPTS+=',' - mount -o ${MNT_OPTS}subvol=${mvol} "$part" "$mntp" 2> "$ERR" - errshow 0 "mount -o ${MNT_OPTS}subvol=${mvol} $part $mntp" || return 1 - btrfs_extsubvols "$mntp" "$mvol" || return 1 - msg "Btrfs Setup Complete" "\nCreated subvolumes:\n\n$(ls -R "$mntp/$mvol")" -} - ############################################################################### # lvm functions @@ -3259,9 +3260,14 @@ system_identify() # enable some nicer colours in the linux console termcol +MISS="" +for i in dialog find parted curl arch-chroot; do + hash $i >/dev/null 2>&1 || MISS+="$i " +done + # ensure the required packages are installed and that we're running as root on x86_64 architecture -if ! hash dialog rsync find parted curl arch-chroot >/dev/null 2>&1; then - echo "One or more required packages are missing: dialog, curl, rsync, parted, findutils, arch-install-scripts" +if [[ $MISS ]]; then + printf "This installer requires the following package(s) to be installed:\n\n\t%s" "$MISS" die 1 elif (( UID != 0 )); then msg "Not Root" "\nThis installer must be run as root or using sudo.\n\nExiting..\n" 2