mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
replace ="1" with =1
This commit is contained in:
parent
f5bcdd262e
commit
e0c5e8c37a
10 changed files with 62 additions and 62 deletions
|
@ -158,7 +158,7 @@ _auto_mkinitcpio() {
|
|||
# remove fallback initramfs
|
||||
[[ -e "${_DESTDIR}/boot/initramfs-linux-fallback.img" ]] && rm -f "${_DESTDIR}/boot/initramfs-linux-fallback.img"
|
||||
sleep 2
|
||||
_AUTO_MKINITCPIO="1"
|
||||
_AUTO_MKINITCPIO=1
|
||||
run_mkinitcpio
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ _autoprepare() {
|
|||
fi
|
||||
if [[ "${_UEFISYS_MP}" == "/boot" ]]; then
|
||||
_dialog --msgbox "You have chosen to use /boot as the UEFISYS Mountpoint. The minimum partition size is 260 MiB and only FAT32 FS is supported." 0 0
|
||||
_UEFISYS_BOOTPART="1"
|
||||
_UEFISYS_BOOTPART=1
|
||||
fi
|
||||
while [[ "${_DEFAULTFS}" == "" ]]; do
|
||||
_FSOPTS=""
|
||||
|
@ -66,7 +66,7 @@ _autoprepare() {
|
|||
if [[ "${_GUIDPARAMETER}" == 1 ]]; then
|
||||
_GUID_PART_SIZE="2"
|
||||
_GPT_BIOS_GRUB_PART_SIZE="${_GUID_PART_SIZE}"
|
||||
_PART_NUM="1"
|
||||
_PART_NUM=1
|
||||
_GPT_BIOS_GRUB_PART_NUM="${_PART_NUM}"
|
||||
_DISK_SIZE="$((_DISK_SIZE-_GUID_PART_SIZE))"
|
||||
fi
|
||||
|
@ -133,7 +133,7 @@ _autoprepare() {
|
|||
_dialog --msgbox "ERROR: You have entered an invalid size, please enter again." 0 0
|
||||
else
|
||||
_BOOT_PART_SET=1
|
||||
_PART_NUM="1"
|
||||
_PART_NUM=1
|
||||
_BOOT_PART_NUM="${_PART_NUM}"
|
||||
_DISK_SIZE="$((_DISK_SIZE-_BOOT_PART_SIZE))"
|
||||
fi
|
||||
|
|
|
@ -75,17 +75,17 @@ _set_uefi_parameters() {
|
|||
_UEFI_BOOT=""
|
||||
_UEFI_SECURE_BOOT=""
|
||||
_GUIDPARAMETER=""
|
||||
[[ -e "/sys/firmware/efi" ]] && _UEFI_BOOT="1"
|
||||
[[ -e "/sys/firmware/efi" ]] && _UEFI_BOOT=1
|
||||
if [[ -n "${_UEFI_BOOT}" ]]; then
|
||||
_GUIDPARAMETER="1"
|
||||
_GUIDPARAMETER=1
|
||||
_SECUREBOOT_VAR_VALUE="$(efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot 2>/dev/null | tail -n -1 | awk '{print $2}')"
|
||||
_SETUPMODE_VAR_VALUE="$(efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SetupMode 2>/dev/null | tail -n -1 | awk '{print $2}')"
|
||||
if [[ "${_SECUREBOOT_VAR_VALUE}" == "01" ]] && [[ "${_SETUPMODE_VAR_VALUE}" == "00" ]]; then
|
||||
_UEFI_SECURE_BOOT="1"
|
||||
_UEFI_SECURE_BOOT=1
|
||||
fi
|
||||
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||
if grep -q '_IA32_UEFI=1' /proc/cmdline 1>/dev/null; then
|
||||
_EFI_MIXED="1"
|
||||
_EFI_MIXED=1
|
||||
_UEFI_ARCH="IA32"
|
||||
_SPEC_UEFI_ARCH="ia32"
|
||||
else
|
||||
|
@ -109,15 +109,15 @@ _set_guid() {
|
|||
## Lenovo BIOS-GPT issues - Arch Forum - https://bbs.archlinux.org/viewtopic.php?id=131149 , https://bbs.archlinux.org/viewtopic.php?id=133330 , https://bbs.archlinux.org/viewtopic.php?id=138958
|
||||
## Lenovo BIOS-GPT issues - in Fedora - https://bugzilla.redhat.com/show_bug.cgi?id=735733, https://bugzilla.redhat.com/show_bug.cgi?id=749325 , http://git.fedorahosted.org/git/?p=anaconda.git;a=commit;h=ae74cebff312327ce2d9b5ac3be5dbe22e791f09
|
||||
#shellcheck disable=SC2034
|
||||
_dialog --yesno "You are running in BIOS/MBR mode.\n\nDo you want to use GUID Partition Table (GPT)?\n\nIt is a standard for the layout of the partition table on a physical storage disk. Although it forms a part of the Unified Extensible Firmware Interface (UEFI) standard, it is also used on some BIOS systems because of the limitations of MBR aka msdos partition tables, which restrict maximum disk size to 2 TiB.\n\nWindows 10 and later versions include the capability to use GPT for non-boot aka data disks (only UEFI systems can boot Windows 10 and later from GPT disks).\n\nAttention:\n- Please check if your other operating systems have GPT support!\n- Use this option for a GRUB(2) setup, which should support LVM, RAID\n etc., which doesn't fit into the usual 30k MS-DOS post-MBR gap.\n- BIOS-GPT boot may not work in some Lenovo systems (irrespective of the\n bootloader used). " 0 0 && _GUIDPARAMETER="1"
|
||||
_dialog --yesno "You are running in BIOS/MBR mode.\n\nDo you want to use GUID Partition Table (GPT)?\n\nIt is a standard for the layout of the partition table on a physical storage disk. Although it forms a part of the Unified Extensible Firmware Interface (UEFI) standard, it is also used on some BIOS systems because of the limitations of MBR aka msdos partition tables, which restrict maximum disk size to 2 TiB.\n\nWindows 10 and later versions include the capability to use GPT for non-boot aka data disks (only UEFI systems can boot Windows 10 and later from GPT disks).\n\nAttention:\n- Please check if your other operating systems have GPT support!\n- Use this option for a GRUB(2) setup, which should support LVM, RAID\n etc., which doesn't fit into the usual 30k MS-DOS post-MBR gap.\n- BIOS-GPT boot may not work in some Lenovo systems (irrespective of the\n bootloader used). " 0 0 && _GUIDPARAMETER=1
|
||||
fi
|
||||
}
|
||||
|
||||
_set_vconsole() {
|
||||
if [[ -e /usr/bin/km ]]; then
|
||||
km --setup && _NEXTITEM="1"
|
||||
km --setup && _NEXTITEM=1
|
||||
elif [[ -e /usr/bin/archboot-km.sh ]]; then
|
||||
archboot-km.sh --setup && _NEXTITEM="1"
|
||||
archboot-km.sh --setup && _NEXTITEM=1
|
||||
else
|
||||
_dialog --msgbox "Error:\nkm script not found, aborting console and keyboard setting." 0 0
|
||||
fi
|
||||
|
@ -166,7 +166,7 @@ _prepare_storagedrive() {
|
|||
"2" "Partition Storage Drives" \
|
||||
"3" "Manage Software Raid, Lvm2 and Luks encryption" \
|
||||
"4" "Set Filesystem Mountpoints" \
|
||||
"5" "Return to Main Menu" 2>${_ANSWER} || _CANCEL="1"
|
||||
"5" "Return to Main Menu" 2>${_ANSWER} || _CANCEL=1
|
||||
_NEXTITEM="$(cat ${_ANSWER})"
|
||||
[[ "${_S_MKFSAUTO}" = "1" ]] && _DONE=1
|
||||
case $(cat ${_ANSWER}) in
|
||||
|
@ -180,7 +180,7 @@ _prepare_storagedrive() {
|
|||
_create_special ;;
|
||||
"4")
|
||||
_PARTFINISH=""
|
||||
_ASK_MOUNTPOINTS="1"
|
||||
_ASK_MOUNTPOINTS=1
|
||||
_mountpoints ;;
|
||||
*)
|
||||
_DONE=1 ;;
|
||||
|
|
|
@ -281,7 +281,7 @@ _activate_luks()
|
|||
# skip already encrypted devices, device mapper!
|
||||
if ! ${_LSBLK} TYPE "${part}" | grep -q "crypt$"; then
|
||||
_RUN_LUKS=""
|
||||
_dialog --yesno "Setup detected luks encrypted device, do you want to activate ${part} ?" 0 0 && _RUN_LUKS="1"
|
||||
_dialog --yesno "Setup detected luks encrypted device, do you want to activate ${part} ?" 0 0 && _RUN_LUKS=1
|
||||
[[ "${_RUN_LUKS}" == 1 ]] && _enter_luks_name && _enter_luks_passphrase && _opening_luks
|
||||
[[ "${_RUN_LUKS}" == "" ]] && _ACTIVATE_LUKS="no"
|
||||
else
|
||||
|
@ -326,7 +326,7 @@ _set_device_name_scheme() {
|
|||
#shellcheck disable=SC2086
|
||||
_dialog --menu "Select the device name scheme you want to use in config files. ${_MENU_DESC_TEXT} FSUUID is recommended." 15 70 9 ${_NAME_SCHEME_LEVELS} 2>"${_ANSWER}" || return 1
|
||||
_NAME_SCHEME_PARAMETER=$(cat "${_ANSWER}")
|
||||
_NAME_SCHEME_PARAMETER_RUN="1"
|
||||
_NAME_SCHEME_PARAMETER_RUN=1
|
||||
}
|
||||
|
||||
# Get a list of available disks for use in the "Available disks" dialogs.
|
||||
|
@ -370,7 +370,7 @@ _stopmd()
|
|||
{
|
||||
if grep -q ^md /proc/mdstat 2>/dev/null; then
|
||||
_DISABLEMD=""
|
||||
_dialog --defaultno --yesno "Setup detected already running raid devices, do you want to disable them completely?" 0 0 && _DISABLEMD="1"
|
||||
_dialog --defaultno --yesno "Setup detected already running raid devices, do you want to disable them completely?" 0 0 && _DISABLEMD=1
|
||||
if [[ "${_DISABLEMD}" == 1 ]]; then
|
||||
_umountall
|
||||
_dialog --infobox "Disabling all software raid devices..." 0 0
|
||||
|
@ -391,7 +391,7 @@ _stopmd()
|
|||
fi
|
||||
_DISABLEMDSB=""
|
||||
if ${_LSBLK} FSTYPE | grep -q "linux_raid_member"; then
|
||||
_dialog --defaultno --yesno "Setup detected superblock of raid devices, do you want to clean the superblock of them?" 0 0 && _DISABLEMDSB="1"
|
||||
_dialog --defaultno --yesno "Setup detected superblock of raid devices, do you want to clean the superblock of them?" 0 0 && _DISABLEMDSB=1
|
||||
if [[ "${_DISABLEMDSB}" == 1 ]]; then
|
||||
_umountall
|
||||
_dialog --infobox "Cleaning superblocks of all software raid devices..." 0 0
|
||||
|
@ -417,7 +417,7 @@ _stoplvm()
|
|||
! [[ "${_LV_GROUPS}" == "" ]] && _DETECTED_LVM=1
|
||||
! [[ "${_LV_PHYSICAL}" == "" ]] && _DETECTED_LVM=1
|
||||
if [[ "${_DETECTED_LVM}" == 1 ]]; then
|
||||
_dialog --defaultno --yesno "Setup detected lvm volumes, volume groups or physical devices, do you want to remove them completely?" 0 0 && _DISABLELVM="1"
|
||||
_dialog --defaultno --yesno "Setup detected lvm volumes, volume groups or physical devices, do you want to remove them completely?" 0 0 && _DISABLELVM=1
|
||||
fi
|
||||
if [[ "${_DISABLELVM}" == 1 ]]; then
|
||||
_umountall
|
||||
|
@ -446,7 +446,7 @@ _stopluks()
|
|||
_LUKSDEVICE="$(${_LSBLK} NAME,TYPE | grep " crypt$" | cut -d' ' -f1)"
|
||||
[[ "${_LUKSDEVICE}" == "" ]] || _DETECTED_LUKS=1
|
||||
if [[ "${_DETECTED_LUKS}" == 1 ]]; then
|
||||
_dialog --defaultno --yesno "Setup detected running luks encrypted devices, do you want to remove them completely?" 0 0 && _DISABLELUKS="1"
|
||||
_dialog --defaultno --yesno "Setup detected running luks encrypted devices, do you want to remove them completely?" 0 0 && _DISABLELUKS=1
|
||||
fi
|
||||
if [[ "${_DISABLELUKS}" == 1 ]]; then
|
||||
_umountall
|
||||
|
@ -463,7 +463,7 @@ _stopluks()
|
|||
# detect not running luks devices
|
||||
${_LSBLK} FSTYPE | grep -q "crypto_LUKS" && _DETECTED_LUKS=1
|
||||
if [[ "${_DETECTED_LUKS}" == 1 ]]; then
|
||||
_dialog --defaultno --yesno "Setup detected not running luks encrypted devices, do you want to remove them completely?" 0 0 && _DISABLELUKS="1"
|
||||
_dialog --defaultno --yesno "Setup detected not running luks encrypted devices, do you want to remove them completely?" 0 0 && _DISABLELUKS=1
|
||||
fi
|
||||
if [[ "${_DISABLELUKS}" == 1 ]]; then
|
||||
_dialog --infobox "Removing not running luks encrypted devices ..." 0 0
|
||||
|
@ -482,7 +482,7 @@ _dmraid_update()
|
|||
_dialog --infobox "Deactivating dmraid devices ..." 0 0
|
||||
dmraid -an >/dev/null 2>&1
|
||||
if [[ "${_DETECTED_LVM}" == 1 || "${_DETECTED_LUKS}" == 1 ]]; then
|
||||
_dialog --defaultno --yesno "Setup detected running dmraid devices and/or running lvm2, luks encrypted devices. If you reduced/deleted partitions on your dmraid device a complete reset of devicemapper devices is needed. This will reset also your created lvm2 or encrypted devices. Are you sure you want to do this?" 0 0 && _RESETDM="1"
|
||||
_dialog --defaultno --yesno "Setup detected running dmraid devices and/or running lvm2, luks encrypted devices. If you reduced/deleted partitions on your dmraid device a complete reset of devicemapper devices is needed. This will reset also your created lvm2 or encrypted devices. Are you sure you want to do this?" 0 0 && _RESETDM=1
|
||||
if [[ "${_RESETDM}" == 1 ]]; then
|
||||
_dialog --infobox "Resetting devicemapper devices ..." 0 0
|
||||
dmsetup remove_all >/dev/null 2>&1
|
||||
|
@ -613,7 +613,7 @@ _raid()
|
|||
_dialog --menu "Select additional device ${_RAIDNUMBER}:" 21 50 13 ${_PARTS} ${_MDEXTRA} DONE _ 2>"${_ANSWER}" || return 1
|
||||
_PART=$(cat "${_ANSWER}")
|
||||
_SPARE=""
|
||||
! [[ "${_LEVEL}" == "raid0" || "${_LEVEL}" == "linear" ]] && _dialog --yesno --defaultno "Would you like to use ${_PART} as spare device?" 0 0 && _SPARE="1"
|
||||
! [[ "${_LEVEL}" == "raid0" || "${_LEVEL}" == "linear" ]] && _dialog --yesno --defaultno "Would you like to use ${_PART} as spare device?" 0 0 && _SPARE=1
|
||||
[[ "${_PART}" == "DONE" ]] && break
|
||||
if [[ "${_PART}" == "MISSING" ]]; then
|
||||
_dialog --yesno "Would you like to create a degraded raid on ${_RAIDDEVICE}?" 0 0 && _DEGRADED="missing"
|
||||
|
@ -666,7 +666,7 @@ _createraid()
|
|||
cfdisk "${_RAIDDEVICE}"
|
||||
else
|
||||
_DISK="${_RAIDDEVICE}"
|
||||
_RUN_CFDISK="1"
|
||||
_RUN_CFDISK=1
|
||||
_CHECK_BIOS_BOOT_GRUB=""
|
||||
_CHECK_UEFISYS_PART=""
|
||||
_check_gpt
|
||||
|
@ -898,7 +898,7 @@ _createlv()
|
|||
_dialog --inputbox "Enter the size (MB) of your Logical Volume,\nMinimum value is > 0.\n\nVolume space left: $(vgs -o vg_free --noheading --units m "${_LV}")B\n\nIf you enter no value, all free space left will be used." 10 65 "" 2>"${_ANSWER}" || return 1
|
||||
_LV_SIZE=$(cat "${_ANSWER}")
|
||||
if [[ -z "${_LV_SIZE}" ]]; then
|
||||
_dialog --yesno "Would you like to create Logical Volume with no free space left?" 0 0 && _LV_ALL="1"
|
||||
_dialog --yesno "Would you like to create Logical Volume with no free space left?" 0 0 && _LV_ALL=1
|
||||
if ! [[ "${_LV_ALL}" == 1 ]]; then
|
||||
_LV_SIZE=0
|
||||
fi
|
||||
|
@ -915,7 +915,7 @@ _createlv()
|
|||
done
|
||||
#Contiguous doesn't work with +100%FREE
|
||||
_LV_CONTIGUOUS=""
|
||||
[[ -z "${_LV_ALL}" ]] && _dialog --defaultno --yesno "Would you like to create Logical Volume as a contiguous partition, that means that your space doesn't get partitioned over one or more disks nor over non-contiguous physical extents.\n(usefull for swap space etc.)?" 0 0 && _LV_CONTIGUOUS="1"
|
||||
[[ -z "${_LV_ALL}" ]] && _dialog --defaultno --yesno "Would you like to create Logical Volume as a contiguous partition, that means that your space doesn't get partitioned over one or more disks nor over non-contiguous physical extents.\n(usefull for swap space etc.)?" 0 0 && _LV_CONTIGUOUS=1
|
||||
if [[ "${_LV_CONTIGUOUS}" == 1 ]]; then
|
||||
_CONTIGUOUS=yes
|
||||
_LV_EXTRA="-C y"
|
||||
|
|
|
@ -249,7 +249,7 @@ _do_mok_sign () {
|
|||
_UEFI_BOOTLOADER_DIR="${_UEFISYS_MP}/EFI/BOOT"
|
||||
_INSTALL_MOK=""
|
||||
_MOK_PW=""
|
||||
_dialog --yesno "Do you want to install the MOK certificate to the UEFI keys?" 5 65 && _INSTALL_MOK="1"
|
||||
_dialog --yesno "Do you want to install the MOK certificate to the UEFI keys?" 5 65 && _INSTALL_MOK=1
|
||||
if [[ -n "${_INSTALL_MOK}" ]]; then
|
||||
while [[ -z "${_MOK_PW}" ]]; do
|
||||
_dialog --insecure --passwordbox "Enter a one time MOK password for SHIM on reboot:" 8 65 2>"${_ANSWER}" || return 1
|
||||
|
@ -271,7 +271,7 @@ _do_mok_sign () {
|
|||
sleep 5
|
||||
fi
|
||||
_SIGN_MOK=""
|
||||
_dialog --yesno "Do you want to sign with the MOK certificate?\n\n/boot/${_VMLINUZ} and ${_UEFI_BOOTLOADER_DIR}/grub${_SPEC_UEFI_ARCH}.efi" 7 55 && _SIGN_MOK="1"
|
||||
_dialog --yesno "Do you want to sign with the MOK certificate?\n\n/boot/${_VMLINUZ} and ${_UEFI_BOOTLOADER_DIR}/grub${_SPEC_UEFI_ARCH}.efi" 7 55 && _SIGN_MOK=1
|
||||
if [[ -n "${_SIGN_MOK}" ]]; then
|
||||
if [[ "${_DESTDIR}" == "/install" ]]; then
|
||||
systemd-nspawn -q -D "${_DESTDIR}" sbsign --key /"${_KEYDIR}"/MOK/MOK.key --cert /"${_KEYDIR}"/MOK/MOK.crt --output /boot/"${_VMLINUZ}" /boot/"${_VMLINUZ}" > "${_LOG}" 2>&1
|
||||
|
@ -287,7 +287,7 @@ _do_mok_sign () {
|
|||
|
||||
_do_pacman_sign() {
|
||||
_SIGN_KERNEL=""
|
||||
_dialog --yesno "Do you want to install a pacman hook\nfor automatic signing /boot/${_VMLINUZ} on updates?" 6 60 && _SIGN_KERNEL="1"
|
||||
_dialog --yesno "Do you want to install a pacman hook\nfor automatic signing /boot/${_VMLINUZ} on updates?" 6 60 && _SIGN_KERNEL=1
|
||||
if [[ -n "${_SIGN_KERNEL}" ]]; then
|
||||
[[ ! -d "${_DESTDIR}/etc/pacman.d/hooks" ]] && mkdir -p "${_DESTDIR}"/etc/pacman.d/hooks/
|
||||
_HOOKNAME="${_DESTDIR}/etc/pacman.d/hooks/999-sign_kernel_for_secureboot.hook"
|
||||
|
@ -457,7 +457,7 @@ GUMEOF
|
|||
"${_EDITOR}" "${_DESTDIR}/${_UEFISYS_MP}/loader/loader.conf"
|
||||
_dialog --infobox "SYSTEMD-BOOT has been setup successfully.\nContinuing in 5 seconds ..." 4 50
|
||||
sleep 5
|
||||
_S_BOOTLOADER="1"
|
||||
_S_BOOTLOADER=1
|
||||
else
|
||||
_dialog --msgbox "Error installing SYSTEMD-BOOT ..." 0 0
|
||||
fi
|
||||
|
@ -507,7 +507,7 @@ CONFEOF
|
|||
cp -f "${_REFIND_CONFIG}" "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/"
|
||||
_dialog --infobox "rEFInd has been setup successfully.\nContinuing in 5 seconds ..." 4 50
|
||||
sleep 5
|
||||
_S_BOOTLOADER="1"
|
||||
_S_BOOTLOADER=1
|
||||
else
|
||||
_dialog --msgbox "Error setting up rEFInd." 3 40
|
||||
fi
|
||||
|
@ -524,7 +524,7 @@ _do_grub_common_before() {
|
|||
_common_bootloader_checks
|
||||
_abort_f2fs_bootpart || return 1
|
||||
if ! dmraid -r | grep -q ^no; then
|
||||
_dialog --yesno "Setup detected dmraid device.\nDo you want to install grub on this device?" 6 50 && _USE_DMRAID="1"
|
||||
_dialog --yesno "Setup detected dmraid device.\nDo you want to install grub on this device?" 6 50 && _USE_DMRAID=1
|
||||
fi
|
||||
if [[ ! -d "${_DESTDIR}/usr/lib/grub" ]]; then
|
||||
_dialog --infobox "Installing grub ..." 0 0
|
||||
|
@ -600,7 +600,7 @@ insmod search_fs_uuid
|
|||
insmod search_label
|
||||
insmod linux
|
||||
insmod chain
|
||||
set pager="1"
|
||||
set pager=1
|
||||
# set debug="all"
|
||||
set locale_dir="\${prefix}/locale"
|
||||
EOF
|
||||
|
@ -758,7 +758,7 @@ label linux
|
|||
EOF
|
||||
_dialog --infobox "UBOOT has been installed successfully.\n\nContinuing in 5 seconds ..." 5 55
|
||||
sleep 5
|
||||
_S_BOOTLOADER="1"
|
||||
_S_BOOTLOADER=1
|
||||
}
|
||||
|
||||
_do_grub_bios() {
|
||||
|
@ -771,7 +771,7 @@ _do_grub_bios() {
|
|||
_FAIL_COMPLEX=""
|
||||
if cryptsetup status "${_BOOTDEV}"; then
|
||||
# encryption devices are not supported
|
||||
_FAIL_COMPLEX="1"
|
||||
_FAIL_COMPLEX=1
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${_FAIL_COMPLEX}" ]]; then
|
||||
|
@ -785,7 +785,7 @@ _do_grub_bios() {
|
|||
if echo /dev/mapper/"${_DETECTEDVOLUMEGROUP}"-* | grep "${_BOOTDEV}"; then
|
||||
# change _BOOTDEV to md device!
|
||||
_BOOTDEV=$(pvs -o pv_name --noheading "${devpath}")
|
||||
_RAID_ON_LVM="1"
|
||||
_RAID_ON_LVM=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
@ -794,7 +794,7 @@ _do_grub_bios() {
|
|||
#check if raid is used
|
||||
_USE_RAID=""
|
||||
if echo "${_BOOTDEV}" | grep -q /dev/md; then
|
||||
_USE_RAID="1"
|
||||
_USE_RAID=1
|
||||
fi
|
||||
fi
|
||||
# A switch is needed if complex ${_BOOTDEV} is used!
|
||||
|
@ -809,7 +809,7 @@ _do_grub_bios() {
|
|||
_dialog --menu "Select the boot device where the GRUB(2) bootloader will be installed." 14 55 7 ${_DEVS} 2>"${_ANSWER}" || return 1
|
||||
_BOOTDEV=$(cat "${_ANSWER}")
|
||||
if [[ "$(${_BLKID} -p -i -o value -s PTTYPE "${_BOOTDEV}")" == "gpt" ]]; then
|
||||
_CHECK_BIOS_BOOT_GRUB="1"
|
||||
_CHECK_BIOS_BOOT_GRUB=1
|
||||
_CHECK_UEFISYS_PART=""
|
||||
_RUN_CFDISK=""
|
||||
_DISK="${_BOOTDEV}"
|
||||
|
@ -842,7 +842,7 @@ _do_grub_bios() {
|
|||
_do_grub_config
|
||||
_dialog --infobox "GRUB(2) BIOS has been installed successfully.\n\nContinuing in 5 seconds ..." 5 55
|
||||
sleep 5
|
||||
_S_BOOTLOADER="1"
|
||||
_S_BOOTLOADER=1
|
||||
else
|
||||
_dialog --msgbox "Error installing GRUB(2) BIOS.\nCheck /tmp/grub_bios_install.log for more info.\n\nYou probably need to install it manually by chrooting into ${_DESTDIR}.\nDon't forget to bind mount /dev and /proc into ${_DESTDIR} before chrooting." 0 0
|
||||
return 1
|
||||
|
@ -878,7 +878,7 @@ _do_grub_uefi() {
|
|||
_GRUB_PREFIX_DIR="/boot/grub/"
|
||||
fi
|
||||
_chroot_umount
|
||||
_GRUB_UEFI="1"
|
||||
_GRUB_UEFI=1
|
||||
_do_grub_config
|
||||
_GRUB_UEFI=""
|
||||
if [[ -n "${_UEFI_SECURE_BOOT}" ]]; then
|
||||
|
@ -911,7 +911,7 @@ _do_grub_uefi() {
|
|||
cp -f "${_DESTDIR}/${_UEFISYS_MP}/EFI/grub/grub${_SPEC_UEFI_ARCH}.efi" "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/BOOT${_UEFI_ARCH}.EFI"
|
||||
_dialog --infobox "GRUB(2) for ${_UEFI_ARCH} UEFI has been installed successfully.\n\nContinuing in 5 seconds ..." 5 60
|
||||
sleep 5
|
||||
_S_BOOTLOADER="1"
|
||||
_S_BOOTLOADER=1
|
||||
elif [[ -e "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/grub${_SPEC_UEFI_ARCH}.efi" && -n "${_UEFI_SECURE_BOOT}" ]]; then
|
||||
_do_secureboot_keys || return 1
|
||||
_do_mok_sign
|
||||
|
@ -922,7 +922,7 @@ _do_grub_uefi() {
|
|||
_do_uefi_bootmgr_setup
|
||||
_dialog --infobox "SHIM and GRUB(2) Secure Boot for ${_UEFI_ARCH} UEFI\nhas been installed successfully.\n\nContinuing in 5 seconds ..." 6 50
|
||||
sleep 5
|
||||
_S_BOOTLOADER="1"
|
||||
_S_BOOTLOADER=1
|
||||
else
|
||||
_dialog --msgbox "Error installing GRUB(2) for ${_UEFI_ARCH} UEFI.\nCheck /tmp/grub_uefi_${_UEFI_ARCH}_install.log for more info.\n\nYou probably need to install it manually by chrooting into ${_DESTDIR}.\nDon't forget to bind mount /dev, /sys and /proc into ${_DESTDIR} before chrooting." 0 0
|
||||
return 1
|
||||
|
|
|
@ -46,7 +46,7 @@ _set_locale() {
|
|||
fi
|
||||
sed -i -e "s#LANG=.*#LANG=${_SET_LOCALE}#g" "${_DESTDIR}"/etc/locale.conf
|
||||
_dialog --infobox "Setting locale LANG=${_SET_LOCALE} on installed system ..." 3 70
|
||||
_SET_LOCALE="1"
|
||||
_SET_LOCALE=1
|
||||
sleep 2
|
||||
_auto_set_locale
|
||||
_run_locale_gen
|
||||
|
|
|
@ -61,9 +61,9 @@ _do_wireless() {
|
|||
_dialog --infobox "Connection to SSID='${_WLAN_SSID}' with interface ${_INTERFACE} ..." 3 70
|
||||
_printk off
|
||||
if [[ -z "${_WLAN_KEY}" ]]; then
|
||||
iwctl station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" > /dev/null 2>&1 && _WLAN_AUTH="1"
|
||||
iwctl station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" > /dev/null 2>&1 && _WLAN_AUTH=1
|
||||
else
|
||||
iwctl --passphrase="${_WLAN_KEY}" station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" > /dev/null 2>&1 && _WLAN_AUTH="1"
|
||||
iwctl --passphrase="${_WLAN_KEY}" station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" > /dev/null 2>&1 && _WLAN_AUTH=1
|
||||
fi
|
||||
if [[ -n "${_WLAN_AUTH}" ]]; then
|
||||
_dialog --infobox "Authentification successfull. Continuing in 3 seconds ..." 3 70
|
||||
|
@ -140,7 +140,7 @@ _donetwork() {
|
|||
_dialog --yesno "Are these settings correct?\n\nInterface: ${_INTERFACE}\nConnection: ${_CONNECTION}\nNetwork profile: ${_NETWORK_PROFILE}\nSSID: ${_WLAN_SSID}\nHidden: ${_WLAN_HIDDEN}\nKey: ${_WLAN_KEY}\ndhcp or static: ${_IP}\nIP address: ${_IPADDR}\nGateway: ${_GW}\nDNS server: ${_DNS}\nProxy setting: ${_PROXY}" 0 0
|
||||
case $? in
|
||||
1) ;;
|
||||
0) _NETPARAMETERS="1" ;;
|
||||
0) _NETPARAMETERS=1 ;;
|
||||
esac
|
||||
done
|
||||
# write systemd-networkd profile
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_getsource() {
|
||||
_S_SRC=0
|
||||
_S_SRC=""
|
||||
_PACMAN_CONF=""
|
||||
if [[ -e "${_LOCAL_DB}" ]]; then
|
||||
_NEXTITEM="4"
|
||||
|
@ -97,7 +97,7 @@ _update_environment() {
|
|||
_dialog --infobox "No new kernel online available. Continuing in 3 seconds ..." 3 70
|
||||
sleep 3
|
||||
else
|
||||
_dialog --defaultno --yesno "New online kernel version ${_ONLINE_KERNEL} available.\n\nDo you want to update the archboot environment to latest packages with caching packages for installation?\n\nATTENTION:\nThis will reboot the system using kexec!" 0 0 && _UPDATE_ENVIRONMENT="1"
|
||||
_dialog --defaultno --yesno "New online kernel version ${_ONLINE_KERNEL} available.\n\nDo you want to update the archboot environment to latest packages with caching packages for installation?\n\nATTENTION:\nThis will reboot the system using kexec!" 0 0 && _UPDATE_ENVIRONMENT=1
|
||||
if [[ "${_UPDATE_ENVIRONMENT}" == 1 ]]; then
|
||||
_dialog --infobox "Now setting up new archboot environment and dowloading latest packages.\n\nRunning at the moment: update-installer -latest-install\nCheck ${_VC} console (ALT-F${_VC_NUM}) for progress...\n\nGet a cup of coffee ...\nDepending on your system's setup, this needs about 5 minutes.\nPlease be patient." 0 0
|
||||
update-installer -latest-install > "${_LOG}" 2>&1
|
||||
|
|
|
@ -11,10 +11,10 @@ _detect_disk() {
|
|||
|
||||
_check_gpt() {
|
||||
_GUID_DETECTED=""
|
||||
[[ "$(${_BLKID} -p -i -o value -s PTTYPE "${_DISK}")" == "gpt" ]] && _GUID_DETECTED="1"
|
||||
[[ "$(${_BLKID} -p -i -o value -s PTTYPE "${_DISK}")" == "gpt" ]] && _GUID_DETECTED=1
|
||||
if [[ -z "${_GUID_DETECTED}" ]]; then
|
||||
_dialog --yesno "Setup detected no GUID (gpt) partition table on ${_DISK}.\n\nDo you want to convert the existing MBR table in ${_DISK} to a GUID (gpt) partition table?" 0 0 || return 1
|
||||
sgdisk --mbrtogpt "${_DISK}" > "${_LOG}" && _GUID_DETECTED="1"
|
||||
sgdisk --mbrtogpt "${_DISK}" > "${_LOG}" && _GUID_DETECTED=1
|
||||
# reread partitiontable for kernel
|
||||
partprobe "${_DISK}" > "${_LOG}"
|
||||
if [[ -z "${_GUID_DETECTED}" ]]; then
|
||||
|
@ -26,7 +26,7 @@ _check_gpt() {
|
|||
wipefs -a "${_DISK}" &>/dev/null
|
||||
# create fresh GPT
|
||||
sgdisk --clear "${_DISK}" &>/dev/null
|
||||
_GUID_DETECTED="1"
|
||||
_GUID_DETECTED=1
|
||||
fi
|
||||
fi
|
||||
if [[ "${_GUID_DETECTED}" == 1 ]]; then
|
||||
|
@ -37,7 +37,7 @@ _check_gpt() {
|
|||
if [[ "${_CHECK_BIOS_BOOT_GRUB}" == 1 ]]; then
|
||||
if ! sgdisk -p "${_DISK}" | grep -q 'EF02'; then
|
||||
_dialog --msgbox "Setup detected no BIOS BOOT PARTITION in ${_DISK}. Please create a >=1 MB BIOS Boot partition for grub BIOS GPT support." 0 0
|
||||
_RUN_CFDISK="1"
|
||||
_RUN_CFDISK=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -56,7 +56,7 @@ _check_efisys_part() {
|
|||
_GUID_DETECTED=""
|
||||
_dialog --defaultno --yesno "Setup detected no GUID (gpt) partition table on ${_DISK}.\nUEFI boot requires ${_DISK} to be partitioned as GPT.\n\nDo you want to convert the existing MBR table in ${_DISK} to a GUID (gpt) partition table?" 0 0 || return 1
|
||||
_dialog --msgbox "Setup will now try to non-destructively convert ${_DISK} to GPT using sgdisk." 0 0
|
||||
sgdisk --mbrtogpt "${_DISK}" > "${_LOG}" && _GUID_DETECTED="1"
|
||||
sgdisk --mbrtogpt "${_DISK}" > "${_LOG}" && _GUID_DETECTED=1
|
||||
partprobe "${_DISK}" > "${_LOG}"
|
||||
if [[ "${_GUID_DETECTED}" == "" ]]; then
|
||||
_dialog --msgbox "Conversion failed on ${_DISK}.\nSetup detected no GUID (gpt) partition table on ${_DISK}.\n\n You need to fix your partition table first, before setup can proceed." 0 0
|
||||
|
@ -74,11 +74,11 @@ _check_efisys_part() {
|
|||
_UEFISYS_PART="$(${_LSBLK} NAME,PARTTYPE "${_DISK}" | grep 'c12a7328-f81f-11d2-ba4b-00a0c93ec93b' | cut -d " " -f1)"
|
||||
if [[ "$(${_LSBLK} FSTYPE "${_UEFISYS_PART}")" != "vfat" ]]; then
|
||||
## Check whether EFISYS is FAT, otherwise inform the user and offer to format the partition as FAT32.
|
||||
_dialog --defaultno --yesno "Detected EFI System partition ${_UEFISYS_PART} does not appear to be FAT formatted. UEFI Specification requires EFI System partition to be FAT32 formatted. Do you want to format ${_UEFISYS_PART} as FAT32?\nNote: Setup will proceed even if you select NO. Some systems like Apple Macs may work with Non-FAT EFI System partition. However the installed system is not in conformance with UEFI Spec., and MAY NOT boot properly." 0 0 && _FORMAT_UEFISYS_FAT32="1"
|
||||
_dialog --defaultno --yesno "Detected EFI System partition ${_UEFISYS_PART} does not appear to be FAT formatted. UEFI Specification requires EFI System partition to be FAT32 formatted. Do you want to format ${_UEFISYS_PART} as FAT32?\nNote: Setup will proceed even if you select NO. Some systems like Apple Macs may work with Non-FAT EFI System partition. However the installed system is not in conformance with UEFI Spec., and MAY NOT boot properly." 0 0 && _FORMAT_UEFISYS_FAT32=1
|
||||
fi
|
||||
if [[ "$(${_LSBLK} FSTYPE "${_UEFISYS_PART}")" == "vfat" ]] && [[ "$(${_BLKID} -p -i -o value -s VERSION "${_UEFISYS_PART}")" != "FAT32" ]]; then
|
||||
## Check whether EFISYS is FAT32 (specifically), otherwise warn the user about compatibility issues with UEFI Spec.
|
||||
_dialog --defaultno --yesno "Detected EFI System partition ${_UEFISYS_PART} does not appear to be FAT32 formatted. Do you want to format ${_UEFISYS_PART} as FAT32?\nNote: Setup will proceed even if you select NO. Most systems will boot fine even with FAT16 or FAT12 EFI System partition, however some firmwares may refuse to boot with a non-FAT32 EFI System partition. It is recommended to use FAT32 for maximum compatibility with UEFI Spec." 0 0 && _FORMAT_UEFISYS_FAT32="1"
|
||||
_dialog --defaultno --yesno "Detected EFI System partition ${_UEFISYS_PART} does not appear to be FAT32 formatted. Do you want to format ${_UEFISYS_PART} as FAT32?\nNote: Setup will proceed even if you select NO. Most systems will boot fine even with FAT16 or FAT12 EFI System partition, however some firmwares may refuse to boot with a non-FAT32 EFI System partition. It is recommended to use FAT32 for maximum compatibility with UEFI Spec." 0 0 && _FORMAT_UEFISYS_FAT32=1
|
||||
fi
|
||||
#autodetect efisys mountpoint, on fail ask for mountpoint
|
||||
_UEFISYS_MP="/$(basename "$(mount | grep "${_UEFISYS_PART}" | cut -d " " -f 3)")"
|
||||
|
@ -141,10 +141,10 @@ _partition() {
|
|||
if [[ "${_GUIDPARAMETER}" == 1 ]]; then
|
||||
_CHECK_BIOS_BOOT_GRUB=""
|
||||
_CHECK_UEFISYS_PART=""
|
||||
_RUN_CFDISK="1"
|
||||
_RUN_CFDISK=1
|
||||
_check_gpt
|
||||
else
|
||||
[[ "$(${_BLKID} -p -i -o value -s PTTYPE "${_DISK}")" == "dos" ]] && _MSDOS_DETECTED="1"
|
||||
[[ "$(${_BLKID} -p -i -o value -s PTTYPE "${_DISK}")" == "dos" ]] && _MSDOS_DETECTED=1
|
||||
|
||||
if [[ "${_MSDOS_DETECTED}" == "" ]]; then
|
||||
_dialog --defaultno --yesno "Setup detected no MS-DOS partition table on ${_DISK}.\nDo you want to create a MS-DOS partition table now on ${_DISK}?\n\n${_DISK} will be COMPLETELY ERASED! Are you absolutely sure?" 0 0 || return 1
|
||||
|
|
|
@ -16,7 +16,7 @@ _create_special() {
|
|||
"1" "Manage Software Raid" \
|
||||
"2" "Manage LVM2" \
|
||||
"3" "Manage Luks encryption" \
|
||||
"4" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL="1"
|
||||
"4" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL=1
|
||||
_NEXTITEM="$(cat "${_ANSWER}")"
|
||||
case $(cat "${_ANSWER}") in
|
||||
"1")
|
||||
|
@ -53,14 +53,14 @@ _createmd() {
|
|||
"2" "Create Partitionable Software Raid" \
|
||||
"3" "Reset Software Raid" \
|
||||
"4" "Raid Help" \
|
||||
"5" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL="1"
|
||||
"5" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL=1
|
||||
_NEXTITEM="$(cat "${_ANSWER}")"
|
||||
case $(cat "${_ANSWER}") in
|
||||
"1")
|
||||
_RAID_PARTITION=""
|
||||
_raid ;;
|
||||
"2")
|
||||
_RAID_PARTITION="1"
|
||||
_RAID_PARTITION=1
|
||||
_raid ;;
|
||||
"3")
|
||||
_stopmd ;;
|
||||
|
@ -70,7 +70,7 @@ _createmd() {
|
|||
_MDDONE=1 ;;
|
||||
esac
|
||||
done
|
||||
_NEXTITEM="1"
|
||||
_NEXTITEM=1
|
||||
}
|
||||
|
||||
# menu for lvm creation
|
||||
|
@ -91,7 +91,7 @@ _createlvm() {
|
|||
"3" "Create Logical Volume" \
|
||||
"4" "Reset Logical Volume" \
|
||||
"5" "LVM Help" \
|
||||
"6" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL="1"
|
||||
"6" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL=1
|
||||
_NEXTITEM="$(cat "${_ANSWER}")"
|
||||
case $(cat "${_ANSWER}") in
|
||||
"1")
|
||||
|
@ -127,7 +127,7 @@ _createluks() {
|
|||
"1" "Create Luks" \
|
||||
"2" "Reset Luks Encryption completely" \
|
||||
"3" "Luks Help" \
|
||||
"4" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL="1"
|
||||
"4" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL=1
|
||||
_NEXTITEM="$(cat "${_ANSWER}")"
|
||||
case $(cat "${_ANSWER}") in
|
||||
"1")
|
||||
|
|
Loading…
Reference in a new issue