diff --git a/archlabs-installer b/archlabs-installer new file mode 100755 index 0000000..ca4f415 --- /dev/null +++ b/archlabs-installer @@ -0,0 +1,2597 @@ +#!/bin/bash + +# This program is free software, provided under the GNU GPL +# Written by Nathaniel Maia for use in Archlabs +# Some ideas and code reworked from other resources +# AIF, Cnichi, Calamares, Arch Wiki.. Credit where credit is due + +VER="2.0.17" # version +DIST="ArchLabs" # distributor +MNT="/mnt" # mountpoint +ANS="/tmp/ans" + + +# --------------------------------------------- # +# if you manually mount your partitions then you +# need to set these values to avoid issues. +# --------------------------------------------- # + +# root partition, eg/ /dev/sda2 +ROOT_PART='' + +# boot partition, required on UEFI, eg. /dev/sda1 +BOOT_PART='' + +# device used for some bootloader install process, eg. /dev/sda +BOOT_DEV='' + +# bootloader to use, can be: +# UEFI: grub, syslinux, efistub, systemd-boot, refind-efi +# BIOS: grub, syslinux +BOOTLDR='' + +# directory to mount the boot partition (if any) for most bootloaders +# this will need to be 'boot' however a popular one for grub is 'boot/efi' +BOOTDIR='boot' + +# swap partition or file path +SWAP_PART='' + +# swap size, only used when creating a swapfile +SWAP_SIZE='' + +# --------------------------------------------- # + +# bulk default values { + +EXMNT='' # holder for additional partitions while mounting +EXMNTS='' # when an extra partition is mounted append it's info + +FONT="ter-i16n" # font used in the linux console +HOOKS="shutdown" # list of additional HOOKS to add in /etc/mkinitcpio.conf + +LOGINRC='' # login shell rc file, eg. .zprofile, .bash_profile, .profile +LOGIN_WM='' # default login session, used only for xinit +LOGIN_TYPE='' # login manager can be: lightdm, xinit +INSTALL_WMS='' # space separated list of chosen wm and de + +UCODE='' # cpu microcode (if any), eg. amd-ucode, intel-ucode +KERNEL='' # can be linux, linux-lts, linux-zen, or linux-hardened +MYSHELL='' # full path for the shell, eg. /usr/bin/zsh + +WM_PKGS='' # full list of packages added during wm/de choice +PACKAGES='' # list of all packages to install including WM_PKGS +USER_PKGS='' # packages selected by the user during install + +NEWUSER='' # username for the primary user +USER_PASS='' # password for the primary user +ROOT_PASS='' # root password + +LUKS='' # empty when not using luks encryption +LUKS_DEV='' # boot parameter string for LUKS +LUKS_PART='' # partition used for encryption +LUKS_PASS='' # encryption password +LUKS_UUID='' # encrypted partition UUID +LUKS_NAME='' # name used for encryption + +LVM='' # empty when not using lvm +VGROUP_MB=0 # available space in volume group +LVM_PARTS='' # partitions used for volume group + +WARN='' # issued mounting/partitioning warning +SEP_BOOT='' # separate boot partition for BIOS +AUTOLOGIN='' # enable autologin for xinit +CONFIG_DONE='' # basic configuration is finished +BROADCOM_WL='' # fixes for broadcom cards eg. BCM4352 + +FORMATTED='' # partitions we formatted and should allow skipping +AUTO_ROOT_PART='' # root value from auto partition +AUTO_BOOT_PART='' # boot value from auto partition + +# iso base, pacstrap when running the installer from a stock arch iso +ISO_BASE="arch-install-scripts b43-firmware b43-fwcutter broadcom-wl clonezilla dhclient dhcpcd ethtool " +ISO_BASE+="exfat-utils f2fs-tools gptfdisk vim hdparm ipw2100-fw ipw2200-fw nfs-utils nilfs-utils ntfs-3g " +ISO_BASE+="pacman-contrib parted rsync sdparm smartmontools wget wireless_tools wpa_actiond xl2tpd dialog " +ISO_BASE+="parted alsa-firmware alsa-lib alsa-plugins pulseaudio pulseaudio-alsa networkmanager " +ISO_BASE+="wireless-regdb wpa_supplicant lm_sensors lsb-release p7zip pamixer reflector unrar htop ranger " +ISO_BASE+="w3m terminus-font ttf-dejavu archlabs-keyring" + +# baseline +BASE_PKGS="archlabs-skel-base archlabs-themes archlabs-dARK archlabs-icons archlabs-wallpapers " +BASE_PKGS+="base-devel xorg xorg-drivers sudo git gvfs gtk3 gtk-engines gtk-engine-murrine pavucontrol tumbler " +BASE_PKGS+="playerctl ffmpeg gstreamer libmad libmatroska gst-libav gst-plugins-base gst-plugins-good scrot" + +# extras for window managers +WM_BASE_PKGS="arandr archlabs-networkmanager-dmenu xdg-user-dirs nitrogen polkit-gnome volumeicon xclip exo " +WM_BASE_PKGS+="xdotool compton wmctrl gnome-keyring dunst feh gsimplecal xfce4-power-manager xfce4-settings laptop-detect" + +SEL=0 # currently selected menu item +ERR="/tmp/errlog" # error log used internally +DBG="/tmp/debuglog" # debug log when passed -d +RUN="/run/archiso/bootmnt/arch/boot" # path for live /boot +VM="$(dmesg | grep -i "hypervisor")" # is the system a vm +SYS='Unknown' + +# } + +# giant ugly variable container :P { + +# RAM in the system in MB +SYS_MEM="$(awk '/MemTotal/ { +print int($2 / 1024)"M" +}' /proc/meminfo)" + +# locales from /etc/locale.gen +LOCALES="$(awk '/\.UTF-8/ { + gsub(/# .*|#/, "") + if ($1) { + print $1 " - " + } +}' /etc/locale.gen)" + +# linux console keyboard mappings +CMAPS="$(find /usr/share/kbd/keymaps -name '*.map.gz' | awk '{ + gsub(/\.map\.gz|.*\//, "") + print $1 " - " +}' | sort)" + +# terminal size definitions +# { +[[ $LINES ]] || LINES=$(tput lines) +[[ $COLUMNS ]] || COLUMNS=$(tput cols) +SHL=$((LINES - 20)) # } + +# associative arrays +# { + +# commands used to install each bootloader (most get modified during runtime) { +declare -A BCMDS=( +[refind-efi]='refind-install' +[grub]='grub-install --recheck --force' +[syslinux]='syslinux-install_update -i -a -m' +[efistub]='efibootmgr -v -d /dev/sda -p 1 -c -l' +[systemd-boot]='bootctl --path=/boot install' +) # } + +# executable name for each wm/de { +declare -A WM_SESSIONS=( +[dwm]='dwm' +[i3-gaps]='i3' +[bspwm]='bspwm' +[plasma]='startkde' +[xfce4]='startxfce4' +[gnome]='gnome-session' +[fluxbox]='startfluxbox' +[openbox]='openbox-session' +[cinnamon]='cinnamon-session' +) # } + +# packages installed for each wm/de { +declare -A WM_EXT=( +[gnome]='' +[plasma]='kdebase-meta' +[bspwm]='sxhkd archlabs-skel-bspwm rofi archlabs-polybar' +[fluxbox]='archlabs-skel-fluxbox archlabs-polybar jgmenu rofi lxmenu-data' +[i3-gaps]='i3status perl-anyevent-i3 archlabs-skel-i3-gaps rofi archlabs-polybar' +[openbox]='obconf archlabs-skel-openbox jgmenu archlabs-polybar tint2 conky rofi lxmenu-data' +[xfce4]='xfce4-goodies xfce4-pulseaudio-plugin network-manager-applet volumeicon rofi archlabs-skel-xfce4' +) # } + +# files that can be edited after install is complete { +declare -A EDIT_FILES=( +[login]='' +[fstab]='/etc/fstab' +[sudoers]='/etc/sudoers' +[crypttab]='/etc/crypttab' +[pacman]='/etc/pacman.conf' +[console]='/etc/vconsole.conf' +[mkinitcpio]='/etc/mkinitcpio.conf' +[hostname]='/etc/hostname /etc/hosts' +[bootloader]="/boot/loader/entries/$DIST.conf" +[locale]='/etc/locale.conf /etc/default/locale' +[keyboard]='/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard' +) # } + +# mkfs command for formatting each offered filesystem { +declare -A FS_CMDS=( +[f2fs]='mkfs.f2fs' +[jfs]='mkfs.jfs -q' +[xfs]='mkfs.xfs -f' +[ntfs]='mkfs.ntfs -q' +[ext2]='mkfs.ext2 -q' +[ext3]='mkfs.ext3 -q' +[ext4]='mkfs.ext4 -q' +[vfat]='mkfs.vfat -F32' +[nilfs2]='mkfs.nilfs2 -q' +[reiserfs]='mkfs.reiserfs -q' +) # } + +# mount options for each offered filesystem (if any { +declare -A FS_OPTS=( +[vfat]='' +[ntfs]='' +[ext2]='' +[ext3]='' +[jfs]='discard errors=continue errors=panic nointegrity' +[reiserfs]='acl nolog notail replayonly user_xattr off' +[ext4]='discard dealloc nofail noacl relatime noatime nobarrier nodelalloc' +[xfs]='discard filestreams ikeep largeio noalign nobarrier norecovery noquota wsync' +[nilfs2]='discard nobarrier errors=continue errors=panic order=relaxed order=strict norecovery' +[f2fs]='discard fastboot flush_merge data_flush inline_xattr inline_data noinline_data inline_dentry no_heap noacl nobarrier norecovery noextent_cache disable_roll_forward disable_ext_identify' +) # } + +# PKG_EXT: if you add a package to $PACKAGES in any dialog { +# and it uses/requires some additional packages, +# you can add them here to keep it simple: [package]="extra" +# duplicates are removed with `uniq` before install +declare -A PKG_EXT=( +[vlc]='qt4' +[mpd]='mpc' +[mupdf]='mupdf-tools' +[qt5ct]='qt5-styleplugins' +[vlc]='qt5ct qt5-styleplugins' +[zathura]='zathura-pdf-poppler' +[noto-fonts]='noto-fonts-emoji' +[cairo-dock]='cairo-dock-plug-ins' +[qutebrowser]='qt5ct qt5-styleplugins' +[qbittorrent]='qt5ct qt5-styleplugins' +[transmission-qt]='qt5ct qt5-styleplugins' +[kdenlive]='kdebase-meta dvdauthor frei0r-plugins breeze breeze-gtk qt5ct qt5-styleplugins' +) # } + +# } + +# text variables +# { + +# Basics (somewhat in order) +_keymap="\nPick which keymap to use for the system from the list below\n\nThis is used once a graphical environment is running (Xorg).\n\nSystem default: us" +_vconsole="\nSelect the console keymap, the console is the tty shell you reach before starting a graphical environment (Xorg).\n\nIts keymap is seperate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nSystem default: us" +_user="\nEnter a name and password for the new user account.\n\nThe name must not use capital letters, contain any periods (.), end with a hyphen (-), or include any colons (:)\n\nNOTE: Use the [Up] and [Down] arrows to switch between input fields, [Tab] to toggle between input fields and the buttons, and [Enter] to accept." +_hostname="\nEnter a hostname for the new system.\n\nA hostname is used to identify systems on the network.\n\nIt's restricted to alphanumeric characters (a-z, A-Z, 0-9).\nIt can contain hyphens (-) BUT NOT at the beggining or end." +_locale="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\neg. en_US is: english United States\n en_GB is: english Great Britain" +_timez="\nThe time zone is used to set the system clock.\n\nSelect your country or continent from the list below" +_timesubz="\nSelect the nearest city to you or one with the same time zone.\n\nTIP: Pressing the first letter of the city name repeatedly will navigate between entries beggining with that letter." +_sessions="\nUse [Space] to toggle available sessions, use [Enter] to accept the selection and continue.\n\nA basic package set will be installed for compatibility and functionality." +_login="\nSelect which of your session choices to use for the initial login.\n\nYou can be change this later by editing your ~/.xinitrc" +_packages="\nUse [Space] to move a package into the selected area and press [Enter] to accept the selection.\n\nPackages may be installed by your DE/WM (if any), or for the packages you select." +_device="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb, /sdc ..." +_mount="\nUse [Space] to toggle mount options from below, press [Enter] when done to confirm selection.\n\nNot selecting any and confirming will run an automatic mount." +_warn="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nPartitions can be mounted without formatting by selecting skip during mounting, useful for extra or already formatted partitions.\n\nThe exception to this is the root (/) partition, it needs to be formatted before install to ensure system stability.\n" +_part="\nFull device auto partitioning is available for beginners otherwise cfdisk is recommended.\n\n - All systems will require a root partition (8G or greater).\n - UEFI (and BIOS using LUKS without LVM) require a separate boot partition (100-512M)." +_uefi="\nSelect the EFI boot partition (/boot), required for UEFI boot.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as vfat/fat32 if not already." +_bios="\nDo you want to use a separate boot partition? (optional)\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already." +_biosluks="\nSelect the boot partition (/boot), required for LUKS.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already." +_format="is already formatted correctly.\n\nFor a clean install, previously existing partitions should be reformatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to reformat the partition?\n" +_swapsize="\nEnter the size of the swapfile in megabytes (M) or gigabytes (G).\n\neg. 100M will create a 100 megabyte swapfile, while 10G will create a 10 gigabyte swapfile.\n\nFor ease of use and as an example it is filled in to match the size of your system memory (RAM).\n\nMust be greater than 1, contain only whole numbers, and end with either M or G." +_expart="\nYou can now select additional partitions you want mounted, once choosen you will be asked to enter a mountpoint.\n\nSelect 'done' to finish the mounting step and begin unpacking the base system in the background." +_exmnt="\nWhere do you want the partition mounted?\n\nEnsure the name begins with a slash (/).\nExamples include: /usr, /home, /var, etc." +_edit="\nBefore exiting you can select configuration files to review/change.\n\nIf you need to make other changes with the drives still mounted, use Ctrl-z to pause the installer, when finished type 'fg' and [Enter] or Ctrl-z again to resume the installer, if you want to avoid the automatic reboot using Ctrl-c will cleanly exit." + +# LUKS +_luksnew="Basic LUKS Encryption" +_luksadv="Advanced LUKS Encryption" +_luksopen="Open Existing LUKS Partition" +_luksmenu="\nA seperate boot partition without encryption or logical volume management (LVM) is required (except BIOS systems using grub).\n\nBasic uses the default encryption settings, and is recommended for beginners. Advanced allows cypher and key size parameters to be entered manually." +_luksomenu="\nEnter a name and password for the encrypted device.\n\nIt is not necessary to prefix the name with /dev/mapper/,an example has been provided." +_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 +_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." +_lvmnew="Create Volume Group and Volume(s)" +_lvmdel="Delete an Existing Volume Group" +_lvmdelall="Delete ALL Volume Group(s) and Volume(s)" +_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." +_lvmlvsize="\nEnter what size you want the logical volume (LV) to be in megabytes (M) or gigabytes (G).\n\neg. 100M will create a 100 megabyte volume, 10G will create a 10 gigabyte volume." +_lvmdelask="\nConfirm deletion of volume group(s) and logical volume(s).\n\nDeleting a volume group, will delete all logical volumes within it.\n" + +# Errors +_errexpart="\nCannot mount partition due to a problem with the mountpoint.\n\nEnsure it begins with a slash (/) followed by atleast one character.\n" +_errpart="\nYou need create the partiton(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\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" +_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" +_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" +_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\neg. 400M, 10G, 250G, etc...\n\nThe value may also not be equal to or greater than the remaining size of the volume group.\n" + +# } + +# } + +############################################################################### +# selection menus + +select_main() +{ + (( SEL < 12 )) && (( SEL++ )) + tput civis + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" \ + --title " Prepare " --default-item $SEL --cancel-label 'Exit' --menu "$_prep" 0 0 0 \ + 1 "Show lsblk output (optional)" \ + 2 "Edit partitions (optional)" \ + 3 "LUKS encryption (optional)" \ + 4 "Logical volume management (optional)" \ + 5 "Mount and format partitions" \ + 6 "Select system bootloader" \ + 7 "Create user and set password" \ + 8 "Configure system settings" \ + 9 "Select window manager or desktop (optional)" \ + 10 "Select additional packages (optional)" \ + 11 "Check configuration choices (optional)" \ + 12 "Start the installation" 2>"$ANS" + + read -r SEL < "$ANS" + + if [[ -z $WARN && $SEL =~ (2|5) ]]; then + msg "Prepare" "$_warn" + WARN=true + fi + + case $SEL in + 1) part_show ;; + 2) part_menu || (( SEL-- )) ;; + 3) luks_menu || (( SEL-- )) ;; + 4) lvm_menu || (( SEL-- )) ;; + 5) select_menu || (( SEL-- )) ;; + 6) prechecks 0 && { select_boot || (( SEL-- )); } ;; + 7) prechecks 1 && { select_mkuser || (( SEL-- )); } ;; + 8) prechecks 2 && { select_config || (( SEL-- )); } ;; + 9) prechecks 3 && { select_sessions || (( SEL-- )); } ;; + 10) prechecks 3 && { select_packages || (( SEL-- )); } ;; + 11) prechecks 3 && select_show ;; + 12) prechecks 3 && install_main ;; + *) yesno "Exit" "\nUnmount partitions (if any) and exit the installer?\n" && die 0 + esac +} + +select_boot() +{ + if [[ $SYS == 'BIOS' ]]; then + dlg BOOTLDR menu "BIOS Bootloader" "\nSelect which bootloader to use." \ + "grub" "The Grand Unified Bootloader, standard among many Linux distributions" \ + "syslinux" "A collection of boot loaders for booting drives, CDs, or over the network" + + else + dlg BOOTLDR menu "UEFI Bootloader" "\nSelect which bootloader to use." \ + "systemd-boot" "A simple UEFI boot manager which executes configured EFI images" \ + "grub" "The Grand Unified Bootloader, standard among many Linux distributions" \ + "refind-efi" "A UEFI boot manager that aims to be platform neutral and simplify multi-boot" \ + "efistub" "Boot the kernel image directly (no chainloading support)" \ + "syslinux" "A collection of boot loaders for booting drives, CDs, or over the network (no chainloading support)" + + fi + [[ $BOOTLDR ]] || return 1 + setup_${BOOTLDR} +} + +select_show() +{ + local cmd="${BCMDS[$BOOTLDR]}" + [[ $BOOT_PART ]] && local mnt="/$BOOTDIR" || local mnt="none" + + local pkgs="${USER_PKGS# }" + pkgs="${pkgs% }" + pkgs="${pkgs% } ${PACKAGES# }" + pkgs="${pkgs// / }" + pkgs="${pkgs// / }" + [[ $INSTALL_WMS == *dwm* ]] && pkgs="dwm st dmenu ${pkgs# }" + pkgs="${pkgs# }" + pkgs="${pkgs% }" + pkgs="${pkgs// / }" + msg "Show Configuration" " + +---------- PARTITION CONFIGURATION ------------ + + Root: ${ROOT_PART:-none} + Boot: ${BOOT_PART:-${BOOT_DEV:-none}} + + Swap: ${SWAP_PART:-none} + Size: ${SWAP_SIZE:-none} + + LVM: ${LVM:-none} + LUKS: ${LUKS:-none} + + Extra: ${EXMNTS:-${EXMNT:-none}} + Hooks: ${HOOKS:-none} + + +---------- BOOTLOADER CONFIGURATION ----------- + + Bootloader: ${BOOTLDR:-none} + Mountpoint: ${mnt:-none} + Command: ${cmd:-none} + + +------------ SYSTEM CONFIGURATION ------------- + + Locale: ${MYLOCALE:-none} + Keymap: ${KEYMAP:-none} + Hostname: ${MYHOST:-none} + Timezone: ${ZONE:-none}/${SUBZ:-none} + + +------------ USER CONFIGURATION -------------- + + User: ${NEWUSER:-none} + Shell: ${MYSHELL:-none} + Session: ${LOGIN_WM:-none} + Autologin: ${AUTOLOGIN:-none} + Login Method: ${LOGIN_TYPE:-none} + + +------------ PACKAGES AND MIRRORS ------------- + + Kernel: ${KERNEL:-none} + Sessions: ${INSTALL_WMS:-none} + Mirrors: ${MIRROR_CMD:-none} + Packages: $(print4 "${pkgs:-none}") +" +} + +select_login() +{ + dlg LOGIN_TYPE menu "Login Management" "\nSelect which login management to use." \ + "xinit" "Console login without a display manager" \ + "lightdm" "Lightweight display manager with a gtk greeter" + + if [[ -z $LOGIN_TYPE ]]; then + return 1 + elif [[ $LOGIN_TYPE == 'lightdm' ]]; then + WM_PKGS+=" lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice" + EDIT_FILES[login]="/etc/lightdm/lightdm.conf /etc/lightdm/lightdm-gtk-greeter.conf" + AUTOLOGIN='' + else + if (( WM_NUM == 1 )); then + LOGIN_WM="${WM_SESSIONS[$INSTALL_WMS]}" + else + dlg LOGIN_WM menu "Login Management" "$_login" $LOGIN_CHOICES || return 1 + LOGIN_WM="${WM_SESSIONS[$LOGIN_WM]}" + fi + + local txt="\nDo you want autologin enabled for $NEWUSER?\n\nPicking yes will create the following files:\n\n - /home/$NEWUSER/$LOGINRC (run startx when logging in on tty1)\n - /etc/systemd/system/getty@tty1.service.d/autologin.conf (login $NEWUSER without password)\n\nTo disable autologin remove these files.\n" + + yesno "Autologin" "$txt" && AUTOLOGIN=true || AUTOLOGIN='' + WM_PKGS+=" xorg-xinit" + EDIT_FILES[login]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile" + fi +} + +select_config() +{ + local i=0 + + CONFIG_DONE='' + + until [[ $CONFIG_DONE ]]; do + case $i in + 0) + dlg MYSHELL menu "Shell" "\nChoose which shell to use." \ + /usr/bin/zsh 'A very advanced and programmable command interpreter (shell) for UNIX' \ + /bin/bash 'The GNU Bourne Again shell, standard in many GNU/Linux distributions' \ + /usr/bin/mksh 'The MirBSD Korn Shell - an enhanced version of the public domain ksh' || return 1 + + ;; + 1) dlg MYHOST input "Hostname" "$_hostname" "${DIST,,}" limit || continue ;; + 2) dlg MYLOCALE menu "Locale" "$_locale" $LOCALES || continue ;; + 3) ZONE='' SUBZ='' + until [[ $ZONE && $SUBZ ]]; do + dlg ZONE menu "Timezone" "$_timez" America - Australia - Asia - Atlantic - Africa - Europe - Indian - Pacific - Arctic - Antarctica - || break + dlg SUBZ menu "Timezone" "$_timesubz" $(awk '/'"$ZONE"'\// {gsub(/'"$ZONE"'\//, ""); print $3 " - "}' /usr/share/zoneinfo/zone.tab | sort) || continue + yesno "Timezone" "\nConfirm time zone: $ZONE/$SUBZ\n" || unset ZONE + done + [[ $ZONE && $SUBZ ]] || continue ;; + 4) + dlg KERNEL menu "Kernel" "\nChoose which kernel to use." \ + linux 'Vanilla linux kernel and modules, with a few patches applied' \ + linux-lts 'Long-term support (LTS) linux kernel and modules' \ + linux-zen 'A effort of kernel hackers to provide the best kernel for everyday systems' \ + linux-hardened 'A security-focused linux kernel with hardening patches to mitigate exploits' || continue + + ;; + 5) select_mirrorcmd || continue + CONFIG_DONE=true + ;; + esac + (( i++ )) + done + + case $MYSHELL in + '/bin/bash') LOGINRC='.bash_profile' ;; + '/usr/bin/zsh') LOGINRC='.zprofile' ;; + '/usr/bin/mksh') LOGINRC='.profile' ;; + esac + + return 0 +} + +select_mkuser() +{ + local v='' u='' p='' p2='' rp='' rp2='' + NEWUSER='' + + until [[ $NEWUSER ]]; do + i=0 + tput cnorm + dialog --cr-wrap --insecure --backtitle "$DIST Installer - $SYS - v$VER" \ + --separator $'\n' --title " User " --mixedform "$_user" 0 0 0 \ + "Username:" 1 1 "$u" 1 11 $COLUMNS 0 0 \ + "Password:" 2 1 '' 2 11 $COLUMNS 0 1 \ + "Password2:" 3 1 '' 3 12 $COLUMNS 0 1 \ + "--- Root password, if left empty the user password will be used ---" 6 1 '' 6 68 $COLUMNS 0 2 \ + "Password:" 8 1 '' 8 11 $COLUMNS 0 1 \ + "Password2:" 9 1 '' 9 12 $COLUMNS 0 1 2>"$ANS" || return 1 + + while read -r line; do + case $i in + 0) u="$line" ;; + 1) p="$line" ;; + 2) p2="$line" ;; + 3) rp="$line" ;; + 4) rp2="$line" ;; + esac + (( i++ )) + done < "$ANS" + + # root passwords empty, so use the user passwords + [[ -z $rp && -z $rp2 ]] && { rp="$p"; rp2="$p2"; } + + # make sure a username was entered and that the passwords match + if [[ ${#u} -eq 0 || $u =~ \ |\' || $u =~ [^a-z0-9] ]]; then + msg "Invalid Username" "\nIncorrect user name.\n\nPlease try again.\n"; u='' + elif [[ -z $p ]]; then + msg "Empty Password" "\nThe user password cannot be left empty.\n\nPlease try again.\n" + elif [[ "$p" != "$p2" ]]; then + msg "Password Mismatch" "\nThe user passwords do not match.\n\nPlease try again.\n" + elif [[ "$rp" != "$rp2" ]]; then + msg "Password Mismatch" "\nThe root passwords do not match.\n\nPlease try again.\n" + else + NEWUSER="$u" + USER_PASS="$p" + ROOT_PASS="$rp" + fi + done + return 0 +} + +select_keymap() +{ + dlg KEYMAP menu "Keyboard Layout" "$_keymap" \ + us English cm English gb English au English gh English \ + za English ng English ca French 'cd' French gn French \ + tg French fr French de German at German ch German \ + es Spanish latam Spanish br Portuguese pt Portuguese ma Arabic \ + sy Arabic ara Arabic ua Ukrainian cz Czech ru Russian \ + sk Slovak nl Dutch it Italian hu Hungarian cn Chinese \ + tw Taiwanese vn Vietnamese kr Korean jp Japanese th Thai \ + la Lao pl Polish se Swedish is Icelandic fi Finnish \ + dk Danish be Belgian in Indian al Albanian am Armenian \ + bd Bangla ba Bosnian 'bg' Bulgarian dz Berber mm Burmese \ + hr Croatian gr Greek il Hebrew ir Persian iq Iraqi \ + af Afghani fo Faroese ge Georgian ee Estonian kg Kyrgyz \ + kz Kazakh lt Lithuanian mt Maltese mn Mongolian ro Romanian \ + no Norwegian rs Serbian si Slovenian tj Tajik lk Sinhala \ + tr Turkish uz Uzbek ie Irish pk Urdu 'mv' Dhivehi \ + np Nepali et Amharic sn Wolof ml Bambara tz Swahili \ + ke Swahili bw Tswana ph Filipino my Malay tm Turkmen \ + id Indonesian bt Dzongkha lv Latvian md Moldavian mao Maori \ + by Belarusian az Azerbaijani mk Macedonian kh Khmer epo Esperanto \ + me Montenegrin + + [[ $KEYMAP ]] || return 1 + + if [[ $CMAPS == *"$KEYMAP"* ]]; then + CMAP="$KEYMAP" + else + dlg CMAP menu "Console Keymap" "$_vconsole" $CMAPS + [[ $CMAP ]] || return 1 + fi + + if [[ $DISPLAY && $TERM != 'linux' ]]; then + setxkbmap $KEYMAP >/dev/null 2>&1 + else + loadkeys $CMAP >/dev/null 2>&1 + fi + + return 0 +} + +select_sessions() +{ + LOGIN_CHOICES='' + + dlg INSTALL_WMS check "Sessions" "$_sessions\n" \ + i3-gaps "A fork of i3wm with more features including gaps" $(ofn i3-gaps "${INSTALL_WMS[*]}") \ + openbox "A lightweight, powerful, and highly configurable stacking wm" $(ofn openbox "${INSTALL_WMS[*]}") \ + bspwm "A tiling wm that represents windows as the leaves of a binary tree" $(ofn bspwm "${INSTALL_WMS[*]}") \ + dwm "A fork of dwm, with more layouts and features" $(ofn dwm "${INSTALL_WMS[*]}") \ + fluxbox "A lightweight and highly-configurable window manager" $(ofn fluxbox "${INSTALL_WMS[*]}") \ + gnome "A desktop environment that aims to be simple and easy to use" $(ofn gnome "${INSTALL_WMS[*]}") \ + cinnamon "A desktop environment combining traditional desktop with modern effects" $(ofn cinnamon "${INSTALL_WMS[*]}") \ + plasma "A kde software project currently comprising a full desktop environment" $(ofn plasma "${INSTALL_WMS[*]}") \ + xfce4 "A lightweight and modular desktop environment based on gtk+2/3" $(ofn xfce4 "${INSTALL_WMS[*]}") + + [[ $INSTALL_WMS ]] || return 1 + + WM_NUM=0 + while IFS=' ' read -r field; do + (( WM_NUM++ )) + done <<< "$INSTALL_WMS" + + WM_PKGS="${INSTALL_WMS/dwm/}" # remove dwm from package list + WM_PKGS="${WM_PKGS// / }" # remove double spaces + WM_PKGS="${WM_PKGS# }" # remove leading space + + for i in $INSTALL_WMS; do + LOGIN_CHOICES+="$i - " + [[ ${WM_EXT[$i]} && $WM_PKGS != *"${WM_EXT[$i]}"* ]] && WM_PKGS+=" ${WM_EXT[$i]}" + done + + select_login || return 1 + + # add unique wm packages to main package list + for i in $WM_PKGS; do + [[ $PACKAGES == *$i* ]] || PACKAGES+=" ${i# }" + done + + return 0 +} + +select_packages() +{ + dlg USER_PKGS check " Packages " "$_packages" \ + abiword "A Fully-featured word processor" $(ofn abiword "${USER_PKGS[*]}") \ + alacritty "A cross-platform, GPU-accelerated terminal emulator" $(ofn alacritty "${USER_PKGS[*]}") \ + atom "An open-source text editor developed by GitHub" $(ofn atom "${USER_PKGS[*]}") \ + audacious "A free and advanced audio player based on GTK+" $(ofn audacious "${USER_PKGS[*]}") \ + audacity "A program that lets you manipulate digital audio waveforms" $(ofn audacity "${USER_PKGS[*]}") \ + cairo-dock "Light eye-candy fully themable animated dock" $(ofn cairo-dock "${USER_PKGS[*]}") \ + calligra "A set of applications for productivity" $(ofn calligra "${USER_PKGS[*]}") \ + chromium "An open-source web browser based on the Blink rendering engine" $(ofn chromium "${USER_PKGS[*]}") \ + clementine "A modern music player and library organizer" $(ofn clementine "${USER_PKGS[*]}") \ + cmus "A small, fast and powerful console music player" $(ofn cmus "${USER_PKGS[*]}") \ + deadbeef "A GTK+ audio player for GNU/Linux" $(ofn deadbeef "${USER_PKGS[*]}") \ + deluge "A BitTorrent client written in python" $(ofn deluge "${USER_PKGS[*]}") \ + docky "Full fledged dock for opening applications and managing windows" $(ofn docky "${USER_PKGS[*]}") \ + emacs "An extensible, customizable, self-documenting real-time display editor" $(ofn emacs "${USER_PKGS[*]}") \ + epiphany "A GNOME web browser based on the WebKit rendering engine" $(ofn epiphany "${USER_PKGS[*]}") \ + evince "A document viewer" $(ofn evince "${USER_PKGS[*]}") \ + evolution "Manage your email, contacts and schedule" $(ofn evolution "${USER_PKGS[*]}") \ + file-roller "Create and modify archives" $(ofn file-roller "${USER_PKGS[*]}") \ + firefox "A popular open-source web browser from Mozilla" $(ofn firefox "${USER_PKGS[*]}") \ + gcolor2 "A simple GTK+2 color selector" $(ofn gcolor2 "${USER_PKGS[*]}") \ + geany "A fast and lightweight IDE" $(ofn geany "${USER_PKGS[*]}") \ + geary "A lightweight email client for the GNOME desktop" $(ofn geary "${USER_PKGS[*]}") \ + gimp "GNU Image Manipulation Program" $(ofn gimp "${USER_PKGS[*]}") \ + gnome-disk-utility "Disk Management Utility" $(ofn gnome-disk-utility "${USER_PKGS[*]}") \ + gnome-system-monitor "View current processes and monitor system state" $(ofn gnome-system-monitor "${USER_PKGS[*]}") \ + gparted "A GUI frontend for creating and manipulating partition tables" $(ofn gparted "${USER_PKGS[*]}") \ + gpick "Advanced color picker using GTK+ toolkit" $(ofn gpick "${USER_PKGS[*]}") \ + gpicview "Lightweight image viewer" $(ofn gpicview "${USER_PKGS[*]}") \ + guvcview "Capture video from camera devices" $(ofn guvcview "${USER_PKGS[*]}") \ + hexchat "A popular and easy to use graphical IRC client" $(ofn hexchat "${USER_PKGS[*]}") \ + inkscape "Professional vector graphics editor" $(ofn inkscape "${USER_PKGS[*]}") \ + irssi "Modular text mode IRC client" $(ofn irssi "${USER_PKGS[*]}") \ + kdenlive "A popular non-linear video editor for Linux" $(ofn kdenlive "${USER_PKGS[*]}") \ + krita "Edit and paint images" $(ofn krita "${USER_PKGS[*]}") \ + libreoffice-fresh "Full featured office suite" $(ofn libreoffice-fresh "${USER_PKGS[*]}") \ + lollypop "A new music playing application" $(ofn lollypop "${USER_PKGS[*]}") \ + mousepad "A simple text editor" $(ofn mousepad "${USER_PKGS[*]}") \ + mpd "A flexible, powerful, server-side application for playing music" $(ofn mpd "${USER_PKGS[*]}") \ + mpv "A media player based on mplayer" $(ofn mpv "${USER_PKGS[*]}") \ + mupdf "Lightweight PDF and XPS viewer" $(ofn mupdf "${USER_PKGS[*]}") \ + mutt "Small but very powerful text-based mail client" $(ofn mutt "${USER_PKGS[*]}") \ + nautilus "The default file manager for Gnome" $(ofn nautilus "${USER_PKGS[*]}") \ + ncmpcpp "A mpd client and almost exact clone of ncmpc with some new features" $(ofn ncmpcpp "${USER_PKGS[*]}") \ + neovim "A fork of Vim aiming to improve user experience, plugins, and GUIs." $(ofn neovim "${USER_PKGS[*]}") \ + nicotine+ "A graphical client for Soulseek" $(ofn nicotine+ "${USER_PKGS[*]}") \ + noto-fonts "Google Noto fonts" $(ofn noto-fonts "${USER_PKGS[*]}") \ + noto-fonts-cjk "Google Noto CJK fonts (Chinese, Japanese, Korean)" $(ofn noto-fonts-cjk "${USER_PKGS[*]}") \ + obs-studio "Free opensource streaming/recording software" $(ofn obs-studio "${USER_PKGS[*]}") \ + openshot "An open-source, non-linear video editor for Linux" $(ofn openshot "${USER_PKGS[*]}") \ + opera "A Fast and secure, free of charge web browser from Opera Software" $(ofn opera "${USER_PKGS[*]}") \ + pcmanfm "A fast and lightweight file manager based in Lxde" $(ofn pcmanfm "${USER_PKGS[*]}") \ + pidgin "Multi-protocol instant messaging client" $(ofn pidgin "${USER_PKGS[*]}") \ + plank "An elegant, simple, and clean dock" $(ofn plank "${USER_PKGS[*]}") \ + qbittorrent "An advanced BitTorrent client" $(ofn qbittorrent "${USER_PKGS[*]}") \ + qpdfview "A tabbed PDF viewer" $(ofn qpdfview "${USER_PKGS[*]}") \ + qt5ct "GUI for managing Qt based application themes, icons, and fonts" $(ofn qt5ct "${USER_PKGS[*]}") \ + qutebrowser "A keyboard-focused vim-like web browser based on Python and PyQt5" $(ofn qutebrowser "${USER_PKGS[*]}") \ + rhythmbox "A Music playback and management application" $(ofn rhythmbox "${USER_PKGS[*]}") \ + rxvt-unicode "A unicode enabled rxvt-clone terminal emulator" $(ofn rxvt-unicode "${USER_PKGS[*]}") \ + sakura "A terminal emulator based on GTK and VTE" $(ofn sakura "${USER_PKGS[*]}") \ + simplescreenrecorder "A feature-rich screen recorder" $(ofn simplescreenrecorder "${USER_PKGS[*]}") \ + steam "A popular game distribution platform by Valve" $(ofn steam "${USER_PKGS[*]}") \ + surf "A simple web browser based on WebKit2/GTK+" $(ofn surf "${USER_PKGS[*]}") \ + terminator "Terminal emulator that supports tabs and grids" $(ofn terminator "${USER_PKGS[*]}") \ + termite "A minimal VTE-based terminal emulator" $(ofn termite "${USER_PKGS[*]}") \ + thunar "A modern file manager for the Xfce Desktop Environment" $(ofn thunar "${USER_PKGS[*]}") \ + thunderbird "Standalone mail and news reader from mozilla" $(ofn thunderbird "${USER_PKGS[*]}") \ + tilda "A GTK based drop down terminal for Linux and Unix" $(ofn tilda "${USER_PKGS[*]}") \ + tilix "A tiling terminal emulator for Linux using GTK+ 3" $(ofn tilix "${USER_PKGS[*]}") \ + transmission-cli "Free BitTorrent client CLI" $(ofn transmission-cli "${USER_PKGS[*]}") \ + transmission-gtk "Free BitTorrent client GTK+ GUI" $(ofn transmission-gtk "${USER_PKGS[*]}") \ + transmission-qt "Free BitTorrent client Qt GUI" $(ofn transmission-qt "${USER_PKGS[*]}") \ + ttf-anonymous-pro "A family fixed-width fonts designed with code in mind" $(ofn ttf-anonymous-pro "${USER_PKGS[*]}") \ + ttf-fira-code "Monospaced font with programming ligatures" $(ofn ttf-fira-code "${USER_PKGS[*]}") \ + ttf-font-awesome "Iconic font designed for Bootstrap" $(ofn ttf-font-awesome "${USER_PKGS[*]}") \ + ttf-hack "A hand groomed typeface based on Bitstream Vera Mono" $(ofn ttf-hack "${USER_PKGS[*]}") \ + vlc "A free and open source cross-platform multimedia player" $(ofn vlc "${USER_PKGS[*]}") \ + weechat "Fast, light and extensible IRC client" $(ofn weechat "${USER_PKGS[*]}") \ + xarchiver "A GTK+ frontend to various command line archivers" $(ofn xarchiver "${USER_PKGS[*]}") \ + xfce-terminal "A terminal emulator based in the Xfce Desktop Environment" $(ofn xfce-terminal "${USER_PKGS[*]}") \ + xterm "The standard terminal emulator for the X window system" $(ofn xterm "${USER_PKGS[*]}") \ + zathura "Minimalistic document viewer" $(ofn zathura "${USER_PKGS[*]}") + + if [[ $USER_PKGS ]]; then + for i in $USER_PKGS; do + [[ ${PKG_EXT[$i]} && $USER_PKGS != *"${PKG_EXT[$i]}"* ]] && USER_PKGS="${USER_PKGS% } ${PKG_EXT[$i]}" + done + USER_PKGS="${USER_PKGS// / }" + USER_PKGS="${USER_PKGS# }" + USER_PKGS="${USER_PKGS% }" + fi + + return 0 +} + +select_mirrorcmd() +{ + local c='' key="5f29642060ab983b31fdf4c2935d8c56" + + if hash reflector >/dev/null 2>&1; then + MIRROR_CMD="reflector --score 100 -l 50 -f 5 --sort rate --verbose" + yesno "Mirrorlist" "\nSort the mirrorlist automatically?\n\nTakes longer but can find faster mirrors.\n" && return 0 + + c="$(json 'country_name' "$(json 'ip' "check&?access_key=${key}&fields=ip")?access_key=${key}&fields=country_name")" + MIRROR_CMD="reflector --country $c --fastest 5 --sort rate --verbose" + + tput cnorm + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" \ + --title " Mirrorlist " --inputbox "\nThe command below will be used to sort the mirrorlist, edit if needed.\n\n + --score n Limit the list to the n servers with the highest score. + --latest n Limit the list to the n most recently synchronized servers. + --fastest n Return the n fastest mirrors that meet the other criteria. + --sort {age,rate,country,score,delay} + + 'age': Last server synchronization; + 'rate': Download rate; + 'country': Server location; + 'score': MirrorStatus score; + 'delay': MirrorStatus delay.\n" 0 0 "$MIRROR_CMD" 2>"$ANS" + + [ $? -eq 0 ] || return 1 + read -r MIRROR_CMD < "$ANS" + elif hash rankmirrors >/dev/null 2>&1; then + msg "Mirrorlist" "\nQuerying mirrors near your location\n" + c="$(json 'country_code' "$(json 'ip' "check&?access_key=${key}&fields=ip")?access_key=${key}&fields=country_code")" + local w="https://www.archlinux.org/mirrorlist/?country=" + if [[ $c ]]; then + [[ $c =~ (CA|US) ]] && MIRROR_CMD="curl -s '${w}US&country=CA&use_mirror_status=on'" || MIRROR_CMD="curl -s '${w}${c}&use_mirror_status=on'" + else + MIRROR_CMD="curl -s '${w}US&country=CA&country=NZ&country=GB&country=AU&use_mirror_status=on'" + fi + fi + + return 0 +} + +############################################################################### +# partition menus + +part_menu() +{ + check_background_install || return 0 + + local device choice devhash="$(lsblk -f | base64)" + if [[ $# -eq 1 ]]; then + device="$1" + else + umount_dir $MNT + part_device || return 1 + device="$DEVICE" + fi + + while true; do + if [[ $DISPLAY && $TERM != 'linux' ]] && hash gparted >/dev/null 2>&1; then + dlg choice menu "Edit Partitions" "$_part" \ + "auto" "Whole device automatic partitioning" \ + "gparted" "GUI front end to parted" \ + "cfdisk" "Curses based variant of fdisk" \ + "parted" "GNU partition editor" \ + "fdisk" "Dialog-driven program for creation and manipulation of partition tables." \ + "done" "Return to the main menu" + + else + dlg choice menu "Edit Partitions" "$_part" \ + "auto" "Whole device automatic partitioning" \ + "cfdisk" "Curses based variant of fdisk" \ + "parted" "GNU partition editor" \ + "fdisk" "Dialog-driven program for creation and manipulation of partition tables." \ + "done" "Return to the main menu" + + fi + + if [[-z $choice || $choice == 'done' ]]; then + return 0 + elif [[ $choice == 'auto' ]]; then + local root_size txt ret table boot_fs + root_size=$(lsblk -lno SIZE "$device" | awk 'NR == 1 { + if ($1 ~ "G") { + sub(/G/, "") + print ($1 * 1000 - 512) / 1000 "G" + } else { + sub(/M/, "") + print ($1 - 512) "M" + } + }') + txt="\nWARNING:\n\nALL data on $device will be destroyed and the following partitions will be created\n\n- " + if [[ $SYS == 'BIOS' ]]; then + table="msdos" boot_fs="ext4" + txt+="An $boot_fs boot partition with the boot flag enabled (512M)\n- " + else + table="gpt" boot_fs="fat32" + txt+="A $boot_fs efi boot partition (512M)\n- " + fi + txt+="An ext4 partition using all remaining space ($root_size)\n\nDo you want to continue?\n" + yesno "Auto Partition" "$txt" && part_auto "$device" "$table" "$boot_fs" "$root_size" + else + clear + tput cnorm + $choice "$device" + fi + + # update the kernel if the partition table changes + [[ $devhash == "$(lsblk -f | base64)" ]] || partprobe >/dev/null 2>&1 + done +} + +part_show() +{ + tput civis + local txt + if [[ $IGNORE_DEV ]]; then + txt="$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT | awk "!/$IGNORE_DEV/"' && /disk|part|lvm|crypt|NAME/')" + else + txt="$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT | awk '/disk|part|lvm|crypt|NAME/')" + fi + msg "Device Tree" "\n\n$txt\n\n" +} + +part_swap() +{ + if [[ $1 == "$MNT/swapfile" && $SWAP_SIZE ]]; then + fallocate -l $SWAP_SIZE $1 2>$ERR + errshow "fallocate -l $SWAP_SIZE $1" + chmod 600 $1 2>$ERR + errshow "chmod 600 $1" + fi + mkswap $1 >/dev/null 2>$ERR + errshow "mkswap $1" + swapon $1 >/dev/null 2>$ERR + errshow "swapon $1" + return 0 +} + +part_auto() +{ + local device="$1" table="$2" boot_fs="$3" size="$4" + local dev_info="$(parted -s $device print)" + + msg "Auto Partition" "\nRemoving partitions on $device and setting table to $table\n" 1 + + swapoff -a + while read -r PART; do + parted -s $device rm $PART >/dev/null 2>&1 + done <<< "$(awk '/^ [1-9][0-9]?/ {print $1}' <<< "$dev_info" | sort -r)" + + [[ $(awk '/Table:/ {print $3}' <<< "$dev_info") != "$table" ]] && parted -s $device mklabel $table >/dev/null 2>&1 + + msg "Auto Partition" "\nCreating a 512M $boot_fs boot partition.\n" 1 + if [[ $SYS == "BIOS" ]]; then + parted -s $device mkpart primary $boot_fs 1MiB 513MiB >/dev/null 2>&1 + else + parted -s $device mkpart ESP $boot_fs 1MiB 513MiB >/dev/null 2>&1 + fi + + sleep 0.5 + BOOT_DEV="$device" + AUTO_BOOT_PART=$(lsblk -lno NAME,TYPE $device | awk 'NR==2 {print "/dev/" $1}') + + if [[ $SYS == "BIOS" ]]; then + mkfs.ext4 -q $AUTO_BOOT_PART >/dev/null 2>&1 + else + mkfs.vfat -F32 $AUTO_BOOT_PART >/dev/null 2>&1 + fi + + msg "Auto Partition" "\nCreating a $size ext4 root partition.\n" 0 + parted -s $device mkpart primary ext4 513MiB 100% >/dev/null 2>&1 + sleep 0.5 + AUTO_ROOT_PART="$(lsblk -lno NAME,TYPE $device | awk 'NR==3 {print "/dev/" $1}')" + mkfs.ext4 -q $AUTO_ROOT_PART >/dev/null 2>&1 + tput civis + sleep 0.5 + FORMATTED+="$AUTO_BOOT_PART $AUTO_ROOT_PART " + msg "Auto Partition" "\nProcess complete.\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE $device)\n" +} + +part_find() +{ + local str="$1" err='' + + # string of partitions as /TYPE/PART SIZE + if [[ $IGNORE_DEV ]]; then + PARTS="$(lsblk -lno TYPE,NAME,SIZE | + awk "/$str/"' && !'"/$IGNORE_DEV/"' { + sub(/^part/, "/dev/") + sub(/^lvm|^crypt/, "/dev/mapper/") + print $1$2, $3 + }')" + else + PARTS="$(lsblk -lno TYPE,NAME,SIZE | + awk "/$str/"' { + sub(/^part/, "/dev/") + sub(/^lvm|^crypt/, "/dev/mapper/") + print $1$2 " " $3 + }')" + fi + + # number of partitions total + if [[ $PARTS ]]; then + COUNT=$(wc -l <<< "$PARTS") + else + COUNT=0 + fi + + # ensure we have enough partitions for the system and action type + case "$str" in + 'part|lvm|crypt') [[ $COUNT -lt 1 || ($SYS == 'UEFI' && $COUNT -lt 2) ]] && err="$_errpart" ;; + 'part|crypt') (( COUNT < 1 )) && err="$_lvmerr" ;; + 'part|lvm') (( COUNT < 2 )) && err="$_lukserr" ;; + esac + + # if there aren't enough partitions show the relevant error message + [[ $err ]] && { msg "Not Enough Partitions" "$err" 2; return 1; } + + return 0 +} + +part_mount() +{ + local part="$1" + local mountp="${MNT}$2" + local fs="$(lsblk -lno FSTYPE $part)" + mkdir -p "$mountp" + + if [[ $fs && ${FS_OPTS[$fs]} && $part != "$BOOT_PART" ]] && select_mntopts "$fs"; then + mount -o $MNT_OPTS "$part" "$mountp" >/dev/null 2>&1 + else + mount "$part" "$mountp" >/dev/null 2>&1 + fi + + part_mountconf $part "$mountp" || return 1 + part_cryptlv "$part" + + return 0 +} + +part_format() +{ + local part="$1" fs="$2" delay="$3" fscmd="${FS_CMDS[$2]}" + + msg "Format" "\nFormatting $part as $fs\n" 0 + + $fscmd "$part" >/dev/null 2>$ERR + errshow "$fscmd $part" || return 1 + + FORMATTED+="$part " + sleep ${delay:-0} +} + +part_device() +{ + if [[ $DEV_COUNT -eq 1 && $SYS_DEVS ]]; then + DEVICE="$(awk '{print $1}' <<< "$SYS_DEVS")" + elif (( DEV_COUNT > 1 )); then + tput civis + if [[ $1 ]]; then + dlg DEVICE menu "Boot Device" "\nSelect the device to use for bootloader install." $SYS_DEVS + else + dlg DEVICE menu "Select Device" "$_device" $SYS_DEVS + fi + [[ $DEVICE ]] || return 1 + elif [[ $DEV_COUNT -lt 1 && ! $1 ]]; then + msg "Installation Error" "\nNo available devices.\n\nExiting..\n" 2; die 1 + fi + + [[ $1 ]] && BOOT_DEV="$DEVICE" + + return 0 +} + +part_bootdev() +{ + msg "Boot Device" "\nSetting device flags for: $BOOT_PART\n" 1 + [[ $BOOT_PART = /dev/nvme* ]] && BOOT_DEV="${BOOT_PART%p[1-9]}" || BOOT_DEV="${BOOT_PART%[1-9]}" + BOOT_PART_NUM="${BOOT_PART: -1}" + if [[ $SYS == 'UEFI' ]]; then + parted -s $BOOT_DEV set $BOOT_PART_NUM esp on >/dev/null 2>&1 + else + parted -s $BOOT_DEV set $BOOT_PART_NUM boot on >/dev/null 2>&1 + fi + return 0 +} + +part_cryptlv() +{ + local part="$1" + local devs="$(lsblk -lno NAME,FSTYPE,TYPE)" + + # Identify if $part is LUKS+LVM, LVM+LUKS, LVM alone, or LUKS alone + if lsblk -lno TYPE "$part" | grep -q 'crypt'; then + LUKS='encrypted' + LUKS_NAME="${part#/dev/mapper/}" + + for dev in $(awk '/lvm/ && /crypto_LUKS/ {print "/dev/mapper/"$1}' <<< "$devs" | uniq); do + if lsblk -lno NAME "$dev" | grep -q "$LUKS_NAME"; then + LUKS_DEV="$LUKS_DEV cryptdevice=$dev:$LUKS_NAME" + LVM='logical volume' + break + fi + done + + for dev in $(awk '/part/ && /crypto_LUKS/ {print "/dev/"$1}' <<< "$devs" | uniq); do + if lsblk -lno NAME "$dev" | grep -q "$LUKS_NAME"; then + LUKS_UUID="$(lsblk -lno UUID,TYPE,FSTYPE "$dev" | awk '/part/ && /crypto_LUKS/ {print $1}')" + LUKS_DEV="$LUKS_DEV cryptdevice=UUID=$LUKS_UUID:$LUKS_NAME" + break + fi + done + + elif lsblk -lno TYPE "$part" | grep -q 'lvm'; then + LVM='logical volume' + VNAME="${part#/dev/mapper/}" + + for dev in $(awk '/crypt/ && /lvm2_member/ {print "/dev/mapper/"$1}' <<< "$devs" | uniq); do + if lsblk -lno NAME "$dev" | grep -q "$VNAME"; then + LUKS_NAME="${dev/\/dev\/mapper\//}" + break + fi + done + + for dev in $(awk '/part/ && /crypto_LUKS/ {print "/dev/"$1}' <<< "$devs" | uniq); do + if lsblk -lno NAME "$dev" | grep -q "$LUKS_NAME"; then + LUKS_UUID="$(lsblk -lno UUID,TYPE,FSTYPE "$dev" | awk '/part/ && /crypto_LUKS/ {print $1}')" + LUKS_DEV="$LUKS_DEV cryptdevice=UUID=$LUKS_UUID:$LUKS_NAME" + LUKS='encrypted' + break + fi + done + fi +} + +part_countdec() +{ + for i in "$@"; do + if (( COUNT > 0 )); then + PARTS="$(sed "/${i//\//\\/}/d" <<< "$PARTS")" + (( COUNT-- )) + fi + done +} + +part_mountconf() +{ + if grep -qw "$1" /proc/mounts; then + msg "Mount Success" "\nPartition $1 mounted at $2\n" 1 + part_countdec "$1" + return 0 + else + msg "Mount Fail" "\nPartition $1 failed to mount at $2\n" 2 + return 1 + fi +} + +############################################################################### +# mounting menus + +select_menu() +{ + check_background_install || return 0 + lvm_detect + umount_dir $MNT + part_find 'part|lvm|crypt' || { SEL=2; return 1; } + + [[ $LUKS && $LUKS_PART ]] && part_countdec $LUKS_PART + [[ $LVM && $LVM_PARTS ]] && part_countdec $LVM_PARTS + + select_root_partition || return 1 + + if [[ $SYS == 'UEFI' ]]; then + select_efi_partition || { BOOT_PART=''; return 1; } + elif (( COUNT > 0 )); then + select_boot_partition || { BOOT_PART=''; return 1; } + fi + + if [[ $BOOT_PART ]]; then + part_mount "$BOOT_PART" "/$BOOTDIR" && SEP_BOOT=true || return 1 + part_bootdev + fi + + select_swap || return 1 + select_extra_partitions || return 1 + + install_background || return 1 + + return 0 +} + +select_swap() +{ + tput civis + dlg SWAP_PART menu "Swap Setup" "\nSelect whether to use a swapfile, swap partition, or none." \ + "none" "Don't allocate any swap space" \ + "swapfile" "Allocate $SYS_MEM at /swapfile" \ + $PARTS + + if [[ -z $SWAP_PART || $SWAP_PART == "none" ]]; then + SWAP_PART='' + return 0 + elif [[ $SWAP_PART == "swapfile" ]]; then + tput cnorm + local i=0 + until [[ ${SWAP_SIZE:0:1} =~ [1-9] && ${SWAP_SIZE: -1} =~ (M|G) ]]; do + (( i > 0 )) && msg "Swap Size Error" "\nSwap size must be 1(M|G) or greater, and can only contain whole numbers\n\nSize entered: $SWAP_SIZE\n" 2 + dlg SWAP_SIZE input "Swap Setup" "$_swapsize" "$SYS_MEM" + [ $? -eq 0 ] || { SWAP_PART=''; SWAP_SIZE=''; return 1; } + (( i++ )) + done + part_swap "$MNT/$SWAP_PART" + SWAP_PART="/$SWAP_PART" + elif [[ $PARTS == *"$SWAP_PART"* ]]; then + part_swap $SWAP_PART + part_countdec $SWAP_PART + SWAP_SIZE="$(lsblk -lno SIZE $SWAP_PART)" + else + return 1 + fi + + return 0 +} + +select_mntopts() +{ + local fs="$1" opts='' + local title="${fs^} Mount Options" + + for i in ${FS_OPTS[$fs]}; do + opts+="$i - off " + done + + until [[ $MNT_OPTS ]]; do + dlg MNT_OPTS check "$title" "$_mount" $opts + [[ $MNT_OPTS ]] || return 1 + MNT_OPTS="${MNT_OPTS// /,}" + yesno "$title" "\nConfirm the following options: $MNT_OPTS\n" || MNT_OPTS='' + done + + return 0 +} + +select_mountpoint() +{ + EXMNT='' + tput cnorm + until [[ $EXMNT ]]; do + dlg EXMNT input "Extra Mount $part" "$_exmnt" "/" + [ $? -eq 0 ] || return 1 + if [[ ${EXMNT:0:1} != "/" || ${#EXMNT} -le 1 || $EXMNT =~ \ |\' || $EXMNTS == *"$EXMNT"* ]]; then + msg "Installation Error" "$_errexpart" + EXMNT='' + fi + done + return 0 +} + +select_filesystem() +{ + local part="$1" fs='' + local cur="$(lsblk -lno FSTYPE "$part" 2>/dev/null)" + local txt="\nSelect which filesystem to use for: $part\n\nDefault: ext4" + + until [[ $fs ]]; do + if [[ $cur && ($part != "$ROOT_PART" || $FORMATTED == *"$part"*) ]]; then + dlg fs menu "Filesystem" "$txt\nCurrent: $cur" skip - ext4 - ext3 - ext2 - vfat - ntfs - f2fs - jfs - xfs - nilfs2 - reiserfs - + else + dlg fs menu "Filesystem" "$txt" ext4 - ext3 - ext2 - vfat - ntfs - f2fs - jfs - xfs - nilfs2 - reiserfs - + fi + [ $? -eq 0 ] || return 1 + [[ $fs == 'skip' ]] && return 0 + yesno "Filesystem" "\nFormat $part as $fs?\n" || fs='' + done + part_format "$part" "$fs" +} + +select_efi_partition() +{ + tput civis + + if (( COUNT == 1 )); then + BOOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")" + elif [[ $AUTO_BOOT_PART ]]; then + BOOT_PART="$AUTO_BOOT_PART" + return 0 # were done here + else + dlg BOOT_PART menu "EFI Partition" "$_uefi" $PARTS + fi + + [[ $BOOT_PART ]] || return 1 + + if grep -q 'fat' <<< "$(fsck -N "$BOOT_PART")"; then + local txt="\nIMPORTANT:\n\nThe EFI partition $BOOT_PART $_format" + if yesno "Format EFI Partition" "$txt" "Format $BOOT_PART" "Skip Formatting" 1; then + part_format "$BOOT_PART" "vfat" 2 + fi + else + part_format "$BOOT_PART" "vfat" 2 + fi + + return 0 +} + +select_boot_partition() +{ + if [[ $AUTO_BOOT_PART && ! $LVM ]]; then + BOOT_PART="$AUTO_BOOT_PART"; return 0 # were done here + elif [[ $LUKS && ! $LVM ]]; then + dlg BOOT_PART menu "Boot Partition" "$_biosluks" $PARTS + [[ $BOOT_PART ]] || return 1 + else + dlg BOOT_PART menu "Boot Partition" "$_bios" "skip" "don't use a separate boot" $PARTS + [[ -z $BOOT_PART || $BOOT_PART == "skip" ]] && { BOOT_PART=''; return 0; } + fi + + if grep -q 'ext[34]' <<< "$(fsck -N "$BOOT_PART")"; then + local txt="\nIMPORTANT:\n\nThe boot partition $BOOT_PART $_format" + if yesno "Format Boot Partition" "$txt" "Format $BOOT_PART" "Skip Formatting" 1; then + part_format "$BOOT_PART" "ext4" 2 + fi + else + part_format "$BOOT_PART" "ext4" 2 + fi + return 0 +} + +select_root_partition() +{ + if [[ $AUTO_ROOT_PART && ! $LVM && ! $LUKS ]]; then + ROOT_PART="$AUTO_ROOT_PART" + elif (( COUNT == 1 )); then + ROOT_PART="$(awk 'NR==1 {print $1}' <<< "$PARTS")" + else + dlg ROOT_PART menu "Mount Root" "\nSelect the root (/) partition, this is where $DIST will be installed." $PARTS + fi + + [[ $ROOT_PART ]] || return 1 + + select_filesystem "$ROOT_PART" || { ROOT_PART=''; return 1; } + part_mount "$ROOT_PART" || { ROOT_PART=''; return 1; } + + return 0 +} + +select_extra_partitions() +{ + local part + + while (( COUNT > 0 )); do + part='' + tput civis + dlg part menu 'Mount Boot' "$_expart" 'done' 'finish mounting step' $PARTS + if [[ $part == 'done' || -z $part ]]; then + break + elif select_filesystem "$part" && select_mountpoint && part_mount "$part" "$EXMNT"; then + EXMNTS+="$part: $EXMNT " + [[ $EXMNT == '/usr' && $HOOKS != *usr* ]] && HOOKS="usr $HOOKS" + else + return 1 + fi + done + + return 0 +} + +############################################################################### +# installation + +install_main() +{ + clear + tput cnorm + install_base + genfstab -U $MNT >$MNT/etc/fstab 2>$ERR + errshow 1 "genfstab -U $MNT >$MNT/etc/fstab" + [[ -f $MNT/swapfile ]] && sed -i "s~${MNT}~~" $MNT/etc/fstab + install_mirrorlist + install_packages + install_mkinitcpio + install_boot + chrun "hwclock --systohc --utc" || chrun "hwclock --systohc --utc --directisa" + install_user + install_login + chrun "chown -Rf $NEWUSER:users /home/$NEWUSER" + sleep 1 + + while true; do + dlg choice menu "Finalization" "$_edit" \ + finished "exit the installer and reboot" \ + keyboard "${EDIT_FILES[keyboard]}" \ + console "${EDIT_FILES[console]}" \ + locale "${EDIT_FILES[locale]}" \ + hostname "${EDIT_FILES[hostname]}" \ + sudoers "${EDIT_FILES[sudoers]}" \ + mkinitcpio "${EDIT_FILES[mkinitcpio]}" \ + fstab "${EDIT_FILES[fstab]}" \ + crypttab "${EDIT_FILES[crypttab]}" \ + bootloader "${EDIT_FILES[bootloader]}" \ + pacman "${EDIT_FILES[pacman]}" \ + login "${EDIT_FILES[login]}" + + if [[ -z $choice || $choice == "finished" ]]; then + [[ $DEBUG == true && -r $DBG ]] && vim $DBG + die 127 + else + local exists='' + for f in ${EDIT_FILES[$choice]}; do + [[ -e ${MNT}$f ]] && exists+=" ${MNT}$f" + done + if [[ $exists ]]; then + vim -O $exists + else + msg "File Error" "\nFile(s) do not exist.\n" + fi + fi + done +} + +install_base() +{ + if [[ $RSYNC_PID ]]; then + while kill -0 $RSYNC_PID 2>/dev/null; do + clear + printf "\nSystem base is still unpacking...\n" + sleep 1 + done + trap - EXIT + unset RSYNC_PID + elif [[ -d /run/archiso/sfs/airootfs/etc/skel ]]; then + rsync -ahv /run/archiso/sfs/airootfs/ $MNT/ 2>$ERR + errshow 1 "rsync -ahv /run/archiso/sfs/airootfs/ $MNT/" + else + install_mirrorlist + pacstrap $MNT base $KERNEL $UCODE $ISO_BASE 2>$ERR + errshow 1 "pacstrap $MNT base $KERNEL $UCODE $ISO_BASE" + fi + + rm -rf $MNT/etc/mkinitcpio-archiso.conf + find $MNT/usr/lib/initcpio -name 'archiso*' -type f -delete + sed -i 's/volatile/auto/g' $MNT/etc/systemd/journald.conf + + if [[ $VM ]]; then + rm -rfv $MNT/etc/X11/xorg.conf.d/*?.conf + sleep 1 + elif [[ "$(lspci | grep ' VGA ' | grep 'Intel')" ]]; then + cat > $MNT/etc/X11/xorg.conf.d/20-intel.conf << EOF +Section "Device" + Identifier "Intel Graphics" + Driver "intel" + Option "TearFree" "true" +EndSection +EOF + fi + + if [[ -e /run/archiso/sfs/airootfs ]]; then + [[ $KERNEL == 'linux' ]] && cp -vf $RUN/x86_64/vmlinuz $MNT/boot/vmlinuz-linux + [[ $UCODE ]] && cp -vf $RUN/${UCODE/-/_}.img $MNT/boot/$UCODE.img + fi + + cp -fv /etc/resolv.conf $MNT/etc/ + if [[ -e /etc/NetworkManager/system-connections ]]; then + cp -rvf /etc/NetworkManager/system-connections $MNT/etc/NetworkManager/ + fi + + echo "LANG=$MYLOCALE" > $MNT/etc/locale.conf + echo "LANG=$MYLOCALE" > $MNT/etc/default/locale + sed -i "s/#en_US.UTF-8/en_US.UTF-8/g; s/#${MYLOCALE}/${MYLOCALE}/g" $MNT/etc/locale.gen + chrun "locale-gen" + chrun "ln -svf /usr/share/zoneinfo/$ZONE/$SUBZ /etc/localtime" + + if [[ $BROADCOM_WL ]]; then + echo 'blacklist bcma' >> $MNT/etc/modprobe.d/blacklist.conf + rm -f $MNT/etc/modprobe/ + fi + + cat > $MNT/etc/X11/xorg.conf.d/00-keyboard.conf << EOF +# Use localectl(1) to instruct systemd-localed to update it. +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "on" + Option "XkbLayout" "$KEYMAP" +EndSection +EOF + cat > $MNT/etc/default/keyboard << EOF +# KEYBOARD CONFIGURATION FILE +# Consult the keyboard(5) manual page. +XKBMODEL="" +XKBLAYOUT="$KEYMAP" +XKBVARIANT="" +XKBOPTIONS="" +BACKSPACE="guess" +EOF + printf "KEYMAP=%s\nFONT=%s\n" "$CMAP" "$FONT" > $MNT/etc/vconsole.conf + echo "$MYHOST" > $MNT/etc/hostname + cat > $MNT/etc/hosts << EOF +127.0.0.1 localhost +127.0.1.1 $MYHOST +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +EOF + +} + +install_boot() +{ + if [[ $ROOT_PART == /dev/mapper* ]]; then + ROOT_PART_ID="$ROOT_PART" + else + local uuid_type="UUID" + [[ $BOOTLDR =~ (systemd-boot|refind-efi|efistub) ]] && uuid_type="PARTUUID" + ROOT_PART_ID="$uuid_type=$(blkid -s $uuid_type -o value $ROOT_PART)" + fi + + if [[ $SYS == 'UEFI' ]]; then + find $MNT/$BOOTDIR/EFI/ -maxdepth 1 -mindepth 1 -iname "$DIST" -type d -delete >/dev/null 2>&1 + find $MNT/$BOOTDIR/EFI/ -maxdepth 1 -mindepth 1 -iname 'boot' -type d -delete >/dev/null 2>&1 + fi + + prerun_$BOOTLDR + chrun "${BCMDS[$BOOTLDR]}" 2>$ERR + errshow 1 "${BCMDS[$BOOTLDR]}" + + if [[ -d $MNT/hostrun ]]; then + umount $MNT/hostrun/udev >/dev/null 2>&1 + umount $MNT/hostrun/lvm >/dev/null 2>&1 + rm -rf $MNT/hostrun >/dev/null 2>&1 + fi + + if [[ $SYS == 'UEFI' ]]; then + # some UEFI firmware requires a generic esp/BOOT/BOOTX64.EFI + mkdir -pv $MNT/$BOOTDIR/EFI/BOOT + if [[ $BOOTLDR == 'grub' ]]; then + cp -fv $MNT/$BOOTDIR/EFI/$DIST/grubx64.efi $MNT/$BOOTDIR/EFI/BOOT/BOOTX64.EFI + elif [[ $BOOTLDR == 'syslinux' ]]; then + cp -rf $MNT/$BOOTDIR/EFI/syslinux/* $MNT/$BOOTDIR/EFI/BOOT/ + cp -f $MNT/$BOOTDIR/EFI/syslinux/syslinux.efi $MNT/$BOOTDIR/EFI/BOOT/BOOTX64.EFI + elif [[ $BOOTLDR == 'refind-efi' ]]; then + sed -i '/#extra_kernel_version_strings/ c extra_kernel_version_strings linux-hardened,linux-zen,linux-lts,linux' $MNT/$BOOTDIR/EFI/refind/refind.conf + cp -fv $MNT/$BOOTDIR/EFI/refind/refind_x64.efi $MNT/$BOOTDIR/EFI/BOOT/BOOTX64.EFI + fi + fi + + return 0 +} + +install_user() +{ + chrun "chpasswd <<< 'root:$ROOT_PASS'" 2>$ERR + errshow 1 "set root password" + if [[ $MYSHELL != *zsh ]]; then + chrun "usermod -s $MYSHELL root" 2>$ERR + errshow 1 "usermod -s $MYSHELL root" + if [[ $MYSHELL == "/usr/bin/mksh" ]]; then + cp -fv $MNT/etc/skel/.mkshrc /root/.mkshrc + fi + fi + + local groups='audio,autologin,floppy,log,network,rfkill,scanner,storage,optical,power,wheel' + + chrun "groupadd -r autologin" 2>$ERR + errshow 1 "groupadd -r autologin" + chrun "useradd -m -u 1000 -g users -G $groups -s $MYSHELL $NEWUSER" 2>$ERR + errshow 1 "useradd -m -u 1000 -g users -G $groups -s $MYSHELL $NEWUSER" + chrun "chpasswd <<< '$NEWUSER:$USER_PASS'" 2>$ERR + errshow 1 "set $NEWUSER password" + + if [[ $USER_PKGS == *neovim* ]]; then + mkdir -p $MNT/home/$NEWUSER/.config/nvim + cp -fv $MNT/home/$NEWUSER/.vimrc $MNT/home/$NEWUSER/.config/nvim/init.vim + cp -rfv $MNT/home/$NEWUSER/.vim/colors $MNT/home/$NEWUSER/.config/nvim/colors + fi + + if [[ $MYSHELL == '/usr/bin/mksh' ]]; then + cat >> $MNT/home/$NEWUSER/.mkshrc << EOF +# colors in less (manpager) +export LESS_TERMCAP_mb=$'\e[01;31m' +export LESS_TERMCAP_md=$'\e[01;31m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[01;44;33m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[01;32m' + +export EDITOR=$([[ $USER_PKGS == *neovim* ]] && printf "n")vim + +# source shell configs +for f in "\$HOME/.mksh/"*?.sh; do + . "\$f" +done + +al-info +EOF + fi + + [[ $INSTALL_WMS == *dwm* ]] && install_suckless + [[ $LOGIN_WM =~ (startkde|gnome-session) ]] && sed -i '/super/d' $HOME/.xprofile /root/.xprofile + + return 0 +} + +install_login() +{ + SERVICE="$MNT/etc/systemd/system/getty@tty1.service.d" + + # remove welcome message + sed -i '/printf/d' $MNT/root/.zshrc + + # remove unneeded shell files from installation + case $MYSHELL in + "/bin/bash") rm -rf $MNT/home/$NEWUSER/.{zsh,mksh}* $MNT/root/.{zsh,mksh}* ;; + "/usr/bin/mksh") rm -rf $MNT/home/$NEWUSER/.{zsh,bash}* $MNT/home/$NEWUSER/.inputrc $MNT/root/.{zsh,bash}* $MNT/root/.inputrc ;; + "/usr/bin/zsh") rm -rf $MNT/home/$NEWUSER/.{bash,mksh}* $MNT/home/$NEWUSER/.inputrc $MNT/root/.{bash,mksh}* $MNT/root/.inputrc ;; + esac + + install_${LOGIN_TYPE:-xinit} +} + +install_xinit() +{ + if [[ -e $MNT/home/$NEWUSER/.xinitrc ]] && grep -q 'exec' $MNT/home/$NEWUSER/.xinitrc; then + sed -i "/exec/ c exec ${LOGIN_WM}" $MNT/home/$NEWUSER/.xinitrc + else + printf "exec %s\n" "$LOGIN_WM" >> $MNT/home/$NEWUSER/.xinitrc + fi + + [[ ${EDIT_FILES[login]} == *"$LOGINRC"* ]] || EDIT_FILES[login]+=" /home/$NEWUSER/$LOGINRC" + + if [[ $AUTOLOGIN ]]; then + sed -i "s/root/${NEWUSER}/g" $SERVICE/autologin.conf + cat > $MNT/home/$NEWUSER/$LOGINRC << EOF +# ~/$LOGINRC +# sourced by ${MYSHELL##*/} when used as a login shell + +# automatically run startx when logging in on tty1 +[[ -z \$DISPLAY && \$XDG_VTNR -eq 1 ]] && exec startx -- vt1 +EOF + else + rm -rf $SERVICE + rm -rf $MNT/home/$NEWUSER/.{profile,zprofile,bash_profile} + fi +} + +install_lightdm() +{ + rm -rf $SERVICE + rm -rf $MNT/home/$NEWUSER/.{xinitrc,profile,zprofile,bash_profile} + chrun 'systemctl set-default graphical.target && systemctl enable lightdm.service' 2>$ERR + errshow 1 "systemctl set-default graphical.target && systemctl enable lightdm.service" + cat > $MNT/etc/lightdm/lightdm-gtk-greeter.conf << EOF +# LightDM GTK+ Configuration + +[greeter] +active-monitor=0 +default-user-image=/usr/share/icons/ArchLabs-Dark/64x64/places/distributor-logo-archlabs.png +background=/usr/share/backgrounds/archlabs/archlabs.jpg +theme-name=Adwaita-dark +icon-theme-name=Adwaita +font-name=DejaVu Sans Mono 11 +position=30%,end 50%,end +EOF +} + +install_packages() +{ + local inpkg="$BASE_PKGS $PACKAGES $USER_PKGS" + local rmpkg="" + + if pacman -Qsq 'archlabs-installer' >/dev/null 2>&1; then + rmpkg+="archlabs-installer" + elif [[ -e "$MNT/usr/bin/archlabs-installer" ]]; then + rm -f "$MNT/usr/bin/archlabs-installer" + fi + + [[ $MYSHELL == *mksh ]] && inpkg+=" mksh" + [[ $KERNEL == 'linux' ]] || { inpkg+=" $KERNEL"; rmpkg+=" linux"; } + + # add xterm when not installing a terminal emulator or de that provides one + [[ $inpkg =~ (term|urxvt|tilix|alacritty|sakura|tilda|plasma|cinnamon) || $INSTALL_WMS == *dwm* ]] || inpkg+=" xterm" + + [[ $MYSHELL == '/usr/bin/zsh' ]] && inpkg+=" zsh-completions" + [[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps|dwm|fluxbox) ]] && inpkg+=" $WM_BASE_PKGS" + [[ $INSTALL_WMS =~ ^(plasma|gnome|cinnamon)$ ]] || inpkg+=" archlabs-ksuperkey" + + chrun "pacman -Syyu --noconfirm" + chrun "pacman -Rns $rmpkg --noconfirm" + chrun "pacman -S iputils --noconfirm" + chrun "pacman -S $inpkg --needed --noconfirm" + + if [[ $BOOTLDR == 'grub' ]]; then + chrun "pacman -S grub os-prober efibootmgr --needed --noconfirm" + elif [[ $BOOTLDR == 'refind-efi' ]]; then + chrun "pacman -S refind-efi efibootmgr --needed --noconfirm" + elif [[ $SYS == 'UEFI' ]]; then + chrun "pacman -S efibootmgr --needed --noconfirm" + fi + + sed -i "s/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" $MNT/etc/sudoers + return 0 +} + +install_suckless() +{ + mkdir -pv $MNT/home/$NEWUSER/suckless + + for i in dwm dmenu st; do + if chrun "git clone https://bitbucket.org/natemaia/$i /home/$NEWUSER/suckless/$i"; then + chrun "cd /home/$NEWUSER/suckless/$i; rm -f config.h; make clean install; make clean" + else + printf "failed to clone $i repo\n" + fi + done + + if [[ -d $MNT/home/$NEWUSER/suckless/dwm && -x $MNT/usr/bin/dwm ]]; then + printf "To configure dwm edit /home/$NEWUSER/suckless/dwm/config.h\n" + printf "You can then recompile it with 'sudo make clean install'\n" + sleep 2 + fi +} + +install_mirrorlist() +{ + if hash reflector >/dev/null 2>&1; then + $MIRROR_CMD --save $MNT/etc/pacman.d/mirrorlist --verbose || reflector --score 100 -l 50 -f 10 --sort rate --verbose --save $MNT/etc/pacman.d/mirrorlist + else + { eval $MIRROR_CMD || curl -s 'https://www.archlinux.org/mirrorlist/all/'; } | + sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -v -t -n 10 - > $MNT/etc/pacman.d/mirrorlist + fi +} + +install_mkinitcpio() +{ + local add='' + # [[ $LUKS_UUID && $LUKS_PASS && $SYS == 'UEFI' && $BOOTLDR == 'grub' ]] && luks_keyfile + [[ $LUKS ]] && add="encrypt" + [[ $LVM ]] && { [[ $add ]] && add+=" lvm2" || add+="lvm2"; } + sed -i "s/block filesystems/block ${add} filesystems ${HOOKS}/g" $MNT/etc/mkinitcpio.conf + chrun "mkinitcpio -p $KERNEL" 2>$ERR + errshow 1 "mkinitcpio -p $KERNEL" +} + +install_background() +{ + if [[ -d /run/archiso/sfs/airootfs/etc/skel ]] && grep -qw "$MNT" /proc/mounts && (grep -qw "$MNT/$BOOTDIR" /proc/mounts || [[ $SYS == 'BIOS' && -z $LUKS ]]); then + msg "Background Install" "\nThe system base will now be unpacked in the background.\n" 2 + rsync -a /run/archiso/sfs/airootfs/ $MNT/ >/dev/null 2>&1 & + RSYNC_PID=$! + trap "kill $RSYNC_PID 2>/dev/null" EXIT + fi + return 0 +} + +############################################################################### +# bootloader setup + +setup_grub() +{ + EDIT_FILES[bootloader]="/etc/default/grub" + + if [[ $SYS == 'BIOS' ]]; then + [[ $BOOT_DEV ]] || { part_device 1 || return 1; } + BCMDS[grub]="grub-install --recheck --force --target=i386-pc $BOOT_DEV" + else + if [[ $ROOT_PART == */dev/mapper/* && ! $LVM && ! $LUKS_PASS ]]; then + luks_pass "$_luksopen" 1 || return 1 + fi + BCMDS[grub]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars >/dev/null 2>&1 + grub-install --recheck --force --target=x86_64-efi --efi-directory=/$BOOTDIR --bootloader-id=$DIST" + + grep -q /sys/firmware/efi/efivars /proc/mounts || mount -t efivarfs efivarfs /sys/firmware/efi/efivars >/dev/null 2>&1 + fi + + BCMDS[grub]="mkdir -p /run/udev /run/lvm && + mount --bind /hostrun/udev /run/udev && + mount --bind /hostrun/lvm /run/lvm && + ${BCMDS[grub]} && + grub-mkconfig -o /boot/grub/grub.cfg && + sleep 1 && umount /run/udev /run/lvm" + + return 0 +} + +prerun_grub() +{ + sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g; + s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $MNT/etc/default/grub + if [[ $LUKS_DEV ]]; then + sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g; + s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $MNT/etc/default/grub 2>$ERR + errshow 1 "sed -i 's~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g; + s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g' $MNT/etc/default/grub" + fi + if [[ $SYS == 'BIOS' && $LVM && -z $SEP_BOOT ]]; then + sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $MNT/etc/default/grub 2>$ERR + errshow 1 "sed -i 's/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g' $MNT/etc/default/grub" + fi + + # setup for os-prober module + mkdir -p /run/{lvm,udev} + mkdir -p $MNT/hostrun/{lvm,udev} + mount --bind /run/lvm $MNT/hostrun/lvm + mount --bind /run/udev $MNT/hostrun/udev + + return 0 +} + +setup_efistub() +{ + EDIT_FILES[bootloader]="" +} + +prerun_efistub() +{ + BCMDS[systemd-boot]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars >/dev/null 2>&1 + efibootmgr -v -d $BOOT_DEV -p $BOOT_PART_NUM -c -L '${DIST} Linux' -l /vmlinuz-${KERNEL} \ + -u 'root=$ROOT_PART_ID rw $([[ $UCODE ]] && printf 'initrd=\%s.img ' "$UCODE")initrd=\initramfs-${KERNEL}.img'" + + return 0 +} + +setup_syslinux() +{ + if [[ $SYS == 'BIOS' ]]; then + EDIT_FILES[bootloader]="/boot/syslinux/syslinux.cfg" + else + EDIT_FILES[bootloader]="/boot/EFI/syslinux/syslinux.cfg" + BCMDS[syslinux]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars >/dev/null 2>&1 + efibootmgr -v -c -d $BOOT_DEV -p $BOOT_PART_NUM -l /EFI/syslinux/syslinux.efi -L $DIST" + + fi +} + +prerun_syslinux() +{ + local c="$MNT/boot/syslinux" s="/usr/lib/syslinux/bios" d=".." + [[ $SYS == 'UEFI' ]] && { c="$MNT/boot/EFI/syslinux"; s="/usr/lib/syslinux/efi64/"; d=''; } + + mkdir -pv "$c" && cp -rfv $s/* "$c/" && cp -f "$RUN/syslinux/splash.png" "$c/" + cat > "$c/syslinux.cfg" << EOF +UI vesamenu.c32 +MENU TITLE $DIST Boot Menu +MENU BACKGROUND splash.png +TIMEOUT 50 +DEFAULT $DIST + +# see: https://www.syslinux.org/wiki/index.php/Comboot/menu.c32 +MENU WIDTH 78 +MENU MARGIN 4 +MENU ROWS 4 +MENU VSHIFT 10 +MENU TIMEOUTROW 13 +MENU TABMSGROW 14 +MENU CMDLINEROW 14 +MENU HELPMSGROW 16 +MENU HELPMSGENDROW 29 +MENU COLOR border 30;44 #40ffffff #a0000000 std +MENU COLOR title 1;36;44 #9033ccff #a0000000 std +MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all +MENU COLOR unsel 37;44 #50ffffff #a0000000 std +MENU COLOR help 37;40 #c0ffffff #a0000000 std +MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std +MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std +MENU COLOR msg07 37;40 #90ffffff #a0000000 std +MENU COLOR tabmsg 31;40 #30ffffff #00000000 std + +LABEL $DIST +MENU LABEL $DIST Linux +LINUX $d/vmlinuz-$KERNEL +APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw +INITRD $([[ $UCODE ]] && printf "%s" "$d/$UCODE.img,")$d/initramfs-$KERNEL.img + +LABEL ${DIST}fallback +MENU LABEL $DIST Linux Fallback +LINUX $d/vmlinuz-$KERNEL +APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw +INITRD $([[ $UCODE ]] && printf "%s" "$d/$UCODE.img,")$d/initramfs-$KERNEL-fallback.img +$([[ $SYS == 'BIOS' ]] && printf "\n%s" "# examples of chainloading other bootloaders + +#LABEL grub2 +#MENU LABEL Grub2 +#COM32 chain.c32 +#APPEND file=$d/grub/boot.img + +#LABEL windows +#MENU LABEL Windows +#COM32 chain.c32 +#APPEND hd0 3") +EOF + return 0 +} + +setup_refind-efi() +{ + EDIT_FILES[bootloader]="/boot/refind_linux.conf" + BCMDS[refind-efi]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars >/dev/null 2>&1 + refind-install" +} + +prerun_refind-efi() +{ + cat > $MNT/boot/refind_linux.conf << EOF +"$DIST Linux" "root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && + printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] && + printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-$KERNEL.img" +"$DIST Linux Fallback" "root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && + printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] && + printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-$KERNEL-fallback.img" +EOF + mkdir -p $MNT/etc/pacman.d/hooks + cat > $MNT/etc/pacman.d/hooks/refind.hook << EOF +[Trigger] +Operation = Upgrade +Type = Package +Target = refind-efi + +[Action] +Description = Updating rEFInd on ESP +When = PostTransaction +Exec = /usr/bin/refind-install +EOF +} + +setup_systemd-boot() +{ + EDIT_FILES[bootloader]="/boot/loader/entries/$DIST.conf" + BCMDS[systemd-boot]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars >/dev/null 2>&1 + bootctl --path=/boot install" +} + +prerun_systemd-boot() +{ + mkdir -p $MNT/boot/loader/entries + cat > $MNT/boot/loader/loader.conf << EOF +default $DIST +timeout 5 +editor no +EOF + cat > $MNT/boot/loader/entries/$DIST.conf << EOF +title $DIST Linux +linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/$UCODE.img") +initrd /initramfs-$KERNEL.img +options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw +EOF + cat > $MNT/boot/loader/entries/$DIST-fallback.conf << EOF +title $DIST Linux Fallback +linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/$UCODE.img") +initrd /initramfs-$KERNEL-fallback.img +options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw +EOF + mkdir -p $MNT/etc/pacman.d/hooks + cat > $MNT/etc/pacman.d/hooks/systemd-boot.hook << EOF +[Trigger] +Type = Package +Operation = Upgrade +Target = systemd + +[Action] +Description = Updating systemd-boot +When = PostTransaction +Exec = /usr/bin/bootctl update +EOF + systemd-machine-id-setup --root="$MNT" + return 0 +} + +############################################################################### +# lvm functions + +lvm_menu() +{ + check_background_install || return 1 + lvm_detect + local choice + dlg choice menu "Logical Volume Management" "$_lvmmenu" \ + "$_lvmnew" "vgcreate -f, lvcreate -L -n" \ + "$_lvmdel" "vgremove -f" \ + "$_lvmdelall" "lvrmeove, vgremove, pvremove -f" \ + "back" "return to the main menu" + + case "$choice" in + "$_lvmnew") lvm_create || return 1 ;; + "$_lvmdel") lvm_delgroup && yesno "$_lvmdel" "$_lvmdelask" && vgremove -f "$DEL_VG" >/dev/null 2>&1 ;; + "$_LvMDelAll") lvm_del_all ;; + esac + + return 0 +} + +lvm_detect() +{ + local pv="$(pvs -o pv_name --noheading 2>/dev/null)" + local v="$(lvs -o vg_name,lv_name --noheading --separator - 2>/dev/null)" + VGROUP="$(vgs -o vg_name --noheading 2>/dev/null)" + + if [[ $VGROUP && $v && $pv ]]; then + msg "Logical Volume Management" "\nActivating existing logical volume management (LVM).\n\n" 1 + modprobe dm-mod >/dev/null 2>$ERR + errshow 'modprobe dm-mod' + vgscan >/dev/null 2>&1 + vgchange -ay >/dev/null 2>&1 + fi +} + +lvm_create() +{ + VGROUP='' LVM_PARTS='' VGROUP_MB=0 + umount_dir $MNT + lvm_mkgroup || return 1 + local txt="\nThe last (or only) logical volume will automatically use all remaining space in the volume group." + dlg VOL_COUNT menu "$_lvmnew" "\nSelect the number of logical volumes (LVs) to create in: $VGROUP\n$txt" 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 + [[ $VOL_COUNT ]] || return 1 + lvm_extra_lvs || return 1 + lvm_volume_name "$_lvmlvname\nNOTE: This LV will use up all remaining space in the volume group (${VGROUP_MB}MB)" || return 1 + lvcreate -l +100%FREE "$VGROUP" -n "$VNAME" >/dev/null 2>$ERR + errshow "lvcreate -l +100%FREE $VGROUP -n $VNAME" || return 1 + LVM='logical volume'; sleep 0.5 + txt="\nDone, volume: $VGROUP-$VNAME (${VOLUME_SIZE:-${VGROUP_MB}MB}) has been created.\n" + msg "$_lvmnew (LV:$VOL_COUNT)" "$txt\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE $LVM_PARTS)\n" + return 0 +} + +get_lv_size() +{ + local txt="${VGROUP}: ${SIZE}$SIZE_UNIT (${VGROUP_MB}MB remaining).$_lvmlvsize" + while true; do + ERR_SIZE=0 + dlg VOLUME_SIZE input "$_lvmnew (LV:$VOL_COUNT)" "$txt" '' + if [[ -z $VOLUME_SIZE ]]; then + ERR_SIZE=1 + break # allow bailing with escape or an empty choice + elif (( ${VOLUME_SIZE:0:1} == 0 )); then + ERR_SIZE=1 # size values can't begin with '0' + else + # walk the string and make sure all but the last char are digits + local lv=$((${#VOLUME_SIZE} - 1)) + for (( i=0; i= VGROUP_MB )) && ERR_SIZE=1 || VGROUP_MB=$((VGROUP_MB - m)) ;; + [Mm]) (( ${VOLUME_SIZE:0:$lv} >= VGROUP_MB )) && ERR_SIZE=1 || VGROUP_MB=$((VGROUP_MB - s)) ;; + *) ERR_SIZE=1 + esac ;; + *) ERR_SIZE=1 + esac + fi + fi + (( ! ERR_SIZE )) && break || msg "Invalid Logical Volume Size" "$_lvmerrlvsize" + done + + return $ERR_SIZE +} + +lvm_mkgroup() +{ + local named='' + local txt="\nConfirm creation of volume group: $VGROUP\n\nwith the following partition(s):" + + until [[ $named ]]; do + lvm_partitions || return 1 + lvm_group_name || return 1 + yesno "$_lvmnew" "$txt $LVM_PARTS\n" && named=true + done + + vgcreate -f "$VGROUP" $LVM_PARTS >/dev/null 2>$ERR + errshow "vgcreate -f $VGROUP $LVM_PARTS" || return 1 + + SIZE=$(vgdisplay "$VGROUP" | awk '/VG Size/ { gsub(/[^0-9.]/, ""); print int($0) }') + SIZE_UNIT="$(vgdisplay "$VGROUP" | awk '/VG Size/ { print substr($NF, 0, 1) }')" + + if [[ $SIZE_UNIT == 'G' ]]; then + VGROUP_MB=$((SIZE * 1000)) + else + VGROUP_MB=$SIZE + fi + + msg "$_lvmnew" "\nVolume group: $VGROUP ($SIZE $SIZE_UNIT) has been created\n" + return 0 +} + +lvm_del_all() +{ + local pv="$(pvs -o pv_name --noheading 2>/dev/null)" + local v="$(lvs -o vg_name,lv_name --noheading --separator - 2>/dev/null)" + VGROUP="$(vgs -o vg_name --noheading 2>/dev/null)" + + if [[ $VGROUP || $v || $pv ]]; then + if yesno "$_lvmdelall" "$_lvmdelask"; then + for i in $v; do lvremove -f "/dev/mapper/$i" >/dev/null 2>&1; done + for i in $VGROUP; do vgremove -f "$i" >/dev/null 2>&1; done + for i in $pv; do pvremove -f "$i" >/dev/null 2>&1; done + LVM='' + fi + else + msg "Delete LVM" "\nNo LVMs to remove...\n" 2 + LVM='' + fi +} + +lvm_delgroup() +{ + DEL_VG='' + VOL_GROUP_LIST='' + + for i in $(lvs --noheadings | awk '{print $2}' | uniq); do + VOL_GROUP_LIST+="$i $(vgdisplay "$i" | awk '/VG Size/ {print $3$4}') " + done + [[ $VOL_GROUP_LIST ]] || { msg "Installation Error" "\nNo volume groups found."; return 1; } + + dlg DEL_VG menu "Logical Volume Management" "\nSelect volume group to delete.\n\nAll logical volumes within will also be deleted." $VOL_GROUP_LIST + [[ $DEL_VG ]] +} + +lvm_extra_lvs() +{ + while (( VOL_COUNT > 1 )); do + lvm_volume_name "$_lvmlvname" && get_lv_size || return 1 + lvcreate -L "$VOLUME_SIZE" "$VGROUP" -n "$VNAME" >/dev/null 2>$ERR + errshow "lvcreate -L $VOLUME_SIZE $VGROUP -n $VNAME" || return 1 + msg "$_lvmnew (LV:$VOL_COUNT)" "\nDone, logical volume (LV) $VNAME ($VOLUME_SIZE) has been created.\n" + (( VOL_COUNT-- )) + done + return 0 +} + +lvm_partitions() +{ + part_find 'part|crypt' || return 1 + PARTS="$(awk 'NF > 0 {print $0 " off"}' <<< "$PARTS")" + dlg LVM_PARTS check "$_lvmnew" "\nSelect the partition(s) to use for the physical volume (PV)." $PARTS + [[ $LVM_PARTS ]] +} + +lvm_group_name() +{ + VGROUP='' + + until [[ $VGROUP ]]; do + dlg VGROUP input "$_lvmnew" "$_lvmvgname" "mygroup" + if [[ -z $VGROUP ]]; then + return 1 + elif [[ ${VGROUP:0:1} == "/" || $VGROUP =~ \ |\' ]] || grep -q "$VGROUP" <<< "$(lsblk)"; then + msg "Installation Error" "$_lvmerrvgname" + VGROUP='' + fi + done + + return 0 +} + +lvm_volume_name() +{ + VNAME='' + local txt="$1" default="mainvolume" + (( VOL_COUNT > 1 )) && default="extravolume$VOL_COUNT" + until [[ $VNAME ]]; do + dlg VNAME input "$_lvmnew (LV:$VOL_COUNT)" "\n$txt" "$default" + if [[ -z $VNAME ]]; then + return 1 + elif [[ ${VNAME:0:1} == "/" || $VNAME =~ \ |\' ]] || grep -q "$VNAME" <<< "$(lsblk)"; then + msg "Installation Error" "$_lvmerlvname" + VNAME='' + fi + done + return 0 +} + +############################################################################### +# luks functions + +luks_menu() +{ + local choice + check_background_install || return 1 + dlg choice menu "LUKS Encryption" "$_luksmenu" \ + "$_luksnew" "cryptsetup -q luksFormat" \ + "$_luksopen" "cryptsetup open --type luks" \ + "$_luksadv" "cryptsetup -q -s -c luksFormat" \ + "back" "Return to the main menu" + + case "$choice" in + "$_luksnew") luks_basic || return 1 ;; + "$_luksopen") luks_open || return 1 ;; + "$_luksadv") luks_advanced || return 1 ;; + esac + + return 0 +} + +luks_open() +{ + modprobe -a dm-mod dm_crypt + umount_dir $MNT + part_find 'part|crypt|lvm' || return 1 + + if (( COUNT == 1 )); then + LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")" + else + dlg LUKS_PART menu "$_luksopen" "\nSelect which partition to open." $PARTS + fi + + [[ $LUKS_PART ]] || return 1 + + luks_pass "$_luksopen" || return 1 + msg "$_luksopen" "\nOpening encrypted partition: $LUKS_NAME\n\nDevice or volume used: $LUKS_PART\n" 0 + cryptsetup open --type luks $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR + errshow "cryptsetup open --type luks $LUKS_PART $LUKS_NAME" || return 1 + LUKS='encrypted'; luks_show + return 0 +} + +luks_pass() +{ + LUKS_PASS='' + local t="$1" op="$2" v='' p='' p2='' + + until [[ $LUKS_PASS ]]; do + i=0 + tput cnorm + if [[ $op ]]; then + dialog --cr-wrap --insecure --backtitle "$DIST Installer - $SYS - v$VER" --separator $'\n' --title " $title " \ + --mixedform "\nEnter the password to decrypt $ROOT_PART\n\nThis is needed to create a keyfile." 0 0 0 \ + "Password:" 1 1 '' 1 11 $COLUMNS 0 1 \ + "Password2:" 2 1 '' 2 12 $COLUMNS 0 1 2>"$ANS" || return 1 + + else + dialog --cr-wrap --insecure --backtitle "$DIST Installer - $SYS - v$VER" \ + --separator $'\n' --title " $title " --mixedform "$_luksomenu" 0 0 0 \ + "Name:" 1 1 "${LUKS_NAME:-cryptroot}" 1 7 $COLUMNS 0 0 \ + "Password:" 2 1 '' 2 11 $COLUMNS 0 1 \ + "Password2:" 3 1 '' 3 12 $COLUMNS 0 1 2>"$ANS" || return 1 + + fi + + while read -r line; do + if [[ $op ]]; then + case $i in + 0) p="$line" ;; + 1) p2="$line" ;; + esac + else + case $i in + 0) n="$line" ;; + 1) p="$line" ;; + 2) p2="$line" ;; + esac + fi + (( i++ )) + done < "$ANS" + + if [[ -z $op && -z $n ]]; then + msg "Name Empty" "\nEncrypted device name cannot be empty.\n\nPlease try again.\n" 2 + elif [[ -z $p || "$p" != "$p2" ]]; then + [[ $op ]] || LUKS_NAME="$n" + msg "Password Mismatch" "\nThe passwords entered do not match.\n\nPlease try again.\n" 2 + else + [[ $op ]] || LUKS_NAME="$n" + LUKS_PASS="$p" + fi + done + + return 0 +} + +luks_show() +{ + sleep 0.5 + msg "$_luksnew" "\nEncrypted partition opened and ready for mounting.\n\n$(lsblk $LUKS_PART -o NAME,MODEL,SIZE,TYPE,FSTYPE)\n\n" +} + +luks_setup() +{ + modprobe -a dm-mod dm_crypt + umount_dir $MNT + part_find 'part|lvm' || return 1 + + if [[ $AUTO_ROOT_PART ]]; then + LUKS_PART="$AUTO_ROOT_PART" + elif (( COUNT == 1 )); then + LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")" + else + dlg LUKS_PART menu "$_luksnew" "\nSelect the partition you want to encrypt." $PARTS + fi + + [[ $LUKS_PART ]] || return 1 + luks_pass "$_luksnew" +} + +luks_basic() +{ + luks_setup || return 1 + msg "$_luksnew" "\nCreating encrypted partition: $LUKS_NAME\n\nDevice or volume used: $LUKS_PART\n" 0 + cryptsetup -q luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR + errshow "cryptsetup -q luksFormat $LUKS_PART" || return 1 + cryptsetup open $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR + errshow "cryptsetup open $LUKS_PART $LUKS_NAME" || return 1 + LUKS='encrypted'; luks_show + return 0 +} + +luks_keyfile() +{ + if [[ ! -e $MNT/crypto_keyfile.bin ]]; then + # printf "Creating LUKS keyfile /crypto_keyfile.bin\n" + local n + n="$(lsblk -lno NAME,UUID,TYPE | awk "/$LUKS_UUID/"' && /part|crypt|lvm/ {print $1}')" + local mkkey="dd bs=512 count=8 if=/dev/urandom of=/crypto_keyfile.bin" + mkkey="$mkkey && chmod 000 /crypto_keyfile.bin" + mkkey="$mkkey && cryptsetup luksAddKey /dev/$n /crypto_keyfile.bin <<< '$LUKS_PASS'" + chrun "$mkkey" + sed -i 's/FILES=()/FILES=(\/crypto_keyfile.bin)/g' $MNT/etc/mkinitcpio.conf 2>$ERR + fi + + return 0 +} + +luks_advanced() +{ + if luks_setup; then + local cipher + dlg cipher input "LUKS Encryption" "$_lukskey" "-s 512 -c aes-xts-plain64" + [[ $cipher ]] || return 1 + msg "$_luksadv" "\nCreating encrypted partition: $LUKS_NAME\n\nDevice or volume used: $LUKS_PART\n" 0 + cryptsetup -q $cipher luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR + errshow "cryptsetup -q $cipher luksFormat $LUKS_PART" || return 1 + cryptsetup open $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR + errshow "cryptsetup open $LUKS_PART $LUKS_NAME" || return 1 + luks_show + return 0 + fi + return 1 +} + +############################################################################### +# helper functions + +ofn() +{ + [[ "$2" == *"$1"* ]] && printf "on" || printf "off" +} + +die() +{ + local exitcode="$1" + + trap - INT + tput cnorm + if [[ -d $MNT ]] && command cd /; then + umount_dir $MNT + if (( exitcode == 127 )); then + umount -l /run/archiso/bootmnt + sleep 0.5 + systemctl -i reboot + fi + fi + + # restore custom linux console 0-15 colors when not rebooting + if [[ $TERM == 'linux' ]]; then + colors=("\e]P0191919" "\e]P1D15355" "\e]P2609960" "\e]P3FFCC66" + "\e]P4255A9B" "\e]P5AF86C8" "\e]P62EC8D3" "\e]P7949494" "\e]P8191919" "\e]P9D15355" + "\e]PA609960" "\e]PBFF9157" "\e]PC4E88CF" "\e]PDAF86C8" "\e]PE2ec8d3" "\e]PFE1E1E1") + printf "%b" "${colors[@]}" && clear && unset col + fi + + exit $exitcode +} + +dlg() +{ + local var="$1" btype="$2" title="$3" body="$4" n=0 + shift 4 + (( ($# / 2) > SHL )) && n=$SHL + + case "$btype" in + menu) + tput civis + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" \ + --title " $title " --menu "$body" 0 0 $n "$@" 2>"$ANS" + ;; + check) + tput civis + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" \ + --title " $title " --checklist "$body" 0 0 $n "$@" 2>"$ANS" + ;; + input) + tput cnorm + local default="$1" + shift + if [[ $1 == 'limit' ]]; then + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" \ + --max-input 63 --title " $title " --inputbox "$body" 0 0 "$default" 2>"$ANS" + else + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" \ + --title " $title " --inputbox "$body" 0 0 "$default" 2>"$ANS" + fi + ;; + esac + [ $? -eq 0 ] && [ -s "$ANS" ] && printf -v $var "%s" "$(< "$ANS")" +} + +msg() +{ + local title="$1" body="$2" + + tput civis + if (( $# == 3 )); then + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" --sleep $3 --title " $title " --infobox "$body\n" 0 0 + else + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" --title " $title " --msgbox "$body\n" 0 0 + fi +} + +json() +{ + curl -s "http://api.ipstack.com/$2" | python3 -c "import sys, json; print(json.load(sys.stdin)['$1'])" +} + +yesno() +{ + local title="$1" body="$2" yes='Yes' no='No' + + (( $# >= 3 )) && local yes="$3" + (( $# >= 4 )) && local no="$4" + + tput civis + if (( $# == 5 )); then + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" --defaultno \ + --title " $title " --yes-label "$yes" --no-label "$no" --yesno "$body\n" 0 0 + else + dialog --cr-wrap --backtitle "$DIST Installer - $SYS - v$VER" \ + --title " $title " --yes-label "$yes" --no-label "$no" --yesno "$body\n" 0 0 + fi +} + +chrun() +{ + arch-chroot "$MNT" bash -c "$1" +} + +debug() +{ + export PS4='| ${BASH_SOURCE} LINE:${LINENO} FUNC:${FUNCNAME[0]:+ ${FUNCNAME[0]}()} |> ' + set -x + exec 3>| $DBG + BASH_XTRACEFD=3 + DEBUG=true +} + +sigint() +{ + printf "\n^C caught, cleaning up...\n" + die 1 +} + +print4() +{ + local str="$*" + if [[ $COLUMNS -ge 110 && ${#str} -gt $((COLUMNS - 30)) ]]; then + str="$(awk '{ + i = 2; p1 = p2 = p3 = p4 = ""; p1 = $1; q = int(NF / 4) + for (; i <= q; i++) { p1 = p1 " " $i } + for (; i <= q * 2; i++) { p2 = p2 " " $i } + for (; i <= q * 3; i++) { p3 = p3 " " $i } + for (; i <= NF; i++) { p4 = p4 " " $i } + printf "%s\n %s\n %s\n %s", p1, p2, p3, p4 + }' <<< "$str")" + printf "%s\n" "$str" + elif [[ $str ]]; then + printf "%s\n" "$str" + fi +} + +errshow() +{ + [ $? -eq 0 ] && return 0 + + local fatal=0 + local err="$(sed 's/[^[:print:]]//g; s/\[[0-9\;:]*\?m//g; s/==> //g; s/] ERROR:/]\nERROR:/g' "$ERR")" + + (( $1 == 1 )) && { fatal=1; shift; } + + local txt="\nThe command exited abnormally:\n\n$1\n\n" + + if [[ $err ]]; then + txt+="With the following message:\n\n$err\n\n" + else + txt+="With no error message:\n\n" + fi + + if (( fatal == 1 )); then + txt+="Errors at this stage are fatal and the install cannot continue.\n" + else + txt+="Errors at this stage are non-fatal and can be either fixed or ignored depending on the error.\n" + fi + + msg "Install Error" "$txt" + + if (( fatal == 1 )); then + [[ -r $DBG && $TERM == 'linux' ]] && less "$DBG" + die 1 + fi + + return 1 +} + +load_bcm() +{ + msg "Broadcom Wireless Setup" "\nDetected chipset is Broadcom BCM4352\n\nDisabling bcma/b43 modules and loading wl module.\n" 1 + { rmmod wl; rmmod bcma; rmmod b43; rmmod ssb; modprobe wl; depmod -a; } >/dev/null 2>&1 + BROADCOM_WL=true +} + +prechecks() +{ + if [[ $1 -ge 0 ]] && ! grep -qw "$MNT" /proc/mounts; then + msg "Not Mounted" "\nPartition(s) must be mounted first.\n" 2 + SEL=4 + return 1 + elif [[ $1 -ge 1 && -z $BOOTLDR ]]; then + msg "No Bootloader" "\nBootloader must be selected first.\n" 2 + SEL=5 + return 1 + elif [[ $1 -ge 2 && (-z $NEWUSER || -z $USER_PASS) ]]; then + msg "No User" "\nA user must be created first.\n" 2 + SEL=6 + return 1 + elif [[ $1 -ge 3 && -z $CONFIG_DONE ]]; then + msg "Not Configured" "\nSystem configuration must be done first.\n" 2 + SEL=7 + return 1 + fi + return 0 +} + +umount_dir() +{ + swapoff -a + [[ -d $1 ]] && umount -R $1 >/dev/null 2>&1 + return 0 +} + +chk_connect() +{ + msg "Network Connect" "\nVerifying network connection\n" 1 + curl -sIN --connect-timeout 5 'https://www.archlinux.org/' | sed '1q' | grep -q '200' +} + +net_connect() +{ + if chk_connect; then + return 0 + else + if hash nmtui >/dev/null 2>&1; then + tput civis + [[ $TERM == 'linux' ]] && printf "%b" "\e]P1191919" "\e]P4191919" + nmtui-connect + [[ $TERM == 'linux' ]] && printf "%b" "\e]P1D15355" "\e]P4255a9b" + chk_connect + else + return 1 + fi + fi +} + +system_devices() +{ + IGNORE_DEV="$(lsblk -lno NAME,MOUNTPOINT | awk '/\/run\/archiso\/bootmnt/ {sub(/[1-9]/, ""); print $1}')" + + if [[ $IGNORE_DEV ]]; then + SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE | awk '/disk/ && !'"/$IGNORE_DEV/"' {print "/dev/" $1 " " $2}')" + else + SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE | awk '/disk/ {print "/dev/" $1 " " $2}')" + fi + + if [[ -z $SYS_DEVS ]]; then + msg "Installation Error" "\nNo available devices...\n\nExiting..\n" 2 + die 1 + fi + + DEV_COUNT=0 + while read -r line; do + (( DEV_COUNT++ )) + done <<< "$SYS_DEVS" +} + +system_identify() +{ + if [[ $VM ]]; then + UCODE='' + elif grep -q 'AuthenticAMD' /proc/cpuinfo; then + UCODE="amd-ucode" + elif grep -q 'GenuineIntel' /proc/cpuinfo; then + UCODE="intel-ucode" + fi + + if grep -qi 'apple' /sys/class/dmi/id/sys_vendor; then + modprobe -r -q efivars + else + modprobe -q efivarfs + fi + + _prep="\nTo begin the install you must first have:\n\n - A root (/) partition mounted." + if [[ -d /sys/firmware/efi/efivars ]]; then + export SYS="UEFI" + grep -q /sys/firmware/efi/efivars /proc/mounts || mount -t efivarfs efivarfs /sys/firmware/efi/efivars + _prep+="\n - An EFI boot partition mounted." + else + export SYS="BIOS" + fi + _prep+="\n - The system bootloader selected.\n - A new user created and passwords set." + _prep+="\n - The system configuration finished.\n\nOnce the above are met the install can be started." +} + +check_background_install() +{ + [[ $RSYNC_PID ]] || return 0 + msg "Install Running" "\nA background install process is currently running.\n" 2 + return 1 +} + +############################################################################### +# entry point + +if (( UID != 0 )); then + msg "Not Root" "\nThis installer must be run as root or using sudo.\n\nExiting..\n" 2 + die 1 +elif ! grep -qwm 1 'lm' /proc/cpuinfo; then + msg "Not x86_64 Architecture" "\nThis installer only supports x86_64 architectures.\n\nExiting..\n" 2 + die 1 +elif [[ $1 =~ (-d|--debug) ]]; then + debug +fi + +trap sigint INT + +system_identify +system_devices + +msg "Welcome to the $DIST Installer" "\nThis will help you get $DIST setup on your system.\nHaving GNU/Linux experience is an asset, however we try our best to keep things simple.\n\nIf you are unsure about an option, a default will be listed or\nthe first selected option will be the default (excluding language and timezone).\n\n\nMenu Navigation:\n\n - Select items with the arrow keys or the option number.\n - Use [Space] to toggle options and [Enter] to confirm.\n - Switch between buttons using [Tab] or the arrow keys.\n - Use [Page Up] and [Page Down] to jump whole pages\n - Press the highlighted key of an option to select it.\n" + +select_keymap || { clear; die 0; } + +if lspci -vnn -d 14e4: | grep -q 'BCM4352'; then + load_bcm +fi + +if ! net_connect; then + msg "Not Connected" "\nThis installer requires an active internet connection.\n\nExiting..\n" 2 + die 1 +fi + +while true; do + select_main +done + +# vim:fdm=marker:fmr={,} diff --git a/install.sh b/install.sh index faa3322..ec4774b 100755 --- a/install.sh +++ b/install.sh @@ -1,20 +1,17 @@ #!/bin/bash -hash git >/dev/null 2>&1 || { printf "This requires git installed\n"; exit 1; } -git clone --depth=1 https://bitbucket.org/archlabslinux/installer +if (( UID != 0 )); then + printf "privilege escalation required\n" + su -c 'hash git >/dev/null 2>&1 || pacman -Syy git + git clone --depth=1 https://bitbucket.org/archlabslinux/installer && + cp -fv installer/archlabs-installer /usr/bin/ && rm -rf installer' -if [[ $(whoami) != 'root' ]]; then - asroot=sudo - printf "\nRoot access is needed to continue\n\n" else - asroot="" + hash git >/dev/null 2>&1 || pacman -Syy git + git clone --depth=1 https://bitbucket.org/archlabslinux/installer && + cp -fv installer/archlabs-installer /usr/bin/ && rm -rf installer + fi -$asroot mkdir -pv /usr/share/archlabs/installer/{lang,docs} -$asroot cp -fv installer/src/archlabs-installer /usr/bin/ -$asroot cp -fv installer/src/packages.txt /usr/share/archlabs/installer/ -$asroot cp -fv installer/lang/*.trans /usr/share/archlabs/installer/lang/ -$asroot cp -fv installer/{LICENSE,README.md} /usr/share/archlabs/installer/docs/ - -printf "\nInstall complete\n" +[ $? -eq 0 ] && printf "\nInstall complete\n" diff --git a/lang/english.trans b/lang/english.trans deleted file mode 100644 index 7915199..0000000 --- a/lang/english.trans +++ /dev/null @@ -1,115 +0,0 @@ -# english translation file -# written by natemaia10@gmail.com - 2018 - -_WelTitle="Welcome to the" -_WelBody="\nThis will help you get $DIST setup on your system.\nHaving GNU/Linux experience is an asset, however we try our best to keep things simple.\n\nIf you are unsure about an option, a default will be listed or\nthe first selected option will be the default (excluding language and timezone).\n\n\nMenu Navigation:\n\n - Select items with the arrow keys or the option number.\n - Use [Space] to toggle options and [Enter] to confirm.\n - Switch between buttons using [Tab] or the arrow keys.\n - Use [Page Up] and [Page Down] to jump whole pages\n - Press the highlighted key of an option to select it.\n" - -_PrepBody="\nThis is the menu where you can prepare your system for the install.\n\nTo begin the install you must first have:\n\n - A root (/) partition mounted (UEFI systems also require a seperate boot partition).\n - A new user created and the passwords set.\n - The system configuration finished.\n\nOnce the above requirements are met and you have gone through any optional setup steps you like the install can be started." -_PrepShow="Show lsblk output (optional)" -_PrepPart="Edit partitions (optional)" -_PrepLUKS="LUKS encryption (optional)" -_PrepLVM="Logical volume management (optional)" -_PrepMnt="Mount and format partitions" -_PrepUser="Create user and set passwords" -_PrepConf="Configure system settings" -_PrepWM="Select window manager or desktop (optional)" -_PrepPkg="Select additional packages (optional)" -_PrepChk="Check configuration choices (optional)" -_Install="Start the installation" - -_EditBody="\nBefore exiting you can select configuration files to review/change.\n\nIf you need to make other changes with the drives still mounted, use Ctrl-z to pause the installer, when finished type 'fg' and [Enter] or Ctrl-z again to resume the installer." - -_TimeZBody="\nThe time zone is used to set the system clock.\n\nSelect your country or continent from the list below" -_TimeSubZBody="\nSelect the nearest city to you or one with the same time zone.\n\nTIP: Pressing the first letter of the city name repeatedly will navigate between entries beggining with that letter." - -_MirrorSetup="\nSort the mirrorlist automatically?\n\nTakes longer but gets fastest mirrors.\n" -_MirrorCmd="\nThe command below will be used to sort the mirrorlist, edit if needed.\n" - -_WMChoiceBody="\nUse [Space] to toggle available sessions.\n\nFor all sessions a basic package set will be installed for basic compatibilty across sessions. In addition to this extra packages specific to each sessions will also be installed to provide basic functionality most people expect from an environment." - -_PackageMenu="\nSelect a category to choose packages from, once finished select the last entery or press [Esc] to return to the main menu." -_PackageBody="\nUse [Space] to toggle packages(s) and press [Enter] to accept the selection.\n\nNOTE: Some packages may already be installed by your desktop environment (if any). Extra packages may also be installed for the selected packages eg. Selecting qutebrowser will also install qt5ct (the Qt5 theme tool) and qt5-styleplugins (for Gtk themes in Qt applications)." - -_WMLoginBody="\nSelect which of your session choices to use for the initial login.\n\nYou can be change this later by editing your ~/.xinitrc" - -_XMapBody="\nPick your system keymap from the list below\n\nThis is the keymap used once a graphical environment is running (usually Xorg).\n\nSystem default: us" -_LocaleBody="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\neg. en_US is: english United States\n en_GB is: english Great Britain" - -_CMapBody="\nSelect console keymap, the console is the tty shell you reach before starting a graphical environment (usually Xorg).\n\nIts keymap is seperate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nSystem default: us" - -_HostNameBody="\nEnter a hostname for the new system.\n\nA hostname is used to identify systems on the network.\n\nIt's restricted to alphanumeric characters (a-z, A-Z, 0-9).\nIt can contain hyphens (-) BUT NOT at the beggining or end." - -_RootBody="--- Enter root password (empty uses the password entered above) ---" -_UserBody="\nEnter a name and password for the new user account.\n\nThe name must not use capital letters, contain any periods (.), end with a hyphen (-), or include any colons (:)\n\nNOTE: Use the [Up] and [Down] arrows to switch between input fields, [Tab] to toggle between input fields and the buttons, and [Enter] to accept." - -_MntBody="\nUse [Space] to toggle mount options from below, press [Enter] when done to confirm selection.\n\nNot selecting any and confirming will run an automatic mount." -_WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nPartitions can be mounted without formatting by selecting skip during mounting, useful for extra or already formatted partitions.\n\nThe exception to this is the root (/) partition, it needs to be formatted before install to ensure system stability.\n" - -_DevSelBody="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb, /sdc ..." - -_ExtPartBody="\nYou can now select additional partitions you want mounted, once choosen you will be asked to enter a mountpoint.\n\nSelect 'done' to finish the mounting step and return to the main menu." -_ExtPartBody1="\nWhere do you want the partition mounted?\n\nEnsure the name begins with a slash (/).\nExamples include: /usr, /home, /var, etc." - -_PartBody="\nFull device auto partitioning is available for beginners otherwise cfdisk is recommended.\n\n - All systems will require a root partition (8G or greater).\n - UEFI and BIOS using LUKS without LVM will require a boot partition (100-512M)." - -_PartBody1="\nWARNING: ALL data on" -_PartBody2="will be destroyed and the following partitions will be created\n\n- A vfat/fat32 boot partition with boot flags enabled (512M)\n- An ext4 partition using all remaining space" -_PartBody3="\n\nDo you want to continue?\n" -_PartWipeBody="will be destroyed using 'wipe -Ifre'.\n\nThis is ONLY intended for use on devices before sale or disposal to reliably destroy the data beyond recovery. This is NOT for devices you intend to continue using.\nThe wiping process can take a long time depending on the size and speed of the drive.\n\nDo you still want to continue?\n" - -_SelRootBody="\nSelect the root (/) partition, this is where $DIST will be installed." -_SelUefiBody="\nSelect the EFI boot partition (/boot), required for UEFI boot.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as vfat/fat32 if not already." -_SelBiosBody="\nDo you want to use a separate boot partition? (optional)\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already." -_SelBiosLuksBody="\nSelect the boot partition (/boot), required for LUKS.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already." -_FormBootBody="is already formatted correctly.\n\nFor a clean install, previously existing partitions should be reformatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to reformat the partition?\n" - -_SelSwpErr="\nSwap Setup Error: Must be 1(M|G) or greater, and can only contain whole numbers\n\nSize Entered:" -_SelSwpSize="\nEnter the size of the swapfile in megabytes (M) or gigabytes (G).\n\neg. 100M will create a 100 megabyte swapfile, while 10G will create a 10 gigabyte swapfile.\n\nFor ease of use and as an example it is filled in to match the size of your system memory (RAM).\n\nMust be greater than 1, contain only whole numbers, and end with either M or G." - -# LUKS / DM-Crypt / Encryption -_LuksMenuBody="\nDevices and volumes encrypted using dm_crypt cannot be accessed or seen without first being unlocked." -_LuksMenuBody2="\n\nA seperate boot partition without encryption or logical volume management (LVM) is required (unless using BIOS Grub)." -_LuksMenuBody3="\n\nAutomatic uses default encryption settings, and is recommended for beginners, otherwise cypher and key size parameters may be entered manually." -_LuksOpenBody="\nEnter a name and password for the encrypted device.\n\nIt is not necessary to prefix the name with /dev/mapper/,an example has been provided." -_LuksEncrypt="Basic LUKS Encryption" -_LuksEncryptAdv="Advanced LUKS Encryption" -_LuksOpen="Open Encrypted Partition" -_LuksEncryptBody="\nSelect the partition you want to encrypt." -_LuksEncryptSucc="\nDone! encrypted partition opened and ready for mounting.\n" -_LuksPartErrBody="\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" -_LuksCreateWaitBody="\nCreating encrypted partition:" -_LuksOpenWaitBody="\nOpening encrypted partition:" -_LuksWaitBody2="\n\nDevice or volume used:" -_LuksCipherKey="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)." - -_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." -_LvmNew="Create VG and LV(s)" -_LvmDel="Delete existing VG(s)" -_LvmDelAll="Delete all VGs, LVs, and PVs" -_LvmDetBody="\nExisting logical volume management (LVM) detected.\n\nActivating...\n" -_LvmNameVgBody="\nEnter the name of the volume group (VG) to create.\n\nThe VG is the new virtual device that will be created from the partition(s) selected." -_LvmPvSelBody="\nSelect the partition(s) to use for the physical volume (PV)." -_LvmPvConfBody1="\nConfirm creation of volume group:" -_LvmPvConfBody2="with the following partition(s):" -_LvmPvActBody1="\nCreating and activating volume group:" -_LvmLvNumBody1="\nSelect the number of logical volumes (LVs) to create in:" -_LvmLvNumBody2="\nThe last (or only) logical volume will automatically use all remaining space in the volume group." -_LvmLvNameBody1="\nEnter the name of the logical volume (LV) to create.\n\nThis is like setting a name or label for a partition.\n" -_LvmLvNameBody2="\nNOTE: This LV will use up all remaining space in the volume group" -_LvmLvSizeBody1="remaining" -_LvmLvSizeBody2="\nEnter the size of the logical volume (LV) in megabytes (M) or gigabytes (G). For example, 100M will create a 100 megabyte LV. 10G will create a 10 gigabyte LV.\n" -_LvmCompBody="\nDone! all logical volumes have been created for the volume group.\n\nDo you want to view the device tree for the new LVM scheme?\n" -_LvmDelQ="\nConfirm deletion of volume group(s) and logical volume(s).\n\nDeleting a volume group, will delete all logical volumes within as well.\n" -_LvmSelVGBody="\nSelect volume group to delete.\n\nAll logical volumes within will also be deleted." - -_LvmVGErr="\nNo volume groups found." -_LvmNameVgErr="\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" -_LvmPartErrBody="\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" -_LvmLvNameErrBody="\nInvalid name entered.\n\nThe logical volume (LV) name may be alpha-numeric, but may not contain spaces or be preceded with a '/'\n" -_LvmLvSizeErrBody="\nInvalid value Entered.\n\nMust be a numeric value with 'M' (megabytes) or 'G' (gigabytes) at the end.\n\neg. 400M, 10G, 250G, etc...\n\nThe value may also not be equal to or greater than the remaining size of the volume group.\n" - -_ErrTitle="Installation Error" -_ExtErrBody="\nCannot mount partition due to a problem with the mountpoint.\n\nEnsure it begins with a slash (/) followed by atleast one character.\n" -_PartErrBody="\nYou need create the partiton(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\n" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/chinese.trans b/lang/needupdate/chinese.trans deleted file mode 100644 index 76989fd..0000000 --- a/lang/needupdate/chinese.trans +++ /dev/null @@ -1,179 +0,0 @@ -## Chinese Translation File -## Written zqh.me@qq.com (May-2018) - -# Generic -_All="全部" -_Done="完成" -_Skip="跳过/否" -_Edit="编辑配置文件" -_ErrTitle="安装错误" -_PlsWait="\n请稍候...\n" -_PassErr="\n输入的密码不匹配.\n" -_Pass2="再次输入用户密码" -_TryAgain="请重新输入.\n" -_NoFileErr="\n文件不存在.\n" -_Back="返回" -_Exit="正在退出.\n" -_Name="名稱:" - -# Welcome -_WelTitle="欢迎来到" -_WelBody="这将在您的系统上解压并设置$DIST \n\n菜单导航:\n通过按选项编号或使用箭头键选择。 使用[Tab]或箭头键在按钮之间切换。 长列表可以使用[上一页]和[下一页]进行导航,或者按下所需选项的第一个字母。\n\n使用[空格]选择/取消选择选项并按[Enter]确认。 [Ctrl] [Shift] +和[Ctrl] - 增加/减小字体大小。" - -# Requirements -_NotRoot="\n安装程序必须使用root权限.\n" -_NoNetwork="\n安装程序必须在有效连接的网络中运行.\n" - -# Preparation Menu -_PrepTitle="准备启动系统" -_PrepBody="\n请按顺序执行。\n\n解包后,您将自动进入配置菜单。\n安装前的配置项" -_PrepLayout="键盘布局" -_PrepShowDev='列出设备 (可选)' -_PrepParts="格式化分区" -_PrepLUKS='LUKS硬盘加密 (可选)' -_PrepLVM='逻辑分区管理 (可选)' -_PrepMount="挂载分区" -_PrepConfig="配置安裝" -_PrepInstall="安装到 $DIST" - -_BootLdr="安装引导程序" - -# Configure Menu -_ConfTitle="安装配置项" -_ConfBody="新系统配置项" -_ConfHost="主机名" -_ConfLocale="语言和时区" -_ConfRoot="管理员密码" -_ConfUser="创建新用户" - -# Select Config Files -_EditBody="\n安裝工作即將完成\n\n查看或修改以下文件.\n" -_EditTitle="修改文件" - -# Close Installer -_CloseInst="關閉安裝程序" -_CloseInstBody="\n卸載分區並關閉安裝程序?\n" -_InstFinBody="\n安裝現已完成。\n\n您要關閉安裝程序並重新啟動嗎?\n" - -# Error Messages -_ErrNoMount="\n必须先挂载分区.\n" -_ErrNoBase="\n必须先解压基础系统.\n" -_ErrNoConfig="\n必須首先完成系統的基本配置。\n" -_ExtErrBody="\n由于挂载点名称出错导致挂载失败.\n\n挂载点名称必须以斜线开头.\n" -_PartErrBody="\nBIOS启动必须有至少一个分区 (来挂载根路径).\n\nUEFI启动必须要有至少2个分区(来挂载根分区和EFI分区).\n" -_UserErrTitle="用户名错误" -_UserErrBody="\n用户名不正确.\n\n请重新输入.\n" -_UserPassErr="\n輸入的用戶密碼不匹配。\n" -_RootPassErr="\n輸入的root密碼不匹配。\n" - -# Set Keymap, Clock, Local and Timezone -_CMapTitle="虚拟控制台键盘映射" -_CMapBody="设置虚拟控制台键盘映射.\n\n虚拟控制台是一个在非图形界面下的命令提示符号.\n\n此键盘映射与桌面环境是独立的, 默认值是 'us'\n" -_XMapBody="设置系统 键盘映射.\n\n此键盘映射是用于桌面环境,默认值通常是'us'\n" -_LocaleBody="本地化设置对日期、时间、货币、语言起作用.\n\n使用格式是 language_COUNTRY 例如.\n\nen_US 是英语(美国)\nen_GB 是英语(英国)" -_TimeZBody="时区是用于设置时间和硬件时钟." -_TimeSubZBody="选择离你最近的城市." -_TimeZQ="\n设置时区为:" - -# Set Hostname -_HostNameBody="hostname是用于在网络中标记主机身份的名称.\n\nhostname由大小写字母和数字组成.\n可以包含连字符 (-) 但不能用于开头和结尾." - -# Set Root Password -_RootBody="--- 輸入root密碼(空使用用戶密碼)---" - -# Create New User and set password -_UserTitle="创建新用户" -_UserBody="\n輸入新用戶帳戶的名稱和密碼。\n\n名稱不得使用大寫字母,包含任何句點(。),以連字符(- )結尾,或包含任何冒號(:)\n\n注意:[Tab]在文本輸入和按鈕之間切換,或按[Enter]接受。" -_UserSetBody="\n正在创建用户和设置用户组..\n" -_Username="用戶名:" -_Password="密碼:" -_Password2="密碼2:" - -# Mounting (Partitions) -_MntTitle="挂载状态" -_MntSucc="\n挂载成功!\n" -_MntFail="\n挂载失败!\n" -_WarnMount="重要: 在挂载和格式化的过程中请小心.\n\n分区可以不格式而挂载 '$_Skip' 选中项在菜单顶部,选中分区将被格式化\n\n确保安装和格式化的选项正确直到没有警告提示,不能选择EFI启动分区." -_MntBody="使用空格键确定选择/取消选择.\n同一个选择项不要使用多个值.\n\n如果使用ext4格式则推荐'noatime',另外,如果使用SSD/固态硬盘则推荐'discard'以便激活SSD的TRIM支持." -_MntConfBody="\n确定使用如下挂载设置:" - -# Select Device -_DevSelTitle="选择设备" -_DevSelBody="系统中存在设备驱动器 (/dev/). /sda, /sdb, 之类." - -# Extra Partitions -_ExtPartBody="选择额外的分区进行挂载, 这将会提示你选择或输入挂载点.\n选择‘完成’将完成操作并继续下一步." -_ExtPartBody1="将分区挂载在扫描位置.\n\n请确保挂载点是以斜线开头(/).\n这些是例子:" - -# Auto partition -_PartBody1="\n警告:所有在此分区下的数据" -_PartBody2="将丢失.\n\n将创建一个500M的boot启动分区,\n剩下的全部剩余空间将分配给主分区." -_PartBody3="\n\n要继续吗?" -_PartWipeBody1="\n警告:所有在此分区下的数据" -_PartWipeBody2="将被'wipe -Ifre'命令删除.\n\n这过程花费的时间取决于启动器的空间大小.\n\n要继续吗?" - -# Partitioning Menu -_PartTitle="分区工具" -_PartBody="\n自動分區適用於初學者,否則gparted作為GUI選項提供,和 cfdisk/parted CLI。\n\nUEFI系統需要大小為100-512M的vfat/fat32分區才能安裝在/boot或/boot/efi,此外,使用LUKS的BIOS系統需要一個單獨的/啟動分區,介於100-512M之間,格式為ext3/4。" -_PartAuto="自动分区中" -_PartWipe="安全移除磁盘(可选)" - -# File System -_FSTitle="选择文件系统" -_FSBody="如果不确定的话建议使用ext4.\n\n并不是所有格式类型的分区都能用作根路径 (/)或启动路径 (/boot) ,所有的分区都有各自的特点和限制." -_SelRootBody="选择根分区 (/).\n\n这是 $DIST 安装的位置." -_SelSwpBody="是否启用交换分区? (可选)\n\n选择使用交换文件还是交换分区n\n\n交换文件的大小默认为内存容量,也可以在接下来的步骤中修改." -_SelSwpFile="交换文件" -_SelSwpNone="沒有" -_SelUefiBody="选择EFI分区.\n\n这是一个用于启动较新系统的特殊分区. 通常位于硬盘第一个分区,大小100-500M,分区格式为vfat/fat32." -_FormUefiBody="[重要]\nEFI分区" -_FormBiosBody="[重要]\nboot分区" -_FormUefiBody2="已经被正确地格式化.\n\n要跳过吗?\n\n选择'no'将清除分区所有数据(即引导程序).\n\n如果不确定请选择'Yes'.\n" - -# LUKS / DM-Crypt / Encryption -_LuksMenuBody="通过dm_crypt加密的分区如果不通过密码来解锁,将不能写入甚至不能去读取." -_LuksMenuBody2="\n\n除非使用GRUB引导程序,则必须有一个单独的未加密的启动分区或逻辑卷管理(LVM)程序A seperate boot partition without encryption or logical volume management is required, unless using BIOS grub." -_LuksMenuBody3="\n\n对新手推荐使用默认的加密设置.\n否则, 密码和密钥大小参数可以手动输入." -_LuksOpen="打开已加密的分区" -_LuksOpenBody="輸入加密設備的名稱和密碼。\n\n无需在/dev/mapper/中添加前缀。\n\n已提供示例名称。" -_LuksEncrypt="自动LUKS加密" -_LuksEncryptAdv="定义密钥大小和密码" -_LuksEncryptBody="选择要加密的分区." -_LuksEncryptSucc="\n完成!加密分区已经打开并准备进行挂载.\n" -_LuksPartErrBody="\n加密需要至少两个分区:\n\n1.根分区(/)-标准或lvm分区类型.\n\n2. 引导分区(/boot或/boot/efi) - 仅限于标准分区类型(使用BIOS时除外lvm)." -_LuksOpenWaitBody="\n创建加密分区:" -_LuksCreateWaitBody="\n创建加密分区:" -_LuksWaitBody2="\n\n设备或卷已经被使用:" -_LuksCipherKey="一旦修改了指定标志,它们将自动与'cryptsetup -q luksFormat/dev/ ...'命令一起使用。\n\n注意:密钥文件不受支持; 他们可以在安装后手动添加。 不要指定任何其他标志,例如-v(--verbose)或-y(--verify-passphrase)." - -# Logical Volume Management -_LvmMenu="逻辑卷管理(LVM)允许从现有驱动器和分区创建"虚拟"硬盘驱动器(卷组)和分区(逻辑卷)。 必须首先创建一个卷组,然后再创建一个或多个逻辑卷。\n\nLVM还可以与加密分区一起使用,以在其中创建多个逻辑卷(例如,根目录和主目录)。" -_LvmCreateVG="创建卷组和逻辑卷." -_LvmDelVG="删除卷组" -_LvMDelAll="删除全部卷组、逻辑分区、主分区." -_LvmDetBody="检测到现有的逻辑卷管理(LVM)。\n\n正在激活,请稍候..." -_LvmNameVgBody="输入要创建的卷组(VG)的名称。\n\n VG是在下一个选定分区之外创建的新"虚拟设备/硬盘。" -_LvmPvSelBody="选择用于物理卷(PV)的分区。" -_LvmPvConfBody1="确认创建卷组" -_LvmPvConfBody2="包含以下分区:\n\n" -_LvmPvActBody1="创建和激活卷组" -_LvmPvDoneBody1="卷组" -_LvmPvDoneBody2="已创建" -_LvmLvNumBody1="使用[空格键]选择要创建的逻辑卷(LV)的数量为" -_LvmLvNumBody2="\n最后(或唯一)LV将自动使用卷组中剩余空间的100%。" -_LvmLvNameBody1="输入要创建的逻辑卷(LV)的名称。\n\n这类似于为分区设置名称/标签。\n" -_LvmLvNameBody2="\n注意:此LV将自动用尽卷组上剩余的所有空间" -_LvmLvSizeBody1="剩余的" -_LvmLvSizeBody2="\n\n输入以兆字节(M)或千兆字节(G)为单位的逻辑卷(LV)大小。例如,100M将创建100兆字节LV,10G将创建10千兆字节LV。\n" -_LvmCompBody="\n完成!已为卷组创建所有逻辑卷。\n\n是否希望查看新的LVM方案?\n" -_LvmDelQ="\n确认删除卷组和逻辑卷。\n\n如果删除某个卷组,则其中的所有逻辑卷也将被删除。" -_LvmSelVGBody="选择要删除的卷组。\n\n卷组内的所有逻辑卷也将被删除。" - -# LVM Errors -_LvmVGErr="\n没有找到卷组"。 -_LvmNameVgErr="输入的名称无效。\n\n卷组名称可能是字母数字,但可能不包含空格,以'/'开头或已被使用。\n" -_LvmPartErrBody="没有可用于逻辑卷管理的可用分区,至少需要一个分区。\n\n如果LVM已在使用中,取消激活它将允许用于其物理卷的分区, 再次使用。" -_LvmLvNameErrBody="输入的名称无效。逻辑卷(LV)名称可能是字母数字,但不能包含空格或以'/'开头。\n" -_LvmLvSizeErrBody="\n输入的值无效。\n\n必须是最后以'M'(兆字节)或'G'(千兆字节)表示的数值。\n\n示例包括100M,10G或250M。\n值 也可能不等于或大于VG的剩余尺寸。" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/dutch.trans b/lang/needupdate/dutch.trans deleted file mode 100644 index 6cdb863..0000000 --- a/lang/needupdate/dutch.trans +++ /dev/null @@ -1,198 +0,0 @@ -# Generic -_All="Alle" -_Done="Klaar" -_Skip="Overspringen/Geen" -_ErrTitle="Fout" -_NoFileErr="\nBestand bestaat niet.\n" -_PlsWait="\nEven geduld aub...\n" -_PassErr="\nDe ingegeven wachtwoorden zijn niet identiek.\n" -_Pass2="Herhaal het wachtwoord" -_TryAgain="Probeer opnieuw aub.\n" -_Exit="Afsluiten.\n" -_Back="Terug" -_Name="Naam:" - -# Welkom -_WelTitle="Welkom bij" -_WelBody="\nDit installatieprogramma zal de nieuwste pakketten downloaden van de $DIST repositories. Enkel de hoogstnodige configuratie wordt uitgevoerd\n\nMENU OPTIES: Selecteer de gewenste optie door haar nummer in te tikken of door de pijljestoetsen [op]/[neer] te gebruiken. Bevestig door op [enter] te drukken. Schakel tussen de knoppen door de [Tab] toets of de pijltjestoets [links]/[rechts] te gebruiken. Bevestig door op [enter] te drukken. U kunt navigeren in de lange lijsten door de [pg up] en [pg down] toetsen te gebruiken, en/of door op de eerste letter van de gewenste optie te drukken.\n\nCONFIGURATIE & PAKKET OPTIES: Standaard pakketten in checklists worden vooraf geselecteerd. Gebruik de [Spatiebar] om te (de)selecteren" - -# Requirements Voorwaarden -_NotRoot="\nHet installatieprogramma moet worden uitgevoerd als root.\n" -_NoNetwork="\nGeen internetverbinding.\n" - -_MntConfBody="\nBevestig volgende aankoppelopties:" -_MntBody="Gebuik [Spatie] om de gewenste aankoppel-opties te (de)selecteren en controleer deze nauwkeurig. Vermijd de selectie van meerdere versies van de zelfde optie, aub." - -# Autopartitionering -_PartBody1="Opgelet:\n\nALLE data op" -_PartBody2="zal worden gewist.\n\nEr wordt eerst een vfat/fat32 boot partitie van 512MB aangemaakt, de rest van de ruimte wordt ingenomen door een tweede ext4 (root of '/') partitie" -_PartBody3="\n\nWil je verder gaan?" - -#Foutmeldingen. Alle andere worden door BASH gegenereerd. -_ErrNoMount="\nPartitie(s) moet(en) eerst worden aangekoppeld\n" -_ErrNoBase="\nHet $DIST basissysteem moet eerst worden geïnstalleerd.\n" -_ErrNoConfig="\nDe basisconfiguratie voor het systeem moet eerst worden uitgevoerd.\n" - -# Selecteer Configuratiebestanden -_EditTitle="Controle van Configuratiebestanden" -_EditBody="\nA telepítés szinte befejeződött.\n\nSelecteer een hieronder vermeld bestand dat moet worden herzien of gewijzigd." - -# Installeer BIOS Bootloader -_InstBootTitle="Installeer Bootlader" -_MntBootBody="\nGrub is aanbevolen voor beginners. De installatieschijf kan ook worden geselecteerd.\n" -_InstSysTitle="Installeer Syslinux" -_InstSysBody="\nInstalleer syslinux op Master Boot Record (MBR) of op Root (/)?\n" - -# Installeer UEFI Bootloader -_InstUefiBtTitle="Installeer UEFI Bootloader" -_InstUefiBtBody="\nsystemd-boot vereist /boot. Grub werkt met eender welk aankoppelpunt." - -# LUKS / DM-Crypt / Versleuteling -_LuksMenuBody="\nOpslagmedia en volumes die versleuteld werden met dm_crypt kunnen niet geopend of gelezen worden zonder deze te deblokkeren met een sleutel of wachtwoord." -_LuksMenuBody2="\n\nEen aparte niet-versleutelde boot partitie zonder logisch volume management (LVM - tenzij bij gebruik van BIOS Grub) is vereist." -_LuksMenuBody3="\n\nStandaard wordt de automatische versleuteloptie gebruikt, en dit is aanbevolen voor beginners. Het is ook mogelijk om de code en de sleutelgrootte-parameters manueel in te geven." -_LuksOpen="Open Versleutelde Partitie" -_LuksOpenBody="\nVoer een naam en wachtwoord in voor het versleutelde apparaat.\n\nHet is niet nodig om het voorvoegsel /dev/mapper/ te vermelden. er werd een voorbeeld voorzien." -_LuksEncrypt="Automatische LUKS Versleuteling" -_LuksEncryptAdv="Bepaal de sleutelgrootte en Cypher" -_LuksEncryptBody="\nSelecteer een partitie om te versleutelen." -_LuksEncryptSucc="\nKlaar! Geopend en klaar voor LVM (aanbevolen) of rechtstreekse aankoppeling.\n" -_LuksPartErrBody="\nEr zijn minimum twee partities nodig om te kunnen versleutelen:\n\n1. Root (/) - standaard-of LVM partitie-types.\n\n2. Boot (/boot of /boot/efi) - alleen standaard partitietypes (behalve LVM waar men BIOS Grub gebruikt).\n" -_LuksOpenWaitBody="\nAanmaken van een versleutelde Root partitie:" -_LuksCreateWaitBody="\nAanmaken van een versleutelde Root partitie:" -_LuksWaitBody2="Gebruikt opslagmedium of volume:" -_LuksCipherKey="\nZodra de opgegeven vlaggen zijn gewijzigd, zullen ze automatisch worden gebruikt met de opdracht 'cryptsetup q luksFormat/dev/...'\n\nOpmerking: Sleutelbestanden worden niet ondersteund; ze kunnen na de installatie handmatig worden toegevoegd. Geef geen extra vlaggen op, zoals -v (--verbose) of -y (--verify-passphrase).\n" - -# Logisch Volume Management -_LvmMenu="\nLogisch Volume Management (LVM) laat ons toe 'virtuele' harde schijven (Volume Groepen) en partities (Logische Volumes) te maken op bestaande schijven en partities. Eerst moet een Volume Groep worden aangemaakt met daarin één of meerdere Logische Volumes.\n\nLVM kan ook worden gebruikt om in een versleutelde partitie meerdere logische volumes aan te maken (zoals root en home)." -_LvmCreateVG="Aanmaken van VG en LV(s)" -_LvmDelVG="Verwijder Volume Groepen" -_LvMDelAll="Verwijder *ALLE* VGs, LVs, PVs" -_LvmDetBody="\nEen bestaand Logische Volume Management (LVM) gedetecteerd. Activeren. Even geduld aub...\n" -_LvmPartErrBody="\Er zijn geen geschikte partities beschikbaar die gebruikt kunnen worden als Logische Volume Management. Er is minimum één zo'n partitie vereist.\n\nAls LVM al in gebruik is, zal het deactiveren ervan het mogelijk maken om de partitie(s) die bezet waren als Physical Volume(s) opnieuw te gebruiken.\n" -_LvmNameVgBody="\nOm een Volume Groep (VG) aan te maken geef een naam in.\n\nDe VG is de nieuwe 'virtuele harde schijf' die gemaakt kan worden op de hierna te selecteren partitie(s).\n" -_LvmNameVgErr="\nOngeldige naam ingegeven. The Volume Groepsnaam mag alfa-numeriek zijn, maar mag geen spaties bevatten, starten met een '/', of al in gebruik zijn.\n" -_LvmPvSelBody="\nSelecteer de partitie(s) om te gebruiken als Physical Volume (PV).\n" -_LvmPvConfBody1="\nBevestig het aanmaken van Volume Groep " -_LvmPvConfBody2="met de volgende partities:\n\n" -_LvmPvActBody1="\nAanmaak en activering van Volume Groep " -_LvmPvDoneBody1="\nVolume Groep " -_LvmPvDoneBody2="werd aangemaakt" -_LvmLvNumBody1="\nGebruik [spatie] om het aantal logische volumes (LVM) te selecteren die moeten worden aangemaakt" -_LvmLvNumBody2="\n\nDe laatste (of enige) LV zal automatisch 100% van de overblijvende ruimte innemen in de Volume Groep." -_LvmLvNameBody1="\nOm een Logisch Volume (LV) aan te maken geef je een naam in.\n\nDit is zoals het geven van een naam/label aan een partitie.\n" -_LvmLvNameBody2="\nNOTE: Deze LV zal alle overgebleven ruimte van de Volume Groep innemen" -_LvmLvNameErrBody="\nOngeldige naam. De naam van de Logische Volume (LV) mag alfa-numeriek zijn, maar mag geen spaties bevatten of voorafgegaan worden door een '/'.\n" -_LvmLvSizeBody1="resterend" -_LvmLvSizeBody2="\n\nGeef de grootte van Logisch Volume (LV) in, in Megabytes (M) of Gigabytes (G). Bij voorbeeld, 100M maakt een LV van 100 Megabyte . 10G maakt een LV van 10 Gigabyte.\n" -_LvmLvSizeErrBody="\nEen ongeldige waarde werd ingegeven. Er moet een numerieke waarde worden ingegeven gevolgd door een 'M' (Megabytes) of een 'G' (Gigabytes).\n\nVoorbeelden, 100M, 10G, or 250M. De waarde mag ook niet gelijk of groter zijn dan de restgrootte van de VG.\n" -_LvmCompBody="\nKlaar! Alle Logische Volumes voor de Volume Groep werden aangemaakt.\n\nWil je het nieuwe LVM schema te zien?\n" -_LvmDelQ="\n Bevestig het verwijderen van Volume Groep(en) en Logische Volume(s).\n\nBij het verwijderen van een Volume Groep, zullen alle Logische Volumes binnen deze groep ook worden verwijderd.\n" -_LvmSelVGBody="\nSelecteer de Volume Groep die moet worden verwijderd. Alle Logische Volumes daarin zullen ook vernietigd worden.\n" -_LvmVGErr="\nGeen Volume Groepen gevonden.\n" - -# Stel het toetsenbord in (vconsole) -_CMapTitle="Stel de Virtuele Console in" -_CMapBody="\nEen virtuele console is een shell prompt in een niet-grafische omgeving. De toetsenbordindeling ervan is onafhankelijk van een desktop suite / terminal." - -# stel Xkbmap in (omgeving) -_XMapBody="\nSelecteer de toetsenbordindeling voor Desktop Suite." - -# Stel de systeemtaal in -_LocaleBody="Landinstellingen bepalen welke talen en hoe tijd en datum enz... worden weergegeven.\n\nHet formaat is taal_LAND (bijvoorbeeld nl_BE is nederlands, België; en_GB is engels, Groot-Brittannië). " - -# Stel de tijdzone in -_TimeZBody="\nAan de hand van de tijdzone wordt uw systeemklok correct ingesteld." -_TimeSubZBody="\nSelecteer de dichtstbij zijnde stad." -_TimeZQ="\nStel als tijdzone in" - -# Stel Host naam in -_HostNameBody="\nAan de hand van de Host-Naam wordt een systeem in een netwerk geïdentificeerd.\n\nDe Host-Naam mag enkel uit alfa-numerieke karakters bestaan maar kan ook een streepje (-) bevatten - doch niet in het begin of op het einde." - -# Stel het Root wachtwoord in -_RootBody="- Voer het root-wachtwoord in (leeg gebruikt het bovenstaande) -" - -# Aanmaken van een Nieuwe Gebruiker -_UserTitle="Maak een nieuwe gebruiker aan" -_UserBody="\nVoer de naam en het wachtwoord in voor uw nieuwe gebruikersaccount.\n\nDe naam mag geen hoofdletters bevatten, geen punten bevatten (.), Eindigen met een koppelteken (-), of dubbele punten bevatten (:)\n\nOPMERKING: [Tab] om te schakelen tussen tekstinvoer en knoppen of druk op [Enter] om te accepteren." -_UserSetBody="\nMaak een Gebruiker aan en stel Groepen in..\n" -_UserErrTitle="Foute gebruikersnaam" -_UserErrBody="\nEen foute gebruikersnaam werd ingegeven. Probeer opnieuw aub.\n" -_UserPassErr="\nDe ingevoerde gebruikerswachtwoorden komen niet overeen.\n" -_RootPassErr="\nDe ingevoerde rootwachtwoorden komen niet overeen.\n" -_Username="Gebruikersnaam:" -_Password="Wachtwoord:" -_Password2="Wachtwoord2:" - -# Aankoppelen van Partities -_MntTitle="Aankoppelstatus" -_MntSucc="\nSuccesvol aangekoppeld!\n" -_MntFail="\nAankoppeling mislukt!\n" -_WarnMount="\nBELANGRIJK: Partities kunnen worden aangekoppeld zonder ze te formatteren door het selecteren van de '$_Skip' optie te vinden bovenaan in het systeem menubestand.\n" - -# Selecteer Opslagmedium (installatie) -_DevSelTitle="Selecteer Opslagmedium" -_DevSelBody="\nOpslagmedia (/dev) zijn de beschikbare en beschrijfbare harde schijven. De eerste is /sda, de tweede /sdb, en zo verder." - -# Partitionering -_PartTitle="Partities instellen" -_PartBody="\nAuto partitionering is beschikbaar voor beginners, anders wordt gparted aangeboden als een GUI-optie en cfdisk/parted voor CLI.\n\nUEFI-systemen vereisen een vfat/fat32-partitie tussen 100-512M groot om te worden gemount aan /boot of /boot/efi, daarnaast hebben BIOS-systemen die LUKS gebruiken een aparte /boot-partitie nodig, tussen 100-512M en geformatteerd als ext3/4." -_PartAuto="Automatische Partitionering" -_PartWipe="Opslagmedium veilig wissen (optioneel)" -_PartWipeBody1="\nOPGELET: ALLE data op" -_PartWipeBody2="zal worden vernietigd bij gebruik van de opdracht 'wipe -Ifre'. Dit kan een tijdje duren afhankelijk van de grootte van het opslagmedium.\n\nWenst U verder te gaan?\n" - -# Partitionering Fout -_PartErrBody="\nDe installatie van BIOS systemen vereist minimum één partitie (ROOT).\n\nUEFI systemen vereisen een minimum van twee partities (ROOT and UEFI).\n" - -# Bestand Systeem -_FSTitle="Kies een bestandsysteem" -_FSBody="\nExt4 is hier aanbevolen.\n\nNiet alle bestandsystemen zijn geschikt voor de Root of Boot-Partities. Elk bestandsysteem heeft verschillende eigenschappen en beperkingen." - -# Selecteer Root -_SelRootBody="Selecteer de ROOT Partitie.\n\nDit is waar $DIST zal worden geïnstalleerd." - -# Selecteer SWAP -_SelSwpBody="Selecteer de SWAP Partitie.\n\nBij gebruik van SWAP, zal deze even groot ingesteld worden als de hoeveelheid RAM." -_SelSwpFile="Swapbestand" -_SelSwpNone="Geen" - -# Selecteer UEFI -_SelUefiBody="Selecteer een UEFI Partitie.\n\nDit is een speciale partitie voor het starten van UEFI systemen." -_FormUefiBody="[BELANGRIJK]\nDe EFI-partitie" -_FormBiosBody="[BELANGRIJK]\nDe boot-partitie" -_FormUefiBody2="is al correct geformatteerd.\n\nWilt u het formatteren overslaan? Als u 'Nee' kiest, worden ALLE gegevens (bootloaders) op de partitie gewist.\n\nKies 'Ja' als u niet zeker bent.\n" - -# Extra Partities -_ExtPartBody="\nSelecteer bijkomende partities in eender welke volgorde, of 'Klaar' om te eindigen." -_ExtPartBody1="\nBepaal een partitie aankoppelpunt. Verzeker je ervan dat de naam begint met een slash (/). Zie voorbeelden:" -_ExtErrBody="\nPartitie kan niet worden aangekoppeld wegens een probleem met de aankoppelnaam. De naam moet achter een voorwaartse slash komen.\n" - -#Voorbereidings Menu -_PrepTitle="Voorbereiding Installatieproces" -_PrepBody="\nElke stap moet IN VOLGORDE uitgevoerd worden. Eenmaal alles is afgewerkt, selecteer 'Klaar' om zo de installatie correct af te ronden.\n\nEenvoudige configuratie van het basissysteem." -_PrepLayout="Stel Desktop Toetsenbordindeling in" -_PrepParts="Partitioneer Schijf" -_PrepShowDev="Lijst van Opslagmedia (optioneel)" -_PrepLUKS="LUKS Versleuteling (optioneel)" -_PrepLVM="Logisch Volume Management (optioneel)" -_PrepMount="Koppel de Partities aan" -_PrepConfig="Configureer de installatie" -_PrepInstall="Installeer $DIST" - -_BootLdr="Installeer de Bootlader" - -# Configureer het basissysteem -_ConfTitle="Configureer het Basissysteem" -_ConfHost="Stel Host-naam in" -_ConfTimeHC="Stel Tijdzone en klok in" -_ConfLocale="Stel de Systeemtaal in" -_ConfRoot="Stel het Root wachtwoord in" -_ConfUser="Voeg nieuwe gebruiker(s) toe" - -# Sluit Installer -_CloseInst="Sluit het installatieprogramma" -_CloseInstBody="\nUnmount partities en sluit het installatieprogramma?\n" -_InstFinBody="\nDe installatie is nu voltooid.\n\nWilt u het installatieprogramma sluiten en opnieuw opstarten?" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/french.trans b/lang/needupdate/french.trans deleted file mode 100644 index fc746da..0000000 --- a/lang/needupdate/french.trans +++ /dev/null @@ -1,200 +0,0 @@ -# Générique -_All="Tous" -_Done="Terminé" -_Skip="Passer/Aucun" -_ErrTitle="Erreur" -_NoFileErr="\nLe fichier n'existe pas.\n" -_PlsWait="\nVeuillez patienter...\n" -_PassErr="\nLes mots de passe entrés ne correspondent pas.\n" -_Pass2="Entrer à nouveau le mot de passe." -_TryAgain="Veuillez réessayer.\n" -_Exit="Sortie.\n" -_Back="Retour" -_Name="prénom:" - -# Bienvenue -_WelTitle="Bienvenue dans" -_WelBody="\nCet installateur va télécharger les derniers paquets provenant des dépôts $DIST. Seule la configuration minimale nécessaire sera téléchargée.\n\nOPTIONS du MENU : Sélectionner en appuyant sur le numéro de l'option, ou en utilisant les flèches haut/bas avant d'appuyer sur [entrée] pour confirmer. Basculer entre les boutons en utilisant [Tab] ou les flèches gauche/droite avant d'appuyer sur [entrée] pour confirmer.\n\nNaviguer dans la liste en utilisant les touches [page suivante] et [page précédente], et/ou en appuyant sur la première lettre de l'option souhaitée.\n\nOPTIONS & CONFIGURATION DES PAQUETS : Les paquets par défaut dans les listes vont être pré-vérifiés. Utiliser la [barre espace] pour sélectionner/désélectionner." - -_MntBody="Utiliser [Espace] pour sélectionner/désélectionner les options de montage désirées. Veuillez ne pas sélectionner plusieurs versions de la même option." -_MntConfBody="\nConfirmer les options de montage suivantes:" - -# Point de montage UEFI -_MntUefiBody="\nSélectionner un point de montage EFI.\n\nsystemd-boot requiert /boot. grub requiert /boot/efi." - -# Partition auto -_PartBody1="AVERTISSEMENT: TOUTES les données sur" -_PartBody2="vont être effacées.\n\nUne vfat/fat32 partition de démarrage (boot) de 512MB va être créée en premier, suivie par une seconde ext4 partition (root ou '/') utilisant tout l'espace restant" -_PartBody3="\n\nSouhaitez-vous continuer?" - -# Messages d'erreur. Tous les autres messages sont générés par BASH. -_ErrNoMount="\nLa ou les partitions doivent être montées en premier.\n" -_ErrNoBase="\nLa base de $DIST doit être installée en premier.\n" -_ErrNoConfig="\nLa configuration de base du système doit être effectuée en premier.\n" - -# Sélectionner les fichiers de configuration -_EditTitle="Vérifier les fichiers de configuration" -_EditBody="\nL'installation est presque terminée.\n\nSélectionner un fichier référencé ci-dessous pour être vérifié ou modifié." - -# Installer le chargeur d'amorçage BIOS -_InstBootTitle="Installer le chargeur d'amorçage" -_MntBootBody="\nGrub est recommandé pour les débutants. Le périphérique d'installation peut également être sélectionné.\n" -_InstSysTitle="Installer Syslinux" -_InstSysBody="\nInstaller syslinux dans le Master Boot Record (MBR) ou à la racine (/) ?\n" - -# Cryptage / DM-Crypt / LUKS -_LuksMenuBody="\nLes volumes et périphériques cryptés utilisant dm_crypt ne peuvent pas être accessibles ou visibles sans être débloqués par une clé de chiffrement ou un mot de passe." -_LuksMenuBody2="\n\nUne partition de démarrage (boot) séparée sans cryptage ou un gestionnaire de volume logique (LVM - sauf si vous utilisez BIOS Grub) est nécessaire." -_LuksMenuBody3="\n\nL'option automatique utilise les paramètres d'encryptage par défaut, et elle est recommandé pour les débutants. Toutefois, il est possible de préciser manuellement les paramètres de chiffrement ainsi que la longueur de clé." -_LuksOpen="Ouvrir une partition cryptée" -_LuksOpenBody="\nEntrez un nom et un mot de passe pour l'appareil chiffré.\n\nIl n'est pas nécessaire de le préfixer avec /dev/mapper/. Un exemple a été fourni." -_LuksEncrypt="Cryptage LUKS automatique" -_LuksEncryptAdv="Définir le cryptage et la longueur de clé" -_LuksEncryptBody="\nSélectionner une partition à crypter." -_LuksEncryptSucc="\nTerminé ! Ouvert et prêt pour LVM (recommandé) ou montage direct.\n" -_LuksPartErrBody="\nUn minimum de deux partitions est nécessaire pour le cryptage :\n\n1. Root (/) - partition standard ou lvm.\n\n2. Boot (/boot ou /boot/efi) - partition standard uniquement (excepté lvm utilisant BIOS Grub).\n" -_LuksCreateWaitBody="\nCréation d'une partition Root crypté :" -_LuksOpenWaitBody="\nCréation d'une partition Root crypté :" -_LuksWaitBody2="Périphérique ou volume utilisé :" -_LuksCipherKey="\nDès que les drapeaux spécifiés sont modifiés, ils peuvent être automatiquement utilisés avec la commande 'cryptsetup -q luksFormat /dev/...'.\n\nNOTE : Les fichiers de clé ne sont pas supportés ; Ils peuvent être ajoutés manuellement après l'installation. Ne spécifier aucuns drapeaux additionnels du genre -v (--verbose) ou -y (verify-passphrase).\n" - -# Gestionnaire de volume logique (LVM) -_LvmMenu="\nLe gestionnaire de volume logique (LVM) permet aux disque durs 'virtuels' (groupes de volume) et aux partitions (volumes logiques) d'être créer à partir de volumes et partitions qui existent déjà. Un groupe de volume peut être créé en premier, avec un ou plusieurs volumes logiques à l'intérieur.\n\nLVM peut également être utilisé avec une partition cryptée pour créer de multiples volumes logiques (ex : root et home) à l'intérieur." -_LvmCreateVG="Créer des LV(s) et VG" -_LvmDelVG="Supprimer des groupes de volume" -_LvMDelAll="Supprimer *TOUT* PVs, LVs, VGs" -_LvmDetBody="\nGestionnaire de volume logique (LVM) existant détecté. Activation. Veuillez patienter...\n" -_LvmPartErrBody="\nIl n'y a aucunes partitions exploitables disponible à utiliser pour le gestionnaire de volume logique. Une partition minimum est nécessaire.\n\nSi le LVM est déjà en cours d'utilisation, la désactivation de celui-ci permettra aux partitions utilisées pour ses volumes physiques d'être utilisées à nouveau.\n" -_LvmNameVgBody="\nEntrer le nom du groupe de volume (VG) à créer.\n\nLe VG est le nouveau « Périphérique virtuel / disque dur » à créer en dehors de la partition sélectionnée ensuite.\n" -_LvmNameVgErr="\nNom entré incorrect. Le nom du groupe de volume doit être en caractère alphanumérique, mais ne doit pas contenir d'espaces, ni commencer par un « / », ou être déjà utilisé.\n" -_LvmPvSelBody="\nSélectionner la ou les partitions à utiliser pour le volume physique (PV).\n" -_LvmPvConfBody1="\nConfirmer la création du groupe de volume" -_LvmPvConfBody2="avec les partitions suivantes :\n\n" -_LvmPvActBody1="\nCréation et activation du groupe de volume" -_LvmPvDoneBody1="\nLe groupe de volume" -_LvmPvDoneBody2="a été créé" -_LvmLvNumBody1="\nUtiliser [barre espace] pour sélectionner le nombre de volumes logiques (LVs) à créer dans" -_LvmLvNumBody2="\n\nLe dernier (ou seul) LV utilisera automatiquement 100% de l'espace restant dans le groupe de volume." -_LvmLvNameBody1="\nEntrer le nom du volume logique (LV) à créer.\n\nCeci ressemble à une configuration de nom / d'étiquette pour une partition.\n" -_LvmLvNameBody2="\nNOTE : Ce LV utilisera automatiquement tout l'espace restant dans le groupe de volume" -_LvmLvNameErrBody="\nNom entré incorrect. Le nom du volume logique (LV) peut contenir des caractères alphanumériques, mais ne peut pas contenir d'espaces ou être précédé par un « / ».\n" -_LvmLvSizeBody1="restant" -_LvmLvSizeBody2="\n\nEntrer la taille du volume logique (LV) en Mégaoctets (M) ou en Gigaoctets (G). Par exemple, 100M créera un VL de 100 Mégaoctets. 10G créera un VL de 10 Gigaoctets.\n" -_LvmLvSizeErrBody="\nValeur entrée incorrecte. Une valeur numérique doit être entrée avec un « M » (Mégaoctets) ou un « G » (Gigaoctets) à la fin.\n\nLes exemples incluent, 100M, 10G, ou 250M. De plus, la valeur ne doit pas être égale ou supérieure à la taille restante du VG.\n" -_LvmCompBody="\nTerminé ! Tous les volumes logiques ont été créés pour le groupe de volume.\n\nSouhaitez-vous voir le nouveau schéma du LVM ?\n" -_LvmDelQ="\nConfirmer la suppression des volumes logiques et des groupes de volume.\n\nSi vous supprimez un groupe de volume, tous les volumes logiques contenus à l'intérieur seront également supprimés.\n" -_LvmSelVGBody="\nSélectionner un groupe de volume à supprimer. Tous les volumes logiques contenus à l'intérieur seront également supprimés.\n" -_LvmVGErr="\nAucuns groupes de volume trouvés.\n" - -# Vérifier les conditions requises -_NotRoot="\nL'installateur doit être exécuté en tant qu'administrateur.\n" -_NoNetwork="\nLe test de connexion internet a échoué.\n" - -# Configurer l'agencement du clavier (vconsole) -_CMapTitle="Configurer la console virtuelle" -_CMapBody="\nUne console virtuelle est une invite de commande (shell prompt) dans un environnement non graphique. Son agencement clavier est indépendant du terminal / environnement de bureau." - -# Configurer Xkbmap (environnement) -_XMapBody="\nSélectionner l'agencement de l'environnement de bureau." - -# Définir les paramètres régionaux -_LocaleBody="Les locales déterminent les langages affichées, les formats de date et heure, etc....\n\nLe format de langue se présente ainsi : langage_PAYS (ex : fr_FR pour la France ; fr_BE pour la Belgique ; fr_CA pour le Canada ; fr_LU pour le Luxembourg, etc...)." - -# Définir le fuseau horaire -_TimeZBody="\nLe fuseau horaire est utilisé pour configurer correctement votre horloge système." -_TimeSubZBody="\nSélectionner la ville la plus proche de chez vous." -_TimeZQ="\nDéfinir le fuseau horaire sous" - -# Définir le nom d'hôte -_HostNameBody="\nLe nom d'hôte est utilisé pour identifier le système sur un réseau.\n\nIl est limité aux caractères alphanumériques, peut contenir un trait d'union (-) - mais pas au début ni à la fin." - -# Définir le mot de passe administrateur -_RootBody="-- Entrez le mot de passe root (vide utilise ce qui précède) --" - -# Créer un nouvel utilisateur -_UserTitle="Créer un nouvel utilisateur" -_UserBody="\nEntrez le nom et le mot de passe pour votre nouveau compte d'utilisateur.\n\nLe nom ne doit pas utiliser de majuscules, contenir des points (.), Se terminer par un tiret (-) ou inclure des deux-points (:)\n\nNOTE: [Tab] pour basculer entre la saisie de texte et les boutons ou appuyer sur [Entrée] pour accepter." -_UserErrTitle="Erreur de nom utilisateur" -_UserErrBody="\nNom d'utilisateur incorrect. Veuillez réessayer.\n" -_UserPassErr="\nLes mots de passe d'utilisateur entrés ne correspondent pas.\n" -_RootPassErr="\nLes mots de passe racine ne correspondent pas.\n" -_UserSetBody="\nCréation de l'utilisateur et paramétrage des groupes..\n" -_Username="Nom d'utilisateur:" -_Password="Mot de passe:" -_Password2="Mot de passe2:" - -# Montage (Partitions) -_MntTitle="État de montage" -_MntSucc="\nMontage réussi !\n" -_MntFail="\nÉchec de montage !\n" -_WarnMount="\nIMPORTANT: Les partitions peuvent être montées sans les formater en sélectionnant l'option '$_Skip' référencée tout en haut du menu du système de fichiers.\n" - -# Sélectionner un périphérique (installation) -_DevSelTitle="Sélectionner un périphérique" -_DevSelBody="\nLes périphériques (/dev) sont des disques durs et des clés USB disponibles pour une installation. Le premier se nomme /sda, le second /sdb, etc...." - -# Outil de partitionnement -_PartTitle="Outil de partitionnement" -_PartBody="\nLe partitionnement automatique est disponible pour les débutants, sinon gparted est fourni en tant qu'option GUI et cfdisk/parted pour CLI.\n\nLes systèmes UEFI nécessitent une partition vfat/fat32 de taille comprise entre 100-512M pour être montés sur /boot ou /boot/efi. De plus, les systèmes BIOS utilisant LUKS nécessitent une partition séparée /boot, entre 100-512M et formatée ext3/4." -_PartAuto="Partitionnement automatique" -_PartWipe="Effacement sécurisé du périphérique (optionnel)" -_PartWipeBody1="\nAVERTISSEMENT : TOUTES les données sur" -_PartWipeBody2="vont être détruites en utilisant la commande 'wipe -Ifre'. Cette opération peut prendre un certain temps, en fonction de la taille du périphérique.\n\nSouhaitez-vous continuer ?\n" - -# Erreur de partitionnement -_PartErrBody="\nLes systèmes BIOS requièrent une partition minimum (ROOT).\n\nLes systèmes UEFI requièrent 2 partitions minimum (ROOT et UEFI).\n" - -# Système de fichiers -_FSTitle="Choisir un système de fichiers" -_FSBody="\nExt4 est recommandé.\n\nTous les systèmes de fichiers ne sont pas exploitables pour les partitions racine ou pour les partitions de démarrage. Tous ont des caractéristiques différentes et des restrictions." - -# Sélectionner Root -_SelRootBody="\nSélectionner la partition racine (ROOT) où $DIST sera installé." - -# Sélectionner le fichier d'échange (SWAP) -_SelSwpBody="\nSélectionner une partition SWAP. Le fichier d'échange créé doit être de la même taille que votre mémoire vive (RAM)." -_SelSwpFile="Fichier d'échange" -_SelSwpNone="Aucun" - -# Formater UEFI -_FormUefiBody="[IMPORTANT]\nLa partition EFI" -_FormBiosBody="[IMPORTANT]\nLa partition boot" -_FormUefiBody2="est déjà correctement formaté.\n\nVoulez-vous passer la mise en forme? Choisir 'Non' effacera TOUTES les données (bootloaders) sur la partition.\n\nEn cas de doute, choisissez 'Oui'\n" -_SelUefiBody="\nSélectionner une partition UEFI. C'est une partition spéciale permettant le démarrage sur des systèmes UEFI." - - -# Partitions supplémentaires -_ExtPartBody="\nSélectionner des partitions additionnelles dans n'importe quel ordre, ou cliquer sur « Terminé » afin de poursuivre." -_ExtPartBody1="\nSpécifier le point de montage de la partition. Assurez-vous que le nom débute par une barre oblique (/). Exemples inclus:" -_ExtErrBody="\nLa partition ne peut être montée, cela est dû à un problème avec le nom du point de montage. Un nom doit être déterminé après la barre oblique.\n" - -# Menu de Préparation -_PrepTitle="Préparer l'installation" -_PrepBody="\nChaque étape doit être suivie DANS L'ORDRE. Une fois effectué, sélectionner « Terminé » pour finaliser correctement l'installation.\n\nL'agencement du clavier sera utilisé pour l'installateur et pour le système installé." -_PrepLayout="Configurer l'agencement du clavier" -_PrepShowDev="Liste des périphériques (optionnel)" -_PrepLUKS="Cryptage LUKS (optionnel)" -_PrepLVM="Gestionnaire de volume logique (optionnel)" -_PrepParts="Partitionner le(s) disque(s)" -_PrepMount="Monter les partitions" -_PrepConfig="Configurer l'installation" -_PrepInstall="Installer $DIST" - -_BootLdr="Installer le chargeur d'amorçage" - -# Configurer le menu de Base -_ConfTitle="Configurer Base" -_ConfBody="\nConfiguration simple de la base." -_ConfFstab="Générer FSTAB" -_ConfHost="Définir le nom d'hôte" -_ConfTimeHC="Définir l'heure et le fuseau horaire" -_ConfLocale="Définir les paramètres régionaux" -_ConfRoot="Définir le mot de passe administrateur" -_ConfUser="Ajouter un ou plusieurs utilisateurs" - -# Fermer l'installateur -_CloseInst="Fermer l'installateur" -_CloseInstBody="\nDémonter les partitions et fermer le programme d'installation?\n" -_InstFinBody="\nL'installation est maintenant terminée.\n\nVoulez-vous fermer le programme d'installation et redémarrer?" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/hungarian.trans b/lang/needupdate/hungarian.trans deleted file mode 100644 index f24bb07..0000000 --- a/lang/needupdate/hungarian.trans +++ /dev/null @@ -1,199 +0,0 @@ -# Általános -_All="Összes" -_Done="Kész" -_Skip="Ugrás/Nincs" -_ErrTitle="Hiba" -_NoFileErr="\nA fájl nem létezik.\n" -_PlsWait="\nKérlek várj...\n" -_PassErr="\nA megadott jelszavak nem egyeznek.\n" -_Pass2="Ismételd meg a jelszót." -_TryAgain="Kérlek próbáld újra.\n" -_Exit="Kilépés.\n" -_Back="Vissza" -_Name="Név:" - -# Üdvözöllek -_WelTitle="Üdvözöllek az" -_WelBody="\nEz a telepítő letölti a legújabb csomagokat az $DIST tárolókból. Csak minimálisan szükséges beállítás vállalt.\n\nMENÜ OPCIÓK: Válassz az opciók számának beütésével, vagy használd a fel/le nyilakat mielőtt [enter]t nyomnál a kiválasztáshoz. A gombok közötti váltáshoz használd a [Tab] billentyűt vagy használd a bal/jobb nyilakat mielőtt [enter]t nyomnál a megerősítéshez. A hosszú listában navigálhatsz a [pg up] és [pg down] billentyűkkel, és/vagy nyomd le az első betűjét a kiválasztani kívánt opciónak.\n\nKonfiguráció és csomag opciók: Az alapértelmezett csomagok a csekklistán elleőrizve lesznek. Használd a [szóköz] billentyűt a kiválasztásoz illetve a kiválasztás törléséhez." - -_MntBody="Használd a [Szóköz] billentyűt a csatolni kívánt meghajtó kijelöléséhez, illetve a kijelölés törléséhez és nézd át újra gondosan. Kérjük ne válassz több változatot ugyanahhoz a lehetőséghez." -_MntConfBody="\nErősítsd meg a következő csatolási lehetőségeket:" - -# UEFI csatolási pont -_MntUefiBody="\nVálasszUEFI csatolási pontot.\n\n'systemd-boot' megköveteli a /boot csatosási pontot. A 'grub' megköveteli a /boot/efi csatosási pont." - -# Automata partícionálás -_PartBody1="Figyelmeztetés: Az összes adat a" -_PartBody2="törölve lesz.\n\nAz 512MB-os vfat/fat32 boot partíciótkell először létrehoznod, következö a ext4 (root vagy '/') partíció az összes fennmaradó hely használatba vételével" -_PartBody3="\n\nFolytatni akarod?" - -# Hibaüzenetek. Az összes többi létre lesz hozva a BASH által. -_ErrNoMount="\nA partíciót (partíciókat) csatold először.\n" -_ErrNoBase="\nAz '$DIST base'-t kell először telepíteni.\n" -_ErrNoConfig="\nElőször a rendszer alapvető konfigurációját kell elvégezni.\n" - -# Konfigurációs fájlok kiválasztása -_EditTitle="Konfigurációs fájlok áttekintése" -_EditBody="\nA telepítés szinte befejeződött.\n\nA felsorolt listából jelöld ki bármelyik fájlt felülvizsgálatra, vagy módosításra." - -# BIOS rendszertöltő telepítése -_InstBootTitle="rendszertöltő telepítése" -_MntBootBody="\nA 'Grub' ajánlott a kezdőknek. A telepítési eszköz is kiválasztható.\n" -_InstSysTitle="Syslinux telepítése" -_InstSysBody="\nA 'syslinux' telepítése a Master Boot Recordba (MBR) vagy a Root (/) partícióra?\n" - -# LUKS / DM-Crypt / Titkosítás -_LuksMenuBody="\nEszközök és kötetek titkosítása 'dm_crypt' használatával. Kulcs vagy jelszó használata nélkül nincs hozzáférés vagy akár nem láthatóak az adatok." -_LuksMenuBody2="\n\nTitkosítatlan , különálló boot partíció, vagy logikai kötetkezelő (LVM - hacsak BIOS Grub-ot használsz) szükséges." -_LuksMenuBody3="\n\nAz automatikus lehetőség az alapértelmezett titkosítási beállításokat használja, ez a kezdőknek ajánlott. Egyébként van lehetőség a rejtjel és a kulcs méret paraméterjeinek kézi megadására." -_LuksOpen="Titkosított partíció kinyitása" -_LuksOpenBody="\nAdja meg a titkosított eszköz nevét és jelszavát.\n\nNem szükséges, hogy az előtag tartalmazza a /dev/ leképezőt. Egy példa biztosított." -_LuksEncrypt="Automatikus LUKS Titkosítás" -_LuksEncryptAdv="Határozd meg a kulcs méretét és a rejtjelezés típusát" -_LuksEncryptBody="\nVálaszd ki a titkosítandó partíciót." -_LuksEncryptSucc="\nKész! Kinyílt, és kész az LVM (ajánlott) vagy direkt csatolásra.\n" -_LuksPartErrBody="\nMinimum kettő partícióra van szükség a titkosításhoz:\n\n1. Root (/) - normál vagy lvm partíció.\n\n2. Boot (/boot or /boot/efi) - csak normál partíció (kivéve lvm-nél ha BIOS Grub-ot használsz).\n" -_LuksOpenWaitBody="\nTitkosított gyökér partíció létrehozása:" -_LuksCreateWaitBody="\nTitkosított gyökér partíció létrehozása:" -_LuksWaitBody2="Használt eszköz vagy kötet:" -_LuksCipherKey="\nHa a megadott zászlókat módosítod, ezt automatikusan használva lesz a 'cryptsetup -q luksFormat /dev/...' parancssal.\n\nMegjegyzés: Kulcs fájlok nem támogatottak; ezeket manuálisan kell hozzáadni telepítés után. Ne add meg a további zászlókat, mint a -v (--verbose) vagy -y (--verify-passphrase).\n" - -# Logikai kötetkezelés -_LvmMenu="\nA logikai kötetkezelő (LVM) lehetővé teszi 'virtuális' merevlemezek (Kötetcsoportok) és partíciók (logikai kötetek) létrehozását a meglévő meghajtóra és partícióra A kötetcsoportot kell létrehozni először, majd ebben egy vagy több logikai kötetet.\n\nAz LVM is használható titkosított partíciónál, ha több logikai kötete hozol létre benne. (pl. root és home) " -_LvmCreateVG="Kötetcsoport és logikai kötet(ek) létrehozása" -_LvmDelVG="Kötetcsoport törlése" -_LvMDelAll="Minden törlése; kötetcsopot(ok), logikai kötet(ek), fizikai kötet(ek)" -_LvmDetBody="\nMeglévő logikai kötetkezelőt (LWM) érzékeltem. Aktiválás. Kérlek várj...\n" -_LvmPartErrBody="\nNincs életképes elérhető partíció a logikai kötetkezelő (LWM) számára. Minimum egy szükséges.\n\nHa az LVM már használatban van, kapcsold ki, hogy lehetővé tedd a fizikai kötet(ek) által használt partíció(k) újra felhasználását.\n" -_LvmNameVgBody="\nAdd meg a létrehozni kívánt kötetcsoport (VG) nevét.\n\nAz új kötetcsoport (VG) az új 'virtuális eszköz / merevlemez' , amit készítesz a következő partíció(k)ból.\n" -_LvmNameVgErr="\nÉrvénytelen a beírt név. A kötetcsoport neve lehet alfanumerikus, de nem tartalmazhat szóközt és nem kezdődhet '/' jellel, vagy a név már használatban van.\n" -_LvmPvSelBody="\nVálassz partíciót, vagy partíciókat a fizikai kötet (PV) felhasználásához.\n" -_LvmPvConfBody1="\nErősítsd meg a kötetcsoport létrehozását " -_LvmPvConfBody2="a következő partíciókkal:\n\n" -_LvmPvActBody1="\nKötetcsoport készítése és aktiválása " -_LvmPvDoneBody1="\nKötetcsoport " -_LvmPvDoneBody2="létrehozva" -_LvmLvNumBody1="\nHasználd a [Szóköz] billentyűt a létrehozandó logikai kötet(ek) (LVs) számának kiválasztásához" -_LvmLvNumBody2="\n\nAz utolsó (vagy egyetlen) logikai kötet automatikusan felhasználja a fennmaradó hely 100%-át a kötetcsoportban." -_LvmLvNameBody1="\nÍrja be a logikai kötet nevét a létrehozáshoz.\n\nEz egy olyan névbeállítás, mint egy partíció cimke.\n" -_LvmLvNameBody2="\nMegjegyzés: Ez a logikai kötet automatikusan használatba veszi az összes fennmaradó helyet a kötetcsoportban" -_LvmLvNameErrBody="\nÉrvénytelen a beírt név. A kötetcsoport (LV) neve lehet alfanumerikus, de nem tartalmazhat szóközt és nem kezdődhet '/' jellel,\n" -_LvmLvSizeBody1="hátralevő" -_LvmLvSizeBody2="\n\nAdjad meg a logikai kötet (LV) méretét megabájtban (M), vagy gigabájtban (G). Például 100M esetén 100 megabájtot, míg 10G esetén 10 gigabájt logikai kötetet (LV) hozol létre.\n" -_LvmLvSizeErrBody="\nÉrvénytelen megadott érték. Egy számot kell beírni egy 'M' (megabájtal), vagy a 'G' (gigabájtal) a végén.\n\nPéldául: 100M, 10G, vagy 250M. Az érték soha nem lehet nagyobb, mint a kötetcsoport (VG) mérete.\n" -_LvmCompBody="\nKész! Minden logikai kötet létrehozva a kötetcsoportban.\n\nSzeretnéd megtekinteni az új LWM elrendezést?\n" -_LvmDelQ="\nKötetcsoport(ok) és logikai kötet(ek) törlésének megerősítése.\n\nHa törlöd a kötetcsoportot, akkor az ezen belül létrehozott összes logikai kötet törlődik.\n" -_LvmSelVGBody="\nVálassz kötetcsoportot a törlésre. Az összes logikai kötet ezen belül törlődni fog\n" -_LvmVGErr="\nKötetcsoport nem található\n" - -# Követelmények ellenőrzése -_NotRoot="\nA telepítőnek rendszergazdai jogok szükségesek.\n" -_NoNetwork="\nNincs aktív internet kapcsolat.\n" - -# Konzolos billentyűzetkiosztás beállítása -_CMapTitle="Virtuális konzol beállítása" -_CMapBody="\nA virtuális konzol egy 'shell prompt' nem grafikus környezetben. Ez a billentyűzetkiosztás független az asztali környezettől." - -# Billentyűzet beállítása asztali környezetben -_XMapBody="\nVálassz billentyűzetkiosztást az asztali környezetbe." - -# Tartózkodási hely beállítása -_LocaleBody="A tartózkodási hely beállítása meghatározza a megjelenítebdő nyelvet, időt és dátum formátumot stb\n\nA nyelv formátum ország alapján kerül beállításra. (pl. en_US az angol, hu_Hu az magyar)." - -# Időzóna beállítása -_TimeZBody="\nAz időzónát a rendszeróra helyes beállítására használják" -_TimeSubZBody="\nVálaszd ki a hozzád legközelebb álló várost ." -_TimeZQ="\nIdőzóna beállítása mint" - -# Gazdagépnév (hosztnév) beállítása -_HostNameBody="\n\A házigazda nevének azonosítására használja rendszer a hálózaton keresztül.n\nEz a név alfanumerikus karakterekből állhat és tartalmazhat kötőjelet (-), de nem az elején és a végén." - -# Rendszergazda jelszó beállítása -_RootBody="--- Adja meg a root jelszót (üres a fentieket használja) ---" - -# Új felhasználó létrehozása -_UserTitle="Új felhasználó létrehozása" -_UserBody="\nÍrja be az új felhasználói fiók nevét és jelszavát.\n\nA név nem használhat nagybetűket, nem tartalmazhat időtartamokat (.), Vége egy kötőjellel (-), vagy tartalmazhat bármely kettőspontot (:)\n\nMEGJEGYZÉS: A [Tab] billentyűvel válthat a szövegbevitel és a gombok között, vagy nyomja meg az [Enter]" -_UserErrTitle="Felhasználónév hiba" -_UserErrBody="\nHelytelen felhasználónevet adtál meg. Kérlek próbáld újra.\n" -_UserPassErr="\nA megadott felhasználói jelszavak nem egyeznek.\n" -_RootPassErr="\nA megadott gyökér jelszavak nem egyeznek.\n" -_UserSetBody="\nFelhasználó létrehozása és csoportok beállítása..\n" -_Username="Felhasználónév:" -_Password="Jelszó:" -_Password2="Jelszó2:" - -# Csatolás (Partíciók) -_MntTitle="Csatolási állapot" -_MntSucc="\nCsatolás sikeres!\n" -_MntFail="\nCsatolási hiba!\n" -_WarnMount="\nFontos: Partíciók csatolhatóak formázás nélkül is, válaszd ki ezeket '$_Skip' a lehetőségek listázva vannak a fájl rendszer menüben felül.\n" - -# Eszközválasztás (telepítés) -_DevSelTitle="Válassz eszközt" -_DevSelBody="\nRendelkezésre álló eszközök, (/dev) merevlemezek és usb kulcsok a telepítéshez. Az első a /sda, a második a /sdb, ás így tovább." - -# Particionáló eszköz -_PartTitle="Particionáló eszközl" -_PartBody="\nAz automatikus partícionálás kezdők számára áll rendelkezésre, egyébként a gparted GUI opcióként van megadva, és cfdisk/parted for CLI.\n\nAz UEFI rendszereknek 100-512M méretű vfat/fat32 partícióra van szükségük a /boot vagy az /boot/efi állományba történő telepítéshez, emellett a LUKS-t használó BIOS rendszerek különálló /boot partíciót igényelnek, 100-512M között és ext3/4 formátumban formázva." -_PartAuto="Automata partícionálás" -_PartWipe="Biztos eszköz törlés (választható)" -_PartWipeBody1="\nFigyelmeztetés: Minden adat" -_PartWipeBody2="meg fog semmisülni a 'wipe -Ifre' parancs használatával. Ez a folyamat hosszú időt vesz igénybe és ez az idő függ a készülék méretétől. Folytatni szeretnéd?\n" - -# Partícionálási hiba -_PartErrBody="\nBIOS rendszereknél a minimális követelmény egy partíció (ROOT).\n\nUEFI rendszernél a minimális követelmény kettő partíció (ROOT and UEFI).\n" - -# Fájlrendszer -_FSTitle="Válassz fájlrendszert" -_FSBody="\nExt4 az ajánlott.\n\nNem minden fájlrendszer alkalmas root vagy boot partíció számára. A fájrendszerek különböző funkciókat és korlátokat tartalmaznak." - -# Gyökérpartíció (ROOT) kiválasztása -_SelRootBody="\nVálassz gyökérpartíciót (ROOT). Ez lesz ahová az $DIST telepítjük." - -# Cserepartíció (SWAP) kiválasztása -_SelSwpBody="\nVálassz cserepartíciót (SWAP). Ha lapozófájlt használsz ezzel létrejön a RAM azonos méretű cserefájl." -_SelSwpFile="Cserefájl" -_SelSwpNone="Egyik sem" - -# UEFI kiválasztása -_SelUefiBody="\nVálassz UEFI partíciót. Ez egy speciális partíció az UEFI rendszerek indítása számára." -_FormUefiBody="[FONTOS]\nAz EFI partíció" -_FormBiosBody="[FONTOS]\nAz boot partíció" -_FormUefiBody2="már formázott.\n\nÁt akarja hagyni a formázást? A 'Nem' kiválasztása törli az összes adatot (bootloader) a partíción.\n\nHa bizonytalan, válassza az 'Igen' lehetőséget.\n" - -# Extra partíciók -_ExtPartBody="\nVálassz a további partíciók közül bármilyen sorrendben, vagy nyomd meg a 'Kész' gombot ha végeztél." -_ExtPartBody1="\nAdj meg partíció csatolási pontot. Biztosítsd, hogy a név per (/) jellel kezdődjön. Például:" -_ExtErrBody="\nA partíció nem csatolható a csatolási pont nevének hibája miatt.. A nevet per '/' jel után add meg.\n" - -# Előkészületek menü -_PrepTitle="Telepítés előkészítése" -_PrepBody="\nMinden szükséges lépést követned kell a telepítés érdekében. Miután elkészültél, válaszd a 'Kész' gombot a telepítés befejezéséhez.\n\nA konzol billentyűzetkiosztást használja mind a telepítő, mind a telepített rendszer.\n" -_PrepParts="Lemez partícionálás" -_PrepShowDev="Eszközök listája (választható)" -_PrepLayout="Asztali billentyűzetkiosztás beállítása" -_PrepLUKS="LUKS Titkosítás (választható)" -_PrepLVM="Logikai kötetkezelés (választható)" -_PrepMount="Partíciók csatolása" -_PrepConfig="A telepítés konfigurálása" -_PrepInstall="Alaptelepítés $DIST" - -_BootLdr="Rendszertöltő telepítése" - -# Alapbeállítás menü -_ConfTitle="Alaptelepítés beállítása" -_ConfBody="\nAlaptelepítés bázis beállítása." -_ConfFstab="FSTAB generálása" -_ConfHost="Gazdagépnév beállítása" -_ConfTimeHC="Időzóna és óra beállítása" -_ConfLocale="Rendszer tartózkodási hely beállítása" -_ConfRoot="Rendszergazda jelszó beállítása" -_ConfUser="Új felhasználó(k) hozzáadása" - -# Telepítő bezárása -_CloseInst="Zárja be a telepítőt" -_CloseInstBody="\nLeválasztja a partíciókat és bezárja a telepítőt?" -_InstFinBody="\nA telepítés befejeződött.\n\nSzeretné bezárni a telepítőt és újraindítani?" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/italian.trans b/lang/needupdate/italian.trans deleted file mode 100644 index 04e0ac9..0000000 --- a/lang/needupdate/italian.trans +++ /dev/null @@ -1,198 +0,0 @@ -# Generic -_All="Tutte" -_Done="Fatto" -_Skip="Salta/Nessuno" -_Back="Indietro" -_ErrTitle="Errore" -_NoFileErr="\nIl file non esiste.\n" -_PlsWait="\nAttendere prego...\n" -_PassErr="\nLe password digitate non corrispondono.\n" -_Pass2="Immettere nuovamente la password per" -_TryAgain="Provare nuovamente.\n" -_Exit="Procedura terminata.\n" -_Name="Nome:" - -# Welcome -_WelTitle="Benvenuto in" -_WelBody="\nQuesto installer scaricherà i pacchetti più recenti dai repositories $DIST. I passaggi comprenderrano la minima configurazione necessaria.\n\nOPZIONI MENU: Selezionare premendo il numero corrispondente o usando i tasti su/giù prima di premere [invio] per confermare. Scorrere fra i bottoni premendo [Tab] o le frecce sinistra/destraconfermando con [Invio]. È possibile navigare liste più lunghe usando i tasti [pg up] e [pg down], e/o la prima lettera corrispondente all'opzione selezionata.\n\nCONFIGURAZIONE & OPZIONI PACHETTI: I pacchetti preferiti nelle checklists verranno pre-selezionati. Utilizzare [Spazio] per selzionare e deselezionare." - -_MntBody="Usare [Spazio] per de/selezionare le opzioni di montaggio desiderate e leggere accuratamente. Non selezionare multiple versioni della stessa opzione." -_MntConfBody="\nConfermare le seguenti opzioni di montaggio:" - -# Mountpoint UEFI -_MntUefiBody="\nSelezionare mountpoint EFI.\n\nsystemd-boot richiede /boot. grub richiede /boot/efi." - -# Partizionamento automatico -_PartBody1="Attenzione: TUTTI i dati contenuti in" -_PartBody2="saranno eliminati.\n\nVerrà creata una vfat/fat32 partizione di boot da 512MB, seguita da una seconda ext4 partizione (root o '/') usando tutto lo spazio rimanente" -_PartBody3="\n\nSi desidera continuare?" - -# Messaggi d'errore. Tutti gli altri sono generati da BASH. -_ErrNoMount="\nLa/Le partizione/i deve/devono essere montata/e per prima/e.\n" -_ErrNoBase="\n$DIST base deve essere istallata per prima.\n" -_ErrNoConfig="\nLa configurazione di base per il sistema deve essere eseguita per prima.\n" - -# Selezionare i file di configurazione -_EditTitle="Controllare i file di configurazione" -_EditBody="\nL'installazione è quasi finita.\n\nSelezionare ogni file elencato di seguito per essere controllato o modificato." - -# Install BIOS Bootloader -_InstBootTitle="Installazione Bootloader" -_MntBootBody="\nGrub è consigliato per i principianti. E' possibile specificare il dispositivo sul quale installarlo.\n" -_InstSysTitle="Installa Syslinux" -_InstSysBody="\nInstallare syslinux nel Master Boot Record (MBR) on in Root (/)?\n" - -# LUKS / DM-Crypt / Encryption -_LuksMenuBody="\nI dispositivi e volumi crittografati con dm_crypt non possono essere montati o visualizzati senza prima essere sbloccati da una chiave o password." -_LuksMenuBody2="\n\nÈ necessaria una partizione di boot separata senza cifratura o Logical Volume Management (LVM - tranne GRUB su BIOS)." -_LuksMenuBody3="\n\nL'opzione Automatica usa impostazioni crittografiche tipiche, ed è raccomandata per i principianti. Eventualmente, è possibile specificare algoritmo e grandezza chiave manualmente." -_LuksOpen="Apri Partizione Crittografata" -_LuksOpenBody="\nImmettere un nome e una password per il dispositivo crittografato.\n\nNon è necessario sia preceduto da /dev/mapper. Viene mostrato un esempio." -_LuksEncrypt="Crittografia LUKS Automatica" -_LuksEncryptAdv="impostare lunghezza chiave e algoritmo di cifratura" -_LuksEncryptBody="\nSelezionare una partizione da crittografare." -_LuksEncryptSucc="\nFatto! Aerta e pronta per LVM (raccomandato) o montaggio diretto.\n" -_LuksPartErrBody="\nDevono essere crittografate almeno due partizioni:\n\n1. Root (/) - ammesse partizioni standard o lvm.\n\n2. Boot (/boot or /boot/efi) - solo partizioni standard (o lvm con Grub su BIOS).\n" -_LuksOpenWaitBody="\nCreazione partizione Root crittografata in corso:" -_LuksCreateWaitBody="\nCreazione partizione Root crittografata in corso:" -_LuksWaitBody2="Volume o dispositivo in uso:" -_LuksCipherKey="\nUna volte modificati i parametri, saranno automaticamente utilizzati per il comando 'cryptsetup -q luksFormat /dev/...' .\n\nNOTA: l'uso di key files non è supportato; potranno essere aggiunti manualmente al termine dell'installazione. Non specificare parametri addizionali come -v (--verbose) o -y (--verify-passphrase).\n" - -# Gestore logico dei volumi -_LvmMenu="\nLogical Volume Management (LVM) permette dischi fissi 'virtuali' (Volume Groups) e partizioni (Logical Volumes) creati da dispositivi e partizioni esistenti. Deve prima essere creato un Volume Group, pooi uno o più Logical Volumes al suo interno.\n\nLVM può essere utilizzato con una partizione crittografata per creare più volumi logici (ad es. root e home) al suo interno." -_LvmCreateVG="Crea VG e uno o più LV" -_LvmDelVG="Cancella Volume Groups" -_LvMDelAll="Cancella *TUTTI* i VG, LV, PV" -_LvmDetBody="\nTrovato Logical Volume Management (LVM) preesistente. Attivazione in corso. Attendere...\n" -_LvmPartErrBody="\nNon vi è alcuna partizione utilizzabile per il gestore logico dei volumi. Ne è necessaria almeno una.\n\n Se LVM è già in uso, la sua disattivazione permetterà di riutilizzarne le partizioni impiegate come Volumi Fisici.\n" -_LvmNameVgBody="\nInserisci un nome per il nuovo Gruppo di Volumi (VG).\n\nIl VG è il nuovo 'dispositivo virtuale / hard-disk' che verrà utilizzato, successivamente, per la creazione delle partizioni.\n" -_LvmNameVgErr="\nIl nome inserito non è valido. Il nome del Gruppo di Volumi può essere alfanumerico ma non può contenere spazi, iniziare con il carattere '/' o essere già stato assegnato.\n" -_LvmPvSelBody="\nSelezionare le partizioni da usare per il Volume Fisico (PV).\n" -_LvmPvConfBody1="\nConferma la creazione del Gruppo di Volumi " -_LvmPvConfBody2="con le seguenti partizioni:\n\n" -_LvmPvActBody1="\nCreazione ed attivazione del Gruppo di Volumi in corso " -_LvmPvDoneBody1="\nIl Gruppo di Volumi " -_LvmPvDoneBody2="è stato creato" -_LvmLvNumBody1="\nUsaro [Spazio] per selezionare il numero di Volumi Logici da creare(LVs) in" -_LvmLvNumBody2="\n\nL'ultimo (o l'unico) LV userà il 100% dello spazio disponibile nel Volume Group" -_LvmLvNameBody1="\nInserisci un nome per il nuovo Volume Logico (LV).\n\nQuesta operazione equivale ad assegnare un nome / una etichetta ad una partizione.\n" -_LvmLvNameBody2="\nATTENZIONE: Questo LV utilizzerà automaticamente tutto lo spazio rimanente nel Gruppo di Volumi" -_LvmLvNameErrBody="\nIl nome inserito non è valido. Il nome del Volume Logico (LV) può essere alfanumerico ma non può contenere spazi o iniziare con il carattere '/'.\n" -_LvmLvSizeBody1="rimanenti" -_LvmLvSizeBody2="\n\nInserisci la dimensione del Volume Logico (LV) in Megabyte (M) o Gigabyte (G). Ad esempio, 100M creerà un Volume Logico con dimensione pari a 100 Megabyte. 10G creerà un Volume Logico con dimensione pari a 10 Gigabyte.\n" -_LvmLvSizeErrBody="\nIl valore immesso non è valido. È necessario inserire un valore numerico che termini con una 'M' (Megabyte) o una 'G' (Gigabyte).\n\nAd esempio, 100M, 10G, o 250M. Il valore non deve inoltre essere maggiore o uguale dello spazio rimanente nel VG.\n" -_LvmCompBody="\nFatto! Sono stati creati tutti i Volumi Logici per il Gruppo di Volumi.\n\nVuoi visionare la nuova struttura del LVM?\n" -_LvmDelQ="\nConferma cancellazione dei Volume Group e dei Logical Volumes.\n\nIf cancellando un Volume Group, tutti i Logical Volumes al suo interno saranno cancellati.\n" -_LvmSelVGBody="\nSelezionare il Volume Group da cancellare. Tutti i Logical Volumes al suo interno saranno cancellati.\n" -_LvmVGErr="\nNon sono stati trovati Volume Groups.\n" - -# Controllo Requisiti -_NotRoot="\nL'installer deve essere eseguito come Root.\n" -_NoNetwork="\nIl test della connessione ad Internet è fallito.\n" - -# Impostazione tastiera (vconsole) -_CMapTitle="Imposta Virtual Console" -_CMapBody="\nUna virtual console è un prompt di comando in un ambiente non-grafico. La sua mappatura tastiera è indipendente da quella per l'ambiente desktop / terminale." - -# Impostazione Xkbmap (ambiente desktop) -_XMapBody="\nSeleziona la disposizione della testiera." - -# Impostazione Localizzazione -_LocaleBody="I Locales determinano la lingua mostrata, i formati di data e ora, ecc.\n\nIl formato è lingua_NAZIONE (en_US per l'inglese, Sati Uniti; en_GB per inglese, Gran Bretagna)." - -# Impostazione fuso orario -_TimeZBody="\nIl fuso orario è utilizzato per impostare correttamente l'ora del sistema." -_TimeSubZBody="\nSeleziona la città più vicina alla tua posizione." -_TimeZQ="\nImposta Time Zone" - -# Impostazione Hostname -_HostNameBody="\nL'hostname è utilizzato per identificare il sistema all'interno di una rete.\n\nPuò essere composto di soli caratteri alfanumerici, può inoltre contenere un trattino (-) - ma non all'inizio o alla fine del nome." - -# Impostare la password di Root -_RootBody="-- Inserisci la password di root (vuoto usa il precedente) --" - -# Crea un nuovo utente -_UserTitle="Crea Nuovo Utente" -_UserBody="\nInserisci il nome e la password per il tuo nuovo account utente.\n\nIl nome non deve utilizzare lettere maiuscole, contenere alcun punto (.), Terminare con un trattino (-), o includere qualsiasi punto (:)\n\nNOTA: [Scheda] per alternare tra input e pulsanti, o premere [Invio] per accettare." -_UserErrTitle="Errore Nome Utente" -_UserErrBody="\nE' stato scelto un nome utente non valido. Provare nuovamente.\n" -_UserPassErr="\nLe password utente inserite non corrispondono.\n" -_RootPassErr="\nLe password di root inserite non corrispondono.\n" -_UserSetBody="\nCreazione utente ed impostazioni gruppi..\n" -_Username="Nome utente:" -_Password="Parola d'ordine:" -_Password2="Parola d'ordine2:" - -# Montaggio (Partizioni) -_MntTitle="Stato Montaggio" -_MntSucc="\nMontaggio corretto!\n" -_MntFail="\nMontaggio fallito!\n" -_WarnMount="\nIMPORTANTE: Le aprtizioni possono essere montate senza formattarle selezionando '$_Skip' l'opzione mostrata in cima al menù file system.\n" - -# Seleziona Dispositivo (installazione) -_DevSelTitle="Seleziona Dispositivo" -_DevSelBody="\nI Dispositivi (/dev/) sono i dishci dissi e le memorie USB disponibili per l'installazione. Il primo è /sda, il secondo /sdb, e così via." - -# Tool Partizionamento -_PartTitle="Tool Partizionamento" -_PartBody="\nIl partizionamento automatico è disponibile per i principianti, altrimenti gparted è fornito come opzione GUI e cfdisk/parted per CLI.\n\nI sistemi UEFI richiedono una partizione vfat/fat32 tra 100-512M di dimensione da montare su /boot o /boot/efi, inoltre i sistemi BIOS che utilizzano LUKS richiedono una partizione separata /boot, compresa tra 100-512M e formattata come ext3/4." -_PartAuto="Partizionamento Automatico" -_PartWipe="Cancellazione Sicura Dispositivo (opzionale)" -_PartWipeBody1="\nATTENZIONE: TUTTI I DATI su" -_PartWipeBody2="saranno cancellati permanentemente tramite il comando 'wipe -Ifre'. Questo processo potrebbe richiedere molto tempo, a seconda della dimensione del dispositivo.\n\nContinuare?\n" - -# Errore Partizionamento -_PartErrBody="\nI sistemi BIOS richiedono almeno una partizione (ROOT).\n\nI sistemi UEFI richiedono almeno due partizioni (ROOT e UEFI).\n" - -# File System -_FSTitle="Selezione Filesystem" -_FSBody="\nExt4 è la scelta consigliata.\n\nNon tutti i filesystem sono utilizzabili per la partizione di root o quella di boot. Ciascuno dispone di funzionalità e limitazioni differenti." - -# Select Root -_SelRootBody="\nSelezionare partizione ROOT. $DIST sarà installata qui." - -# Select SWAP -_SelSwpBody="\nSelezionare partizione SWAP. Se si opta per uno Swapfile, sarà creato della stessa dimensione della RAM." -_SelSwpFile="File di Swap" -_SelSwpNone="Nessuna" - -# Select UEFI -_SelUefiBody="\nSelezionare partizione UEFI. È una partizione speciale per l'avvio nei sistemi UEFI." -_FormUefiBody="[IMPORTANTE]\nLa partizione EFI" -_FormBiosBody="[IMPORTANTE]\nLa partizione boot" -_FormUefiBody2="è già formattato correttamente.\n\nVuoi saltare la formattazione? Scegliendo 'No' verranno cancellati TUTTI i dati (bootloader) sulla partizione.\n\nScegli incerto 'Sì'\n" - - -# Extra Partitions -_ExtPartBody="\nSeleziona le partizioni addizionali in qualsiasi ordine, altrimenti scegli 'Fatto' per concludere." -_ExtPartBody1="\nSpecificare mountpoint partizione. Assicurarsi che il nome cominci con uno slash (/). Ad esempio:" -_ExtErrBody="\nImpossibile montare la partizione a case di un problema con il nome mountpoint. Deve essere indicato un nome dopo lo slash.\n" - -# Preparation Menu -_PrepTitle="Preparazione Installazione" -_PrepBody="\nOgni passaggio deve essere eseguito IN ORDINE. Una volta completati, selezionare 'Fatto' per finalizzare correttamente l'installazione.\n\nIl layout tastiera console verrà utilizzato sia per l'installer che per il sistema installato." -_PrepParts="Partizionamento Disco" -_PrepShowDev="Elenca i dispositivi (opzionale)" -_PrepLayout="Configura la disposizione della tastiera" -_PrepLUKS="Crittografia LUKS (opzionale)" -_PrepLVM="Logical Volume Management (opzionale)" -_PrepMount="Montaggio partizioni" -_PrepConfig="Configura installazione" -_PrepInstall="Installazione $DIST" - -_BootLdr="Installa il Bootloader" - -# Configure Base Menu -_ConfTitle="Configurazione di base" -_ConfBody="\nConfigurazione base del sistema di base." -_ConfHost="Imposta Hostname" -_ConfLocale="Imposta il linguaggio del sistema" -_ConfRoot="Imposta la password di Root" -_ConfUser="Aggiungi nuovo/i utente/i" - -# Chiudere il programma di istallazione -_CloseInst="Chiudi il programma di installazione" -_CloseInstBody="\nSmontare le partizioni e chiudere l'installazione?" -_InstFinBody="\nL'installazione è terminata.\n\nVolete chiudere l'installazione e riavviare?" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/p_brasil.trans b/lang/needupdate/p_brasil.trans deleted file mode 100644 index a6609a2..0000000 --- a/lang/needupdate/p_brasil.trans +++ /dev/null @@ -1,199 +0,0 @@ -# Genérico -_All="Todos" -_Done="Pronto" -_Skip="Pular/Nenhum" -_ErrTitle="Erro" -_NoFileErr="\nO arquivo não existe.\n" -_PlsWait="\nPor favor, aguarde...\n" -_PassErr="\nAs senhas digitadas não coincidem.\n" -_Pass2="Digite novamente a senha para" -_TryAgain="Por favor, tente novamente.\n" -_Exit="Saindo.\n" -_Back="Voltar" -_Name="Nome:" - -# Bem-vindo(a) -_WelTitle="Bem-vindo(a) ao" -_WelBody="\nEste instalador baixa os últimos pacotes dos repositórios $DIST. Apenas a configuração mínina necessária é executada.\n\nOPÇÕES DO MENU: Selecione pressionando o número da opção ou usando as teclas de seta pra cima e para baixo antes de pressionar [Enter] para confirmar. Alterne entre os botões usando o [Tab] ou as teclas de seta para esquerda ou direita antes de pressionar o [Enter] para confirmar. Listas longas podem ser navegadas usando as teclas [Pg Up] e [Pg Dn] e/ou pressionando a primeira letra da opção desejada.\n\nCONFIGURAÇÃO & OPÇÕES DE PACOTES: Pacotes padrão na lista de verificação serão pré-marcados. Utlize a [barra de espaço] para des/selecionar." - -_MntBody="Use [Espaço] para desmarcar ou selecionar as opções de montagem desejadas e reveja com cuidado. Por favor, não selecione múltiplas versões da mesma opção." -_MntConfBody="\nConfirme as seguintes opções de montagem:" - -# UEFI Ponto de montagem -_MntUefiBody="\nSeleccione o ponto de montagem EFI.\n\nO systemd-boot requer /boot. grub requer /boot/efi." - -# Particionamento automático -_PartBody1="Atenção: TODOS os dados em" -_PartBody2="serão destruídos.\n\nUma vfat/fat32 partição de boot de 512MB será criada primeito, seguida por uma segunda ext4 partição (root ou '/') utilizando todo o espaço restante" -_PartBody3="\n\nDesejar continuar?" - -# Mensagens de erro. Todos os outros são gerados por BASH. -_ErrNoMount="\nA(s) partição(ões) deve(m) ser montada(s) primeiro.\n" -_ErrNoBase="\nA base do $DIST deve ser instalada primeiro.\n" -_ErrNoConfig="\nA configuração básica do sistema deve ser feita primeiro.\n" - -# Selecionar arquivos de configuração -_EditTitle="Revisar os arquivos de configuração" -_EditBody="\nA instalação está quase terminada.\n\nSelecione qualquer arquivo listado abaixo para ser revisado ou alterado." - -# Instalar BIOS Bootloader -_InstBootTitle="Instalar Bootloader" -_MntBootBody="\nGrub é recomendado para iniciantes. O dispositivo de instalação também pode ser seleccionado.\n" -_InstSysTitle="Instalar o Syslinux" -_InstSysBody="\nInstalar o syslinux no Master Boot Record (MBR) ou para Root (/)?\n" - -# Criptografia / LUKS / DM-Crypt -_LuksMenuBody="\nDispositivos e volumes criptografados utilizando o dm_crypt não podem ser acessados ou mesmo visualizados sem serem desbloqueados através de uma chave ou senha." -_LuksMenuBody2="\n\nÉ necessária uma partição de boot separada do restante sem criptografia ou gereciamento de volume lógico (LVM - a não ser utilizando Grub BIOS)." -_LuksMenuBody3="\n\nA opção automática utiliza as configurações padrão de criptografia, e é recomendado para os iniciantes. Por outro lado, é possível especificar manualmente a criptografia e os parâmetros do tamanho da chave." -_LuksOpen="Abrir a partição criptografada" -_LuksOpenBody="\nDigite um nome e uma senha para o dispositivo criptografado.\n\nNão é necessário acrescentar o prefixo /dev/mapper/. Um exemplo é apresentado." -_LuksEncrypt="Criptografia LUKS automática" -_LuksEncryptAdv="Defina o tamanho da chave e criptografia" -_LuksEncryptBody="\nSelecione uma partição para criptografar." -_LuksEncryptSucc="\nPronto! Aberto e pronto para o LVM (recomendado) ou montar diretamente.\n" -_LuksPartErrBody="\nSão necessárias no mínimo duas partições para a criptografia:\n\n1. Root (/) - tipo de partição padrão ou lvm.\n\n2. Boot (/boot ou /boot/efi) - apenas o tipo de partição padrão (exceto LVM onde utiliza Grub BIOS).\n" -_LuksOpenWaitBody="\nCriando partição Root criptografada:" -_LuksCreateWaitBody="\nCriando partição Root criptografada:" -_LuksWaitBody2="Dispositivo ou volume utilizado:" -_LuksCipherKey="\nDepois de ter configurado as flags especifadas, elas serão usadas automaticamente com o comando 'cryptsetup -q luksFormat /dev/...'\n\nNOTA: Os arquivos de chave não são suportados, eles podem ser adicionados manualmente após a instalação. Não especifique quaisquer flags adicionais como -v (--verbose) ou -y (--verify-passphrase)./n" - -# Gerenciamento de volume lógico (LVM) -_LvmMenu="\nO gerenciador de volume lógico (LVM) permite criar discos rígidos (grupos de volume - VG) e partições (volumes lógicos - LV) virtuais a partir de dispositivos e partições existentes. Um VG deve ser criado primeiro, então um ou mais LV dentro do mesmo.\n\nO LVM pode também ser usado com uma partição criptografada para criar vários volumes lógicos (ex.: root e home) dentro dela." -_LvmCreateVG="Criar VG e LV(s)" -_LvmDelVG="Apagar Grupos de Volume (VG)" -_LvMDelAll="Apagar *TUDO* VGs, LVs, PVs" -_LvmDetBody="\nUma LVM existente foi detectada. Ativando. Por favor, aguarde...\n" -_LvmPartErrBody="\nNão há nenhuma partição disponível para Gerenciamento de Volume Lógico. No mínimo um é necessário.\n\nSe o LVM já está em uso, desativá-lo permitirá que a partição usada para seus volumes físicos, possa ser usada novamente.\n" -_LvmNameVgBody="\nInsira o nome do Grupo de Volume (VG) para criar.\n\nO VG é o novo 'dispositivo virtual / disco rígido' para criar a partir da partição(ções) selecionada(as) em seguida.\n" -_LvmNameVgErr="\nNome inserido inválido. O nome do Grupo de Volume pode ser alfa numérico, mas não pode conter espaços ou começar com '/', ou já estar em uso.\n" -_LvmPvSelBody="\nSelecionar a(s) partição(ões) a ser(em) usada(s) para o Volume Físico (PV).\n" -_LvmPvConfBody1="\nConfirmar a criação do Grupo de Volume " -_LvmPvConfBody2="com as seguintes partições:\n\n" -_LvmPvActBody1="\nCriando e ativando o Grupo de Volume " -_LvmPvDoneBody1="\nO Grupo de Volume " -_LvmPvDoneBody2="foi criado" -_LvmLvNumBody1="\nUtilize a [barra de espaço] para selecionar o número de volumes lógicos (LV) para criá-los" -_LvmLvNumBody2="\n\nO último (ou único) LV irá automaticamente utilizar 100% do espaço restante no Grupo de Volume (VG)." -_LvmLvNameBody1="\nInsira o nome do Volume Lógico (LV) para criar.\n\nIsto é como criar o nome '/' do rótulo para uma partição.\n" -_LvmLvNameBody2="\nNOTA: Este Volume Lógico (LV) irá automaticamente usar todo o espaço restante no Grupo de Volume (Volume Group)" -_LvmLvNameErrBody="\nNome inserido inválido. O nome do Volume Lógico (LV) pode conter caracteres alfa numéricos, mas não pode conter espaços ou começar com '/'.\n" -_LvmLvSizeBody1="restantes" -_LvmLvSizeBody2="\n\nInsira o tamanho do Volume Lógico (LV) em Megabytes (M) ou Gigabytes (G). Por exemplo, 100M irá criar 100 Megabyte LV. 10G irá criar 10 Gigabyte LV.\n" -_LvmLvSizeErrBody="\nValor inválido inserido. Um valor numérico deve ser inserido com 'M' (Megabytes) ou um 'G' (Gigabytes) no fim.\n\nExemplos incluem, 100M, 10G, ou 250M. O valor também não pode ser igual ou maior que o tamanho restante do VG.\n" -_LvmCompBody="\nFeito! Todos os Volumes Lógicos foram criados para o Grupo de Volume.\n\nDeseja ver o novo esquema de LVM?\n" -_LvmDelQ="\nConfirmar exclusão do(s) Grupo(s) de volume (VG) e Volume(s) lógico(s) (LV).\n\nSe apagar um grupo de volume, todos os volumes lógicos serão deletados também.\n" -_LvmSelVGBody="\nSelecione o Grupo de Volume (VG) para apagar. Todos os Volumes Lógicos (LV) dentro do grupo serão apagados também.\n" -_LvmVGErr="\nNenhum grupos de volume encontrados.\n" - -# Verificar os requisitos -_NotRoot="\nO instalador deve ser executado como root.\n" -_NoNetwork="\nFalha no teste de conexão com a internet.\n" - -# Definir layout de teclado (vconsole) -_CMapTitle="Definir console virtual" -_CMapBody="\nUm console virtual é um prompt do shell em um ambiente não-gráfico. Seu layout de teclado é independente de um ambiente de desktop / terminal." - -# Definir Xkbmap (ambiente) -_XMapBody="\nSelecionar layout de teclado do ambiente de desktop." - -# Definir Local -_LocaleBody="A localização (locale) determina o idioma a ser exibido, os formatos de data e hora, etc...\n\nO formato é idioma_PAÍS (ex.: en_US é inglês, Estados Unidos; pt_BR é português, Brasil)." - -# Definir fuso horário -_TimeZBody="\nO fuso horário é usado para definir corretamente o relógio do sistema." -_TimeSubZBody="\nSelecione a cidade mais próxima de você." -_TimeZQ="\nDefinir fuso horário como" - -# Definir Hostname -_HostNameBody="\nO hostname é usado para identificar o sistema em uma rede.\n\nE é restrito aos caracteres alfa numéricos, pode conter um hífen (-) - mas não no inicio ou no fim." - -# Definir Senha Root -_RootBody="--- Digite a senha do root (vazio usa o acima) ---" - -# Criar Novo Usuário -_UserTitle="Criar novo usuário" -_UserBody="\nDigite o nome e a senha da sua nova conta de usuário.\n\nO nome não deve usar letras maiúsculas, conter pontos (.), Terminar com um hífen (-) ou incluir dois pontos (:)\n\nNOTA: [Tab] para alternar entre entrada de texto e botões, ou pressione [Enter] para aceitar." -_UserErrTitle="Erro no nome do usuário" -_UserErrBody="\nUm nome de usuário incorreto foi inserido. Por favor, tente novamente..\n" -_UserPassErr="\nAs senhas de usuário digitadas não correspondem.\n" -_RootPassErr="\nAs senhas raiz inseridas não correspondem.\n" -_UserSetBody="\nCriando usuários e definindo grupos...\n" -_Username="Nome de usuário:" -_Password="Senha:" -_Password2="Senha2:" - -# Montando (Partições) -_MntTitle="Estado da montagem" -_MntSucc="\nMontagem bem-sucedida!\n" -_MntFail="\nA montagem falhou!\n" -_WarnMount="\nIMPORTANTE: As partições podem ser montadas sem formatá-las, selecionando '$_Skip' listada no inicio do menu do sistemas de arquivos.\n" - -# Selecionar dispositivo (instalação) -_DevSelTitle="Selecionar dispositivo" -_DevSelBody="\nDispositivos (/dev/) estão disponíveis no disco-rígido e pendrive USB para serem instalados. O primeiro é /sda, o segundo é /sdb, e assim por adiante." - -# Ferramenta de particionamento -_PartTitle="Ferramenta de particionamento" -_PartBody="\nO particionamento automático está disponível para iniciantes, caso contrário, o gparted é fornecido como uma opção de GUI e cfdisk/parted para o CLI.\n\nOs sistemas UEFI exigem uma partição vfat/fat32 entre 100-512M para ser montada em /boot ou /boot/efi; além disso, os sistemas BIOS que usam o LUKS requerem uma partição /boot separada, entre 100-512M e formatados como ext3/4." -_PartAuto="Particionamento automático" -_PartWipe="Apagar dispositivo de forma segura (opcional)" -_PartWipeBody1="\nATENÇÃO: TODOS os dados em" -_PartWipeBody2="serão destruídos usando o comando 'wipe -Ifre'. Este processo pode demorar um pouco, dependendo do tamanho do dispositivo.\n\nDeseja continuar?\n" - -# Erro de particionamento -_PartErrBody="\nSistemas BIOS requerem pelo menos uma partição (ROOT).\n\nSistemas UEFI requerem o minímo de duas partições para a instalação (ROOT e UEFI).\n" - -# Sistema de Arquivos -_FSTitle="Escolha o sistema de arquivo" -_FSBody="\nExt4 é recomendado.\n\nNem todos os sistemas de arquivos são viáveis para partições root ou boot. Todas tem diferentes funcionalidades e limitações." - -# Selecionar Root -_SelRootBody="\nSelecione a partição ROOT. Este é o lugar onde $DIST será instalado." - -# Selecionar SWAP -_SelSwpBody="\nSelecione a partição SWAP. Se você utiliza um arquivo Swap, ele será criado do mesmo tamanho da sua memória RAM." -_SelSwpFile="Arquivo SWAP" -_SelSwpNone="Nenhum" - -# Selecionar UEFI -_SelUefiBody="\nSelecione a partição UEFI. Esta é a partição especial para iniciar sistemas UEFI." -_FormUefiBody="[IMPORTANTE]\nA partição EFI" -_FormBiosBody="[IMPORTANTE]\nA partição boot" -_FormUefiBody2="já está formatado corretamente.\n\nVocê quer pular a formatação? Escolher 'Não' irá apagar TODOS os dados (bootloaders) na partição.\n\nSe não tiver certeza, escolha 'Sim'.\n" - - -# Partições Extras -_ExtPartBody="\nSelecionar partições adicionais em qualquer ordem, ou 'Feito' para finalizar." -_ExtPartBody1="\nEspecifique o ponto de montagem da partição. Certifique-se que o nome comece com uma barra (/). Exemplos:" -_ExtErrBody="\nA partição não pode ser montada devido a um problema com o nome do ponto de montagem. Um nome deve ser dado depois da barra.\n" - -# Menu de preparação -_PrepTitle="Preparar a instalação" -_PrepBody="\nCada passo deve ser seguido NA ORDEM. Uma vez completado, selecione 'Pronto' para finalizar corretamente a instalação.\n\nO layout de teclado do console será usado tanto para o instalador e o sistema instalado." -_PrepLayout="Definir o Layout de teclado do Sistema" -_PrepParts="Particionar Disco" -_PrepShowDev="Lista de Dispositivos (opcional)" -_PrepLUKS="Criptografia LUKS (opcional)" -_PrepLVM="Gereciamento de volume lógico (LVM) (opcional)" -_PrepMount="Montar Partições" -_PrepConfig="Configurar instalação" -_PrepInstall="Instalar $DIST" - -_BootLdr="Instalar o carregador do sistema " - -# Configurar Menu Base -_ConfTitle="Configurar Base" -_ConfBody="\nConfiguração básica da base." -_ConfHost="Definir nome da máquina" -_ConfTimeHC="Definir fuso horário e Relógio" -_ConfLocale="Definir a localização do sistema" -_ConfRoot="Definir senha ROOT" -_ConfUser="Adicionar novo Usuário" - -# Fechar o instalador -_CloseInstBody="Fechar o instalador" -_CloseInstBody="\nDesmontar partições e fechar o instalador?" -_InstFinBody="\nA instalação está terminada agora.\n\nGostaria de fechar o instalador e reiniciar?" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/portuguese.trans b/lang/needupdate/portuguese.trans deleted file mode 100644 index e034f75..0000000 --- a/lang/needupdate/portuguese.trans +++ /dev/null @@ -1,201 +0,0 @@ -# Genérico -_All="Todos" -_Done="Pronto" -_Skip="Saltar/Nenhum" -_ErrTitle="Erro" -_NoFileErr="\nO arquivo não existe.\n" -_PlsWait="\nPor favor, aguarde...\n" -_PassErr="\nAs senhas digitadas não coincidem.\n" -_Pass2="Digite novamente a senha para" -_TryAgain="Por favor, tente novamente.\n" -_Exit="Saindo.\n" -_Back="Voltar" -_Name="Nome:" - -# Bem-vindo(a) -_WelTitle="Bem-vindo(a) ao" -_WelBody="\nEste instalador baixa os últimos pacotes dos repositórios $DIST. Apenas a configuração mínima necessária é executada.\n\nOPÇÕES DO MENU: Seleccione pressionando o número da opção ou usando as teclas de seta para cima e para baixo antes de pressionar [Enter] para confirmar. Alterne entre os botões usando o [Tab] ou as teclas de seta para esquerda ou direita antes de pressionar o [Enter] para confirmar. Listas longas podem ser navegadas usando as teclas [Pg Up] e [Pg Dn] e/ou pressionando a primeira letra da opção desejada.\n\nCONFIGURAÇÃO & OPÇÕES DE PACOTES: Pacotes padrão na lista de verificação serão pré-marcados. Utilize a [barra de espaço] para des/seleccionar." - -_MntBody="Use [Espaço] para desmarcar ou seleccionar as opções de montagem desejadas e reveja com cuidado. Por favor, não seleccione múltiplas versões da mesma opção." -_MntConfBody="\nConfirme as seguintes opções de montagem:" - -# Ponto de montagem UEFI -_MntUefiBody="\nSelecione o ponto de montagem EFI.\n\nO systemd-boot requer /boot.O grub requer /boot/efi." - -# Particionamento automático -_PartBody1="Atenção: TODOS os dados em" -_PartBody2="serão destruídos.\n\nUma vfat/fat32 partição de boot de 512MB será criada primeito, seguida por uma segunda ext4 partição (root ou '/') utilizando todo o espaço restante" -_PartBody3="\n\nDesejar continuar?" - -# Mensagens de erro. Todos os outros são gerados por BASH. -_ErrNoMount="\nA(s) partição(ões) deve(m) ser montada(s) primeiro.\n" -_ErrNoBase="\nA base do $DIST deve ser instalada primeiro.\n" -_ErrNoConfig="\nA configuração básica do sistema deve ser feita primeiro.\n" - -# Seleccionar arquivos de configuração -_EditTitle="Revisar os Arquivos de Configuração" -_EditBody="\nA instalação está quase terminada.\n\nSelecione qualquer arquivo listado abaixo para ser revisado ou alterado." - -# Instalar o carregador de boot BIOS" -_InstBootTitle="Instalar o carregador de boot" -_MntBootBody="\nGrub é recomendado para iniciantes. O dispositivo de instalação também pode ser selecionado.\n" -_InstSysTitle="Instalar o Syslinux" -_InstSysBody="\nInstalar o syslinux no Master Boot Record (MBR) ou no Root (/)?\n" - -# Criptografia / LUKS / DM-Crypt -_LuksMenuBody="\nDispositivos e volumes criptografados utilizando o dm_crypt não podem ter acesso ou mesmo visualizados sem serem desbloqueados através de uma chave ou senha." -_LuksMenuBody2="\n\nÉ necessária uma partição de boot separada do restante sem criptografia ou gestão de volume lógico (LVM - a não ser utilizando Grub BIOS)." -_LuksMenuBody3="\n\nA opção automática utiliza as configurações padrão de criptografia, e é recomendado para os iniciantes. Por outro lado, é possível especificar manualmente a criptografia e os parâmetros do tamanho da chave." -_LuksOpen="Abrir a Partição Criptografada" -_LuksOpenBody="\nDigite um nome e uma senha para o dispositivo criptografado.\n\nNão é necessário acrescentar o prefixo /dev/mapper/. Um exemplo é apresentado." -_LuksEncrypt="Criptografia LUKS Automática" -_LuksEncryptAdv="Defina o Tamanho da Chave e Criptografia" -_LuksEncryptBody="\nSeleccione uma partição para criptografar." -_LuksEncryptSucc="\nPronto! Aberto e pronto para o LVM (recomendado) ou montar directamente.\n" -_LuksPartErrBody="\nSão necessárias no mínimo duas partições para a criptografia:\n\n1. Root (/) - tipo de partição padrão ou lvm.\n\n2. Boot (/boot ou /boot/efi) - apenas o tipo de partição padrão (exceto LVM onde utiliza Grub BIOS).\n" -_LuksOpenWaitBody="\nCriando partição Root criptografada:" -_LuksCreateWaitBody="\nCriando partição Root criptografada:" -_LuksWaitBody2="Dispositivo ou volume utilizado:" -_LuksCipherKey="\nDepois de ter configurado as flags especificadas, elas serão usadas automaticamente com o comando 'cryptsetup -q luksFormat /dev/...'\n\nNOTA: Os arquivos de chave não são suportados, eles podem ser adicionados manualmente após a instalação. Não especifique quaisquer flags adicionais como -v (--verbose) ou -y (--verify-passphrase)./n" - -# Gestão de Volume Lógico (LVM) -_LvmMenu="\nA gestão de volume lógico (LVM) permite criar discos rígidos (grupos de volume - VG) e partições (volumes lógicos - LV) virtuais a partir de dispositivos e partições existentes. Um VG deve ser criado primeiro, então um ou mais LV dentro do mesmo.\n\nO LVM pode também ser usado com uma partição criptografada para criar vários volumes lógicos (ex.: root e home) dentro dela." -_LvmCreateVG="Criar VG e LV(s)" -_LvmDelVG="Apagar Grupos de Volume (VG)" -_LvMDelAll="Apagar *TUDO* VGs, LVs, PVs" -_LvmDetBody="\nUma LVM existente foi detectada. Activando. Por favor, aguarde...\n" -_LvmPartErrBody="\nNão há nenhuma partição disponível para Gestão de Volume Lógico. No mínimo um é necessário. \n\n se LVM já está em uso, desactivá-lo permitirá que a partição usada para seus volumes físicos, possa ser usada novamente. \n" -_LvmNameVgBody="\nInsira o nome do Grupo de Volume (VG) para criar.\n\nO VG é o novo 'dispositivo virtual / disco rígido' para criar a partir da partição(ções) seleccionada(as) em seguida.\n" -_LvmNameVgErr="\nNome inserido inválido. O nome do Grupo de Volume pode ser alfa numérico, mas não pode conter espaços ou começar com '/', ou já estar em uso.\n" -_LvmPvSelBody="\nSeleccionar a(s) partição(ões) a ser(em) usada(s) para o Volume Físico (PV).\n" -_LvmPvConfBody1="\nConfirmar a criação do Grupo de Volume " -_LvmPvConfBody2="com as seguintes partições:\n\n" -_LvmPvActBody1="\nCriando e activando Grupo de Volume " -_LvmPvDoneBody1="\nGrupo de Volume " -_LvmPvDoneBody2="foi criado" -_LvmLvNumBody1="\nUtilize a [barra de espaço] para seleccionar o número de volumes lógicos (LV) para criá-los" -_LvmLvNumBody2="\n\nO último (ou único) LV irá automaticamente utilizar 100% do espaço restante no Grupo de Volume (VG)." -_LvmLvNameBody1="\nInsira o nome do Volume Lógico (LV) para criar.\n\nIsto é como criar o nome '/' do rótulo para uma partição.\n" -_LvmLvNameBody2="\nNOTA: Este Volume Lógico (LV) irá automaticamente usar todo o espaço restante no Grupo de Volume (Volume Group)" -_LvmLvNameErrBody="\nInserido Nome Inválido. O nome do Volume Lógico (LV) pode conter caracteres alfa numéricos, mas não pode conter espaços ou começar com '/'.\n" -_LvmLvSizeBody1="restantes" -_LvmLvSizeBody2="\n\nInsira o tamanho do Volume Lógico (LV) em Megabytes (M) ou Gigabytes (G). Por exemplo, 100M irá criar 100 Megabyte LV. 10G irá criar 10 Gigabyte LV.\n" -_LvmLvSizeErrBody="\nValor inválido inserido. Um valor numérico deve ser inserido com 'M' (Megabytes) ou um 'G' (Gigabytes) no fim.\n\nExemplos incluem, 100M, 10G, ou 250M. O valor também não pode ser igual ou maior que o tamanho restante do VG.\n" -_LvmCompBody="\nFeito! Todos os Volumes Lógicos foram criados para o Grupo de Volume.\n\nDeseja ver o novo esquema de LVM?\n" -_LvmDelQ="\nConfirmar exclusão do(s) Grupo(s) de volume (VG) e Volume(s) lógico(s) (LV).\n\nSe apagar um grupo de volume, todos os volumes lógicos serão apagados também.\n" -_LvmSelVGBody="\nSeleccione o Grupo de Volume (VG) para apagar. Todos os Volumes Lógicos (LV) dentro do grupo serão apagados também.\n" -_LvmVGErr="\nNenhum Grupos de Volume encontrados.\n" - -# Verificar os Requisitos -_NotRoot="\nO instalador deve ser executado como root.\n" -_NoNetwork="\nFalha no teste de conexão com a internet.\n" - -# Definir Layout de teclado (vconsole) -_CMapTitle="Definir Console Virtual" -_CMapBody="\nUm console virtual é um prompt do shell em um ambiente não-gráfico. Seu layout de teclado é independente de um ambiente de desktop / terminal." - -# Definir Xkbmap (ambiente) -_XMapBody="\nSeleccionar layout de teclado do ambiente de desktop." - -# Definir Local -_LocaleBody="A localização (locale) determina o idioma a ser exibido, os formatos de data e hora, etc...\n\nO formato é idioma_PAÍS (ex.: en_US é inglês, Estados Unidos; pt_PT é português, Portugal)." - -# Definir Fuso horário -_TimeZBody="\nO fuso horário é usado para definir correctamente o relógio do sistema." -_TimeSubZBody="\nSeleccione a cidade mais próxima de você." -_TimeZQ="\nDefinir fuso horário como" - -# Definir Hostname -_HostNameBody="\nO hostname é usado para identificar o sistema em uma rede.\n\nE é restrito aos caracteres alfa numéricos, pode conter um hífen (-) - mas não no inicio ou no fim." - -# Definir Senha Root -_RootBody="--- Digite a senha do root (vazio usa o acima) ---" - -# Criar Novo Usuário -_UserTitle="Criar Novo Usuário" -_UserBody="\nDigite o nome e a senha da sua nova conta de usuário.\n\nO nome não deve usar letras maiúsculas, conter pontos (.), Terminar com um hífen (-) ou incluir dois pontos (:)\n\nNOTA: [Tab] para alternar entre entrada de texto e botões, ou pressione [Enter] para aceitar." -_UserErrTitle="Erro no Nome do Usuário" -_UserErrBody="\nUm nome de usuário incorrecto foi inserido. Por favor, tente novamente..\n" -_UserPassErr="\nAs senhas de usuário digitadas não correspondem.\n" -_RootPassErr="\nAs senhas raiz inseridas não correspondem.\n" -_UserSetBody="\nCriando usuários e definindo grupos...\n" -_Username="Nome de usuário:" -_Password="Senha:" -_Password2="Senha2:" - -# Montando (Partições) -_MntTitle="Estado da Montagem" -_MntSucc="\nMontagem com Sucesso!\n" -_MntFail="\nMontagem Falhou!\n" -_WarnMount="\nIMPORTANTE: As partições podem ser montadas sem formatá-las, seleccionando '$_Skip' listada no inicio do menu do sistemas de arquivos.\n" - -# Seleccionar Dispositivo (instalação) -_DevSelTitle="Seleccionar Dispositivo" -_DevSelBody="\nDispositivos (/dev/) estão disponíveis no disco-rígido e pendrive USB para serem instalados. O primeiro é /sda, o segundo é /sdb, e assim por adiante." - -# Ferramenta de Particionamento -_PartTitle="Ferramenta de Particionamento" -_PartBody="\nO particionamento automático está disponível para iniciantes, caso contrário, o gparted é fornecido como uma opção de GUI e cfdisk/parted para o CLI.\n\nOs sistemas UEFI exigem uma partição vfat/fat32 entre 100-512M para ser montada em /boot ou /boot/efi; além disso, os sistemas BIOS que usam o LUKS requerem uma partição /boot separada, entre 100-512M e formatados como ext3/4." -_PartAuto="Particionamento Automático" -_PartWipe="Apagar Dispositivo de forma Segura (opcional)" -_PartWipeBody1="\nATENÇÃO: TODOS dados sobre" -_PartWipeBody2="será destruída usando o comando 'wipe -Ifre'. Este processo pode demorar um pouco, dependendo do tamanho do dispositivo.\n\nDeseja continuar?\n" - -# Erro de Particionamento -_PartErrBody="\nSistemas BIOS requerem pelo menos uma partição (ROOT).\n\nSistemas UEFI requerem o mínimo de duas partições para a instalação (ROOT e UEFI).\n" - -# Sistema de Arquivos -_FSTitle="Escolha o Sistema de Arquivo" -_FSBody="\nExt4 é recomendado.\n\nNem todos os sistemas de arquivos são viáveis para partições root ou boot. Todas tem diferentes funcionalidades e limitações." - -# Seleccionar Root -_SelRootBody="\nSeleccione a partição ROOT. Este é o lugar onde $DIST será instalado." - -# Seleccionar SWAP -_SelSwpBody="\nSeleccione a partição SWAP. Se você utiliza um arquivo Swap, ele será criado do mesmo tamanho da sua memória RAM." -_SelSwpFile="Arquivo SWAP" -_SelSwpNone="Nenhum" - -# Seleccionar UEFI -_SelUefiBody="\nSeleccione a partição UEFI. Esta é a partição especial para iniciar sistemas UEFI." - -# Formatar UEFI -_FormUefiBody="[IMPORTANTE]\nA partição EFI" -_FormBiosBody="[IMPORTANTE]\nA partição boot" -_FormUefiBody2="já está formatado corretamente.\n\nVocê quer pular a formatação? Escolher 'Não' irá apagar TODOS os dados (bootloaders) na partição.\n\nSe não tiver certeza, escolha 'Sim'.\n" - - -# Partições Extras -_ExtPartBody="\nSeleccionar partições adicionais em qualquer ordem, ou 'Pronto' para finalizar." -_ExtPartBody1="\nEspecifique o ponto de montagem da partição. Verifique se o nome começa com uma barra (/). Exemplos incluem:" -_ExtErrBody="\nA partição não pode ser montada devido a um problema com o nome do ponto de montagem. Um nome deve ser dado depois da barra.\n" - -# Menu Preparação -_PrepTitle="Preparar Instalação" -_PrepBody="\nCada passo deve ser seguido NA ORDEM. Uma vez completado, seleccione 'Pronto' para finalizar correctamente a instalação.\n\nO layout de teclado do console será usado tanto para o instalador e o sistema instalado." -_PrepLayout="Definir o Layout de teclado do Sistema" -_PrepParts="Particionar Disco" -_PrepShowDev="Lista de Dispositivos (opcional)" -_PrepLUKS="Criptografia LUKS (opcional)" -_PrepLVM="Gestão de Volume Lógico (LVM) (opcional)" -_PrepMount="Montar Partições" -_PrepConfig="Configurar instalação" -_PrepInstall="Instalar $DIST" - -_BootLdr="Instalar Bootloader" - -# Configurar Menu Base -_ConfTitle="Configurar Base" -_ConfBody="\nConfiguração básica da base." -_ConfHost="Definir Nome da Máquina" -_ConfTimeHC="Definir Fuso horário e Relógio" -_ConfLocale="Definir a Localização do Sistema" -_ConfRoot="Definir Senha ROOT" -_ConfUser="Adicionar Novo Usuário" - -# Fechar o instalador -_CloseInstBody="Fechar o instalador" -_CloseInstBody="\nDesmontar partições e fechar o instalador?" -_InstFinBody="\nA instalação está terminada agora.\n\nGostaria de fechar o instalador e reiniciar?" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/russian.trans b/lang/needupdate/russian.trans deleted file mode 100644 index 6014290..0000000 --- a/lang/needupdate/russian.trans +++ /dev/null @@ -1,198 +0,0 @@ -# Generic -_All="Все" -_Done="Готово" -_Skip="Пропустить/Ничего" -_ErrTitle="Ошибка" -_NoFileErr="\nФайл не существует.\n" -_PlsWait="\nПожалуйста, подождите...\n" -_PassErr="\nВведеные пароли не совпадают.\n" -_Pass2="Повторно введите пароль для" -_TryAgain="Пожалуйста, введите еще раз.\n" -_Exit="Выход.\n" -_Back="Назад" -_Name="имя:" - -# Welcome -_WelTitle="Добро пожаловать в" -_WelBody="\nЭтот установщик будет загружать последние версии пакетов из репозиториев $DIST. Необходимость конфигурации сведена к минимуму.\n\nОПЦИИ МЕНЮ: Выбирайте нажатием на номер опции или используя клавиши со стрелками вверх/вниз после чего подтвердите выбор клавишей [enter]. Переключайтесь между кнопками клавишей [Tab] или клавишами со стрелками влево/вправо подтверждая выбор клавишей [enter]. По длинным спискам можно перемещаться с помощью клавиш [pg up] и [pg down], и/или нажатием на первую букву нужной опции.\n\nКОНФИГУРАЦИЯ & ОПЦИИ ПАКЕТОВ: По умолчанию пакеты в контрольных списках будут предварительно проверены. Используйте [Пробел] для выбора/отмены выбора." - -_MntBody="Используте [Пробел] для выбора/отмены выбора опций монтирования и подробного осмотра. Пожалуйста, не выбирайте несколько версий одинаковых опций." -_MntConfBody="\nПодтвердите следующие параметры монтирования:" - -# UEFI Mountpoint -_MntUefiBody="\nВыберите точку монтирования EFI.\n\nsystemd-boot требует /boot. grub требует /boot/efi." - -# Autopartition -_PartBody1="Предупреждение: ВСЕ данные на" -_PartBody2="будут уничтожены.\n\nСначала будет создан раздел vfat/fat32 boot размером 512MB, затем будет создан корневой раздел ext4 (root или '/') который использует все оставшееся место на диске" -_PartBody3="\n\nПродолжить?" - -# Error Messages. All others are generated by BASH. -_ErrNoMount="\nСначала нужно смонтировать раздел(ы).\n" -_ErrNoBase="\nСначала нужно установить системную базу $DIST.\n" -_ErrNoConfig="\nСначала необходимо выполнить основную настройку системы.\n" - -# Select Config Files -_EditTitle="Проверить конфигурационные файлы" -_EditBody="\nУстановка почти завершена.\n\nВыберите любой файл из списка ниже, чтобы просмотреть или отредактировать." - -# Install BIOS Bootloader -_InstBootTitle="Установка загрузчика" -_MntBootBody="\nНовичкам рекомендуется использовать Grub. Устройство для установки также может быть выбрано.\n" -_InstSysTitle="Установка Syslinux" -_InstSysBody="\nУстановить syslinux в Главную Загрузочную Запись (MBR) или в Root (/)?\n" - -# LUKS / DM-Crypt / Encryption -_LuksMenuBody="\nУстройства и тома зашифрованные dm_crypt не имеют доступа или даже обнаружения без разблокировки ключем или паролем." -_LuksMenuBody2="\n\nТребуется отдельный загрузочный раздел без шифрования или менеджера логических томов (LVM - кроме использующих BIOS Grub)." -_LuksMenuBody3="\n\nОпция автоматического шифрования использует стандартные настройки, рекомендуемые для новичков. Также вы можете сами задать параметры шифра и размера ключа." -_LuksOpen="Открыть зашифрованный раздел" -_LuksOpenBody="\nВведите имя и пароль для зашифрованного устройства.\n\nДобавлять к нему префикс /dev/mapper/ не обязательно. Пример предоставлен." -_LuksEncrypt="Автоматическое шифрование LUKS" -_LuksEncryptAdv="Задать размер ключа и шифр" -_LuksEncryptBody="\nВыберите раздел для шифрования." -_LuksEncryptSucc="\nГотово! Откройте и настройте LVM (рекомендуется) или переходите к монтированию разделов.\n" -_LuksPartErrBody="\nКак минимум два раздела требуется для шифрования:\n\n1. Корневой (/) - стандартный или lvm раздел.\n\n2. Загрузочный (/boot или /boot/efi) - только стандартный тип раздела (за исключением lvm, где используется BIOS Grub).\n" -_LuksOpenWaitBody="\nСоздание зашифрованного корневого раздела:" -_LuksCreateWaitBody="\nСоздание зашифрованного корневого раздела:" -_LuksWaitBody2="Используемые устройства или тома:" -_LuksCipherKey="\nПосле того как указанные флаги будут изменены, они будут автоматически применены к команде 'cryptsetup -q luksFormat /dev/...'\n\nПРИМЕЧАНИЕ: Файлы ключей не поддерживаются; они могут быть добавлены вручную после установки. Не указывайте дополнительные флаги, такие как -v (--verbose) или -y (--verify-passphrase).\n" - -# Logical Volume Management -_LvmMenu="\nМенеджер логических томов (LVM) позволяет создавать из существующих дисков и разделов 'виртуальные' дисковые устройства (Группы Томов (VG)) и разделы (Логические Тома (LV)). Сперва создается группа томов, затем в ней создается один или более логических томов.\n\nLVM также может использоваться с зашифрованными разделами для создания в них логических томов (напр. root и home)." -_LvmCreateVG="Создать VG и LV(s)" -_LvmDelVG="Удалить Группу Томов" -_LvMDelAll="Удалить *ВСЕ* VGs, LVs, PVs" -_LvmDetBody="\nСуществующий менеджер логических томов (LVM) обнаружен. Активация. Пожалуйста, подождите...\n" -_LvmPartErrBody="\nПодходящих разделов для использования менеджером логических томов не обнаружено. Требуется как минимум один.\n\nЕсли LVM уже используется, отключите его - это позволит использовать раздел(ы) как физические тома и повторно их использовать.\n" -_LvmNameVgBody="\nВведите название создаваемой Группы Томов (VG).\n\nVG это новое 'виртуальное устройство / жесткий диск' который создается из выбранных далее разделов.\n" -_LvmNameVgErr="\nВведенное имя неверно. Название Группы Томов может быть буквенно-цифровым, но не может содержать пробелы, начинаться на '/', или использовать уже существующее название.\n" -_LvmPvSelBody="\nВыберите раздел(ы) для создания Физического Тома (PV).\n" -_LvmPvConfBody1="\nПодтвердите создание Группы Томов " -_LvmPvConfBody2="со следующими разделами:\n\n" -_LvmPvActBody1="\nСоздание и активация Группы Томов " -_LvmPvDoneBody1="\nГруппа Томов " -_LvmPvDoneBody2="успешно создана" -_LvmLvNumBody1="\nИспользуйте [Пробел] для выбора числа создаваемых Логических Томов (LVs)" -_LvmLvNumBody2="\n\nПоследний (или единственный) Логический Том (LV) автоматически использует 100% оставшегося места в Группе Томов." -_LvmLvNameBody1="\nВведите название создаваемого Логического Тома (LV).\n\nЭто похоже на именование раздела или задание ему метки.\n" -_LvmLvNameBody2="\nПРИМЕЧАНИЕ: Этот Логический Том (LV) автоматически использует все отавшееся место в Группе Томов" -_LvmLvNameErrBody="\nВведенное имя неверно. Название Логического Тома (LV) может быть буквенно-цифровым, но не может содержать пробелы, начинаться на '/'.\n" -_LvmLvSizeBody1="осталось" -_LvmLvSizeBody2="\n\nВведите размер Логического Тома (LV) в Мегабайтах (M) или Гигабайтах (G). К примеру, 100M создаст LV размером в 100 Мегабайт. 10G создаст LV размером в 10 Гигабайт.\n" -_LvmLvSizeErrBody="\nВведенное значение неверно. Может быть введено числовое значение с окончанием на 'M' (Мегабайты) или 'G' (Гигабайты).\n\nК примеру, 100M, 10G, или 250M. Значение также не может быть равным или быть больше оставшегося места в Группе Томов (VG).\n" -_LvmCompBody="\nГотово! Все Логические Тома были созданы в Группе Томов.\n\nХотите посмотреть новую LVM схему?\n" -_LvmDelQ="\nПодтвердите удаление Группы Томов и Логических Томов.\n\nЕсли удалить Группу Томов, все созданные в ней Логические Тома также будут удалены.\n" -_LvmSelVGBody="\nВыберите Группы Томов для удаления. Все Логические Тома внутри этой группы будут также удалены.\n" -_LvmVGErr="\nГруппы Томов не найдены.\n" - -# Check Requirements -_NotRoot="\nУстановщик должен быть запущен от имени root.\n" -_NoNetwork="\nПроверка соединения с интернетом провалена.\n" - -# Set Keymap (vconsole) -_CMapTitle="Настройка виртуальной консоли" -_CMapBody="\nВиртуальная консоль представляет собой оболочку командной строки в неграфической среде. Ее раскладка не зависит от среды рабочего стола / терминала." - -# Set Xkbmap (environment) -_XMapBody="\nНастроить раскладку среды рабочего стола." - -# Set Locale -_LocaleBody="Локаль определяет отображаемый язык, форматы даты и времени, и т.д.\n\nИмеет следующий формат: язык_СТРАНА (напр. en_US - английский, Соединенные Штаты; en_GB - английский, Великобритания)." - -# Set Timezone -_TimeZBody="\nЧасовой пояс используется для корректной установки системного времени." -_TimeSubZBody="\nВыберите ближайший к вам город." -_TimeZQ="\nВыбрать как часовой пояс" - -# Set Hostname -_HostNameBody="\nИмя хоста используется для идентификации системы в сети.\n\nОно ограничено буквенно-цифровыми символами, может содержать дефис (-), но не в начале или конце." - -# Set Root Password -_RootBody="--- Введите пароль root (пустой использует выше) ---" - -# Create New User -_UserTitle="Создать нового пользователя" -_UserBody="\nВведите имя и пароль для новой учетной записи пользователя.\n\nИмя не должно использоваться заглавными буквами, содержать любые периоды (.), Заканчиваться дефисом (-) или включать любые двоеточия (:)\n\nПРИМЕЧАНИЕ: [Tab] для переключения между текстовым вводом и кнопками или нажмите [Ввод], чтобы принять." -_UserErrTitle="Имя пользователя - ошибка" -_UserErrBody="\nВведенное имя пользователя неверно. Пожалуйста, введите еще раз.\n" -_UserPassErr="\nВведенные пароли пользователя не совпадают.\n" -_RootPassErr="\nВведенные пароли root не совпадают.\n" -_UserSetBody="\nСоздание пользователя и присвоение групп...\n" -_Username="имя пользователя:" -_Password="пароль:" -_Password2="пароль2:" - -# Mounting (Partitions) -_MntTitle="Статус монтирования" -_MntSucc="\nУспешно смонтировано!\n" -_MntFail="\nМонтирование не удалось!\n" -_WarnMount="\nВАЖНО: Разделы могут быть смонтированы без форматирования при выборе опции '$_Skip' находящейся в самом верху списка меню файловых систем.\n" - -# Select Device (installation) -_DevSelTitle="Выберите устройство" -_DevSelBody="\nУстройтсва (/dev/) - это доступные жесткие диски и USB-флешки для установки. Первое устройство обозначается /sda, второе /sdb, и т.д.." - -# Partitioning Tool -_PartTitle="Инструменты для разметки" -_PartBody="\nАвтоматическое разбиение на разделы доступно для новичков, иначе gparted предоставляется как опция GUI и cfdisk/parted для CLI.\n\nДля систем UEFI требуется установить раздел vfat/fat32 размером 100-512M, который должен быть установлен в /boot или /boot/efi, кроме того, для систем BIOS, использующих LUKS, требуется отдельный /boot загрузочный раздел между 100-512М и форматированный как ext3/4." -_PartAuto="Автоматическая разметка" -_PartWipe="Безопасное стирание устройства (опционально)" -_PartWipeBody1="\nПРЕДУПРЕЖДЕНИЕ: ВСЕ данные на" -_PartWipeBody2="будут уничтожены командой 'wipe -Ifre'. Этот процесс также займет продолжительное время, зависящее от размера устройства.\n\nХотите продолжить?\n" - -# Partitioning Error -_PartErrBody="\nBIOS системы требуют как минимум один раздел (ROOT).\n\nUEFI системы требуют как минимум два раздела (ROOT и UEFI).\n" - -# File System -_FSTitle="Выберите файловую систему" -_FSBody="\nРекомендуется использовать Ext4.\n\nНе все файловые системы подходят для root или boot разделов. Все имеют различные функции и ограничения." - -# Select Root -_SelRootBody="\nВыберите ROOT раздел. Это тот раздел куда будет устанавливаться $DIST." - -# Select SWAP -_SelSwpBody="\nВыберите SWAP раздел. Если выбрать Swapfile, то он будет создан соразмерно вашей RAM-памяти." -_SelSwpFile="Swapfile" -_SelSwpNone="Нету" - -# Select UEFI -_SelUefiBody="\nВыберите UEFI раздел. Это специальный раздел для загрузки UEFI систем." -_FormUefiBody="[ВАЖНО]\nРаздел EFI" -_FormBiosBody="[ВАЖНО]\nРаздел boot" -_FormUefiBody2="уже правильно отформатирован.\n\nВы хотите пропустить его форматирование? Выбор 'Нет' удалит ВСЕ данные (загрузчики) в разделе.\n\nЕсли неуверенный выбор 'Да'.\n" - -# Extra Partitions -_ExtPartBody="\nВыберите дополнительные разделы в любом порядке или 'Готово' для завершения." -_ExtPartBody1="\nУкажите точку монтирования. Убедитесь, что имя начинается с косой черты (/). Например:" -_ExtErrBody="\nРаздел не может быть смонтирован из-за проблем с именем точки монтирования. Имя должно быть введено после косой черты.\n" - -# Preparation Menu -_PrepTitle="Подготовка к установке" -_PrepBody="\nКаждый шаг должен идти ПО ПОРЯДКУ. После завершения, выберите 'Готово' для правильного завершения процесса установки.\n\nРаскладка клавиатуры консоли будет использована как в установщике, так и в установленной системе." -_PrepLayout="Установить раскладку клавиатуры рабочего стола" -_PrepParts="Разметить диск" -_PrepShowDev="Список устройств (опционально)" -_PrepLUKS="LUKS Шифрование (опционально)" -_PrepLVM="Менеджер логических томов (LVM) (опционально)" -_PrepMount="Смонтировать разделы" -_PrepConfig="Настроить установку" -_PrepInstall="Установка $DIST" - -_BootLdr="Установить загрузчик" - -# Configure Base Menu -_ConfTitle="Настройка базовой системы" -_ConfBody="\nБазовая конфигурация системы." -_ConfHost="Установить имя хоста" -_ConfTimeHC="Настроить часовой пояс и время" -_ConfLocale="Установить язык системы" -_ConfRoot="Установить пароль администратора (root)" -_ConfUser="Добавить нового пользователя" - -# Close Installer -_CloseInst="Закрыть установщик" -_CloseInstBody="\nРазмонтировать разделы и закрыть программу установки?" -_InstFinBody="\nУстановка завершена.\n\nВы хотите закрыть программу установки и перезагрузить компьютер?" - -# vim:tw=9999:syntax=off:nospell diff --git a/lang/needupdate/spanish.trans b/lang/needupdate/spanish.trans deleted file mode 100644 index 8d66359..0000000 --- a/lang/needupdate/spanish.trans +++ /dev/null @@ -1,199 +0,0 @@ -# Genérico -_All="Todos" -_Done="Finalizar" -_Skip="Saltar/Ninguno" -_ErrTitle="Error" -_NoFileErr="\nEl archivo no existe.\n" -_PlsWait="\nPor favor espere...\n" -_PassErr="\nLas contraseñas introducidas no coinciden.\n" -_Pass2="\nVuelva a escribir la contraseña para" -_TryAgain="Vuelva a intentarlo.\n" -_Exit="Saliendo.\n" -_Back="Atrás" -_Name="Nombre:" - -# Bienvenido -_WelTitle="Bienvenido a" -_WelBody="\nEste instalador descargará los paquetes más recientes de los repositorios de $DIST. Sólo se realiza la configuración mínima necesaria.\n\nOPCIONES DE MENÚ: Seleccione pulsando el número de opción o usando las teclas flecha arriba/flecha abajo antes de pulsar [Intro] para confirmar. Cambie entre distintos botones con la tecla [Tabulador] o las teclas flecha izquierda/derecha antes de pulsar [Intro] para confirmar. Se puede navegar por listas largas utilizando las teclas [Re Pág] y [Av Pág], o bien pulsando la primera letra de la opción deseada.\n\nOPCIONES DE CONFIGURACIÓN Y PAQUETES: Los paquetes por defecto en las listas de verificación estarán premarcados. Utilice la tecla [BarraEspaciadora] para des/marcar." - -_MntBody="Utilice la [BarraEspaciadora] para de/seleccionar las opciones de montaje deseadas y revisarlas cuidadosamente. No seleccione varias versiones de la misma opción." -_MntConfBody="\nConfirme las siguientes opciones de montaje:" - -# Punto de montaje UEFI -_MntUefiBody="\nSeleccione el punto de montaje EFI.\n\nsystemd-boot requiere /boot. grub requiere /boot/efi." - -# Autopartición -_PartBody1="Aviso: TODA la información en " -_PartBody2="será eliminada por completo.\n\nPrimero se creará una vfat/fat32 partición de arranque de 512MB, seguida por una segunda ext4 partición (raíz o '/') que utilizará todo el espacio restante" -_PartBody2="\n\n¿Desea continuar?" - -# Mensajes de Error. Todos los demás son generados por BASH. -_ErrNoMount="\nPrimero se debe/n montar la/s partición/es.\n" -_ErrNoBase="\nPrimero se debe instalar el sistema base de $DIST.\n" -_ErrNoConfig="\nLa configuración básica del sistema debe hacerse primero.\n" - -# Seleccionar archivos de configuración -_EditTitle="Revisar archivos de configuración" -_EditBody="\nLa instalación está casi terminada.\n\nSeleccione cualquier archivo de la lista para revisarlo o modificarlo." - -# Instalar gestor de arranque -_InstBootTitle="Instalar gestor de arranque" -_MntBootBody="\nSe recomienda Grub para usuarios principiantes. También se puede seleccionar el dispositivo de instalación.\n" -_InstSysTitle="Instalar Syslinux" -_InstSysBody="\n¿Desea instalar 'syslinux' en el Registro de Arranque Maestro (MBR) o en la raíz (/)?\n" - -# LUKS / DM-Crypt / Encriptación -_LuksMenuBody="\nLos dispositivos y volúmenes encriptados mediante 'dm_crypt' no son accesibles o incluso visibles sin antes desbloquearlos mediante una llave o contraseña." -_LuksMenuBody2="\n\nSe requiere una partición de arranque separada del resto, sin encriptación o gestión de volúmenes lógicos (LVM - a menos que se use grub BIOS)." -_LuksMenuBody3="\n\nLa opción 'Automático' utiliza opciones de encriptación predeterminadas, y es recomendable para principiantes. En cualquier caso, se puede ajustar manualmente el cifrado y el tamaño de la clave." -_LuksOpen="Abrir partición encriptada." -_LuksOpenBody="\nIngrese un nombre y una contraseña para el dispositivo encriptado.\n\nNo es necesario añadirle delante '/dev/mapper/'. Se proporciona un ejemplo para verlo mejor." -_LuksEncrypt="Encriptación LUKS automática" -_LuksEncryptAdv="Establecer cifrado y tamaño de la clave" -_LuksEncryptBody="\nSeleccione una partición para encriptar." -_LuksEncryptSucc="\n¡Listo! Abierto y listo para LVM (recomendado) o montaje directo.\n" -_LuksPartErrBody="\nSe requiere un mínimo de dos particiones para la encriptación:\n\n1. Raíz (/) - tipos de partición estándar o LVM.\n\n2. Arranque (/boot o /boot/efi) - sólo tipos de partición estándar (excepto LVM cuando se utiliza Grub BIOS).\n" -_LuksOpenWaitBody="\nCreando partición raíz encriptada:" -_LuksCreateWaitBody="\nCreando partición raíz encriptada:" -_LuksWaitBody2="Dispositivo o volumen en uso:" -_LuksCipherKey="\nUna vez que se hayan ajustado los flags especificados, se utilizarán de forma automática con el comando 'cryptsetup -q luksFormat /dev/...'\n\nNOTA: los archivos de claves no están soportados; se pueden añadir manualmente después de la instalación. No especifique flags adicionales tales como -v (--verbose) o -y (--verify-passphrase).\n" - -# Gestión de volúmenes lógicos -_LvmMenu="\nLa gestión de volúmenes lógicos (LVM) permite crear discos duros (grupos de volúmenes) y particiones (volúmenes lógicos) 'virtuales' a partir de dispositivos y particiones existentes. Primero se debe crear un grupo de volúmenes, y después uno o más volúmenes lógicos dentro de éste.\n\nTambién se puede usar LVM con una partición encriptada para crear varios volúmenes lógicos (e.g raíz y home) dentro de ésta." -_LvmCreateVG="Crear grupos de volúmenes y volúmenes lógicos" -_LvmDelVG="Borrar grupos de volúmenes" -_LvMDelAll="Borrar *TODOS* los GVs, VLs y VPs" -_LvmDetBody="\nSe ha detectado un LVM ya existente. Activando. Por favor, espere...\n" -_LvmPartErrBody="\nNo hay particiones disponibles para ser usadas para la gestión de volumen lógico. Se necesita una como mínimo.\n\nSi LVM ya está en uso, desactivarlo permitirá a la o las particiones usadas para los volúmenes físicos ser usadas otra vez.\n" -_LvmNameVgBody="\nIntroduzca el nombre del grupo de volúmenes (GV) a crear.\n\nEl grupo de volúmenes (GV) es el nuevo 'dispositivo virtual' o 'disco duro'.\n" -_LvmNameVgErr="\nNombre introducido no válido. El nombre del grupo de volúmenes puede ser alfanumérico, pero no puede contener espacios, empezar con '/' o estar ya en uso.\n" -_LvmPvSelBody="\nSeleccione la o las particiones a usar por el volúmen físico (VF).\n" -_LvmPvConfBody1="\nConfirmar la creación del grupo de volúmenes " -_LvmPvConfBody2="con las siguientes particiones:\n\n" -_LvmPvActBody1="\nCreando y activando grupo de volúmenes " -_LvmPvDoneBody1="\nEl grupo de volúmenes " -_LvmPvDoneBody2="se ha creado" -_LvmLvNumBody1="\nUtilice [BarraEspaciadora] para elegir el número de volúmenes lógicos (VLs) que crear" -_LvmLvNumBody2="\n\nEl último (o único) VL usará de forma automática el 100% del espacio restante en el grupo de volúmenes." -_LvmLvNameBody1="\nIntroduzca el nombre del volumen lógico (VL) a crear.\n\nEs como asignar un nombre o una etiqueta a una partición.\n" -_LvmLvNameBody2="\nATENCIÓN: Este volumen lógico utilizará automáticamente todo el espacio restante del grupo de volúmenes" -_LvmLvNameErrBody="\nEl nombre introducido no es válido. El nombre del volumen lógico (VL) debe ser alfanumérico, pero no puede contener espacios o empezar con '/'.\n" -_LvmLvSizeBody1="restante" -_LvmLvSizeBody2="\n\nIntroduzca el tamaño del volumen lógico (VL) en megabytes (M) o gigabytes (G). Por ejemplo, '100M' creará un volumen lógico de 100MB. '10G' creará un volumen lógico de 10GB.\n" -_LvmLvSizeErrBody="\nEl valor introducido no es válido. Un valor numérico debe ser introducido con una 'M' (Megabytes) o una 'G' (Gigabytes) al final.\n\nPor ejemplo: '100M', '10G' o '250M'. El valor tampoco puede ser mayor o igual que el tamaño restante del grupo de volúmenes.\n" -_LvmCompBody="\n¡Listo! Todos los volúmenes lógicos han sido creados para el grupo de volúmenes.\n\n¿Desea ver el nuevo esquema de LVM?\n" -_LvmDelQ="\nConirmar eliminación de grupo/s de volúmenes y volúmen/es lógico/s.\n\nSi se borra un grupo de volúmenes, todos los vol. lógicos que contenga se eliminarán tambien.\n" -_LvmSelVGBody="\nSelecciona el grupo de volúmenes a eliminar. Todos los volúmenes lógicos serán eliminados también.\n" -_LvmVGErr="\nNo se han encontrado grupos de volúmenes.\n" - -# Comprobar requisitos -_NotRoot="\nEl instalador debe ser ejecutado como superusuario (usuario root).\n" -_NoNetwork="\nFallo de la prueba de conexión a internet.\n" - -# Seleccionar distribución de teclado de la consola virtual (vconsole) -_CMapTitle="Seleccionar distribución de teclado de la consola virtual" -_CMapBody="\nUna consola virtual es un intérprete de comandos en un entorno no gráfico. Su distribución de teclado es independiente de un entorno de escritorio o terminal." - -# Seleccionar Xkbmap (entorno) -_XMapBody="\nSeleccionar distribución de teclado del entorno de escritorio." - -# Seleccionar localización -_LocaleBody="La localización (locale) determina los idiomas para mostrar, los formatos de fecha y hora, etc.\n\nEl formato es idioma_PAÍS (e.g es_ES significa español, España; es_MX significa español, México)." - -# Establecer zona horaria -_TimeZBody="\nLa zona horaria es usada para ajustar el reloj del sistema correctamente." -_TimeSubZBody="\nSeleccione la ciudad más cercana a usted." -_TimeZQ="\nEstablecer zona horaria como" - -# Establecer nombre del equipo -_HostNameBody="\nEl nombre del equipo se usa para identificar al sistema dentro de una red.\n\nEstá restringido a carcteres alfanuméricos, y puede contener guiones (-) pero no al principio o al final del nombre" - -# Establecer contraseña de superusuario -_RootBody="--- Ingrese la contraseña de root (vacía usa la de arriba) ---" - -# Crear nuevo usuario -_UserTitle="Crear un nuevo usuario" -_UserBody="\nIngrese el nombre y la contraseña de su nueva cuenta de usuario.\n\nEl nombre no debe usar letras mayúsculas, contener ningún punto (.), Terminar con un guión (-) o incluir dos puntos (:)\n\nNOTA: [Pestaña] para alternar entre la entrada de texto y los botones, o presione [Intro] para aceptar." -_UserErrTitle="Error de nombre de usuario" -_UserErrBody="\nSe ha introducido un nombre de usuario incorrecto. Vuelva a intentarlo.\n" -_UserPassErr="\nLas contraseñas de usuario ingresadas no coinciden.\n" -_RootPassErr="\nLas contraseñas de raíz ingresadas no coinciden.\n" -_UserSetBody="\nCreando usuario y ajustando grupos...\n" -_Username="Nombre de usuario:" -_Password="Contraseña:" -_Password2="Contraseña2:" - -# Montaje (particiones) -_MntTitle="Estado de montaje" -_MntSucc="\n¡Montaje realizado con éxito!\n" -_MntFail="\n¡Montaje fallido!\n" -_WarnMount="\nIMPORTANTE: las particiones se pueden montar sin formatearlas seleccionando la opción '$_Skip' listada al principio del menú de sistemas de archivos.\n" - -# Seleccionar dispositivo (instalación) -_DevSelTitle="Seleccionar dispositivo" -_DevSelBody="\nLos dispositivos (/dev) son los discos duros y unidades USB disponibles para la instalación. El primero es /sda, el segundo es /sdb, y así sucesivamente." - -# Herramienta de particionado -_PartTitle="Herramienta de particionado" -_PartBody="\nEl partición automática está disponible para principiantes, de lo contrario, gparted se proporciona como una opción de GUI y se cfdisk/parted para CLI.\n\nLos sistemas UEFI requieren una partición vfat/fat32 entre 100-512M de tamaño para ser montada en /boot o /boot/efi, adicionalmente los sistemas BIOS que usan LUKS requieren una partición separada /boot, entre 100-512M y formateada como ext3/4." -_PartAuto="Particionado automático" -_PartWipe="Borrar dispositivo de forma segura (opcional)" -_PartWipeBody1="\nAVISO: TODOS los datos en" -_PartWipeBody2="serán eliminados por completo mediante el comando 'wipe -Ifre'. Este proceso puede llevar mucho tiempo dependiendo del tamaño del dispositivo.\n\n¿Desea continuar?\n" - -# Error de particionado -_PartErrBody="\nLos sistemas BIOS requieren un mínimo de una partición (RAÍZ).\n\nLos sistemas UEFI requieren un mínimo de dos particiones (RAÍZ y UEFI).\n" - -# Sistema de archivos -_FSTitle="Elegir sistema de archivos" -_FSBody="\nSe recomienda el sistema de archivos Ext4.\n\nNo todos los sistemas de archivos son adecuados para particiones raíz o de arranque. Todas tienen sus características y limitaciones." - -# Seleccionar raíz -_SelRootBody="\nSeleccione la partición RAÍZ. Aquí es donde se instalará $DIST." - -# Seleccionar SWAP -_SelSwpBody="\nSeleccione la partición SWAP. Si va a usar un archivo SWAP, se creará con un tamaño igual al de la memoria RAM del equipo." -_SelSwpFile="Archivo SWAP" -_SelSwpNone="Ninguno" - -# Seleccionar UEFI -_SelUefiBody="\nSeleccione la partición UEFI. Ésta es una partición especial para arrancar los sistemas UEFI." -_FormUefiBody="[IMPORTANTE]\nLa partición EFI" -_FormBiosBody="[IMPORTANTE]\nLa partición boot" -_FormUefiBody2="ya está formateado correctamente.\n\n¿Quieres omitir el formateo? Elegir 'No' borrará TODOS los datos (cargadores de arranque) en la partición.\n\nSi no está seguro, elija 'Sí'.\n" - - -# Particiones extra -_ExtPartBody="\nSeleccione particiones adicionales en cualquier orden, o 'Finalizar' para terminar el proceso." -_ExtPartBody1="\nPunto de montaje de partición específica. Asegúrese de que el nombre empieza con una barra inclinada (/). Ejemplos:" -_ExtErrBody="\nLa partición no se puede montar debido a un problema con el nombre del punto de montaje. Se debe indicar un nombre después de una barra inclinada (/).\n" - -# Menú de preparación -_PrepTitle="Preparar instalación" -_PrepBody="\nCada paso se ha de seguir en ESTRICTO ORDEN. Una vez que haya terminado, seleccione 'Finalizar' para terminar la instalación correctamente.\n\nLa distribución de teclado de la consola se utilizará tanto para el instalador como para el sistema instalado." -_PrepLayout="Establecer distribución de teclado del escritorio." -_PrepParts="Particionar disco" -_PrepShowDev="Listar dispositivos (opcional)" -_PrepLUKS="Encriptación LUKS (opcional)" -_PrepLVM="Gestión de volúmenes lógicos (LVM) (opcional)" -_PrepMount="Montar particiones" -_PrepConfig="Configurar instalación" -_PrepInstall="Instalar $DIST" - -_BootLdr="Instalar gestor de arranque" - -# Menú de configuración del sistema base -_ConfTitle="Configurar sistema base" -_ConfBody="\nConfiguración básica del sistema base." -_ConfHost="Establecer nombre del equipo" -_ConfTimeHC="Establecer zona horaria y reloj" -_ConfLocale="Establecer idioma del sistema" -_ConfRoot="Establecer contraseña de superusuario" -_ConfUser="Añadir nuevo/s usuario/s" - -# Cerrar instalador -_CloseInst="Cerrar instalador" -_CloseInstBody="\nDesmontar particiones y cerrar el instalador?" -_InstFinBody="\nLa instalación ahora está terminada.\n\n¿Le gustaría cerrar el instalador y reiniciar?" - -# vim:tw=9999:syntax=off:nospell diff --git a/src/archlabs-installer b/src/archlabs-installer deleted file mode 100755 index d2d151d..0000000 --- a/src/archlabs-installer +++ /dev/null @@ -1,2702 +0,0 @@ -#!/usr/bin/bash - -# vim:fdm=marker:fmr={,} -# shellcheck disable=2154 - -# This program is free software, provided under the GNU GPL -# Written by Nathaniel Maia for use in Archlabs -# Some ideas and code reworked from other resources -# AIF, Cnichi, Calamares, Arch Wiki.. Credit where credit is due - -VER="2.0.6" # version -DIST="ArchLabs" # distributor -MNT="/mnt" # mountpoint - -# bulk default values { - -ROOT_PART="" # root partition -BOOT_PART="" # boot partition -BOOT_DEV="" # device used for BIOS grub install -BOOTLDR="" # bootloader selected -EXMNT="" # holder for additional partitions while mounting -EXMNTS="" # when an extra partition is mounted append it's info -SWAP_PART="" # swap partition or file path -SWAP_SIZE="" # when using a swapfile use this size -NEWUSER="" # username for the primary user -USER_PASS="" # password for the primary user -ROOT_PASS="" # root password -LOGIN_WM="" # default login session -LOGIN_TYPE="" # login manager can be lightdm or xinit -INSTALL_WMS="" # space separated list of chosen wm/de -KERNEL="" # can be linux, linux-lts, linux-zen, or linux-hardened -MYSHELL="" # login shell for root and the primary user -LOGINRC="" # login shell rc file -PACKAGES="" # list of all packages to install including WM_PKGS -USER_PKGS="" # packages selected by the user during install -WM_PKGS="" # full list of packages added during wm/de choice -HOOKS="shutdown" # list of additional HOOKS to add in /etc/mkinitcpio.conf -FONT="ter-i16n" # font used in the linux console -UCODE="" # cpu manufacturer microcode filename (if any) - -LUKS="" # empty when not using luks encryption -LUKS_DEV="" # boot parameter string for LUKS -LUKS_PART="" # partition used for encryption -LUKS_PASS="" # encryption password -LUKS_UUID="" # encrypted partition UUID -LUKS_NAME="" # name used for encryption - -LVM="" # empty when not using lvm -VGROUP_MB=0 # available space in volume group -LVM_PARTS=() # partitions used for volume group - -WARN=false # issued mounting/partitioning warning -SEP_BOOT=false # separate boot partition for BIOS -AUTOLOGIN=false # enable autologin for xinit -CONFIG_DONE=false # basic configuration is finished -BROADCOM_WL=false # fixes for broadcom cards eg. BCM4352 -CHECKED_NET=false # have we checked the network connection already - -AUTO_ROOT_PART="" # root value from auto partition -AUTO_BOOT_PART="" # boot value from auto partition -FORMATTED="" # partitions we formatted and should allow skipping - -# baseline -BASE_PKGS="archlabs-scripts archlabs-skel-base archlabs-themes archlabs-dARK archlabs-icons archlabs-wallpapers " -BASE_PKGS+="base-devel xorg xorg-drivers sudo git gvfs gtk3 gtk-engines gtk-engine-murrine pavucontrol tumbler " -BASE_PKGS+="playerctl ffmpeg gstreamer libmad libmatroska gst-libav gst-plugins-base gst-plugins-good" - -# extras for window managers -WM_BASE_PKGS="arandr archlabs-networkmanager-dmenu xdg-user-dirs nitrogen polkit-gnome volumeicon xclip exo " -WM_BASE_PKGS+="xdotool compton wmctrl gnome-keyring dunst feh gsimplecal xfce4-power-manager xfce4-settings laptop-detect" - -SEL=0 # currently selected menu item -ERR="/tmp/errlog" # error log used internally -DBG="/tmp/debuglog" # debug log when passed -d -RUN="/run/archiso/bootmnt/arch/boot" # path for live /boot -BT="$DIST Installer - v$VER" # backtitle used for dialogs -VM="$(dmesg | grep -i "hypervisor")" # is the system a vm - -# } - -# giant ugly container :P { - -# amount of RAM in the system in Mb -SYS_MEM="$(awk '/MemTotal/ { - print int($2 / 1024)"M" -}' /proc/meminfo)" - -# parsed string of locales from /etc/locale.gen -LOCALES="$(awk '/\.UTF-8/ { - gsub(/# .*|#/, "") - if ($1) { - print $1 " -" - } -}' /etc/locale.gen)" - -# parsed string of linux console keyboard mappings -CMAPS="$(find /usr/share/kbd/keymaps -name '*.map.gz' | awk '{ - gsub(/\.map\.gz|.*\//, "") - print $1 " -" -}' | sort)" - -# make sure these are defined for some dialog size calculation -[[ $LINES ]] || LINES=$(tput lines) -[[ $COLUMNS ]] || COLUMNS=$(tput cols) -SHL=$((LINES - 20)) - -# various associative arrays -# { - -# command used to install each bootloader -declare -A BCMDS=( -[refind-efi]="refind-install" -[grub]="grub-install --recheck --force" -[syslinux]="syslinux-install_update -i -a -m" -[systemd-boot]="bootctl --path=/boot install" -) - -# match the wm name with the actual session name used for xinit -declare -A WM_SESSIONS=( -[dwm]='dwm' -[i3-gaps]='i3' -[bspwm]='bspwm' -[plasma]='startkde' -[xfce4]='startxfce4' -[gnome]='gnome-session' -[fluxbox]='startfluxbox' -[openbox]='openbox-session' -[cinnamon]='cinnamon-session' -) - -# additional packages installed for each wm/de -declare -A WM_EXT=( -[gnome]="" -[fluxbox]="menumaker" -[plasma]="kdebase-meta" -[bspwm]="sxhkd archlabs-skel-bspwm rofi archlabs-polybar" -[i3-gaps]="i3status perl-anyevent-i3 archlabs-skel-i3-gaps rofi archlabs-polybar" -[openbox]="obconf archlabs-skel-openbox jgmenu archlabs-polybar tint2 conky rofi lxmenu-data" -[xfce4]="xfce4-goodies xfce4-pulseaudio-plugin network-manager-applet volumeicon rofi archlabs-skel-xfce4" -) - -# files the user can edit during the final stage of install -declare -A EDIT_FILES=( -[login]="" -[fstab]="/etc/fstab" -[sudoers]="/etc/sudoers" -[crypttab]="/etc/crypttab" -[pacman]="/etc/pacman.conf" -[console]="/etc/vconsole.conf" -[mkinitcpio]="/etc/mkinitcpio.conf" -[hostname]="/etc/hostname /etc/hosts" -[bootloader]="/boot/loader/entries/$DIST.conf" -[locale]="/etc/locale.conf /etc/default/locale" -[keyboard]="/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard" -) - -# PKG_EXT: if you add a package to $PACKAGES in any dialog -# and it uses/requires some additional packages, -# you can add them here to keep it simple: [package]="extra" -# duplicates are removed with `uniq` before install -declare -A PKG_EXT=( -[vlc]="qt4" -[mpd]="mpc" -[mupdf]="mupdf-tools" -[qt5ct]="qt5-styleplugins" -[vlc]="qt5ct qt5-styleplugins" -[zathura]="zathura-pdf-poppler" -[noto-fonts]="noto-fonts-emoji" -[cairo-dock]="cairo-dock-plug-ins" -[qutebrowser]="qt5ct qt5-styleplugins" -[qbittorrent]="qt5ct qt5-styleplugins" -[transmission-qt]="qt5ct qt5-styleplugins" -[kdenlive]="kdebase-meta dvdauthor frei0r-plugins breeze breeze-gtk qt5ct qt5-styleplugins" -) - -# mkfs command to format a partition as a given file system -declare -A FS_CMDS=( -[f2fs]="mkfs.f2fs" -[jfs]="mkfs.jfs -q" -[xfs]="mkfs.xfs -f" -[ntfs]="mkfs.ntfs -q" -[ext2]="mkfs.ext2 -q" -[ext3]="mkfs.ext3 -q" -[ext4]="mkfs.ext4 -q" -[vfat]="mkfs.vfat -F32" -[nilfs2]="mkfs.nilfs2 -q" -[reiserfs]="mkfs.reiserfs -q" -) - -# mount options for a given file system -declare -A FS_OPTS=( -[vfat]="" -[ntfs]="" -[ext2]="" -[ext3]="" -[jfs]="discard - off errors=continue - off errors=panic - off nointegrity - off" -[reiserfs]="acl - off nolog - off notail - off replayonly - off user_xattr - off" -[ext4]="discard - off dealloc - off nofail - off noacl - off relatime - off noatime - off nobarrier - off nodelalloc - off" -[xfs]="discard - off filestreams - off ikeep - off largeio - off noalign - off nobarrier - off norecovery - off noquota - off wsync - off" -[nilfs2]="discard - off nobarrier - off errors=continue - off errors=panic - off order=relaxed - off order=strict - off norecovery - off" -[f2fs]="data_flush - off disable_roll_forward - off disable_ext_identify - off discard - off fastboot - off flush_merge - off inline_xattr - off inline_data - off inline_dentry - off no_heap - off noacl - off nobarrier - off noextent_cache - off noinline_data - off norecovery - off" -) -# } - -# } - -main() -{ - (( SEL < 11 )) && (( SEL++ )) - tput civis - SEL=$(dialog --cr-wrap --stdout --backtitle "$BT" \ - --title " Prepare " --default-item $SEL \ - --cancel-label 'Exit' --menu "$_PrepBody" 0 0 0 \ - "1" "$_PrepShow" \ - "2" "$_PrepPart" \ - "3" "$_PrepLUKS" \ - "4" "$_PrepLVM" \ - "5" "$_PrepMnt" \ - "6" "$_PrepUser" \ - "7" "$_PrepConf" \ - "8" "$_PrepWM" \ - "9" "$_PrepPkg" \ - "10" "$_PrepChk" \ - "11" "$_Install") - - [[ $WARN != true && $SEL =~ (2|5) ]] && { WARN=true; msgbox "Prepare" "$_WarnMount"; } - - case $SEL in - 1) dev_tree ;; - 2) part_menu || (( SEL-- )) ;; - 3) luks_menu || (( SEL-- )) ;; - 4) lvm_menu || (( SEL-- )) ;; - 5) mount_menu || (( SEL-- )) ;; - 6) prechecks 0 && { select_mkuser || (( SEL-- )); } ;; - 7) prechecks 1 && { select_config || (( SEL-- )); } ;; - 8) prechecks 2 && { select_sessions || (( SEL-- )); } ;; - 9) prechecks 2 && { select_packages || (( SEL-- )); } ;; - 10) prechecks 2 && show_cfg ;; - 11) prechecks 2 && install_main ;; - *) yesno "Exit" "\nUnmount partitions (if any) and exit the installer?\n" && die - esac -} - -############################################################################### -# selection menus - -show_cfg() -{ - local cmd="${BCMDS[$BOOTLDR]}" - [[ $BOOT_PART ]] && local mnt="/boot" || local mnt="none" - local pkgs="${USER_PKGS# }" - pkgs="${pkgs% }" - pkgs="${pkgs% } ${PACKAGES# }" - pkgs="${pkgs// / }" - pkgs="${pkgs// / }" - [[ $INSTALL_WMS == *dwm* ]] && pkgs="dwm st dmenu ${pkgs# }" - pkgs="${pkgs# }" - pkgs="${pkgs% }" - pkgs="${pkgs// / }" - msgbox "Show Configuration" " - ----------- PARTITION CONFIGURATION ------------ - - Root: ${ROOT_PART:-none} - Boot: ${BOOT_PART:-${BOOT_DEV:-none}} - - Swap: ${SWAP_PART:-none} - Size: ${SWAP_SIZE:-none} - - LVM: ${LVM:-none} - LUKS: ${LUKS:-none} - - Extra: ${EXMNTS:-${EXMNT:-none}} - Hooks: ${HOOKS:-none} - - ----------- BOOTLOADER CONFIGURATION ----------- - - Bootloader: ${BOOTLDR:-none} - Mountpoint: ${mnt:-none} - Command: ${cmd:-none} - - ------------- SYSTEM CONFIGURATION ------------- - - Locale: ${LOCALE:-none} - Keymap: ${KEYMAP:-none} - Hostname: ${HOSTNAME:-none} - Timezone: ${ZONE:-none}/${SUBZONE:-none} - - ------------- USER CONFIGURATION -------------- - - User: ${NEWUSER:-none} - Shell: ${MYSHELL:-none} - Session: ${LOGIN_WM:-none} - Autologin: ${AUTOLOGIN:-none} - Login Method: ${LOGIN_TYPE:-none} - - ------------- PACKAGES AND MIRRORS ------------- - - Kernel: ${KERNEL:-none} - Sessions: ${INSTALL_WMS:-none} - Mirrors: ${MIRROR_CMD:-none} - Packages: $(print4 "${pkgs:-none}") -" -} - -select_login() -{ - LOGIN_TYPE="$(menubox "Login Management" "\nSelect which login management to use." \ - "xinit" "Console login without a display manager" \ - "lightdm" "Lightweight display manager with a gtk greeter")" - - if [[ $LOGIN_TYPE == "" ]]; then - return 1 - elif [[ $LOGIN_TYPE == 'lightdm' ]]; then - WM_PKGS+=" lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice" - EDIT_FILES[login]="/etc/lightdm/lightdm.conf /etc/lightdm/lightdm-gtk-greeter.conf" - AUTOLOGIN=false - else - if [[ $WM_NUM -eq 1 ]]; then - LOGIN_WM="${WM_SESSIONS[$INSTALL_WMS]}" - else - LOGIN_WM="$(menubox "Login Management" "$_WMLoginBody" $LOGIN_CHOICES)" || return 1 - LOGIN_WM="${WM_SESSIONS[$LOGIN_WM]}" - fi - - local msg="\nDo you want autologin enabled for $NEWUSER?\n\nPicking yes will create the following files:\n\n - /home/$NEWUSER/$LOGINRC (run startx when logging in on tty1)\n - /etc/systemd/system/getty@tty1.service.d/autologin.conf (login $NEWUSER without password)\n\nTo disable autologin remove these files.\n" - - yesno "Autologin" "$msg" && AUTOLOGIN=true || AUTOLOGIN=false - - PACKAGES="${PACKAGES// lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice/}" - WM_PKGS="${WM_PKGS// lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice/}" - WM_PKGS+=" xorg-xinit" - EDIT_FILES[login]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile" - fi -} - -select_config() -{ - tput civis - MYSHELL="$(menubox "Shell" "\nChoose a shell for the new user and root." \ - '/usr/bin/zsh' '-' '/bin/bash' '-' '/usr/bin/mksh' '-')" - - case $MYSHELL in - "/bin/bash") LOGINRC=".bash_profile" ;; - "/usr/bin/mksh") LOGINRC=".profile" ;; - "/usr/bin/zsh") LOGINRC=".zprofile" ;; - *) return 1 ;; - esac - - tput cnorm - HOSTNAME="$(getinput "Hostname" "$_HostNameBody" "${DIST,,}")" - [[ $HOSTNAME ]] || return 1 - tput civis - LOCALE="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " Locale " --menu "$_LocaleBody" 0 0 $SHL $LOCALES)" - [[ $LOCALE ]] || return 1 - select_timezone || return 1 - KERNEL="$(menubox "Kernel" "\nSelect a kernel to use for the install." \ - 'linux' 'Vanilla Linux kernel and modules, with a few patches applied.' \ - 'linux-lts' 'Long-term support (LTS) Linux kernel and modules.' \ - 'linux-zen' 'A collaborative effort of kernel hackers to provide the best Linux kernel for everyday systems' \ - 'linux-hardened' 'A security-focused Linux kernel with hardening patches to mitigate kernel and userspace exploits')" - - [[ $KERNEL ]] || return 1 - select_mirrorcmd || return 1 - CONFIG_DONE=true - return 0 -} - -select_mkuser() -{ - local v="" u="" p="" p2="" rp="" rp2="" err=0 - local l=$((${#_RootBody} + 1)) - - while true; do - tput cnorm - v="$(dialog --stdout --no-cancel --separator ';:~:;' \ - --ok-label "Submit" --backtitle "$BT" --title " User Creation " \ - --insecure --mixedform "$_UserBody" 0 0 0 \ - "Username:" 1 1 "$u" 1 11 $COLUMNS 0 0 \ - "Password:" 2 1 "" 2 11 $COLUMNS 0 1 \ - "Password2:" 3 1 "" 3 12 $COLUMNS 0 1 \ - "$_RootBody" 6 1 "" 6 $l $COLUMNS 0 2 \ - "Password:" 8 1 "" 8 11 $COLUMNS 0 1 \ - "Password2:" 9 1 "" 9 12 $COLUMNS 0 1)" - - err=$? - (( err == 0 )) || break - - u="$(awk -F';:~:;' '{print $1}' <<< "$v")" - p="$(awk -F';:~:;' '{print $2}' <<< "$v")" - p2="$(awk -F';:~:;' '{print $3}' <<< "$v")" - rp="$(awk -F';:~:;' '{print $5}' <<< "$v")" - rp2="$(awk -F';:~:;' '{print $6}' <<< "$v")" - - # root passwords empty, so use the user passwords - [[ $rp == "" && $rp2 == "" ]] && { rp="$p"; rp2="$p2"; } - - # make sure a username was entered and that the passwords match - if [[ ${#u} -eq 0 || $u =~ \ |\' || $u =~ [^a-z0-9] ]]; then - msgbox "Invalid Username" "\nIncorrect user name.\n\nPlease try again.\n"; u="" - elif [[ $p == "" ]]; then - msgbox "Empty Password" "\nThe user password cannot be left empty.\n\nPlease try again.\n" - elif [[ "$p" != "$p2" ]]; then - msgbox "Password Mismatch" "\nThe user passwords do not match.\n\nPlease try again.\n" - elif [[ "$rp" != "$rp2" ]]; then - msgbox "Password Mismatch" "\nThe root passwords do not match.\n\nPlease try again.\n" - else - NEWUSER="$u" - USER_PASS="$p" - ROOT_PASS="$rp" - break - fi - done - return $err -} - -select_keymap() -{ - tput civis - KEYMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" \ - --title " Keyboard Layout " --menu "$_XMapBody" 0 0 $SHL \ - 'us' 'English' 'cm' 'English' 'gb' 'English' 'au' 'English' 'gh' 'English' \ - 'za' 'English' 'ng' 'English' 'ca' 'French' 'cd' 'French' 'gn' 'French' \ - 'tg' 'French' 'fr' 'French' 'de' 'German' 'at' 'German' 'ch' 'German' \ - 'es' 'Spanish' 'latam' 'Spanish' 'br' 'Portuguese' 'pt' 'Portuguese' 'ma' 'Arabic' \ - 'sy' 'Arabic' 'ara' 'Arabic' 'ua' 'Ukrainian' 'cz' 'Czech' 'ru' 'Russian' \ - 'sk' 'Slovak' 'nl' 'Dutch' 'it' 'Italian' 'hu' 'Hungarian' 'cn' 'Chinese' \ - 'tw' 'Taiwanese' 'vn' 'Vietnamese' 'kr' 'Korean' 'jp' 'Japanese' 'th' 'Thai' \ - 'la' 'Lao' 'pl' 'Polish' 'se' 'Swedish' 'is' 'Icelandic' 'fi' 'Finnish' \ - 'dk' 'Danish' 'be' 'Belgian' 'in' 'Indian' 'al' 'Albanian' 'am' 'Armenian' \ - 'bd' 'Bangla' 'ba' 'Bosnian' 'bg' 'Bulgarian' 'dz' 'Berber' 'mm' 'Burmese' \ - 'hr' 'Croatian' 'gr' 'Greek' 'il' 'Hebrew' 'ir' 'Persian' 'iq' 'Iraqi' \ - 'af' 'Afghani' 'fo' 'Faroese' 'ge' 'Georgian' 'ee' 'Estonian' 'kg' 'Kyrgyz' \ - 'kz' 'Kazakh' 'lt' 'Lithuanian' 'mt' 'Maltese' 'mn' 'Mongolian' 'ro' 'Romanian' \ - 'no' 'Norwegian' 'rs' 'Serbian' 'si' 'Slovenian' 'tj' 'Tajik' 'lk' 'Sinhala' \ - 'tr' 'Turkish' 'uz' 'Uzbek' 'ie' 'Irish' 'pk' 'Urdu' 'mv' 'Dhivehi' \ - 'np' 'Nepali' 'et' 'Amharic' 'sn' 'Wolof' 'ml' 'Bambara' 'tz' 'Swahili' \ - 'ke' 'Swahili' 'bw' 'Tswana' 'ph' 'Filipino' 'my' 'Malay' 'tm' 'Turkmen' \ - 'id' 'Indonesian' 'bt' 'Dzongkha' 'lv' 'Latvian' 'md' 'Moldavian' 'mao' 'Maori' \ - 'by' 'Belarusian' 'az' 'Azerbaijani' 'mk' 'Macedonian' 'kh' 'Khmer' 'epo' 'Esperanto' \ - 'me' 'Montenegrin')" - - [[ $KEYMAP ]] || return 1 - if [[ $CMAPS == *"$KEYMAP"* ]]; then - CMAP="$KEYMAP" - else - CMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " Console Keymap " --menu "$_CMapBody" 0 0 $SHL $CMAPS)" - [[ $CMAP ]] || return 1 - fi - - if [[ $DISPLAY && $TERM != 'linux' ]]; then - setxkbmap $KEYMAP >/dev/null 2>&1 - else - loadkeys $CMAP >/dev/null 2>&1 - fi - - return 0 -} - -select_timezone() -{ - local f="/usr/share/zoneinfo/zone.tab" err=0 - - declare -A subz - for i in America Australia Asia Atlantic Africa Europe Indian Pacific Arctic Antarctica; do - subz[$i]="$(awk '/'"$i"'\// {gsub(/'"$i"'\//, ""); print $3, $1}' $f | sort)" - done - - while true; do - tput civis - ZONE="$(menubox "Timezone" "$_TimeZBody" \ - 'America' '-' 'Australia' '-' 'Asia' '-' 'Atlantic' '-' 'Africa' '-' \ - 'Europe' '-' 'Indian' '-' 'Pacific' '-' 'Arctic' '-' 'Antarctica' '-')" - - [[ $ZONE ]] || { err=1; break; } - SUBZONE="$(dialog --cr-wrap --stdout --backtitle "$BT" \ - --title " Timezone " --menu "$_TimeSubZBody" 0 0 $SHL ${subz[$ZONE]})" - - [[ $SUBZONE ]] || { err=1; break; } - yesno "Timezone" "\nConfirm time zone: $ZONE/$SUBZONE\n" && break - done - - return $err -} - -select_sessions() -{ - LOGIN_CHOICES="" - - tput civis - INSTALL_WMS="$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \ - --title " Sessions " --checklist "$_WMChoiceBody\n" 0 0 0 \ - "i3-gaps" "A fork of i3wm with more features including gaps" off \ - "openbox" "A lightweight, powerful, and highly configurable stacking wm" off \ - "bspwm" "A tiling wm that represents windows as the leaves of a binary tree" off \ - "dwm" "A fork of dwm, with more layouts and features" off \ - "fluxbox" "A lightweight and highly-configurable window manager" off \ - "gnome" "A desktop environment that aims to be simple and easy to use" off \ - "cinnamon" "A desktop environment combining traditional desktop with modern effects" off \ - "plasma" "A kde software project currently comprising a full desktop environment" off \ - "xfce4" "A lightweight and modular desktop environment based on gtk+2/3" off)" - - [[ $INSTALL_WMS ]] || return 1 - - WM_NUM=$(awk '{print NF}' <<< "$INSTALL_WMS") - WM_PKGS="${INSTALL_WMS/dwm/}" # remove dwm from package list - WM_PKGS="${WM_PKGS// / }" # remove double spaces - WM_PKGS="${WM_PKGS# }" # remove leading space - - for wm in $INSTALL_WMS; do - LOGIN_CHOICES+="$wm - " - [[ ${WM_EXT[$wm]} && $WM_PKGS != *"${WM_EXT[$wm]}"* ]] && WM_PKGS+=" ${WM_EXT[$wm]}" - done - - select_login || return 1 - - # add unique wm packages to main package list - for i in $WM_PKGS; do - [[ $PACKAGES == *$i* ]] || PACKAGES+=" ${WM_PKGS# }" - done - - return 0 -} - -select_packages() -{ - local cur=0 b="" e="" f="" t="" m="" ml="" p="" v="" fn="" to="" s="" x="" - - while true; do - (( cur < 13 )) && (( cur++ )) - - tput civis - cur=$(dialog --cr-wrap --stdout --backtitle "$BT" \ - --title " Packages " --default-item $cur \ - --menu "$_PackageMenu" 0 0 0 \ - 1 "Web Browsers" \ - 2 "Text Editors" \ - 3 "File Managers" \ - 4 "Terminal Emulators" \ - 5 "Music & Video Players" \ - 6 "Chat & Mail Clients" \ - 7 "Office & Professional" \ - 8 "Image & PDF Viewers" \ - 9 "Additional Fonts" \ - 10 "Torrent Clients" \ - 11 "System Management" \ - 12 "Miscellaneous" \ - 13 "Return to main menu") - - [[ $cur && $cur -lt 13 ]] || break - - case $cur in - 1) b="$(pkg_browsers)" ;; - 2) e="$(pkg_editors)" ;; - 3) f="$(pkg_files)" ;; - 4) t="$(pkg_terms)" ;; - 5) m="$(pkg_media)" ;; - 6) ml="$(pkg_mail)" ;; - 7) p="$(pkg_prof)" ;; - 8) v="$(pkg_viewers)" ;; - 9) fn="$(pkg_fonts)" ;; - 10) to="$(pkg_torrent)" ;; - 11) s="$(pkg_sys)" ;; - 12) x="$(pkg_extra)" ;; - esac - - # add all to the user package list regardless of what was picked - USER_PKGS="$b $e $f $t $m $ml $p $v $fn $to $s $x" - done - - for i in $USER_PKGS; do - [[ ${PKG_EXT[$i]} && $USER_PKGS != *"${PKG_EXT[$i]}"* ]] && USER_PKGS="${USER_PKGS% } ${PKG_EXT[$i]}" - done - - USER_PKGS="${USER_PKGS// / }" - USER_PKGS="${USER_PKGS// / }" - USER_PKGS="${USER_PKGS# }" - USER_PKGS="${USER_PKGS% }" - return 0 -} - -select_mirrorcmd() -{ - local c - local key="5f29642060ab983b31fdf4c2935d8c56" - - if hash reflector >/dev/null 2>&1; then - MIRROR_CMD="reflector --score 100 -l 50 -f 5 --sort rate --verbose" - yesno "Mirrorlist" "$_MirrorSetup" && return 0 - - c="$(json 'country_name' "$(json 'ip' "check&?access_key=${key}&fields=ip")?access_key=${key}&fields=country_name")" - MIRROR_CMD="reflector --country $c --fastest 5 --sort rate --verbose" - - tput cnorm - MIRROR_CMD="$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \ - --title " Mirrorlist " --inputbox "$_MirrorCmd\n - --score n Limit the list to the n servers with the highest score. - --latest n Limit the list to the n most recently synchronized servers. - --fastest n Return the n fastest mirrors that meet the other criteria. - --sort {age,rate,country,score,delay} - - 'age': Last server synchronization; - 'rate': Download rate; - 'country': Server location; - 'score': MirrorStatus score; - 'delay': MirrorStatus delay.\n" 0 0 "$MIRROR_CMD")" - elif hash rankmirrors >/dev/null 2>&1; then - infobox "Mirrorlist" "\nQuerying mirrors near your location\n" - c="$(json 'country_code' "$(json 'ip' "check&?access_key=${key}&fields=ip")?access_key=${key}&fields=country_code")" - local w="https://www.archlinux.org/mirrorlist" - if [[ $c ]]; then - if [[ $c =~ (CA|US) ]]; then - MIRROR_CMD="curl -s '$w/?country=US&country=CA&use_mirror_status=on'" - else - MIRROR_CMD="curl -s '$w/?country=${c}&use_mirror_status=on'" - fi - else - MIRROR_CMD="curl -s '$w/?country=US&country=CA&country=NZ&country=GB&country=AU&use_mirror_status=on'" - fi - fi - - return 0 -} - -############################################################################### -# package menus - -pkg_browsers() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "firefox" "A popular open-source graphical web browser from Mozilla" $(ofn 'firefox') \ - "chromium" "an open-source graphical web browser based on the Blink rendering engine" $(ofn 'chromium') \ - "opera" "A Fast and secure, free of charge web browser from Opera Software" $(ofn 'opera') \ - "epiphany" "A GNOME web browser based on the WebKit rendering engine" $(ofn 'epiphany') \ - "surf" "A simple web browser based on WebKit2/GTK+" $(ofn 'surf') \ - "qutebrowser" "A keyboard-focused vim-like web browser based on Python and PyQt5" $(ofn 'qutebrowser'))" - printf "%s" "$pkgs" -} - -pkg_editors() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "neovim" "A fork of Vim aiming to improve user experience, plugins, and GUIs." $(ofn 'neovim') \ - "atom" "An open-source text editor developed by GitHub that is licensed under the MIT License" $(ofn 'atom') \ - "geany" "A fast and lightweight IDE" $(ofn 'geany') \ - "emacs" "An extensible, customizable, self-documenting real-time display editor" $(ofn 'emacs') \ - "mousepad" "A simple text editor" $(ofn 'mousepad'))" - printf "%s" "$pkgs" -} - -pkg_files() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "thunar" "A modern file manager for the Xfce Desktop Environment" $(ofn 'thunar') \ - "pcmanfm" "A fast and lightweight file manager based in Lxde" $(ofn 'pcmanfm') \ - "nautilus" "The default file manager for Gnome" $(ofn 'nautilus') \ - "gparted" "A GUI frontend for creating and manipulating partition tables" $(ofn 'gparted') \ - "file-roller" "Create and modify archives" $(ofn 'file-roller') \ - "xarchiver" "A GTK+ frontend to various command line archivers" $(ofn 'xarchiver'))" - printf "%s" "$pkgs" -} - -pkg_terms() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "termite" "A minimal VTE-based terminal emulator" $(ofn 'termite') \ - "rxvt-unicode" "A unicode enabled rxvt-clone terminal emulator" $(ofn 'rxvt-unicode') \ - "xterm" "The standard terminal emulator for the X window system" $(ofn 'xterm') \ - "alacritty" "A cross-platform, GPU-accelerated terminal emulator" $(ofn 'alacritty') \ - "terminator" "Terminal emulator that supports tabs and grids" $(ofn 'terminator') \ - "sakura" "A terminal emulator based on GTK and VTE" $(ofn 'sakura') \ - "tilix" "A tiling terminal emulator for Linux using GTK+ 3" $(ofn 'tilix') \ - "tilda" "A Gtk based drop down terminal for Linux and Unix" $(ofn 'tilda') \ - "xfce4-terminal" "A terminal emulator based in the Xfce Desktop Environment" $(ofn 'xfce-terminal'))" - printf "%s" "$pkgs" -} - -pkg_media() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "vlc" "A free and open source cross-platform multimedia player" $(ofn 'vlc') \ - "mpv" "A media player based on mplayer" $(ofn 'mpv') \ - "mpd" "A flexible, powerful, server-side application for playing music" $(ofn 'mpd') \ - "ncmpcpp" "An mpd client and almost exact clone of ncmpc with some new features" $(ofn 'ncmpcpp') \ - "cmus" "A small, fast and powerful console music player for Unix-like operating systems" $(ofn 'cmus') \ - "audacious" "A free and advanced audio player based on GTK+" $(ofn 'audacious') \ - "nicotine+" "A graphical client for Soulseek" $(ofn 'nicotine+') \ - "lollypop" "A new music playing application" $(ofn 'lollypop') \ - "rhythmbox" "Music playback and management application" $(ofn 'rhythmbox') \ - "deadbeef" "A GTK+ audio player for GNU/Linux" $(ofn 'deadbeef') \ - "clementine" "A modern music player and library organizer" $(ofn 'clementine'))" - printf "%s" "$pkgs" -} - -pkg_mail() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "thunderbird" "Standalone mail and news reader from mozilla" $(ofn 'thunderbird') \ - "geary" "A lightweight email client for the GNOME desktop" $(ofn 'geary') \ - "evolution" "Manage your email, contacts and schedule" $(ofn 'evolution') \ - "mutt" "Small but very powerful text-based mail client" $(ofn 'mutt') \ - "hexchat" "A popular and easy to use graphical IRC client" $(ofn 'hexchat') \ - "pidgin" "Multi-protocol instant messaging client" $(ofn 'pidgin') \ - "weechat" "Fast, light and extensible IRC client" $(ofn 'weechat') \ - "irssi" "Modular text mode IRC client" $(ofn 'irssi'))" - printf "%s" "$pkgs" -} - -pkg_prof() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "libreoffice-fresh" "Full featured office suite" $(ofn 'libreoffice-fresh') \ - "abiword" "Fully-featured word processor" $(ofn 'abiword') \ - "calligra" "A set of applications for productivity" $(ofn 'calligra') \ - "gimp" "GNU Image Manipulation Program" $(ofn 'gimp') \ - "inkscape" "Professional vector graphics editor" $(ofn 'inkscape') \ - "krita" "Edit and paint images" $(ofn 'krita') \ - "obs-studio" "Free opensource streaming/recording software" $(ofn 'obs-studio') \ - "kdenlive" "A non-linear video editor for Linux using the MLT video framework" $(ofn 'kdenlive') \ - "openshot" "An open-source, non-linear video editor for Linux" $(ofn 'openshot') \ - "audacity" "A program that lets you manipulate digital audio waveforms" $(ofn 'audacity') \ - "guvcview" "Capture video from camera devices" $(ofn 'guvcview') \ - "simplescreenrecorder" "A feature-rich screen recorder" $(ofn 'simplescreenrecorder'))" - printf "%s" "$pkgs" -} - -pkg_fonts() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "ttf-hack" "A hand groomed and optically balanced typeface based on Bitstream Vera Mono" $(ofn 'ttf-hack') \ - "ttf-anonymous-pro" "A family fixed-width fonts designed with coding in mind" $(ofn 'ttf-anonymous-pro') \ - "ttf-font-awesome" "Iconic font designed for Bootstrap" $(ofn 'ttf-font-awesome') \ - "ttf-fira-code" "Monospaced font with programming ligatures" $(ofn 'ttf-fira-code') \ - "noto-fonts" "Google Noto fonts" $(ofn 'noto-fonts') \ - "noto-fonts-cjk" "Google Noto CJK fonts (Chinese, Japanese, Korean)" $(ofn 'noto-fonts-cjk'))" - printf "%s" "$pkgs" -} - -pkg_viewers() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "evince" "A document viewer" $(ofn 'evince') \ - "zathura" "Minimalistic document viewer" $(ofn 'zathura') \ - "qpdfview" "A tabbed PDF viewer" $(ofn 'qpdfview') \ - "mupdf" "Lightweight PDF and XPS viewer" $(ofn 'mupdf') \ - "gpicview" "Lightweight image viewer" $(ofn 'gpicview'))" - printf "%s" "$pkgs" -} - -pkg_torrent() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "deluge" "A BitTorrent client written in python" $(ofn 'deluge') \ - "qbittorrent" "An advanced BitTorrent client" $(ofn 'qbittorrent') \ - "transmission-gtk" "Free BitTorrent client GTK+ GUI" $(ofn 'transmission-gtk') \ - "transmission-qt" "Free BitTorrent client Qt GUI" $(ofn 'transmission-qt') \ - "transmission-cli" "Free BitTorrent client CLI" $(ofn 'transmission-cli'))" - printf "%s" "$pkgs" -} - -pkg_sys() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "gnome-disk-utility" "Disk Management Utility" $(ofn 'gnome-disk-utility') \ - "gnome-system-monitor" "View current processes and monitor system state" $(ofn 'gnome-system-monitor') \ - "qt5ct" "GUI for managing Qt based application themes, icons, and fonts" $(ofn 'qt5ct'))" - printf "%s" "$pkgs" -} - -pkg_extra() -{ - local pkgs="" - pkgs="$(checkbox "Packages" "$_PackageBody" \ - "steam" "A popular game distribution platform by Valve" $(ofn 'steam') \ - "gpick" "Advanced color picker using GTK+ toolkit" $(ofn 'gpick') \ - "gcolor2" "A simple GTK+2 color selector" $(ofn 'gcolor2') \ - "plank" "An elegant, simple, and clean dock" $(ofn 'plank') \ - "docky" "Full fledged dock for opening applications and managing windows" $(ofn 'docky') \ - "cairo-dock" "Light eye-candy fully themable animated dock" $(ofn 'cairo-dock'))" - printf "%s" "$pkgs" -} - -############################################################################### -# partition menus - -part_menu() -{ - local device choice - - if [[ $# -eq 1 ]]; then - device="$1" - else - umount_dir $MNT - select_device || return 1 - device="$DEVICE" - fi - - tput civis - if [[ $DISPLAY && $TERM != 'linux' ]] && hash gparted >/dev/null 2>&1; then - choice="$(menubox "Edit Partitions" "$_PartBody" \ - "view partition table" "Shows output from the lsblk command" \ - "auto partition" "Full device automatic partitioning" \ - "gparted" "GUI front end to parted" \ - "cfdisk" "Curses front end to fdisk" \ - "parted" "GNU partition editor" \ - "secure wipe" "Wipe data before disposal or sale of a device" \ - "done" "return to the main menu")" - - else - choice="$(menubox "Edit Partitions" "$_PartBody" \ - "view partition table" "Shows output from the lsblk command" \ - "auto partition" "Full device automatic partitioning" \ - "cfdisk" "Curses front end to fdisk" \ - "parted" "GNU partition editor" \ - "secure wipe" "Wipe data before disposal or sale of the device" \ - "done" "return to the main menu")" - - fi - - tput civis - if [[ $choice == "done" || $choice == "" ]]; then - return 0 - elif [[ $choice == "view partition table" ]]; then - msgbox "Partition Table" "\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT "$device")\n\n" - elif [[ $choice == "secure wipe" ]]; then - yesno "Wipe Partition" "\nWARNING: ALL data on $device $_PartWipeBody" && wipe -Ifrev $device - elif [[ $choice == "auto partition" ]]; then - local root_size msg ret table boot_fs - root_size=$(lsblk -lno SIZE "$device" | awk 'NR == 1 { - if ($1 ~ "G") { - sub(/G/, ""); print ($1 * 1000 - 512) / 1000 "G" - } else { - sub(/M/, ""); print ($1 - 512) "M" - } - }') - - if [[ $SYS == 'BIOS' ]]; then - msg="$(sed 's|vfat/fat32|ext4|' <<< "$_PartBody2")"; table="msdos"; boot_fs="ext4" - else - msg="$_PartBody2"; table="gpt"; boot_fs="fat32" - fi - - if yesno "Auto Partition" "\nWARNING: ALL data on $device $msg ($root_size)$_PartBody3"; then - auto_partition "$device" "$table" "$boot_fs" "$root_size" && return 0 || return 1 - fi - else - clear; tput cnorm; $choice "$device" - fi - - part_menu "$device" -} - -format_as() -{ - infobox "Format" "\nRunning: ${FS_CMDS[$2]} $1\n" 1 - ${FS_CMDS[$2]} "$1" >/dev/null 2>$ERR - errshow "${FS_CMDS[$2]} $1" && FORMATTED+=" $part" -} - -decr_pcount() -{ - for i in $(printf "%s" "$@"); do - if (( COUNT > 0 )); then - PARTS="$(sed "/${i//\//\\/}/d" <<< "$PARTS")" && (( COUNT-- )) - fi - done -} - -dev_tree() -{ - tput civis - local msg - if [[ $IGNORE_DEV != "" ]]; then - msg="$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT | - awk "!/$IGNORE_DEV/"' && /disk|part|lvm|crypt|NAME/')" - else - msg="$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT | - awk '/disk|part|lvm|crypt|NAME/')" - fi - msgbox "Device Tree" "\n\n$msg\n\n" -} - -enable_swap() -{ - if [[ $1 == "$MNT/swapfile" && $SWAP_SIZE ]]; then - fallocate -l $SWAP_SIZE $1 2>$ERR - errshow "fallocate -l $SWAP_SIZE $1" - chmod 600 $1 2>$ERR - errshow "chmod 600 $1" - fi - mkswap $1 >/dev/null 2>$ERR - errshow "mkswap $1" - swapon $1 >/dev/null 2>$ERR - errshow "swapon $1" - return 0 -} - -select_device() -{ - if [[ $DEV_COUNT -eq 1 && $SYS_DEVS ]]; then - DEVICE="$(awk '{print $1}' <<< "$SYS_DEVS")" - elif (( DEV_COUNT > 1 )); then - tput civis - if [[ $1 ]]; then - DEVICE="$(menubox "Boot Device" "\nSelect the device to use for bootloader install." $SYS_DEVS)" - else - DEVICE="$(menubox "Select Device" "$_DevSelBody" $SYS_DEVS)" - fi - [[ $DEVICE ]] || return 1 - elif [[ $DEV_COUNT -lt 1 && ! $1 ]]; then - msgbox "$_ErrTitle" "\nNo available devices.\n\nExiting..\n"; die 1 - fi - - [[ $1 ]] && BOOT_DEV="$DEVICE" - - return 0 -} - -confirm_mount() -{ - if [[ $(mount) == *"$1"* ]]; then - infobox "Mount Success" "\nPartition $1 mounted at $2\n" 1 - decr_pcount $1 - else - infobox "Mount Fail" "\nPartition $1 failed to mount at $2\n" 1 - return 1 - fi - return 0 -} - -check_cryptlvm() -{ - local dev devs part="$1" - devs="$(lsblk -lno NAME,FSTYPE,TYPE)" - - # Identify if $part is LUKS+LVM, LVM+LUKS, LVM alone, or LUKS alone - if [[ $(lsblk -lno TYPE "$part") =~ 'crypt' ]]; then - LUKS='encrypted' - LUKS_NAME="${part#/dev/mapper/}" - for dev in $(awk '/lvm/ && /crypto_LUKS/ {print "/dev/mapper/"$1}' <<< "$devs" | uniq); do - if grep -q "$LUKS_NAME" <<< "$(lsblk -lno NAME "$dev")"; then - LUKS_DEV="$LUKS_DEV cryptdevice=$dev:$LUKS_NAME" - LVM='logical volume' - break - fi - done - for dev in $(awk '/part/ && /crypto_LUKS/ {print "/dev/"$1}' <<< "$devs" | uniq); do - if grep -q "$LUKS_NAME" <<< "$(lsblk -lno NAME "$dev")"; then - LUKS_UUID="$(lsblk -lno UUID,TYPE,FSTYPE "$dev" | awk '/part/ && /crypto_LUKS/ {print $1}')" - LUKS_DEV="$LUKS_DEV cryptdevice=UUID=$LUKS_UUID:$LUKS_NAME" - break - fi - done - elif [[ $(lsblk -lno TYPE "$part") =~ 'lvm' ]]; then - LVM='logical volume' - VOLUME_NAME="${part#/dev/mapper/}" - for dev in $(awk '/crypt/ && /lvm2_member/ {print "/dev/mapper/"$1}' <<< "$devs" | uniq); do - if grep -q "$VOLUME_NAME" <<< "$(lsblk -lno NAME "$dev")"; then - LUKS_NAME="$(sed 's~/dev/mapper/~~g' <<< "$dev")" - break - fi - done - for dev in $(awk '/part/ && /crypto_LUKS/ {print "/dev/"$1}' <<< "$devs" | uniq); do - if grep -q "$LUKS_NAME" <<< "$(lsblk -lno NAME "$dev")"; then - LUKS_UUID="$(lsblk -lno UUID,TYPE,FSTYPE "$dev" | awk '/part/ && /crypto_LUKS/ {print $1}')" - LUKS_DEV="$LUKS_DEV cryptdevice=UUID=$LUKS_UUID:$LUKS_NAME" - LUKS='encrypted' - break - fi - done - fi -} - -auto_partition() -{ - local device="$1" table="$2" boot_fs="$3" size="$4" - local dev_info="$(parted -s $device print)" - - infobox "Auto Partition" "\nRemoving partitions on $device and setting table to $table\n" 2 - - # in case the device was previously used for swap - swapoff -a - - # walk the partitions on the device in reverse order and delete them - while read -r PART; do - parted -s $device rm $PART >/dev/null 2>&1 - done <<< "$(awk '/^ [1-9][0-9]?/ {print $1}' <<< "$dev_info" | sort -r)" - - if [[ $(awk '/Table:/ {print $3}' <<< "$dev_info") != "$table" ]]; then - parted -s $device mklabel $table >/dev/null 2>&1 - fi - - infobox "Auto Partition" "\nCreating a 512M $fs boot partition.\n" 2 - if [[ $SYS == "BIOS" ]]; then - parted -s $device mkpart primary $fs 1MiB 513MiB >/dev/null 2>&1 - else - parted -s $device mkpart ESP $fs 1MiB 513MiB >/dev/null 2>&1 - fi - - sleep 0.5 - BOOT_DEV="$device" - AUTO_BOOT_PART=$(lsblk -lno NAME,TYPE $device | awk 'NR == 2 {print "/dev/"$1}') - - if [[ $SYS == "BIOS" ]]; then - mkfs.ext4 -q $AUTO_BOOT_PART >/dev/null 2>&1 - else - mkfs.vfat -F32 $AUTO_BOOT_PART >/dev/null 2>&1 - fi - - infobox "Auto Partition" "\nCreating a $size ext4 root partition.\n" 0 - parted -s $device mkpart primary ext4 513MiB 100% >/dev/null 2>&1 - sleep 0.5 - AUTO_ROOT_PART="$(lsblk -lno NAME,TYPE $device | awk 'NR == 3 {print "/dev/"$1}')" - mkfs.ext4 -q $AUTO_ROOT_PART >/dev/null 2>&1 - tput civis; sleep 0.5 - msgbox "Auto Partition" "\nProcess complete.\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE $device)\n" -} - -mount_partition() -{ - local part="$1" - local mountp="${MNT}$2" - local fs - fs="$(lsblk -lno FSTYPE $part)" - mkdir -p "$mountp" - - if [[ $fs && ${FS_OPTS[$fs]} && $part != "$BOOT_PART" ]] && select_mntopts "$part" "$fs"; then - mount -o $MNT_OPTS "$part" "$mountp" 2>$ERR - else - mount "$part" "$mountp" 2>$ERR - fi - - confirm_mount $part "$mountp" || return 1 - check_cryptlvm "$part" - - return 0 -} - -find_partitions() -{ - local str="$1" err='' - - # string of partitions as /TYPE/PART SIZE - if [[ $IGNORE_DEV ]]; then - PARTS="$(lsblk -lno TYPE,NAME,SIZE | - awk "/$str/"' && !'"/$IGNORE_DEV/"' { - sub(/^part/, "/dev/"); - sub(/^lvm|^crypt/, "/dev/mapper/") - print $1$2 " " $3 - }')" - else - PARTS="$(lsblk -lno TYPE,NAME,SIZE | - awk "/$str/"' { - sub(/^part/, "/dev/") - sub(/^lvm|^crypt/, "/dev/mapper/") - print $1$2 " " $3 - }')" - fi - - # number of partitions total - if [[ $PARTS ]]; then - COUNT=$(wc -l <<< "$PARTS") - else - COUNT=0 - fi - - # ensure we have enough partitions for the system and action type - case "$str" in - 'part|lvm|crypt') [[ $COUNT -lt 1 || ($SYS == 'UEFI' && $COUNT -lt 2) ]] && err="$_PartErrBody" ;; - 'part|crypt') (( COUNT < 1 )) && err="$_LvmPartErrBody" ;; - 'part|lvm') (( COUNT < 2 )) && err="$_LuksPartErrBody" ;; - esac - - # if there aren't enough partitions show the relevant error message - [[ $err ]] && { msgbox "Not Enough Partitions" "$err"; return 1; } - - return 0 -} - -setup_boot_device() -{ - infobox "Boot Device" "\nSetting device flags for: $BOOT_PART\n" 1 - [[ $BOOT_PART = /dev/nvme* ]] && BOOT_DEV="${BOOT_PART%p[1-9]}" || BOOT_DEV="${BOOT_PART%[1-9]}" - BOOT_PART_NUM="${BOOT_PART: -1}" - if [[ $SYS == 'UEFI' ]]; then - parted -s $BOOT_DEV set $BOOT_PART_NUM esp on >/dev/null 2>&1 - else - parted -s $BOOT_DEV set $BOOT_PART_NUM boot on >/dev/null 2>&1 - fi - return 0 -} - -############################################################################### -# mounting menus - -mount_menu() -{ - lvm_detect - umount_dir $MNT - find_partitions 'part|lvm|crypt' || { SEL=2; return 1; } - - [[ $LUKS_PART ]] && decr_pcount $LUKS_PART - [[ $LVM_PARTS ]] && decr_pcount $LVM_PARTS - - select_root_partition || return 1 - - if [[ $SYS == "UEFI" ]]; then - select_efi_partition || { BOOT_PART=""; return 1; } - elif (( COUNT > 0 )); then - select_boot_partition || { BOOT_PART=""; return 1; } - fi - - setup_boot || return 1 - select_swap || return 1 - select_extra_partitions || return 1 - return 0 -} - -select_swap() -{ - tput civis - SWAP_PART="$(menubox "Swap Setup" "\nSelect whether to use a swap partition, swapfile, or none." \ - "none" "Don't allocate any swap space" \ - "swapfile" "Allocate $SYS_MEM of swap at /swapfile" \ - $PARTS)" - - if [[ $SWAP_PART == "" || $SWAP_PART == "none" ]]; then - SWAP_PART=""; return 0 - elif [[ $SWAP_PART == "swapfile" ]]; then - tput cnorm - local i=0 - while ! [[ ${SWAP_SIZE:0:1} =~ [1-9] && ${SWAP_SIZE: -1} =~ (M|G) ]]; do - (( i > 0 )) && msgbox "Swap Setup Error" "\n$_SelSwpErr $SWAP_SIZE\n" - if ! SWAP_SIZE="$(getinput "Swap Setup" "$_SelSwpSize" "$SYS_MEM")"; then - SWAP_PART=""; SWAP_SIZE=""; break; return 0 - fi - (( i++ )) - done - enable_swap "$MNT/$SWAP_PART" - SWAP_PART="/$SWAP_PART" - else - enable_swap $SWAP_PART - decr_pcount $SWAP_PART - SWAP_SIZE="$(lsblk -lno SIZE $SWAP_PART)" - fi - return 0 -} - -select_mntopts() -{ - local part="$1" fs="$2" err=0 - local title="${fs^} Mount Options" - local opts="${FS_OPTS[$fs]}" - - if is_ssd "$part" >/dev/null 2>&1; then - opts=$(sed 's/discard - off/discard - on/' <<< "$opts") - fi - - tput civis - while true; do - MNT_OPTS="$(dialog --cr-wrap --stdout --backtitle "$BT" \ - --title " $title " --checklist "$_MntBody" 0 0 0 $opts)" - - if [[ $MNT_OPTS ]]; then - MNT_OPTS="$(sed 's/ /,/g; $s/,$//' <<< "$MNT_OPTS" )" - yesno "$title" "\nConfirm mount options: $MNT_OPTS\n" && break - else - err=1; break - fi - done - - return $err -} - -select_mountpoint() -{ - local err=0 - tput cnorm - while true; do - EXMNT="$(getinput "Extra Mount $part" "$_ExtPartBody1" "/" nolimit)" - err=$? - (( err == 0 )) || break - if [[ ${EXMNT:0:1} != "/" || ${#EXMNT} -le 1 || $EXMNT =~ \ |\' || $EXMNTS == *"$EXMNT"* ]]; then - msgbox "$_ErrTitle" "$_ExtErrBody" - else - break - fi - done - return $err -} - -select_filesystem() -{ - local part="$1" fs="" cur_fs="" err=0 - cur_fs="$(lsblk -lno FSTYPE "$part" 2>/dev/null)" - [[ $part == "$ROOT_PART" && $ROOT_PART == "$AUTO_ROOT_PART" && ! $LUKS && ! $LVM ]] && return 0 - - while true; do - tput civis - if [[ $cur_fs && ( $part != "$ROOT_PART" || $FORMATTED == *"$part"* ) ]]; then - fs="$(menubox "Filesystem" \ - "\nSelect which filesystem to use for: $part\n\nCurrent: ${cur_fs:-none}\nDefault: ext4" \ - "skip" "do not format this partition" \ - "ext4" "${FS_CMDS[ext4]}" \ - "ext3" "${FS_CMDS[ext3]}" \ - "ext2" "${FS_CMDS[ext2]}" \ - "vfat" "${FS_CMDS[vfat]}" \ - "ntfs" "${FS_CMDS[ntfs]}" \ - "f2fs" "${FS_CMDS[f2fs]}" \ - "jfs" "${FS_CMDS[jfs]}" \ - "xfs" "${FS_CMDS[xfs]}"\ - "nilfs2" "${FS_CMDS[nilfs2]}" \ - "reiserfs" "${FS_CMDS[reiserfs]}")" - - [[ $fs == "skip" ]] && break - else - fs="$(menubox "Filesystem" "\nSelect which filesystem to use for: $part\n\nDefault: ext4" \ - "ext4" "${FS_CMDS[ext4]}" \ - "ext3" "${FS_CMDS[ext3]}" \ - "ext2" "${FS_CMDS[ext2]}" \ - "ntfs" "${FS_CMDS[ntfs]}" \ - "f2fs" "${FS_CMDS[f2fs]}" \ - "jfs" "${FS_CMDS[jfs]}" \ - "xfs" "${FS_CMDS[xfs]}" \ - "nilfs2" "${FS_CMDS[nilfs2]}" \ - "reiserfs" "${FS_CMDS[reiserfs]}")" - - fi - [[ $fs ]] || { err=1; break; } - yesno "Filesystem" "\nFormat $part as $fs?\n" && break - done - (( err == 0 )) || return $err - [[ $fs == "skip" ]] || format_as "$part" "$fs" -} - -select_efi_partition() -{ - tput civis - if (( COUNT == 1 )); then - BOOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")" - elif [[ $AUTO_BOOT_PART ]]; then - BOOT_PART="$AUTO_BOOT_PART" - return 0 # were done here - else - BOOT_PART="$(menubox "EFI Partition" "$_SelUefiBody" $PARTS)" - fi - [[ $BOOT_PART ]] || return 1 - - if grep -q 'fat' <<< "$(fsck -N "$BOOT_PART")"; then - local msg="\nIMPORTANT: The EFI partition $BOOT_PART $_FormBootBody" - if yesno "Format EFI Partition" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then - format_as "$BOOT_PART" "vfat" - sleep 1 - fi - else - format_as "$BOOT_PART" "vfat" - sleep 1 - fi - - return 0 -} - -select_boot_partition() -{ - tput civis - if [[ $AUTO_BOOT_PART && ! $LVM ]]; then - BOOT_PART="$AUTO_BOOT_PART" - return 0 # were done here - elif [[ $LUKS && ! $LVM ]]; then - BOOT_PART="$(menubox "Boot Partition" "$_SelBiosLuksBody" $PARTS)" - [[ $BOOT_PART ]] || return 1 - else - BOOT_PART="$(menubox "Boot Partition" "$_SelBiosBody" "skip" "don't use a separate boot" $PARTS)" - [[ $BOOT_PART == "" || $BOOT_PART == "skip" ]] && { BOOT_PART=""; return 0; } - fi - - if grep -q 'ext[34]' <<< "$(fsck -N "$BOOT_PART")"; then - local msg="\nIMPORTANT: The boot partition $BOOT_PART $_FormBootBody" - if yesno "Format Boot Partition" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then - format_as "$BOOT_PART" "ext4" - sleep 1 - fi - else - format_as "$BOOT_PART" "ext4" - sleep 1 - fi - return 0 -} - -select_root_partition() -{ - tput civis - if (( COUNT == 1 )); then - ROOT_PART="$(awk 'NR==1 {print $1}' <<< "$PARTS")" - else - ROOT_PART="$(menubox "Mount Root" "$_SelRootBody" $PARTS)" - [[ $ROOT_PART ]] || return 1 - fi - - select_filesystem "$ROOT_PART" || { ROOT_PART=""; return 1; } - mount_partition "$ROOT_PART" || { ROOT_PART=""; return 1; } - return 0 -} - -select_extra_partitions() -{ - local part - while (( COUNT > 0 )); do - tput civis - part="$(menubox "Mount Boot" "$_ExtPartBody" "done" "return to the main menu" $PARTS)" - if [[ $part == "done" || $part == "" ]]; then - break - elif select_filesystem "$part" && select_mountpoint && mount_partition "$part" "$EXMNT"; then - EXMNTS="$EXMNTS $part: $EXMNT" - [[ $EXMNT == '/usr' && $HOOKS != *usr* ]] && HOOKS="usr $HOOKS" - else - break; return 1 - fi - done - return 0 -} - -############################################################################### -# installation - -install_main() -{ - clear - tput cnorm - install_base - printf "Generating /etc/fstab: genfstab -U $MNT >$MNT/etc/fstab\n" - genfstab -U $MNT >$MNT/etc/fstab 2>$ERR - errshow 1 "genfstab -U $MNT >$MNT/etc/fstab" - [[ -f $MNT/swapfile ]] && sed -i "s~${MNT}~~" $MNT/etc/fstab - install_mirrorlist - install_packages - install_mkinitcpio - install_boot - printf "Setting hardware clock with: hwclock --systohc --utc\n" - chrun "hwclock --systohc --utc" || chrun "hwclock --systohc --utc --directisa" - install_user - install_login - printf "Setting ownership of /home/$NEWUSER\n" - chrun "chown -Rf $NEWUSER:users /home/$NEWUSER" - sleep 1 - - while true; do - tput civis - choice=$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \ - --title " Finalization " --menu "$_EditBody" 0 0 0 \ - "finished" "exit the installer and reboot" \ - "keyboard" "${EDIT_FILES[keyboard]}" \ - "console" "${EDIT_FILES[console]}" \ - "locale" "${EDIT_FILES[locale]}" \ - "hostname" "${EDIT_FILES[hostname]}" \ - "sudoers" "${EDIT_FILES[sudoers]}" \ - "mkinitcpio" "${EDIT_FILES[mkinitcpio]}" \ - "fstab" "${EDIT_FILES[fstab]}" \ - "crypttab" "${EDIT_FILES[crypttab]}" \ - "bootloader" "${EDIT_FILES[bootloader]}" \ - "pacman" "${EDIT_FILES[pacman]}" \ - "login" "${EDIT_FILES[login]}") - - if [[ $choice == "" || $choice == "finished" ]]; then - [[ $DEBUG == true && -r $DBG ]] && vim $DBG - # when die() is passed 127 it will call: systemctl -i reboot - die 127 - else - local exists="" - for f in $(printf "%s" "${EDIT_FILES[$choice]}"); do - [[ -e ${MNT}$f ]] && exists+=" ${MNT}$f" - done - if [[ $exists ]]; then - vim -O $exists - else - msgbox "File Error" "\nFile(s) do not exist.\n" - fi - fi - done -} - -install_base() -{ - if [[ -e /run/archiso/sfs/airootfs/etc/skel ]]; then - rsync -ahv /run/archiso/sfs/airootfs/ $MNT/ 2>$ERR - errshow 1 "rsync -ahv /run/archiso/sfs/airootfs/ $MNT/" - else - install_mirrorlist - pacstrap $MNT base $KERNEL $UCODE $(grep -hv '^#' /usr/share/archlabs/installer/packages.txt) 2>$ERR - errshow 1 "pacstrap $MNT base $KERNEL $UCODE $(grep -hv '^#' /usr/share/archlabs/installer/packages.txt)" - fi - - printf "Removing archiso remains\n" - rm -rf $MNT/etc/mkinitcpio-archiso.conf - find $MNT/usr/lib/initcpio -name 'archiso*' -type f -exec rm -rf '{}' \; - sed -i 's/volatile/auto/g' $MNT/etc/systemd/journald.conf - - if [[ $VM ]]; then - printf "Removing xorg configs in /etc/X11/xorg.conf.d/ to avoid conflict in VMs\n" - rm -rfv $MNT/etc/X11/xorg.conf.d/*?.conf - sleep 1 - elif [[ $(lspci | grep ' VGA ' | grep 'Intel') != "" ]]; then - printf "Creating intel GPU 'TearFree' config in /etc/X11/xorg.conf.d/20-intel.conf\n" - cat > $MNT/etc/X11/xorg.conf.d/20-intel.conf < $MNT/etc/locale.conf << EOF -LANG=$LOCALE -EOF - cat > $MNT/etc/default/locale << EOF -LANG=$LOCALE -EOF - sed -i "s/#en_US.UTF-8/en_US.UTF-8/g; s/#${LOCALE}/${LOCALE}/g" $MNT/etc/locale.gen - chrun "locale-gen" - printf "Setting timezone: $ZONE/$SUBZONE\n" - chrun "ln -svf /usr/share/zoneinfo/$ZONE/$SUBZONE /etc/localtime" - - if [[ $BROADCOM_WL == true ]]; then - printf "Blacklisting modules for broadcom wireless: bmca\n" - echo 'blacklist bcma' >> $MNT/etc/modprobe.d/blacklist.conf - rm -f $MNT/etc/modprobe/ - fi - - printf "Creating keyboard configurations for keymap: $KEYMAP\n" - cat > $MNT/etc/X11/xorg.conf.d/00-keyboard.conf < $MNT/etc/default/keyboard < $MNT/etc/vconsole.conf < $MNT/etc/hostname << EOF -$HOSTNAME -EOF - cat > $MNT/etc/hosts << EOF -127.0.0.1 localhost -127.0.1.1 $HOSTNAME -::1 localhost ip6-localhost ip6-loopback -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -EOF - -} - -install_user() -{ - printf "Setting root password\n" - chrun "chpasswd <<< 'root:$ROOT_PASS'" 2>$ERR - errshow 1 "set root password" - if [[ $MYSHELL != *zsh ]]; then - chrun "usermod -s $MYSHELL root" 2>$ERR - errshow 1 "usermod -s $MYSHELL root" - if [[ $MYSHELL == "/usr/bin/mksh" ]]; then - cp -fv $MNT/etc/skel/.mkshrc /root/.mkshrc - fi - fi - - local groups='audio,autologin,floppy,log,network,rfkill,scanner,storage,optical,power,wheel' - - printf "Creating user $NEWUSER with: useradd -m -u 1000 -g users -G $groups -s $MYSHELL $NEWUSER\n" - chrun "groupadd -r autologin" 2>$ERR - errshow 1 "groupadd -r autologin" - chrun "useradd -m -u 1000 -g users -G $groups -s $MYSHELL $NEWUSER" 2>$ERR - errshow 1 "useradd -m -u 1000 -g users -G $groups -s $MYSHELL $NEWUSER" - chrun "chpasswd <<< '$NEWUSER:$USER_PASS'" 2>$ERR - errshow 1 "set $NEWUSER password" - - if [[ $USER_PKGS == *neovim* ]]; then - mkdir -p $MNT/home/$NEWUSER/.config/nvim - cp -fv $MNT/home/$NEWUSER/.vimrc $MNT/home/$NEWUSER/.config/nvim/init.vim - cp -rfv $MNT/home/$NEWUSER/.vim/colors $MNT/home/$NEWUSER/.config/nvim/colors - fi - - if [[ $MYSHELL == '/usr/bin/mksh' ]]; then - cat >> $MNT/home/$NEWUSER/.mkshrc << EOF -# colors in less (manpager) -export LESS_TERMCAP_mb=$'\e[01;31m' -export LESS_TERMCAP_md=$'\e[01;31m' -export LESS_TERMCAP_me=$'\e[0m' -export LESS_TERMCAP_se=$'\e[0m' -export LESS_TERMCAP_so=$'\e[01;44;33m' -export LESS_TERMCAP_ue=$'\e[0m' -export LESS_TERMCAP_us=$'\e[01;32m' - -export EDITOR=$([[ $USER_PKGS == *neovim* ]] && printf "n")vim - -# source shell configs -for f in "\$HOME/.mksh/"*?.sh; do - . "\$f" -done - -al-info -EOF - fi - - [[ $INSTALL_WMS == *dwm* ]] && install_suckless - [[ $LOGIN_WM =~ (startkde|gnome-session) ]] && sed -i '/super/d' $HOME/.xprofile /root/.xprofile - - return 0 -} - -install_login() -{ - printf "Setting up $LOGIN_TYPE\n" - SERVICE="$MNT/etc/systemd/system/getty@tty1.service.d" - - # remove welcome message - sed -i '/printf/d' $MNT/root/.zshrc - - # remove unneeded shell files from installation - case $MYSHELL in - "/bin/bash") - rm -rf $MNT/home/$NEWUSER/.{zsh,mksh}* $MNT/root/.{zsh,mksh}* ;; - "/usr/bin/mksh") - rm -rf $MNT/home/$NEWUSER/.{zsh,bash}* $MNT/home/$NEWUSER/.inputrc $MNT/root/.{zsh,bash}* $MNT/root/.inputrc ;; - "/usr/bin/zsh") - rm -rf $MNT/home/$NEWUSER/.{bash,mksh}* $MNT/home/$NEWUSER/.inputrc $MNT/root/.{bash,mksh}* $MNT/root/.inputrc ;; - esac - - install_${LOGIN_TYPE:-xinit} -} - -install_xinit() -{ - if [[ -e $MNT/home/$NEWUSER/.xinitrc ]] && grep -q 'exec' $MNT/home/$NEWUSER/.xinitrc; then - sed -i "/exec/ c exec ${LOGIN_WM}" $MNT/home/$NEWUSER/.xinitrc - else - printf "exec %s\n" "$LOGIN_WM" >> $MNT/home/$NEWUSER/.xinitrc - fi - - [[ ${EDIT_FILES[login]} == *"$LOGINRC"* ]] || EDIT_FILES[login]+=" /home/$NEWUSER/$LOGINRC" - - if [[ $AUTOLOGIN == true ]]; then - sed -i "s/root/${NEWUSER}/g" $SERVICE/autologin.conf - cat > $MNT/home/$NEWUSER/$LOGINRC << EOF -# ~/$LOGINRC -# sourced by $(basename $MYSHELL) when used as a login shell - -# automatically run startx when logging in on tty1 -[[ ! \$DISPLAY && \$XDG_VTNR -eq 1 ]] && exec startx -- vt1 - -EOF - else - rm -rf $SERVICE - rm -rf $MNT/home/$NEWUSER/.{profile,zprofile,bash_profile} - fi -} - -install_lightdm() -{ - rm -rf $SERVICE - rm -rf $MNT/home/$NEWUSER/.{xinitrc,profile,zprofile,bash_profile} - chrun 'systemctl set-default graphical.target && systemctl enable lightdm.service' 2>$ERR - errshow 1 "systemctl set-default graphical.target && systemctl enable lightdm.service" - cat > $MNT/etc/lightdm/lightdm-gtk-greeter.conf << EOF -# LightDM GTK+ Configuration - -[greeter] -active-monitor=0 -default-user-image=/usr/share/icons/ArchLabs-Dark/64x64/places/distributor-logo-archlabs.png -background=/usr/share/backgrounds/archlabs/archlabs.jpg -theme-name=Adwaita-dark -icon-theme-name=Adwaita -font-name=DejaVu Sans Mono 11 -position=30%,end 50%,end -EOF -} - -install_packages() -{ - local rmpkg="archlabs-installer" - local inpkg="$BASE_PKGS $PACKAGES $USER_PKGS" - - [[ $MYSHELL == *mksh* ]] && inpkg+=" mksh" - - if [[ $KERNEL == 'linux-lts' ]]; then - inpkg+=" linux-lts"; rmpkg+=" linux" - elif [[ $KERNEL == 'linux-zen' ]]; then - inpkg+=" linux-zen"; rmpkg+=" linux" - elif [[ $KERNEL == 'linux-hardened' ]]; then - inpkg+=" linux-hardened"; rmpkg+=" linux" - fi - - [[ $BOOTLDR == 'grub' ]] || rmpkg+=" grub os-prober" - [[ $BOOTLDR == 'refind-efi' ]] || rmpkg+=" refind-efi" - - if ! [[ $inpkg =~ (term|urxvt|tilix|alacritty|sakura|tilda|gnome|xfce|plasma|cinnamon) ]] && [[ $INSTALL_WMS != *dwm* ]] - then - inpkg+=" xterm" - fi - - [[ $MYSHELL == '/usr/bin/zsh' ]] && inpkg+=" zsh-completions zsh-history-substring-search" - [[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps|dwm) ]] && inpkg+=" $WM_BASE_PKGS" - [[ $INSTALL_WMS =~ ^(plasma|gnome|cinnamon)$ ]] || inpkg+=" archlabs-ksuperkey" - - chrun "pacman -Syyu --noconfirm" 2>/dev/null - chrun "pacman -Rns $rmpkg --noconfirm" 2>/dev/null - chrun "pacman -S iputils --noconfirm" 2>/dev/null - chrun "pacman -S $inpkg --needed --noconfirm" 2>/dev/null - - sed -i "s/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" $MNT/etc/sudoers - return 0 -} - -install_suckless() -{ - # install and setup dwm - printf "Installing and setting up dwm\n" - mkdir -pv $MNT/home/$NEWUSER/suckless - - for i in dwm dmenu st; do - if chrun "git clone https://bitbucket.org/natemaia/$i /home/$NEWUSER/suckless/$i"; then - chrun "cd /home/$NEWUSER/suckless/$i; rm -f config.h; make clean install; make clean" - else - printf "failed to clone $i repo\n" - fi - done - - if [[ -d $MNT/home/$NEWUSER/suckless/dwm && -x $MNT/usr/bin/dwm ]]; then - printf "To configure dwm edit /home/$NEWUSER/suckless/dwm/config.h\n" - printf "You can then recompile it with 'sudo make clean install'\n" - sleep 2 - fi -} - -install_mirrorlist() -{ - printf "Sorting the mirrorlist\n" - if hash reflector >/dev/null 2>&1; then - $MIRROR_CMD --save $MNT/etc/pacman.d/mirrorlist --verbose || - reflector --score 100 -l 50 -f 10 --sort rate --verbose --save $MNT/etc/pacman.d/mirrorlist - else - { eval $MIRROR_CMD || curl -s 'https://www.archlinux.org/mirrorlist/all/'; } | - sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -v -t -n 10 - > $MNT/etc/pacman.d/mirrorlist - fi -} - -install_mkinitcpio() -{ - local add="" - [[ $LUKS && $LUKS_PASS && $SYS == 'UEFI' && $BOOTLDR == 'grub' ]] && luks_keyfile - [[ $LUKS ]] && add="encrypt" - [[ $LVM ]] && { [[ $add ]] && add+=" lvm2" || add+="lvm2"; } - sed -i "s/block filesystems/block ${add} filesystems ${HOOKS}/g" $MNT/etc/mkinitcpio.conf - chrun "mkinitcpio -p $KERNEL" 2>$ERR - errshow 1 "mkinitcpio -p $KERNEL" -} - -############################################################################### -# bootloader setup - -install_boot() -{ - if [[ $ROOT_PART == */dev/mapper* ]]; then - ROOT_PART_ID="$ROOT_PART" - elif [[ $BOOTLDR == 'syslinux' ]]; then - ROOT_PART_ID="UUID=$(blkid -s UUID -o value $ROOT_PART)" - elif [[ $BOOTLDR == 'systemd-boot' || $BOOTLDR == 'refind-efi' ]]; then - ROOT_PART_ID="PARTUUID=$(blkid -s PARTUUID -o value $ROOT_PART)" - fi - - if [[ $SYS == 'UEFI' ]]; then - find $MNT/boot/EFI/ -maxdepth 1 -mindepth 1 \ - -name '[aA][rR][cC][hH][lL]abs' -type d -exec rm -rf '{}' \; >/dev/null 2>&1 - find $MNT/boot/EFI/ -maxdepth 1 -mindepth 1 \ - -name '[Bb][oO][oO][tT]' -type d -exec rm -rf '{}' \; >/dev/null 2>&1 - fi - - if [[ $BOOTLDR != 'grub' ]]; then - rm -f $MNT/etc/default/grub 2>/dev/null - find $MNT/boot/ -name 'grub*' -exec rm -rf '{}' \; >/dev/null 2>&1 - fi - - if [[ $BOOTLDR != 'syslinux' ]]; then - find $MNT/boot/ -name 'syslinux*' -exec rm -rf '{}' \; >/dev/null 2>&1 - fi - - printf "Installing and setting up $BOOTLDR\n" - prerun_$BOOTLDR - chrun "${BCMDS[$BOOTLDR]}" 2>$ERR - errshow 1 "${BCMDS[$BOOTLDR]}" - - if [[ -d $MNT/hostrun ]]; then - umount $MNT/hostrun/udev >/dev/null 2>&1 - umount $MNT/hostrun/lvm >/dev/null 2>&1 - rm -rf $MNT/hostrun >/dev/null 2>&1 - fi - - if [[ $SYS == 'UEFI' ]]; then - # some UEFI firmware require a generic esp/BOOT/BOOTX64.EFI - # see: https://wiki.archlinux.org/index.php/GRUB#UEFI - # also: https://wiki.archlinux.org/index.php/syslinux#UEFI_Systems - mkdir -pv $MNT/boot/EFI/BOOT - if [[ $BOOTLDR == 'grub' ]]; then - cp -fv $MNT/boot/EFI/$DIST/grubx64.efi $MNT/boot/EFI/BOOT/BOOTX64.EFI - elif [[ $BOOTLDR == 'syslinux' ]]; then - cp -rf $MNT/boot/EFI/syslinux/* $MNT/boot/EFI/BOOT/ - cp -f $MNT/boot/EFI/syslinux/syslinux.efi $MNT/boot/EFI/BOOT/BOOTX64.EFI - elif [[ $BOOTLDR == 'refind-efi' ]]; then - sed -i '/#extra_kernel_version_strings/ c extra_kernel_version_strings linux-hardened,linux-zen,linux-lts,linux' $MNT/boot/EFI/refind/refind.conf - cp -fv $MNT/boot/EFI/refind/refind_x64.efi $MNT/boot/EFI/BOOT/BOOTX64.EFI - fi - fi - - return 0 -} - -setup_boot() -{ - tput civis - if [[ $SYS == 'BIOS' ]]; then - BOOTLDR="$(menubox "Bootloader" "\nSelect which bootloader to use." \ - "grub" "The Grand Unified Bootloader, standard among many Linux distributions" \ - "syslinux" "A collection of boot loaders for booting drives, CDs, or over the network")" - - else - BOOTLDR="$(menubox "Bootloader" "\nSelect which bootloader to use." \ - "systemd-boot" "A simple UEFI boot manager which executes configured EFI images" \ - "grub" "The Grand Unified Bootloader, standard among many Linux distributions" \ - "refind-efi" "A UEFI boot manager that aims to be platform neutral and simplify multi-boot" \ - "syslinux" "A collection of boot loaders for booting drives, CDs, or over the network (no chainloading support)")" - - fi - - [[ $BOOTLDR ]] || return 1 - if [[ $BOOT_PART ]]; then - mount_partition "$BOOT_PART" "/boot" && SEP_BOOT=true || return 1 - setup_boot_device - fi - setup_${BOOTLDR} || return 1 -} - -setup_grub() -{ - EDIT_FILES[bootloader]="/etc/default/grub" - - if [[ $SYS == 'BIOS' ]]; then - [[ $BOOT_DEV ]] || { select_device 1 || return 1; } - BCMDS[grub]="grub-install --recheck --force --target=i386-pc $BOOT_DEV" - else - if [[ $ROOT_PART == */dev/mapper/* && ! $LVM && ! $LUKS_PASS ]]; then - luks_pass "$_LuksOpen" 1 || return 1 - fi - BCMDS[grub]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars || true && - grub-install --recheck --force --target=x86_64-efi --efi-directory=/boot --bootloader-id=$DIST" - - grep -q /sys/firmware/efi/efivars <<< "$(mount)" || mount -t efivarfs efivarfs /sys/firmware/efi/efivars - fi - - BCMDS[grub]="mkdir -p /run/udev /run/lvm && - mount --bind /hostrun/udev /run/udev && - mount --bind /hostrun/lvm /run/lvm && - ${BCMDS[grub]} && - grub-mkconfig -o /boot/grub/grub.cfg && - sleep 1 && umount /run/udev /run/lvm" - - return 0 -} - -setup_syslinux() -{ - if [[ $SYS == 'BIOS' ]]; then - EDIT_FILES[bootloader]="/boot/syslinux/syslinux.cfg" - else - EDIT_FILES[bootloader]="/boot/EFI/syslinux/syslinux.cfg" - BCMDS[syslinux]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars || true && - efibootmgr -c -d $BOOT_DEV -p $BOOT_PART_NUM -l /EFI/syslinux/syslinux.efi -L $DIST -v" - fi -} - -setup_refind-efi() -{ - EDIT_FILES[bootloader]="/boot/refind_linux.conf" - BCMDS[refind-efi]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars || true && refind-install" -} - -setup_systemd-boot() -{ - EDIT_FILES[bootloader]="/boot/loader/entries/$DIST.conf" - BCMDS[systemd-boot]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars || true && bootctl --path=/boot install" -} - -prerun_grub() -{ - sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g; - s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $MNT/etc/default/grub - if [[ $LUKS_DEV ]]; then - sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g; - s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $MNT/etc/default/grub 2>$ERR - errshow 1 "sed -i 's~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g; - s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g' $MNT/etc/default/grub" - fi - if [[ $SYS == 'BIOS' && $LVM && $SEP_BOOT == false ]]; then - sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $MNT/etc/default/grub 2>$ERR - errshow 1 "sed -i 's/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g' $MNT/etc/default/grub" - fi - - # setup for os-prober module - mkdir -p /run/lvm - mkdir -p /run/udev - mkdir -p $MNT/hostrun/lvm - mkdir -p $MNT/hostrun/udev - mount --bind /run/lvm $MNT/hostrun/lvm - mount --bind /run/udev $MNT/hostrun/udev - - return 0 -} - -prerun_syslinux() -{ - local c="$MNT/boot/syslinux" s="/usr/lib/syslinux/bios" d=".." - if [[ $SYS == 'UEFI' ]]; then - c="$MNT/boot/EFI/syslinux"; s="/usr/lib/syslinux/efi64/"; d="" - fi - - mkdir -pv $c && cp -rfv $s/* $c/ && cp -f $RUN/syslinux/splash.png $c/ - cat > $c/syslinux.cfg << EOF -UI vesamenu.c32 -MENU TITLE $DIST Boot Menu -MENU BACKGROUND splash.png -TIMEOUT 50 -DEFAULT $DIST - -# see: https://www.syslinux.org/wiki/index.php/Comboot/menu.c32 -MENU WIDTH 78 -MENU MARGIN 4 -MENU ROWS 4 -MENU VSHIFT 10 -MENU TIMEOUTROW 13 -MENU TABMSGROW 14 -MENU CMDLINEROW 14 -MENU HELPMSGROW 16 -MENU HELPMSGENDROW 29 -MENU COLOR border 30;44 #40ffffff #a0000000 std -MENU COLOR title 1;36;44 #9033ccff #a0000000 std -MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all -MENU COLOR unsel 37;44 #50ffffff #a0000000 std -MENU COLOR help 37;40 #c0ffffff #a0000000 std -MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std -MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std -MENU COLOR msg07 37;40 #90ffffff #a0000000 std -MENU COLOR tabmsg 31;40 #30ffffff #00000000 std - -LABEL $DIST -MENU LABEL $DIST Linux -LINUX $d/vmlinuz-$KERNEL -APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw -INITRD $([[ $UCODE ]] && printf "%s" "$d/$UCODE.img,")$d/initramfs-$KERNEL.img - -LABEL ${DIST}fallback -MENU LABEL $DIST Linux Fallback -LINUX $d/vmlinuz-$KERNEL -APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw -INITRD $([[ $UCODE ]] && printf "%s" "$d/$UCODE.img,")$d/initramfs-$KERNEL-fallback.img -$([[ $SYS == 'BIOS' ]] && printf "\n%s" "# examples of chainloading other bootloaders - -#LABEL grub2 -#MENU LABEL Grub2 -#COM32 chain.c32 -#APPEND file=$d/grub/boot.img - -#LABEL windows -#MENU LABEL Windows -#COM32 chain.c32 -#APPEND hd0 3") -EOF - return 0 -} - -prerun_refind-efi() -{ - cat > $MNT/boot/refind_linux.conf << EOF -"$DIST Linux" "root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && - printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] && - printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-$KERNEL.img" -"$DIST Linux Fallback" "root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && - printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] && - printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-$KERNEL-fallback.img" -EOF - mkdir -p $MNT/etc/pacman.d/hooks - cat > $MNT/etc/pacman.d/hooks/refind.hook << EOF -[Trigger] -Operation = Upgrade -Type = Package -Target = refind-efi - -[Action] -Description = Updating rEFInd on ESP -When = PostTransaction -Exec = /usr/bin/refind-install -EOF -} - -prerun_systemd-boot() -{ - mkdir -p $MNT/boot/loader/entries - cat > $MNT/boot/loader/loader.conf << EOF -default $DIST -timeout 5 -editor no -EOF - cat > $MNT/boot/loader/entries/$DIST.conf << EOF -title $DIST Linux -linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/$UCODE.img") -initrd /initramfs-$KERNEL.img -options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw -EOF - cat > $MNT/boot/loader/entries/$DIST-fallback.conf << EOF -title $DIST Linux Fallback -linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/$UCODE.img") -initrd /initramfs-$KERNEL-fallback.img -options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw -EOF - mkdir -p $MNT/etc/pacman.d/hooks - cat > $MNT/etc/pacman.d/hooks/systemd-boot.hook << EOF -[Trigger] -Type = Package -Operation = Upgrade -Target = systemd - -[Action] -Description = Updating systemd-boot -When = PostTransaction -Exec = /usr/bin/bootctl update -EOF - systemd-machine-id-setup --root="$MNT" - return 0 -} - -############################################################################### -# lvm functions - -lvm_menu() -{ - lvm_detect - tput civis - - local choice - choice="$(dialog --cr-wrap --stdout --backtitle "$BT" \ - --title " Logical Volume Management " --menu "$_LvmMenu" 0 0 0 \ - "$_LvmNew" "vgcreate -f, lvcreate -L -n" \ - "$_LvmDel" "vgremove -f" \ - "$_LvmDelAll" "lvrmeove, vgremove, pvremove -f" \ - "back" "return to the main menu")" - - case $choice in - "$_LvmNew") lvm_create || return 1 ;; - "$_LvmDelVG") - if lvm_show_vg && yesno "$_LvmDelVG" "$_LvmDelQ"; then - vgremove -f "$DEL_VG" >/dev/null 2>&1 - fi - lvm_menu - ;; - "$_LvMDelAll") lvm_del_all ;; - esac - - return 0 -} - -lvm_detect() -{ - PHYSICAL_VOLUMES="$(pvs -o pv_name --noheading 2>/dev/null)" - VOLUME_GROUP="$(vgs -o vg_name --noheading 2>/dev/null)" - VOLUMES="$(lvs -o vg_name,lv_name --noheading --separator - 2>/dev/null)" - - if [[ $VOLUMES && $VOLUME_GROUP && $PHYSICAL_VOLUMES ]]; then - infobox "Logical Volume Management" "$_LvmDetBody" 1 - modprobe dm-mod >/dev/null 2>$ERR - errshow 'modprobe dm-mod' - vgscan >/dev/null 2>&1 - vgchange -ay >/dev/null 2>&1 - fi -} - -lvm_show_vg() -{ - DEL_VG="" - VOL_GROUP_LIST="" - for i in $(lvs --noheadings | awk '{print $2}' | uniq); do - VOL_GROUP_LIST="$VOL_GROUP_LIST $i $(vgdisplay "$i" | awk '/VG Size/ {print $3$4}')" - done - [[ $VOL_GROUP_LIST == "" ]] && { msgbox "$_ErrTitle" "$_LvmVGErr"; return 1; } - tput civis - DEL_VG="$(menubox "Logical Volume Management" "$_LvmSelVGBody" $VOL_GROUP_LIST)" - [[ $DEL_VG ]] -} - -get_lv_size() -{ - tput cnorm - local ttl=" $_LvmNew (LV:$VOL_COUNT) " - local msg="${VOLUME_GROUP}: ${GROUP_SIZE}$GROUP_SIZE_TYPE (${VGROUP_MB}MB $_LvmLvSizeBody1).$_LvmLvSizeBody2" - VOLUME_SIZE="$(getinput "$ttl" "$msg" "")" - [[ $VOLUME_SIZE ]] || return 1 - ERR_SIZE=0 - (( ${#VOLUME_SIZE} == 0 || ${VOLUME_SIZE:0:1} == 0 )) && ERR_SIZE=1 - - if (( ERR_SIZE == 0 )); then - local lv="$((${#VOLUME_SIZE} - 1))" - for (( i=0; i= VGROUP_MB )) && ERR_SIZE=1 || VGROUP_MB=$((VGROUP_MB - m)) ;; - [Mm]) (( ${VOLUME_SIZE:0:$lv} >= VGROUP_MB )) && ERR_SIZE=1 || VGROUP_MB=$((VGROUP_MB - s)) ;; - *) ERR_SIZE=1 - esac - fi - fi - fi - - if (( ERR_SIZE == 1 )); then - msgbox "LVM Size Error" "$_LvmLvSizeErrBody" - get_lv_size || return 1 - fi - - return 0 -} - -lvm_volume_name() -{ - local msg="$1" default="mainvolume" name="" err=0 - (( VOL_COUNT > 1 )) && default="extravolume$VOL_COUNT" - - while true; do - tput cnorm - name="$(getinput "$_LvmNew (LV:$VOL_COUNT)" "\n$msg" "$default" nolimit)" - [[ $name ]] || { err=1; break; } - if [[ ${name:0:1} == "/" || ${#name} -eq 0 || $name =~ \ |\' ]] || grep -q "$name" <<< "$(lsblk)"; then - msgbox "$_ErrTitle" "$_LvmLvNameErrBody" - else - VOLUME_NAME="$name" - break - fi - done - - return $err -} - -lvm_group_name() -{ - local group="" err=0 - - while true; do - tput cnorm - group="$(getinput "$_LvmNew" "$_LvmNameVgBody" "VolGroup" nolimit)" - [[ $group ]] || { err=1; break; } - if [[ ${group:0:1} == "/" || ${#group} -eq 0 || $group =~ \ |\' ]] || grep -q "$group" <<< "$(lsblk)"; then - msgbox "$_ErrTitle" "$_LvmNameVgErr" - else - VOLUME_GROUP="$group" - break - fi - done - - return $err -} - -lvm_extra_lvs() -{ - local err=0 - - while (( VOL_COUNT > 1 )); do - lvm_volume_name "$_LvmLvNameBody1" && get_lv_size || { err=1; break; } - lvcreate -L "$VOLUME_SIZE" "$VOLUME_GROUP" -n "$VOLUME_NAME" >/dev/null 2>$ERR - errshow "lvcreate -L $VOLUME_SIZE $VOLUME_GROUP -n $VOLUME_NAME" || { err=1; break; } - msgbox "$_LvmNew (LV:$VOL_COUNT)" "\nDone, logical volume (LV) $VOLUME_NAME ($VOLUME_SIZE) has been created.\n" - (( VOL_COUNT-- )) - done - - return $err -} - -lvm_partitions() -{ - find_partitions 'part|crypt' || return 1 - PARTS="$(awk 'NF > 0 {print $0 " off"}' <<< "$PARTS")" - - tput civis - LVM_PARTS=($(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \ - --title " $_LvmNew " --checklist "$_LvmPvSelBody" 0 0 0 $PARTS)) - - (( ${#LVM_PARTS[@]} >= 1 )) -} - -lvm_mkgroup() -{ - lvm_group_name || return 1 - - local msg="$_LvmPvConfBody1 $VOLUME_GROUP\n\n$_LvmPvConfBody2" - while ! yesno "$_LvmNew" "$msg ${LVM_PARTS[*]}\n"; do - lvm_partitions || { break; return 1; } - lvm_group_name || { break; return 1; } - done - - vgcreate -f "$VOLUME_GROUP" "${LVM_PARTS[@]}" >/dev/null 2>$ERR - errshow "vgcreate -f $VOLUME_GROUP ${LVM_PARTS[*]}" || return 1 - - GROUP_SIZE=$(vgdisplay "$VOLUME_GROUP" | awk '/VG Size/ { - gsub(/[^0-9.]/, "") - print int($0) - }') - - GROUP_SIZE_TYPE="$(vgdisplay "$VOLUME_GROUP" | awk '/VG Size/ { - print substr($NF, 0, 1) - }')" - - if [[ $GROUP_SIZE_TYPE == 'G' ]]; then - VGROUP_MB=$((GROUP_SIZE * 1000)) - else - VGROUP_MB=$GROUP_SIZE - fi - msgbox "$_LvmNew" "\nVolume group: $VOLUME_GROUP ($GROUP_SIZE $GROUP_SIZE_TYPE) has been created\n" -} - -lvm_create() -{ - VOLUME_GROUP=""; LVM_PARTS=(); VGROUP_MB=0 - umount_dir $MNT - lvm_partitions || return 1 - lvm_mkgroup || return 1 - VOL_COUNT=$(menubox "$_LvmNew" "$_LvmLvNumBody1 $VOLUME_GROUP\n$_LvmLvNumBody2" 0 0 0 \ - "1" "-" "2" "-" "3" "-" "4" "-" "5" "-" "6" "-" "7" "-" "8" "-" "9" "-") - - [[ $VOL_COUNT ]] || return 1 - - lvm_extra_lvs || return 1 - lvm_volume_name "$_LvmLvNameBody1 $_LvmLvNameBody2 (${VGROUP_MB}MB)" || return 1 - lvcreate -l +100%FREE "$VOLUME_GROUP" -n "$VOLUME_NAME" >/dev/null 2>$ERR - errshow "lvcreate -l +100%FREE $VOLUME_GROUP -n $VOLUME_NAME" || return 1 - LVM='logical volume'; tput civis; sleep 0.5 - local msg="\nDone, volume: $VOLUME_GROUP-$VOLUME_NAME (${VOLUME_SIZE:-${VGROUP_MB}MB}) has been created.\n" - msgbox "$_LvmNew (LV:$VOL_COUNT)" "$msg\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE "${LVM_PARTS[@]}")\n" -} - -lvm_del_all() -{ - PHYSICAL_VOLUMES="$(pvs -o pv_name --noheading 2>/dev/null)" - VOLUME_GROUP="$(vgs -o vg_name --noheading 2>/dev/null)" - VOLUMES="$(lvs -o vg_name,lv_name --noheading --separator - 2>/dev/null)" - - if yesno "$_LvmDelAll" "$_LvmDelQ"; then - for i in $VOLUMES; do - lvremove -f "/dev/mapper/$i" >/dev/null 2>&1 - done - for i in $VOLUME_GROUP; do - vgremove -f "$i" >/dev/null 2>&1 - done - for i in $PHYSICAL_VOLUMES; do - pvremove -f "$i" >/dev/null 2>&1 - done - LVM='' - fi -} - -############################################################################### -# luks functions - -luks_menu() -{ - tput civis - local choice - choice="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " LUKS Encryption " \ - --menu "${_LuksMenuBody}${_LuksMenuBody2}${_LuksMenuBody3}" 0 0 0 \ - "$_LuksEncrypt" "cryptsetup -q luksFormat" \ - "$_LuksOpen" "cryptsetup open --type luks" \ - "$_LuksEncryptAdv" "cryptsetup -q -s -c luksFormat" \ - "back" "Return to the main menu")" - - case $choice in - "$_LuksEncrypt") luks_basic || return 1 ;; - "$_LuksOpen") luks_open || return 1 ;; - "$_LuksEncryptAdv") luks_advanced || return 1 ;; - esac - - return 0 -} - -luks_open() -{ - modprobe -a dm-mod dm_crypt - umount_dir $MNT - find_partitions 'part|crypt|lvm' || return 1 - tput civis - - if (( COUNT == 1 )); then - LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")" - else - LUKS_PART="$(menubox "$_LuksOpen" "$_LuksMenuBody" $PARTS)" - fi - [[ $LUKS_PART ]] || return 1 - - luks_pass "$_LuksOpen" || return 1 - infobox "$_LuksOpen" "$_LuksOpenWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0 - cryptsetup open --type luks $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR - errshow "cryptsetup open --type luks $LUKS_PART $LUKS_NAME" || return 1 - LUKS='encrypted'; luks_show - return 0 -} - -luks_pass() -{ - local t="$1" op="$2" v="" p="" p2="" err=0 - - while true; do - tput cnorm - if [[ $op ]]; then - v="$(dialog --stdout --no-cancel --separator ';:~:;' \ - --ok-label "Submit" --backtitle "$BT" --title " $title " --insecure --mixedform \ - "\nEnter the password to decrypt $ROOT_PART.\n\nThis is needed to create a keyfile." 0 0 0 \ - "Password:" 1 1 "" 1 11 $COLUMNS 0 1 \ - "Password2:" 2 1 "" 2 12 $COLUMNS 0 1)" - - else - v="$(dialog --stdout --no-cancel --separator ';:~:;' \ - --ok-label "Submit" --backtitle "$BT" --title " $title " \ - --insecure --mixedform "$_LuksOpenBody" 0 0 0 \ - "Name:" 1 1 "${LUKS_NAME:-cryptroot}" 1 7 $COLUMNS 0 0 \ - "Password:" 2 1 "" 2 11 $COLUMNS 0 1 \ - "Password2:" 3 1 "" 3 12 $COLUMNS 0 1)" - - fi - - err=$? - (( err == 0 )) || break - - if [[ $onlypass ]]; then - p="$(awk -F';:~:;' '{print $1}' <<< "$v")" - p2="$(awk -F';:~:;' '{print $2}' <<< "$v")" - else - n="$(awk -F';:~:;' '{print $1}' <<< "$v")" - p="$(awk -F';:~:;' '{print $2}' <<< "$v")" - p2="$(awk -F';:~:;' '{print $3}' <<< "$v")" - fi - - if [[ ! $op && $n == "" ]]; then - infobox "Name Empty" "\nEncrypted device name cannot be empty.\n\nPlease try again.\n" - elif [[ $p == "" || "$p" != "$p2" ]]; then - [[ $op ]] || LUKS_NAME="$n" - infobox "Password Mismatch" "\nThe passwords entered do not match.\n\nPlease try again.\n" - else - [[ $op ]] || LUKS_NAME="$n" - LUKS_PASS="$p" - break - fi - done - - return $err -} - -luks_setup() -{ - modprobe -a dm-mod dm_crypt - umount_dir $MNT - find_partitions 'part|lvm' || return 1 - tput civis - - if (( COUNT == 1 )); then - LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")" - else - LUKS_PART="$(menubox "$_LuksEncrypt" "$_LuksEncryptBody" $PARTS)" - fi - - [[ $LUKS_PART ]] || return 1 - luks_pass "$_LuksEncrypt" -} - -luks_basic() -{ - luks_setup || return 1 - infobox "$_LuksEncrypt" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0 - cryptsetup -q luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR - errshow "cryptsetup -q luksFormat $LUKS_PART" || return 1 - cryptsetup open $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR - errshow "cryptsetup open $LUKS_PART $LUKS_NAME" || return 1 - LUKS='encrypted'; luks_show - return 0 -} - -luks_advanced() -{ - if luks_setup; then - tput cnorm - local cipher - cipher="$(getinput "LUKS Encryption" "$_LuksCipherKey" "-s 512 -c aes-xts-plain64" nolimit)" - [[ $cipher ]] || return 1 - infobox "$_LuksEncryptAdv" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0 - cryptsetup -q $cipher luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR - errshow "cryptsetup -q $cipher luksFormat $LUKS_PART" || return 1 - cryptsetup open $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR - errshow "cryptsetup open $LUKS_PART $LUKS_NAME" || return 1 - luks_show - return 0 - fi - return 1 -} - -luks_show() -{ - tput civis - sleep 0.5 - msgbox "$_LuksEncrypt" "${_LuksEncryptSucc}\n\n$(lsblk $LUKS_PART -o NAME,MODEL,SIZE,TYPE,FSTYPE)\n\n" -} - -luks_keyfile() -{ - if [[ ! -e $MNT/crypto_keyfile.bin && $LUKS_PASS && $LUKS_UUID ]]; then - printf "Creating LUKS keyfile /crypto_keyfile.bin\n" - local n - n="$(lsblk -lno NAME,UUID,TYPE | awk "/$LUKS_UUID/"' && /part|crypt|lvm/ {print $1}')" - local mkkey="dd bs=512 count=8 if=/dev/urandom of=/crypto_keyfile.bin" - mkkey="$mkkey && chmod 000 /crypto_keyfile.bin" - mkkey="$mkkey && cryptsetup luksAddKey /dev/$n /crypto_keyfile.bin <<< '$LUKS_PASS'" - chrun "$mkkey" - sed -i 's/FILES=()/FILES=(\/crypto_keyfile.bin)/g' $MNT/etc/mkinitcpio.conf 2>$ERR - fi - - return 0 -} - -############################################################################### -# helper functions - -ofn() -{ - [[ $USER_PKGS == *"$1"* ]] && printf "on" || printf "off" -} - -chrun() -{ - arch-chroot $MNT /bin/bash -c "$1" -} - -json() -{ - curl -s "http://api.ipstack.com/$2" | python3 -c "import sys, json; print(json.load(sys.stdin)['$1'])" -} - -is_ssd() -{ - local i dev=$1 - - # check for LVM and or LUKS for their origin devices - if [[ $LUKS && ! $LVM && $dev =~ $LUKS_NAME ]]; then - dev="${LUKS_PART}" - elif [[ $LVM && ! $LUKS && ${#LVM_PARTS[@]} -eq 1 && ${LVM_PARTS[*]} =~ $dev ]]; then - dev="${LVM_PARTS[*]}" - fi - - dev=${dev#/dev/} - [[ $dev =~ nvme ]] && dev=${dev%p[0-9]*} || dev=${dev%[0-9]*} - i=$(cat /sys/block/$dev/queue/rotational 2>/dev/null) - (( ${i:-1} == 0 )) -} - -die() -{ - (( $# >= 1 )) && exitcode=$1 || exitcode=0 - trap - INT - tput cnorm - - if [[ -d $MNT ]] && command cd /; then - umount_dir $MNT - if (( exitcode == 127 )); then - umount -l /run/archiso/bootmnt; sleep 0.5; systemctl -i reboot - fi - fi - - if [[ $TERM == 'linux' ]]; then - # restore custom linux console 0-15 colors when not rebooting - colors=("\e]P0191919" "\e]P1D15355" "\e]P2609960" "\e]P3FFCC66" - "\e]P4255A9B" "\e]P5AF86C8" "\e]P62EC8D3" "\e]P7949494" "\e]P8191919" "\e]P9D15355" - "\e]PA609960" "\e]PBFF9157" "\e]PC4E88CF" "\e]PDAF86C8" "\e]PE2ec8d3" "\e]PFE1E1E1" - ) - for col in "${colors[@]}"; do - printf "$col" - done - fi - - exit $exitcode -} - -sigint() -{ - printf "\n^C caught, cleaning up...\n" - die 1 -} - -print4() -{ - local str="$*" - if [[ $COLUMNS -ge 110 && ${#str} -gt $((COLUMNS - 30)) ]]; then - str="$(awk '{ - i=2; p1=p2=p3=p4=""; p1=$1; q=int(NF / 4) - for (;i<=q; i++) { p1=p1" "$i } - for (;i<=q*2; i++) { p2=p2" "$i } - for (;i<=q*3; i++) { p3=p3" "$i } - for (;i<=NF; i++) { p4=p4" "$i } - printf "%s\n %s\n %s\n %s", p1, p2, p3, p4 - }' <<< "$str")" - printf "%s\n" "$str" - elif [[ $str ]]; then - printf "%s\n" "$str" - fi -} - -system_devices() -{ - IGNORE_DEV="$(lsblk -lno NAME,MOUNTPOINT | - awk '/\/run\/archiso\/bootmnt/ {sub(/[1-9]/, ""); print $1}')" - - if [[ $IGNORE_DEV ]]; then - SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE | - awk '/disk/ && !'"/$IGNORE_DEV/"' {print "/dev/" $1 " " $2}')" - else - SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE | - awk '/disk/ {print "/dev/" $1 " " $2}')" - fi - - [[ $SYS_DEVS ]] || { infobox "$_ErrTitle" "\nNo available devices...\n\nExiting..\n"; die 1; } - DEV_COUNT="$(wc -l <<< "$SYS_DEVS")" -} - -system_identify() -{ - local efidir="/sys/firmware/efi" - - if [[ $VM ]]; then - UCODE="" - elif grep -q 'AuthenticAMD' /proc/cpuinfo; then - UCODE="amd-ucode" - elif grep -q 'GenuineIntel' /proc/cpuinfo; then - UCODE="intel-ucode" - fi - - if grep -qi 'apple' /sys/class/dmi/id/sys_vendor; then - modprobe -r -q efivars - else - modprobe -q efivarfs - fi - - if [[ -d $efidir ]]; then - SYS="UEFI" - grep -q $efidir/efivars <<< "$(mount)" || mount -t efivarfs efivarfs $efidir/efivars - else - SYS="BIOS" - fi - - BT="$DIST Installer - $SYS - v$VER" -} - -load_bcm() -{ - infobox "Broadcom Wireless Setup" "\nLoading broadcom wifi kernel modules please wait...\n" 0 - rmmod wl >/dev/null 2>&1 - rmmod bcma >/dev/null 2>&1 - rmmod b43 >/dev/null 2>&1 - rmmod ssb >/dev/null 2>&1 - modprobe wl >/dev/null 2>&1 - depmod -a >/dev/null 2>&1 - BROADCOM_WL=true -} - -chk_connect() -{ - if [[ $CHECKED_NET == true ]]; then - infobox "Network Connect" "\nVerifying network connection\n" 1 - else - infobox "Network Connect" "\nChecking connection to https://www.archlinux.org\n" 1 - CHECKED_NET=true - fi - curl -sI --connect-timeout 5 'https://www.archlinux.org/' | sed '1q' | grep -q '200' -} - -net_connect() -{ - if ! chk_connect; then - if [[ $(systemctl is-active NetworkManager) == "active" ]] && hash nmtui >/dev/null 2>&1; then - tput civis - printf "\e]P1191919" - printf "\e]P4191919" - nmtui-connect - printf "\e]P1D15355" - printf "\e]P4255a9b" - chk_connect || return 1 - else - return 1 - fi - fi - return 0 -} - -system_checks() -{ - if [[ $(whoami) != "root" ]]; then - infobox "Not Root" "\nThis installer must be run as root or using sudo.\n\nExiting..\n" - die 1 - elif ! grep -qw 'lm' /proc/cpuinfo; then - infobox "Not x86_64" "\nThis installer only supports x86_64 architectures.\n\nExiting..\n" - die 1 - fi - - grep -q 'BCM4352' <<< "$(lspci -vnn -d 14e4:)" && load_bcm - - if ! net_connect; then - infobox "Not Connected" "\nThis installer requires an active internet connection.\n\nExiting..\n" - die 1 - fi -} - -prechecks() -{ - if [[ $1 -ge 0 ]] && ! [[ $(lsblk -lno MOUNTPOINT) =~ $MNT ]]; then - infobox "Not Mounted" "\nPartition(s) must be mounted first.\n"; SEL=4; return 1 - elif [[ $1 -ge 1 && ($NEWUSER == "" || $USER_PASS == "") ]]; then - infobox "No User" "\nA user must be created first.\n"; SEL=5; return 1 - elif [[ $1 -ge 2 && $CONFIG_DONE != true ]]; then - infobox "Not Configured" "\nSystem configuration must be done first.\n"; SEL=6; return 1 - fi - - return 0 -} - -errshow() -{ - last_exit_code=$? - (( last_exit_code == 0 )) && return 0 - local err="$(sed 's/[^[:print:]]//g; s/\[[0-9\;:]*\?m//g; s/==> //g; s/] ERROR:/]\nERROR:/g' "$ERR")" - - if [[ $err ]]; then - msgbox "$_ErrTitle" "\nThe command exited abnormally: $1\n\nWith the following message: $err" - else - msgbox "$_ErrTitle" "\nThe command exited abnormally: $1\n\nWith the no error message.\n" - fi - - if [[ $1 == 1 ]]; then - [[ -e $DBG && $TERM == 'linux' ]] && less $DBG - die 1 - fi - - return 1 -} - -debug() -{ - set -x - exec 3>| $DBG - BASH_XTRACEFD=3 - DEBUG=true -} - -umount_dir() -{ - swapoff -a - [[ -d $1 ]] && umount -R $1 >/dev/null 2>&1 - return 0 -} - -msgbox() -{ - tput civis - dialog --cr-wrap --backtitle "$BT" --title " $1 " --msgbox "$2\n" 0 0 -} - -menubox() -{ - local title="$1" - local body="$2" - shift 2 - local response - if ! response="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $title " --menu "$body" 0 0 0 "$@")"; then - return 1 - fi - printf "%s" "$response" -} - -checkbox() -{ - local title="$1" - local body="$2" - shift 2 - local response - if ! response="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $title " --checklist "$body" 0 0 0 "$@")"; then - return 1 - fi - printf "%s" "$response" -} - -getinput() -{ - local answer - if [[ $# -eq 4 && $4 == 'nolimit' ]]; then - answer="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $1 " --inputbox "$2" 0 0 "$3")" - else - answer="$(dialog --cr-wrap --max-input 63 --stdout --backtitle "$BT" --title " $1 " --inputbox "$2" 0 0 "$3")" - fi - - local e=$? - [[ $e -ne 0 || $answer == "" ]] && return 1 - printf "%s" "$answer" -} - -infobox() -{ - local sec="$3" - tput civis - dialog --cr-wrap --backtitle "$BT" --title " $1 " --infobox "$2\n" 0 0 - sleep ${sec:-2} -} - -yesno() -{ - tput civis - if [[ $# -eq 5 && $5 == "no" ]]; then - dialog --cr-wrap --backtitle "$BT" --defaultno --title " $1 " --yes-label "$3" --no-label "$4" --yesno "$2\n" 0 0 - elif [[ $# -eq 4 ]]; then - dialog --cr-wrap --backtitle "$BT" --title " $1 " --yes-label "$3" --no-label "$4" --yesno "$2\n" 0 0 - else - dialog --cr-wrap --backtitle "$BT" --title " $1 " --yesno "$2\n" 0 0 - fi -} - -############################################################################### -# entry point - -trap sigint INT - -for arg in "$@"; do - [[ $arg =~ (--debug|-d) ]] && debug -done - -if ! . /usr/share/archlabs/installer/lang/english.trans 2>/dev/null; then - printf "Failed to source dialog text file\n" - die 1 -fi - -system_checks -system_identify -system_devices -msgbox "$_WelTitle $DIST Installer" "$_WelBody" -select_keymap || { clear; die 0; } - -while true; do - main -done diff --git a/src/packages.txt b/src/packages.txt deleted file mode 100644 index e19469f..0000000 --- a/src/packages.txt +++ /dev/null @@ -1,59 +0,0 @@ -arch-install-scripts -b43-firmware -b43-fwcutter -broadcom-wl -clonezilla -dhclient -dhcpcd -efibootmgr -ethtool -exfat-utils -f2fs-tools -gptfdisk -grub -vim -hdparm -ipw2100-fw -ipw2200-fw -nfs-utils -nilfs-utils -ntfs-3g -pacman-contrib -parted -refind-efi -rsync -sdparm -smartmontools -wget -wireless_tools -wpa_actiond -xl2tpd -dialog -parted -os-prober -wipe -alsa-firmware -alsa-lib -alsa-plugins -pulseaudio -pulseaudio-alsa -networkmanager -wireless-regdb -wpa_supplicant -gvfs -lm_sensors -lsb-release -p7zip -pamixer -reflector -scrot -unrar -htop -ranger -w3m -terminus-font -ttf-dejavu -archlabs-common -archlabs-keyring -archlabs-scripts -archlabs-installer