diff options
-rw-r--r-- | archinstall.sh | 115 | ||||
-rw-r--r-- | bin/install_bootloader.sh | 19 | ||||
-rw-r--r-- | bin/localization.sh | 19 | ||||
-rw-r--r-- | bin/network_configuration.sh | 19 | ||||
-rw-r--r-- | bin/second_stage.sh | 20 |
5 files changed, 90 insertions, 102 deletions
diff --git a/archinstall.sh b/archinstall.sh index ba074c2..85a3005 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -31,6 +31,9 @@ # Settings for the Script: DELAY=0.5 +BRANCH="devel" +BASE_URL="https://github.com/xengineering/archinstall" +RAW_BASE_URL="https://raw.githubusercontent.com/xengineering/archinstall/" # Greetings and settings @@ -208,110 +211,18 @@ sleep $DELAY echo "" -# Deploy second Stage Script to new root +# Install git in live environment and clone archinstall repository -echo "Going to deploy second stage script for chroot environment ..." -sleep $DELAY -echo "" - -cat > /mnt/root/secondstage.sh << EOL - -# Set timezone - -ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime -hwclock --systohc -echo "Timezone set - OK" -echo "" -sleep 1 - - -# Localization - Greetings from Germany - -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 - -touch /etc/vconsole.conf -echo "KEYMAP=de-latin1" > /etc/vconsole.conf - -# this just works after installing a desktop environment (e.g. xorg and xfce4 package) -# localectl --no-convert set-x11-keymap de pc105 nodeadkeys # desktop keyboard layout - -echo "German localization done - OK" -echo "" -sleep 1 - - -# Network Configuration - -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 - -echo "Network configuration done - OK" -echo "" -sleep 1 - - -# Initramfs - -# implement if needed ... - - -# Set default Password - -echo "root:root" | chpasswd -echo "Default password for user root set - OK" -echo "" -sleep 1 - - -# Install Grub - -pacman --noconfirm -Syu grub efibootmgr -mount $boot_partition_path /mnt -grub-install --target=x86_64-efi --efi-directory=/mnt --bootloader-id=GRUB --removable -grub-mkconfig -o /boot/grub/grub.cfg -umount $boot_partition_path -echo "Grub bootloader installed - OK" -echo "" -sleep 1 - -echo "Leaving chroot environment - OK" -echo "" -sleep 1 - -EOL - -chmod 744 /mnt/root/secondstage.sh - -echo "Second stage script deployed - OK" -echo "" -sleep 1 - - -# Chroot to new System and launch second Stage - -echo "Running second stage in chroot ..." -sleep $DELAY -echo "" -echo "/root/secondstage.sh" | arch-chroot /mnt - - -# Removing second Stage Script and umount the Root Partition +pacman --noconfirm -Sy git +cd /mnt/opt && git clone $BASE_URL +cd /root +mv /mnt/opt/archinstall /mnt/opt/archinstall.git +cd /mnt/opt/archinstall.git && git checkout $BRANCH +cd /root +echo "bash /opt/archinstall.git/bin/second_stage.sh $hostname ${disk_path}1" | arch-chroot /mnt -rm /mnt/root/secondstage.sh -umount $root_partition_path -echo "Removed second stage script and unmounted root partition - OK" +cd /root && umount $root_partition_path +echo "Unmounted root partition - OK" sleep $DELAY echo "" diff --git a/bin/install_bootloader.sh b/bin/install_bootloader.sh index 8c035ee..ccb2173 100644 --- a/bin/install_bootloader.sh +++ b/bin/install_bootloader.sh @@ -1,3 +1,21 @@ +#!/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/>. # Install Grub @@ -14,3 +32,4 @@ sleep 1 echo "Leaving chroot environment - OK" echo "" sleep 1 + diff --git a/bin/localization.sh b/bin/localization.sh index cb34c31..52ab0d0 100644 --- a/bin/localization.sh +++ b/bin/localization.sh @@ -1,3 +1,21 @@ +#!/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/>. # Set timezone @@ -29,3 +47,4 @@ echo "KEYMAP=de-latin1" > /etc/vconsole.conf echo "German localization done - OK" echo "" sleep 1 + diff --git a/bin/network_configuration.sh b/bin/network_configuration.sh index 251f9a0..23368b2 100644 --- a/bin/network_configuration.sh +++ b/bin/network_configuration.sh @@ -1,3 +1,21 @@ +#!/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/>. # Network Configuration @@ -13,3 +31,4 @@ echo "::1 localhost" >> /etc/hosts echo "Network configuration done - OK" echo "" sleep 1 + diff --git a/bin/second_stage.sh b/bin/second_stage.sh index 59203cd..5099e20 100644 --- a/bin/second_stage.sh +++ b/bin/second_stage.sh @@ -1,3 +1,21 @@ +#!/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/>. # Second Stage of archinstall @@ -5,6 +23,8 @@ hostname=$1 boot_partition_path=$2 +echo "hostname: $hostname" +echo "boot_partition_path: $boot_partition_path" # Localization |