diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/check_bootmode.sh | 26 | ||||
-rw-r--r-- | util/close_crypto_partition.sh | 23 | ||||
-rw-r--r-- | util/configure_desktop.sh | 36 | ||||
-rw-r--r-- | util/configure_initramfs.sh | 31 | ||||
-rw-r--r-- | util/configure_keyboard.sh | 27 | ||||
-rw-r--r-- | util/configure_locales.sh | 30 | ||||
-rw-r--r-- | util/configure_network.sh | 34 | ||||
-rw-r--r-- | util/configure_timezone.sh | 27 | ||||
-rw-r--r-- | util/configure_users.sh | 36 | ||||
-rw-r--r-- | util/confirm_installation.sh | 36 | ||||
-rw-r--r-- | util/copy_archinstall_config.sh | 26 | ||||
-rw-r--r-- | util/copy_archinstall_log.sh | 27 | ||||
-rw-r--r-- | util/create_filesystems.sh | 33 | ||||
-rw-r--r-- | util/format_crypto_partition.sh | 27 | ||||
-rw-r--r-- | util/install_archinstall.sh | 26 | ||||
-rw-r--r-- | util/install_bootloader.sh | 46 | ||||
-rw-r--r-- | util/install_packages.sh | 29 | ||||
-rw-r--r-- | util/mount_filesystems.sh | 29 | ||||
-rw-r--r-- | util/open_crypto_partition.sh | 27 | ||||
-rw-r--r-- | util/partition_disk.sh | 44 | ||||
-rw-r--r-- | util/print_final_message.sh | 37 | ||||
-rw-r--r-- | util/read_config_string.py | 40 | ||||
-rw-r--r-- | util/unmount_filesystems.sh | 29 | ||||
-rw-r--r-- | util/write_config.py | 105 | ||||
-rw-r--r-- | util/write_fstab.sh | 23 |
25 files changed, 0 insertions, 854 deletions
diff --git a/util/check_bootmode.sh b/util/check_bootmode.sh deleted file mode 100644 index 299856a..0000000 --- a/util/check_bootmode.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -if [ -d "/sys/firmware/efi/efivars" ]; then - echo "Booted with UEFI" -else - echo "Not booted with UEFI. Please enable it in your mainboard settings. - FAILED" - exit -fi diff --git a/util/close_crypto_partition.sh b/util/close_crypto_partition.sh deleted file mode 100644 index de96f6c..0000000 --- a/util/close_crypto_partition.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -cryptsetup close main - -echo "Closed crypto partition - OK" diff --git a/util/configure_desktop.sh b/util/configure_desktop.sh deleted file mode 100644 index c002e70..0000000 --- a/util/configure_desktop.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -systemctl enable lightdm - -cat > /etc/X11/xorg.conf.d/00-keyboard.conf << EOF -# Written by systemd-localed(8), read by systemd-localed and Xorg. It's -# probably wise not to edit this file manually. Use localectl(1) to -# instruct systemd-localed to update it. -Section "InputClass" - Identifier "system-keyboard" - MatchIsKeyboard "on" - Option "XkbLayout" "de" - Option "XkbModel" "pc105" - Option "XkbVariant" "nodeadkeys" -EndSection -EOF - -echo "Configured desktop - OK" diff --git a/util/configure_initramfs.sh b/util/configure_initramfs.sh deleted file mode 100644 index 3222a89..0000000 --- a/util/configure_initramfs.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -new_hooks_config_line="HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)" -echo "new_hooks_config_line: $new_hooks_config_line" -old_hooks_config_line=$(cat /etc/mkinitcpio.conf | grep "^HOOKS=") -echo "old_hooks_config_line: $old_hooks_config_line" - -sed -i "s|$old_hooks_config_line|$new_hooks_config_line|" /etc/mkinitcpio.conf - -mkinitcpio -P - - -echo "Configured initramfs - OK" diff --git a/util/configure_keyboard.sh b/util/configure_keyboard.sh deleted file mode 100644 index 9a1a1a3..0000000 --- a/util/configure_keyboard.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -keymap=$1 # e.g. "de-latin1" - - -touch /etc/vconsole.conf -echo "KEYMAP=$keymap" > /etc/vconsole.conf - -echo "Keyboard configuration done - OK" diff --git a/util/configure_locales.sh b/util/configure_locales.sh deleted file mode 100644 index 3488bb7..0000000 --- a/util/configure_locales.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen -echo "de_DE ISO-8859-1" >> /etc/locale.gen -echo "de_DE@euro ISO-8859-15" >> /etc/locale.gen - -locale-gen - -touch /etc/locale.conf -echo "LANG=de_DE.UTF-8" > /etc/locale.conf - -echo "Configured locales - OK" diff --git a/util/configure_network.sh b/util/configure_network.sh deleted file mode 100644 index cd2d37c..0000000 --- a/util/configure_network.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -hostname=$1 - - -touch /etc/hostname -echo $hostname > /etc/hostname - -touch /etc/hosts -echo "" >> /etc/hosts -echo "127.0.0.1 localhost" >> /etc/hosts -echo "::1 localhost" >> /etc/hosts - -systemctl enable NetworkManager - -echo "Configured network - OK" diff --git a/util/configure_timezone.sh b/util/configure_timezone.sh deleted file mode 100644 index fce6d99..0000000 --- a/util/configure_timezone.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -timezone=$1 # e.g. /usr/share/zoneinfo/Europe/Berlin - - -ln -sf $timezone /etc/localtime -hwclock --systohc - -echo "Configured timezone - OK" diff --git a/util/configure_users.sh b/util/configure_users.sh deleted file mode 100644 index 4c5f4ea..0000000 --- a/util/configure_users.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -admin_username=$1 -default_password=$2 - - -echo "root:${default_password}" | chpasswd - -useradd -m $admin_username # create user and according home directory -usermod -aG wheel $admin_username # add user to sudo-priviledged wheel group -echo "${admin_username}:${default_password}" | chpasswd - -sed -i '/%wheel ALL=(ALL) ALL/s/^# //g' /etc/sudoers # activate wheel group - # by uncommenting special - # line in sudoers file -passwd -l root # lock the root account - -echo "Configured users - OK" diff --git a/util/confirm_installation.sh b/util/confirm_installation.sh deleted file mode 100644 index 35112dd..0000000 --- a/util/confirm_installation.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -disk=$1 # e.g. sda - - -echo "All data on disk '$disk' will be finally lost!" -echo "Are you SURE that you want to install Arch Linux to '$disk'?!" -echo "Type 'Yes' for installation and 'No' for abort." -read answer -if [ $answer == "Yes" ]; then - echo "" - echo "Confirmed installation - OK" - echo "" -else - echo "" - echo "Abort of installation process!" - exit -fi diff --git a/util/copy_archinstall_config.sh b/util/copy_archinstall_config.sh deleted file mode 100644 index a56a222..0000000 --- a/util/copy_archinstall_config.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -config_file_path=$1 # e.g. "/var/log/archinstall.log" - - -cp $config_file_path /mnt$config_file_path - -echo "Copied archinstall configuration - OK" diff --git a/util/copy_archinstall_log.sh b/util/copy_archinstall_log.sh deleted file mode 100644 index 5f2a8b8..0000000 --- a/util/copy_archinstall_log.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -log_file_path=$1 # e.g. "/etc/archinstall/config.json" - - -mkdir /mnt$(dirname "$log_file_path") -cp $log_file_path /mnt$log_file_path - -echo "Copied archinstall log - OK" diff --git a/util/create_filesystems.sh b/util/create_filesystems.sh deleted file mode 100644 index 972eefd..0000000 --- a/util/create_filesystems.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -efi_partition_path=$1 # e.g. /dev/sda1 -boot_partition_path=$2 # e.g. /dev/sda2 -root_partition_path=$3 # e.g. /dev/sda3 or /dev/SystemVolumeGroup/root - - -mkfs.fat -F32 $efi_partition_path -fatlabel $efi_partition_path "EFI" -mkfs.ext4 $boot_partition_path -e2label $boot_partition_path "BOOT" -mkfs.ext4 $root_partition_path -e2label $root_partition_path "ROOT" - -echo "Created filesystems - OK" diff --git a/util/format_crypto_partition.sh b/util/format_crypto_partition.sh deleted file mode 100644 index 688e280..0000000 --- a/util/format_crypto_partition.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -main_partition_path=$1 -DEFAULT_PASSWORD=$2 - - -echo -n "$DEFAULT_PASSWORD" | cryptsetup luksFormat $main_partition_path - - -echo "Formatted crypto partition - OK" diff --git a/util/install_archinstall.sh b/util/install_archinstall.sh deleted file mode 100644 index 67aee15..0000000 --- a/util/install_archinstall.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -repository_path=$1 # e.g. "/opt/archinstall" - - -cp -r $repository_path /mnt$repository_path - -echo "Installed archinstall - OK" diff --git a/util/install_bootloader.sh b/util/install_bootloader.sh deleted file mode 100644 index 3f63f64..0000000 --- a/util/install_bootloader.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -efi_partition_path=$1 -system_encryption=$2 -main_partition_path=$3 - - -mount $efi_partition_path /mnt -grub-install --target=x86_64-efi --efi-directory=/mnt --bootloader-id=GRUB \ ---removable - -if [ $system_encryption == "yes" ];then - - cryptdevice_uuid=$(lsblk --fs | grep "$(basename $main_partition_path)" | awk '{print $3}') - echo "cryptdevice_uuid: $cryptdevice_uuid" - old_kernel_param_line=$(cat /etc/default/grub | grep "GRUB_CMDLINE_LINUX_DEFAULT") - echo "old_kernel_param_line: $old_kernel_param_line" - new_kernal_param_line="GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet cryptdevice=UUID=${cryptdevice_uuid}:main root=/dev/mapper/main\"" - echo "new_kernel_param_line: $new_kernal_param_line" - echo "Adding kernel parameters to /etc/default/grub" - sed -i "s|$old_kernel_param_line|$new_kernal_param_line|" /etc/default/grub - -fi - -grub-mkconfig -o /boot/grub/grub.cfg -umount $efi_partition_path - -echo "Installed bootloader - OK" diff --git a/util/install_packages.sh b/util/install_packages.sh deleted file mode 100644 index 6faeb2b..0000000 --- a/util/install_packages.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -desktop_wanted=$1 # e.g. "yes" - - -pacstrap /mnt base linux linux-firmware networkmanager nano sudo grub efibootmgr -if [ "$desktop_wanted" = "yes" ]; then - pacstrap /mnt xorg lightdm lightdm-gtk-greeter cinnamon gnome-terminal papirus-icon-theme gedit -fi - -echo "Installed packages - OK" diff --git a/util/mount_filesystems.sh b/util/mount_filesystems.sh deleted file mode 100644 index f24421b..0000000 --- a/util/mount_filesystems.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -boot_partition_path=$1 -root_partition_path=$2 - - -mount $root_partition_path /mnt -mkdir /mnt/boot -mount $boot_partition_path /mnt/boot - -echo "Mounted filesystems - OK" diff --git a/util/open_crypto_partition.sh b/util/open_crypto_partition.sh deleted file mode 100644 index 40e7a61..0000000 --- a/util/open_crypto_partition.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -main_partition_path=$1 -DEFAULT_PASSWORD=$2 - - -echo -n "$DEFAULT_PASSWORD" | cryptsetup open $main_partition_path main - - -echo "Opened crypto partition - OK" diff --git a/util/partition_disk.sh b/util/partition_disk.sh deleted file mode 100644 index fcad5b9..0000000 --- a/util/partition_disk.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -disk_path=$1 # e.g. /dev/sda - - -wipefs -a $disk_path # make sure that fdisk does not ask for removing - # signatures which breaks the script -fdisk $disk_path << EOF -g -n -1 - -+512M -n -2 - -+200M -n -3 - - -p -w -EOF - -echo "Partitioned disk - OK" diff --git a/util/print_final_message.sh b/util/print_final_message.sh deleted file mode 100644 index 46e99b9..0000000 --- a/util/print_final_message.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -default_password=$1 - - -cat << EOF -##################################################################### - - The default password for your user and root is '${default_password}'. - It is also the default password for drive encryption. - You can now power off your machine with 'poweroff', - remove the installation media and boot your new - Arch Linux machine! - -##################################################################### - -EOF - -echo "Printed final message - OK" diff --git a/util/read_config_string.py b/util/read_config_string.py deleted file mode 100644 index 86febd1..0000000 --- a/util/read_config_string.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -########################## -# get_config_string.py # -########################## - - -import sys -import json - - -config_file_path = sys.argv[1] -requested_detail = sys.argv[2] - - -with open(config_file_path) as f: - config_json = f.read() - -config = json.loads(config_json) - - -print(config[requested_detail]) diff --git a/util/unmount_filesystems.sh b/util/unmount_filesystems.sh deleted file mode 100644 index 6ccce3b..0000000 --- a/util/unmount_filesystems.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -boot_partition_path=$1 -root_partition_path=$2 - - -cd /root -umount $boot_partition_path -umount $root_partition_path - -echo "Unmounted filesystems - OK" diff --git a/util/write_config.py b/util/write_config.py deleted file mode 100644 index 2c694eb..0000000 --- a/util/write_config.py +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -import sys -import json -import subprocess - - -config_file_path = sys.argv[1] # e.g. "/etc/archinstall/config.json" - - -def print_separator(): - print() - print("#################################################################") - print() - - -config = {} - - -# Disk selection - -print_separator() -print("Please type in the 'NAME' of the hard disk on which you want to \ninstall Arch Linux:") -print() -subprocess.run("lsblk -o NAME,SIZE,TYPE | grep -v part", shell=True) -print() -config["disk"] = input(">>> ") - - -# Select hostname - -print_separator() -print("Please type in the hostname of your new machine:") -print() -config["hostname"] = input(">>> ") - - -# Desktop or no desktop - -print_separator() -print("Do you want to install a desktop? [Y/n]:") -print() -answer = input(">>> ") -if answer in ["", "Y", "y", "Yes", "yes"]: - config["desktop"] = "yes" -else: - config["desktop"] = "no" - - -# Admin account - -print_separator() -print("Please select your username (like 'paul' or 'alice'):") -print() -config["admin_username"] = input(">>> ") - - -# System encryption - -print_separator() -print("System encryption protects all your data if your device is stolen.") -print("A second password will be required at startup to decrypt the system.") -print("Do you want to encrypt your system? [Y/n]") -print() -answer = input(">>> ") -if answer in ["", "Y", "y", "Yes", "yes"]: - config["system_encryption"] = "yes" -else: - config["system_encryption"] = "no" - - -# Write config to json file - -config_json = json.dumps(config, indent=4) -with open(config_file_path, 'w') as f: - f.write(config_json) - - -# Output json config for logging purpose - -print_separator() -print("Config for this installation:") -print() -print(config_json) -print_separator() - -print("Wrote config - OK") diff --git a/util/write_fstab.sh b/util/write_fstab.sh deleted file mode 100644 index 61b1128..0000000 --- a/util/write_fstab.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - - -# archinstall - A minimal Installation Script for Arch Linux -# Copyright (C) 2019 xengineering - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - - -genfstab -U /mnt >> /mnt/etc/fstab - -echo "Wrote /etc/fstab - OK" |