Update
This commit is contained in:
parent
07af2cd556
commit
86c9388485
38
installer
38
installer
@ -330,7 +330,7 @@ _luksomenu="\nEnter a name and password for the encrypted device.\n\nIt is not n
|
|||||||
_lukskey="Once the specified flags have been amended, they will automatically be used with the 'cryptsetup -q luksFormat /dev/...' command.\n\nNOTE: Do not specify any additional flags such as -v (--verbose) or -y (--verify-passphrase)."
|
_lukskey="Once the specified flags have been amended, they will automatically be used with the 'cryptsetup -q luksFormat /dev/...' command.\n\nNOTE: Do not specify any additional flags such as -v (--verbose) or -y (--verify-passphrase)."
|
||||||
|
|
||||||
# LVM
|
# LVM
|
||||||
_lvmmenu="\nLogical volume management (LVM) allows 'virtual' hard drives (volume groups) and partitions (logical volumes) to be created from existing device partitions.\n\nA volume group must be created first, then one or more logical volumes within it.\n\nLVM can also be used with an encrypted partition to create multiple logical volumes (e.g. root and home) within it."
|
_lvmmenu="\nLogical volume management (LVM) allows 'virtual' drives (volume groups) and partitions (logical volumes)\nto be created from existing device partitions. A volume group must be created first, then one or more logical volumes within it.\n\nLVM can also be used with a LUKS partition to create multiple logical volumes (e.g. root and home) within it."
|
||||||
_lvmvgname="\nEnter a name for the volume group (VG) being created from the partition(s) selected."
|
_lvmvgname="\nEnter a name for the volume group (VG) being created from the partition(s) selected."
|
||||||
_lvmlvname="\nEnter a name for the logical volume (LV) being created.\n\nThis is similar to setting a label for a partition."
|
_lvmlvname="\nEnter a name for the logical volume (LV) being created.\n\nThis is similar to setting a label for a partition."
|
||||||
_lvmlvsize="\nEnter what size you want the logical volume (LV) to be in megabytes (M) or gigabytes (G).\n\ne.g. 100M will create a 100 megabyte volume, 10G will create a 10 gigabyte volume."
|
_lvmlvsize="\nEnter what size you want the logical volume (LV) to be in megabytes (M) or gigabytes (G).\n\ne.g. 100M will create a 100 megabyte volume, 10G will create a 10 gigabyte volume."
|
||||||
@ -340,11 +340,9 @@ _lvmdelask="\nConfirm deletion of volume group(s) and logical volume(s).\n\nDele
|
|||||||
_errexpart="\nCannot mount partition due to a problem with the mountpoint.\n\nEnsure it begins with a slash (/) followed by at least one character.\n"
|
_errexpart="\nCannot mount partition due to a problem with the mountpoint.\n\nEnsure it begins with a slash (/) followed by at least one character.\n"
|
||||||
_errpart="\nYou need to create partition(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\n"
|
_errpart="\nYou need to create partition(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\n"
|
||||||
_errchoice="\nIf you want to fix the issue yourself use Ctrl-z to pause the installer.\nFrom there you can do whatever is needed to resolve the error.\nOnce finished use the 'fg' command to resume the installer and select 'Continue'.\n"
|
_errchoice="\nIf you want to fix the issue yourself use Ctrl-z to pause the installer.\nFrom there you can do whatever is needed to resolve the error.\nOnce finished use the 'fg' command to resume the installer and select 'Continue'.\n"
|
||||||
_lukserr="\nA minimum of two partitions are required for encryption:\n\n 1. root (/) - standard or LVM.\n 2. boot (/boot) - standard (unless using LVM on BIOS systems).\n"
|
_errvolname="\nInvalid name entered.\n\nThe volume name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
||||||
_lvmerr="\nThere are no viable partitions available to use for LVM, a minimum of one is required.\n\nIf LVM is already in use, deactivating it will allow the partition(s) to be used again.\n"
|
_lukserr="\nA minimum of two partitions are required for LUKS encryption:\n\n 1. root (/) - standard or LVM.\n 2. boot (/boot) - standard (unless LVM on BIOS system).\n"
|
||||||
_lvmerrvgname="\nInvalid name entered.\n\nThe volume group name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
_lvmerr="\nThere are no available partitions to use for LVM, a minimum of one is required.\n\nIf LVM is already in use, deactivating it will allow the partition(s) to be used again.\n"
|
||||||
_btrfserrname="\nInvalid name entered.\n\nThe subvolume name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
|
||||||
_lvmerlvname="\nInvalid name entered.\n\nThe logical volume (LV) name may be alpha-numeric, but may not contain spaces or be preceded with a '/'\n"
|
|
||||||
_lvmerrlvsize="\nInvalid value Entered.\n\nMust be a numeric value with 'M' (megabytes) or 'G' (gigabytes) at the end.\n\ne.g. 400M, 10G, 250G, etc...\n\nThe value may also not be equal to or greater than the remaining size of the volume group.\n"
|
_lvmerrlvsize="\nInvalid value Entered.\n\nMust be a numeric value with 'M' (megabytes) or 'G' (gigabytes) at the end.\n\ne.g. 400M, 10G, 250G, etc...\n\nThe value may also not be equal to or greater than the remaining size of the volume group.\n"
|
||||||
|
|
||||||
# }
|
# }
|
||||||
@ -857,7 +855,7 @@ dev_menu()
|
|||||||
[[ $txt ]] && back="Return to mounting"
|
[[ $txt ]] && back="Return to mounting"
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
dlg DEVMNG_OPT menu "Device Management" "\nHere you can perform some basic operations to modify system storage devices.\n$txt" \
|
dlg DEVMNG_OPT menu "Device Management" "\nHere you can perform some operations to modify system storage devices.\nSelect an option from the list below to get started\n$txt" \
|
||||||
'view' 'View the device tree output from lsblk' \
|
'view' 'View the device tree output from lsblk' \
|
||||||
'part' 'Modify the partition layout of a device' \
|
'part' 'Modify the partition layout of a device' \
|
||||||
'luks' 'Setup LUKS encryption on a partition or LVM' \
|
'luks' 'Setup LUKS encryption on a partition or LVM' \
|
||||||
@ -903,7 +901,7 @@ part_menu()
|
|||||||
'gparted -') \
|
'gparted -') \
|
||||||
'fdisk' 'Dialog-driven creation and manipulation of partitions' \
|
'fdisk' 'Dialog-driven creation and manipulation of partitions' \
|
||||||
'gdisk' 'A text-mode partitioning tool that works on GUID Partition Table (GPT) disks' \
|
'gdisk' 'A text-mode partitioning tool that works on GUID Partition Table (GPT) disks' \
|
||||||
'back' 'Return to the device management menu'
|
'back' 'Return to the device management menu' || return 0
|
||||||
|
|
||||||
if [[ -z $choice || $choice == 'back' ]]; then
|
if [[ -z $choice || $choice == 'back' ]]; then
|
||||||
return 0
|
return 0
|
||||||
@ -1313,7 +1311,7 @@ select_boot()
|
|||||||
esac
|
esac
|
||||||
[[ $BOOT ]] || return 1
|
[[ $BOOT ]] || return 1
|
||||||
else
|
else
|
||||||
(( ptcount == 0 )) && return 0
|
(( ! ptcount )) && return 0
|
||||||
dlg BOOT menu "Boot Partition" "$_bios" "skip" "no separate boot" $pts
|
dlg BOOT menu "Boot Partition" "$_bios" "skip" "no separate boot" $pts
|
||||||
if [[ -z $BOOT || $BOOT == "skip" ]]; then
|
if [[ -z $BOOT || $BOOT == "skip" ]]; then
|
||||||
BOOT=''
|
BOOT=''
|
||||||
@ -1452,7 +1450,7 @@ select_extra()
|
|||||||
done <<< "$PARTS"
|
done <<< "$PARTS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( PART_COUNT == 0 )); then
|
if (( ! PART_COUNT )); then
|
||||||
msg "Mount Extra" "\nMounting Finished\n\nNo more partitions to mount, returning to main menu.\n" 2
|
msg "Mount Extra" "\nMounting Finished\n\nNo more partitions to mount, returning to main menu.\n" 2
|
||||||
else
|
else
|
||||||
while (( PART_COUNT )); do
|
while (( PART_COUNT )); do
|
||||||
@ -1633,7 +1631,7 @@ install_base()
|
|||||||
mkdir -pv "$MNT/etc/default"
|
mkdir -pv "$MNT/etc/default"
|
||||||
mkdir -pv "$MNT/etc/X11/xorg.conf.d/"
|
mkdir -pv "$MNT/etc/X11/xorg.conf.d/"
|
||||||
|
|
||||||
if [[ $PACSTRAP == 0 ]]; then
|
if (( ! PACSTRAP )); then
|
||||||
# remove archiso files when copying iso
|
# remove archiso files when copying iso
|
||||||
rm -rf "$MNT/etc/mkinitcpio-archiso.conf"
|
rm -rf "$MNT/etc/mkinitcpio-archiso.conf"
|
||||||
find "$MNT/usr/lib/initcpio" -name 'archiso*' -type f -delete
|
find "$MNT/usr/lib/initcpio" -name 'archiso*' -type f -delete
|
||||||
@ -2462,7 +2460,7 @@ btrfs_name()
|
|||||||
if [[ -z $SUBVOL ]]; then
|
if [[ -z $SUBVOL ]]; then
|
||||||
return 1
|
return 1
|
||||||
elif [[ $SUBVOL =~ \ |\' || $exists == *"$SUBVOL"* ]]; then
|
elif [[ $SUBVOL =~ \ |\' || $exists == *"$SUBVOL"* ]]; then
|
||||||
msg "Subvolume Name Error" "$_btrfserrname"
|
msg "Subvolume Name Error" "$_errvolname"
|
||||||
SUBVOL=''
|
SUBVOL=''
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -2537,10 +2535,10 @@ lvm_menu()
|
|||||||
'create' "Create a new volume group and volumes" \
|
'create' "Create a new volume group and volumes" \
|
||||||
'remove' "Delete an existing volume group" \
|
'remove' "Delete an existing volume group" \
|
||||||
'remove_all' "Delete ALL volume groups and volumes" \
|
'remove_all' "Delete ALL volume groups and volumes" \
|
||||||
"back" "Return to the device management menu"
|
"back" "Return to the device management menu"
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
'create') lvm_create && break ;;
|
'create') lvm_create && break ;;
|
||||||
'remove') lvm_delgroup && yesno "Remove Volume Group" "$_lvmdelask" && vgremove -f "$DEL_VG" > /dev/null 2>&1 ;;
|
'remove') lvm_del_one && yesno "Remove Volume Group" "$_lvmdelask" && vgremove -f "$DEL_VG" > /dev/null 2>&1 ;;
|
||||||
'remove_all') lvm_del_all ;;
|
'remove_all') lvm_del_all ;;
|
||||||
*) break ;;
|
*) break ;;
|
||||||
esac
|
esac
|
||||||
@ -2569,7 +2567,7 @@ lvm_create()
|
|||||||
|
|
||||||
local txt="\nThe last (or only) logical volume will automatically use all remaining space in the volume group."
|
local txt="\nThe last (or only) logical volume will automatically use all remaining space in the volume group."
|
||||||
dlg VOL_COUNT menu "Create Volume Group" "\nSelect the number of logical volumes (LVs) to create in: $VGROUP\n$txt" \
|
dlg VOL_COUNT menu "Create Volume Group" "\nSelect the number of logical volumes (LVs) to create in: $VGROUP\n$txt" \
|
||||||
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -
|
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -
|
||||||
[[ $VOL_COUNT ]] || return 1
|
[[ $VOL_COUNT ]] || return 1
|
||||||
lvm_extra_lvs || return 1
|
lvm_extra_lvs || return 1
|
||||||
|
|
||||||
@ -2595,7 +2593,7 @@ lvm_lv_size()
|
|||||||
if [[ -z $VOLUME_SIZE ]]; then
|
if [[ -z $VOLUME_SIZE ]]; then
|
||||||
ERR_SIZE=1
|
ERR_SIZE=1
|
||||||
break # allow bailing with escape or an empty choice
|
break # allow bailing with escape or an empty choice
|
||||||
elif (( ${VOLUME_SIZE:0:1} == 0 )); then
|
elif (( ! ${VOLUME_SIZE:0:1} )); then
|
||||||
ERR_SIZE=1 # size values can't begin with '0'
|
ERR_SIZE=1 # size values can't begin with '0'
|
||||||
else
|
else
|
||||||
# walk the string and make sure all but the last char are digits
|
# walk the string and make sure all but the last char are digits
|
||||||
@ -2685,7 +2683,7 @@ lvm_del_all()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
lvm_delgroup()
|
lvm_del_one()
|
||||||
{
|
{
|
||||||
DEL_VG=''
|
DEL_VG=''
|
||||||
VOL_GROUP_LIST=''
|
VOL_GROUP_LIST=''
|
||||||
@ -2732,7 +2730,7 @@ lvm_group_name()
|
|||||||
if [[ -z $VGROUP ]]; then
|
if [[ -z $VGROUP ]]; then
|
||||||
return 1
|
return 1
|
||||||
elif [[ ${VGROUP:0:1} == "/" || $VGROUP =~ \ |\' ]] || vgdisplay | grep -q "$VGROUP"; then
|
elif [[ ${VGROUP:0:1} == "/" || $VGROUP =~ \ |\' ]] || vgdisplay | grep -q "$VGROUP"; then
|
||||||
msg "LVM Name Error" "$_lvmerrvgname"
|
msg "LVM Name Error" "$_errvolname"
|
||||||
VGROUP=''
|
VGROUP=''
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -2748,7 +2746,7 @@ lvm_volume_name()
|
|||||||
if [[ -z $VNAME ]]; then
|
if [[ -z $VNAME ]]; then
|
||||||
return 1
|
return 1
|
||||||
elif [[ ${VNAME:0:1} == "/" || $VNAME =~ \ |\' ]] || lsblk | grep -q "$VNAME"; then
|
elif [[ ${VNAME:0:1} == "/" || $VNAME =~ \ |\' ]] || lsblk | grep -q "$VNAME"; then
|
||||||
msg "LVM Name Error" "$_lvmerlvname"
|
msg "LVM Name Error" "$_errvolname"
|
||||||
VNAME=''
|
VNAME=''
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -2904,7 +2902,7 @@ die()
|
|||||||
|
|
||||||
trap - INT
|
trap - INT
|
||||||
tput cnorm
|
tput cnorm
|
||||||
(( e == 0 )) && clear
|
(( ! e )) && clear
|
||||||
if [[ -d $MNT ]]; then
|
if [[ -d $MNT ]]; then
|
||||||
umount_dir "$MNT"
|
umount_dir "$MNT"
|
||||||
(( e == 127 )) && umount_dir /run/archiso/bootmnt && sleep 0.5 && reboot -f
|
(( e == 127 )) && umount_dir /run/archiso/bootmnt && sleep 0.5 && reboot -f
|
||||||
|
Reference in New Issue
Block a user