Lines Matching +full:p1 +full:- +full:retry +full:- +full:params
2 #-
3 # Copyright (c) 2013-2016 Allan Jude
4 # Copyright (c) 2013-2018 Devin Teske
42 # Default name of the boot-pool
54 : ${ZFSBOOT_POOL_CREATE_OPTIONS:=-O compression=on -O atime=off}
174 " # END-QUOTE
197 GELI_ATTACH='geli attach -j - -k "%s" "%s"'
198 GELI_ATTACH_NOKEY='geli attach -j - "%s"'
199 GELI_DETACH_F='geli detach -f "%s"'
200 GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"'
201 GELI_PASSWORD_GELIBOOT_INIT='geli init -bg -e %s -J - -l 256 -s 4096 "%s"'
202 GPART_ADD_ALIGN='gpart add %s -t %s "%s"'
203 GPART_ADD_ALIGN_INDEX='gpart add %s -i %s -t %s "%s"'
204 GPART_ADD_ALIGN_INDEX_WITH_SIZE='gpart add %s -i %s -t %s -s %s "%s"'
205 GPART_ADD_ALIGN_LABEL='gpart add %s -l %s -t %s "%s"'
206 GPART_ADD_ALIGN_LABEL_WITH_SIZE='gpart add %s -l %s -t %s -s %s "%s"'
207 GPART_BOOTCODE='gpart bootcode -b "%s" "%s"'
208 GPART_BOOTCODE_PART='gpart bootcode -b "%s" -p "%s" -i %s "%s"'
209 GPART_CREATE='gpart create -s %s "%s"'
210 GPART_DESTROY_F='gpart destroy -F "%s"'
211 GPART_SET_ACTIVE='gpart set -a active -i %s "%s"'
212 GPART_SET_LENOVOFIX='gpart set -a lenovofix "%s"'
213 GPART_SET_PMBR_ACTIVE='gpart set -a active "%s"'
216 LN_SF='ln -sf "%s" "%s"'
217 MKDIR_P='mkdir -p "%s"'
218 MOUNT_TYPE='mount -t %s "%s" "%s"'
219 NEWFS_ESP='newfs_msdos -F 32 -c 1 "%s"'
233 ZPOOL_EXPORT_F='zpool export -f "%s"'
235 ZPOOL_LABELCLEAR_F='zpool labelclear -f "%s"'
273 msg_mirror_desc="Mirror - n-Way Mirroring"
289 msg_please_enter_amount_of_swap_space="Please enter amount of swap space (SI-Unit suffixes\nrecomme…
297 msg_raid10_desc="RAID 1+0 - n x 2-Way Mirrors"
299 msg_raidz1_desc="RAID-Z1 - Single Redundant RAID"
301 msg_raidz2_desc="RAID-Z2 - Double Redundant RAID"
303 msg_raidz3_desc="RAID-Z3 - Triple Redundant RAID"
310 msg_stripe_desc="Stripe - No Redundancy"
334 # Display the dialog(1)-based application main menu.
351 { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } ||
359 '- $msg_rescan_devices' '*'
361 '- $msg_disk_info' '*'
381 " # END-QUOTE
389 # Obtain default-item from previously stored selection
394 --title \"\$title\" \
395 --backtitle \"\$btitle\" \
396 --hline \"\$hline\" \
397 --item-help \
398 --ok-label \"\$msg_select\" \
399 --cancel-label \"\$msg_cancel\" \
400 --default-item \"\$defaultitem\" \
401 --menu \"\$prompt\" \
403 ${USE_DIALOG:+--} $menu_list \
410 # Only update default-item on success
411 [ $retval -eq $DIALOG_OK ] && f_dialog_default_store "$menu_choice"
419 # action is to return error status unless the user explicitly (non-default)
431 local max_width=$(( $width - 3 - $plen ))
435 yes=ok no=cancel defaultno=default-no
436 extra_args="--wrap --left"
440 extra_args="--colors --cr-wrap"
453 if [ $line_width -gt $max_width ]; then
461 # Append the left-overs
473 --title "$title" \
474 --backtitle "$btitle" \
475 --hline "$hline" \
476 --$defaultno \
477 --$yes-label "$msg_yes" \
478 --$no-label "$msg_no" \
480 --yesno "$prompt" $height $width
502 " # END-QUOTE
533 md[0-9]*) f_mounted -b "/dev/$name" && continue ;;
544 [ $? -eq 0 ] && avail_disks="$avail_disks $disk"
570 # back-up to the previous menu.
580 --title \"\$title\" \
581 --backtitle \"\$btitle\" \
582 --hline \"\$vdev_hline\" \
583 --ok-label \"\$msg_ok\" \
584 --cancel-label \"\$msg_cancel\" \
585 --item-help \
586 --default-item \"\$ZFSBOOT_VDEV_TYPE\" \
587 --menu \"\$vdev_prompt\" \
616 if debug= f_device_find -1 \
639 # Short-circuit if we're running non-interactively
643 [ $ndisks -ge $want_disks ] && break # to success
669 # locals to map statuses onto up-to-date list of disks
671 debug= f_device_find -1 \
685 f_getvar _${disk}_status:-off onoff
695 --title \"\$DIALOG_TITLE\" \
696 --backtitle \"\$DIALOG_BACKTITLE\" \
697 --separate-output \
698 --hline \"\$disk_hline\" \
699 --ok-label \"\$msg_ok\" \
700 --cancel-label \"\$msg_back\" \
701 --checklist \"\$disk_prompt\" \
716 [ $(( $ndisks % 2 )) -ne 0 ]; then
729 [ $ndisks -ge $want_disks ] &&
806 # NOTE: `-F' required to destroy if partitions still exist.
810 zpool list -Ho name | while read z_name; do
811 f_eval_catch -d $funcname zpool "$ZPOOL_EXPORT_F" $z_name
814 geli status | tail -n +2 | while read g_name g_status g_component; do
815 f_eval_catch -d $funcname geli "$GELI_DETACH_F" $g_name
818 f_eval_catch -d $funcname gpart "$GPART_DESTROY_F" $disk
819 f_eval_catch -d $funcname graid "$GRAID_DELETE" $disk
820 f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" /dev/$disk
822 # Make doubly-sure backup GPT is destroyed
823 f_eval_catch -d $funcname gpart "$GPART_CREATE" gpt $disk
824 f_eval_catch -d $funcname gpart "$GPART_DESTROY_F" $disk
831 # If user has requested 4 K alignment, add these params to the
836 align_small="-a 4k"
837 align_big="-a 1m"
860 # 2. Add small freebsd-boot and/or efi partition
862 if [ "$ZFSBOOT_BOOT_TYPE" = "UEFI" -o \
865 f_eval_catch -k justaddedpart $funcname gpart \
871 # Note: This will always be p1
879 if [ $index -eq 0 ]; then
886 echo "${efibootpart}" >> ${TMPDIR:-"/tmp"}/bsdinstall-esps
890 if [ "$ZFSBOOT_BOOT_TYPE" = "BIOS" -o \
896 freebsd-boot 512k $disk || return $FAILURE
914 [ ${swapsize:-0} -gt 0 ] && targetpart=p5
918 [ ${swapsize:-0} -gt 0 ] && targetpart=p4
923 [ ${swapsize:-0} -gt 0 ] && targetpart=p4
927 [ ${swapsize:-0} -gt 0 ] && targetpart=p3
937 "$align_big" boot$index freebsd-zfs \
940 f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \
944 f_eval_catch -d $funcname geli \
951 # 3. Add freebsd-swap partition labeled `swap#'
953 if [ ${swapsize:-0} -gt 0 ]; then
956 "$align_big" swap$index freebsd-swap \
959 f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \
964 # 4. Add freebsd-zfs partition labeled `zfs#' for zroot
968 "$align_big" zfs$index freebsd-zfs $ZFSBOOT_POOL_SIZE $disk ||
972 "$align_big" zfs$index freebsd-zfs $disk ||
975 f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \
986 elif [ ${swapsize:-0} -eq 0 ]; then
988 elif [ "$ZFSBOOT_SWAP_ENCRYPTION" -a "$ZFSBOOT_SWAP_MIRROR" ]; then
1039 if [ $# -lt 1 ]; then
1092 # Destroy the pool in-case this is our second time 'round (case of
1093 # failure and installer presented ``Retry'' option to come back).
1099 f_eval_catch -d $funcname zpool "$ZPOOL_DESTROY" "$zroot_name"
1143 f_eval_catch -d $funcname umount "$UMOUNT" "$BSDINSTALL_CHROOT"
1150 [ $nvdevs -gt 1 ] && bootpool_vdevtype=mirror
1153 bootpool_options="-o altroot=$BSDINSTALL_CHROOT"
1155 bootpool_options="$bootpool_options -m \"/$bootpool_name\" -f"
1170 go-wrx "$bootpool/$zroot_key" ||
1181 # Load the AES-NI kernel module to accelerate encryption
1183 f_eval_catch -d $funcname kldload "$KLDLOAD" "aesni"
1201 AES-XTS "$bootpool/$zroot_key" \
1222 AES-XTS $disk$targetpart
1246 f_eval_catch -d $funcname umount "$UMOUNT" "$BSDINSTALL_CHROOT"
1252 if [ ${swapsize:-0} -gt 0 -a "$ZFSBOOT_SWAP_MIRROR" ]; then
1269 if [ $(( $nvdev % 3 )) -eq 0 ]; then
1275 "-o altroot=$BSDINSTALL_CHROOT $create_options -m none -f" \
1279 "-o altroot=$BSDINSTALL_CHROOT $create_options -m none -f" \
1301 # Replace both commas and spaces with ` -o '
1302 f_replaceall "$options" "[ ,]" " -o " options
1305 "${options:+-o $options}" "$zroot_name$dataset" ||
1404 # Configure geli(8)-based encryption
1432 # Set cachefile for boot pool so it auto-imports at system start
1491 --title "$DIALOG_TITLE" \
1492 --backtitle "$DIALOG_BACKTITLE" \
1493 --hline "$hline" \
1494 --ok-label "Ok" \
1495 --no-cancel \
1496 --inputbox "$prompt" \
1509 # User may have specifically requested ZFS-related operations be interactive
1532 case $(uname -m) in
1540 bootmethod=$( sysctl -n machdep.bootmethod )
1566 [ $retval -eq $DIALOG_OK ] || f_die
1583 # NB: dialog_menu_layout supports running non-interactively
1599 debug= f_device_find -1 \
1602 [ ${disksize:-0} -ge 0 ] || disksize=0
1603 [ $disksize -lt $minsize ] &&
1641 echo "$ZFSBOOT_DISKS" > ${TMPDIR:-"/tmp"}/bsdinstall-zfsboot
1651 "- $msg_rescan_devices") f_device_rescan ;;
1652 "- $msg_disk_info") dialog_menu_diskinfo ;;
1679 if [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" -a \
1684 elif [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" -a \
1706 ZFSBOOT_SWAP_SIZE="${input:-0}"
1709 if [ $swapsize -ne 0 -a $swapsize -lt 104857600 ]; then