Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/bsdinstall/scripts/auto
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | |||||
PMODES="\ | PMODES="\ | ||||
\"Auto (UFS)\" \"Guided Disk Setup\" \ | \"Auto (UFS)\" \"Guided Disk Setup\" \ | ||||
Manual \"Manual Disk Setup (experts)\" \ | Manual \"Manual Disk Setup (experts)\" \ | ||||
Shell \"Open a shell and partition by hand\"" | Shell \"Open a shell and partition by hand\"" | ||||
CURARCH=$( uname -m ) | CURARCH=$( uname -m ) | ||||
case $CURARCH in | case $CURARCH in | ||||
amd64|arm64|i386) # Booting ZFS Supported | amd64|arm64|i386) # Booting ZFS Supported | ||||
PMODES="$PMODES \"Auto (ZFS)\" \"Guided Root-on-ZFS\"" | PMODES="\"Auto (ZFS)\" \"Guided Root-on-ZFS\" $PMODES" | ||||
;; | ;; | ||||
*) # Booting ZFS Unspported | *) # Booting ZFS Unspported | ||||
;; | ;; | ||||
esac | esac | ||||
exec 3>&1 | exec 3>&1 | ||||
PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \ | PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \ | ||||
--title "Partitioning" \ | --title "Partitioning" \ | ||||
--menu "How would you like to partition your disk?" \ | --menu "How would you like to partition your disk?" \ | ||||
0 0 0 2>&1 1>&3` || exit 1 | 0 0 0 2>&1 1>&3` || exit 1 | ||||
exec 3>&- | exec 3>&- | ||||
case "$PARTMODE" in | case "$PARTMODE" in | ||||
"Auto (ZFS)") # ZFS | |||||
bsdinstall zfsboot || error "ZFS setup failed" | |||||
bsdinstall mount || error "Failed to mount filesystem" | |||||
;; | |||||
"Auto (UFS)") # Guided | "Auto (UFS)") # Guided | ||||
bsdinstall autopart || error "Partitioning error" | bsdinstall autopart || error "Partitioning error" | ||||
bsdinstall mount || error "Failed to mount filesystem" | bsdinstall mount || error "Failed to mount filesystem" | ||||
;; | ;; | ||||
"Shell") # Shell | "Shell") # Shell | ||||
clear | clear | ||||
echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'." | echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'." | ||||
sh 2>&1 | sh 2>&1 | ||||
;; | ;; | ||||
"Manual") # Manual | "Manual") # Manual | ||||
if f_isset debugFile; then | if f_isset debugFile; then | ||||
# Give partedit the path to our logfile so it can append | # Give partedit the path to our logfile so it can append | ||||
BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error "Partitioning error" | BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error "Partitioning error" | ||||
else | else | ||||
bsdinstall partedit || error "Partitioning error" | bsdinstall partedit || error "Partitioning error" | ||||
fi | fi | ||||
bsdinstall mount || error "Failed to mount filesystem" | |||||
;; | |||||
"Auto (ZFS)") # ZFS | |||||
bsdinstall zfsboot || error "ZFS setup failed" | |||||
bsdinstall mount || error "Failed to mount filesystem" | bsdinstall mount || error "Failed to mount filesystem" | ||||
;; | ;; | ||||
*) | *) | ||||
error "Unknown partitioning mode" | error "Unknown partitioning mode" | ||||
;; | ;; | ||||
esac | esac | ||||
if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then | if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then | ||||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |