From e5fd0530725139d7dfbdd719c09dbd6a5b7c9a1f Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 16 Sep 2019 21:36:06 +0200 Subject: First test with ignored second stage. --- archinstall.sh | 125 +++------------------------------------------------------ 1 file changed, 5 insertions(+), 120 deletions(-) (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index ba074c2..5832447 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -208,124 +208,9 @@ sleep $DELAY echo "" -# Deploy second Stage Script to new root +# Install git in new 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 - -rm /mnt/root/secondstage.sh -umount $root_partition_path -echo "Removed second stage script and unmounted root partition - OK" -sleep $DELAY -echo "" - - -# Final Messages - -cat << EOF -################################################################# -# # -# The default login is user root with password 'root'. # -# You can now power off your machine with 'poweroff', # -# remove the installation media and boot your new # -# Arch Linux machine! # -# # -################################################################# - -EOF +echo "pacman --noconfirm -Syu git" | arch-chroot /mnt +echo "cd /opt && git clone https://github.com/xengineering/archinstall" | arch-chroot /mnt +echo "cd /opt/archinstall && git checkout feature_01" | arch-chroot /mnt # JUST FOR DEBUGGING!!! +echo "bash /opt/archinstall/bin/test.sh" | arch-chroot /mnt -- cgit v1.2.3-70-g09d2 From 4342a825d5757f913103bdb77026807b47aa0fe5 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Sep 2019 07:38:42 +0200 Subject: Added /bin scripts. - RAW_BASE_URL and BRANCH setting added --- archinstall.sh | 2 ++ bin/install_bootloader.sh | 34 +++++++++++++++++++++++++++++ bin/localization.sh | 49 +++++++++++++++++++++++++++++++++++++++++ bin/network_configuration.sh | 33 ++++++++++++++++++++++++++++ bin/second_stage.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++ bin/test.sh | 2 -- 6 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 bin/install_bootloader.sh create mode 100644 bin/localization.sh create mode 100644 bin/network_configuration.sh create mode 100644 bin/second_stage.sh delete mode 100644 bin/test.sh (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index 5832447..80eb5b7 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -31,6 +31,8 @@ # Settings for the Script: DELAY=0.5 +BRANCH="feature_01" +RAW_BASE_URL="https://raw.githubusercontent.com/xengineering/archinstall/" # Greetings and settings diff --git a/bin/install_bootloader.sh b/bin/install_bootloader.sh new file mode 100644 index 0000000..9f688d6 --- /dev/null +++ b/bin/install_bootloader.sh @@ -0,0 +1,34 @@ +#!/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 . + + +# Install Grub + +pacman --noconfirm -Syu grub efibootmgr +mount $1 /mnt # $1 = boot_partition_path +grub-install --target=x86_64-efi --efi-directory=/mnt --bootloader-id=GRUB --removable +grub-mkconfig -o /boot/grub/grub.cfg +umount $1 +echo "Grub bootloader installed - OK" +echo "" +sleep 1 + +echo "Leaving chroot environment - OK" +echo "" +sleep 1 diff --git a/bin/localization.sh b/bin/localization.sh new file mode 100644 index 0000000..bbde410 --- /dev/null +++ b/bin/localization.sh @@ -0,0 +1,49 @@ +#!/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 . + + +# 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 diff --git a/bin/network_configuration.sh b/bin/network_configuration.sh new file mode 100644 index 0000000..24514ba --- /dev/null +++ b/bin/network_configuration.sh @@ -0,0 +1,33 @@ +#!/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 . + + +# Network Configuration + +touch /etc/hostname +echo $1 > /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 diff --git a/bin/second_stage.sh b/bin/second_stage.sh new file mode 100644 index 0000000..91f5ba8 --- /dev/null +++ b/bin/second_stage.sh @@ -0,0 +1,52 @@ +#!/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 . + + +# Second Stage of archinstall + + +hostname=$1 +boot_partition_path=$2 + + +# Localization + +bash /opt/archinstall.git/bin/localization.sh + + +# Network Configuration +bash /opt/archinstall.git/bin/network_configuration.sh $hostname + + +# Initramfs + +# implement if needed ... + + +# Set default Password + +echo "root:root" | chpasswd +echo "Default password for user root set - OK" +echo "" +sleep 1 + + +# Bootloader Installation + +bash /opt/archinstall.git/bin/install_bootloader.sh $boot_partition_path diff --git a/bin/test.sh b/bin/test.sh deleted file mode 100644 index 88cad89..0000000 --- a/bin/test.sh +++ /dev/null @@ -1,2 +0,0 @@ - -echo "This is working!" -- cgit v1.2.3-70-g09d2 From 7a9574d9b260ef16917aa2bc6930a4eac0106633 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Sep 2019 07:49:56 +0200 Subject: First version with git clone method. --- archinstall.sh | 33 ++++++++++++++++++++++++++++----- bin/second_stage.sh | 2 ++ 2 files changed, 30 insertions(+), 5 deletions(-) (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index 80eb5b7..5f8b9d6 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -210,9 +210,32 @@ sleep $DELAY echo "" -# Install git in new environment and clone archinstall repository +# Install git in live environment and clone archinstall repository + +pacman --noconfirm -Syu git +cd /mnt/opt && git clone https://github.com/xengineering/archinstall +cd /root +mv /mnt/opt/archinstall /mnt/opt/archinstall.git +cd /mnt/opt/archinstall.git && git checkout $BRANCH +cd /root +echo "bash /opt/archinstall/bin/second_stage.sh $hostname ${$disk_path}1" | arch-chroot /mnt + +cd /root && umount $root_partition_path +echo "Removed second stage script and unmounted root partition - OK" +sleep $DELAY +echo "" + -echo "pacman --noconfirm -Syu git" | arch-chroot /mnt -echo "cd /opt && git clone https://github.com/xengineering/archinstall" | arch-chroot /mnt -echo "cd /opt/archinstall && git checkout feature_01" | arch-chroot /mnt # JUST FOR DEBUGGING!!! -echo "bash /opt/archinstall/bin/test.sh" | arch-chroot /mnt +# Final Messages + +cat << EOF +################################################################# +# # +# The default login is user root with password 'root'. # +# You can now power off your machine with 'poweroff', # +# remove the installation media and boot your new # +# Arch Linux machine! # +# # +################################################################# + +EOF diff --git a/bin/second_stage.sh b/bin/second_stage.sh index 91f5ba8..5099e20 100644 --- a/bin/second_stage.sh +++ b/bin/second_stage.sh @@ -23,6 +23,8 @@ hostname=$1 boot_partition_path=$2 +echo "hostname: $hostname" +echo "boot_partition_path: $boot_partition_path" # Localization -- cgit v1.2.3-70-g09d2 From 055091b69d6eb254ca5bfbad437b25455542caa9 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Sep 2019 08:00:26 +0200 Subject: Improved performance. --- archinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index 5f8b9d6..556b374 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -212,7 +212,7 @@ echo "" # Install git in live environment and clone archinstall repository -pacman --noconfirm -Syu git +pacman --noconfirm -S git cd /mnt/opt && git clone https://github.com/xengineering/archinstall cd /root mv /mnt/opt/archinstall /mnt/opt/archinstall.git -- cgit v1.2.3-70-g09d2 From b1d9642c9b5a39a09f2caab00c3b0c9c3b234e26 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Sep 2019 08:06:32 +0200 Subject: Added bugfix for installation of git in live environment. --- archinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index 556b374..60ce909 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -212,7 +212,7 @@ echo "" # Install git in live environment and clone archinstall repository -pacman --noconfirm -S git +pacman --noconfirm -Sy git cd /mnt/opt && git clone https://github.com/xengineering/archinstall cd /root mv /mnt/opt/archinstall /mnt/opt/archinstall.git -- cgit v1.2.3-70-g09d2 From 7c07daaa9b5607b8df53dd33c76facee89a03b4b Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Sep 2019 11:26:40 +0200 Subject: Bugfix in substitution in archinstall.sh. --- archinstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index 60ce909..c888739 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -218,10 +218,10 @@ cd /root mv /mnt/opt/archinstall /mnt/opt/archinstall.git cd /mnt/opt/archinstall.git && git checkout $BRANCH cd /root -echo "bash /opt/archinstall/bin/second_stage.sh $hostname ${$disk_path}1" | arch-chroot /mnt +echo "bash /opt/archinstall/bin/second_stage.sh $hostname ${disk_path}1" | arch-chroot /mnt cd /root && umount $root_partition_path -echo "Removed second stage script and unmounted root partition - OK" +echo "Unmounted root partition - OK" sleep $DELAY echo "" -- cgit v1.2.3-70-g09d2 From 5f494fb2e13fcc5b7750c400778bde374e12850a Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Sep 2019 11:43:44 +0200 Subject: Bugfix for path in archinstall.sh. --- archinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index c888739..fce57e6 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -218,7 +218,7 @@ cd /root mv /mnt/opt/archinstall /mnt/opt/archinstall.git cd /mnt/opt/archinstall.git && git checkout $BRANCH cd /root -echo "bash /opt/archinstall/bin/second_stage.sh $hostname ${disk_path}1" | arch-chroot /mnt +echo "bash /opt/archinstall.git/bin/second_stage.sh $hostname ${disk_path}1" | arch-chroot /mnt cd /root && umount $root_partition_path echo "Unmounted root partition - OK" -- cgit v1.2.3-70-g09d2 From 8fbfa6e8116b46ce754f3c3fc455eccc72a976e9 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Sep 2019 13:20:18 +0200 Subject: Preparation for devel merge done. --- FEATURE_01 | 3 - archinstall.sh | 5 +- archinstall.sh.orig | 331 ---------------------------------------------------- 3 files changed, 3 insertions(+), 336 deletions(-) delete mode 100644 FEATURE_01 delete mode 100644 archinstall.sh.orig (limited to 'archinstall.sh') diff --git a/FEATURE_01 b/FEATURE_01 deleted file mode 100644 index afe333c..0000000 --- a/FEATURE_01 +++ /dev/null @@ -1,3 +0,0 @@ - -This feature branch is for enabling first stage to install git in the chroot -environment and load all additional stages with a git clone. diff --git a/archinstall.sh b/archinstall.sh index fce57e6..85a3005 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -31,7 +31,8 @@ # Settings for the Script: DELAY=0.5 -BRANCH="feature_01" +BRANCH="devel" +BASE_URL="https://github.com/xengineering/archinstall" RAW_BASE_URL="https://raw.githubusercontent.com/xengineering/archinstall/" @@ -213,7 +214,7 @@ echo "" # Install git in live environment and clone archinstall repository pacman --noconfirm -Sy git -cd /mnt/opt && git clone https://github.com/xengineering/archinstall +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 diff --git a/archinstall.sh.orig b/archinstall.sh.orig deleted file mode 100644 index ba074c2..0000000 --- a/archinstall.sh.orig +++ /dev/null @@ -1,331 +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 . - - -################################################################# -# # -# __ _ _ __ ___| |__ (_)_ __ ___| |_ __ _| | | ___| |__ # -# / _` | '__/ __| '_ \| | '_ \/ __| __/ _` | | | / __| '_ \ # -# | (_| | | | (__| | | | | | | \__ \ || (_| | | |_\__ \ | | | # -# \__,_|_| \___|_| |_|_|_| |_|___/\__\__,_|_|_(_)___/_| |_| # -# # -################################################################# - - -# Settings for the Script: - -DELAY=0.5 - - -# Greetings and settings - -cat << EOF - -################################################################# -# # -# Arch Linux Installation Script # -# # -# archinstall Copyright (C) 2019 xengineering # -# This program comes with ABSOLUTELY NO WARRANTY. # -# This is free software, and you are welcome to redistribute it # -# under certain conditions. See # -# for details. # -# # -################################################################# - -EOF - - -echo "Here is a list of available hard disks on your computer:" -echo "" -lsblk -o NAME,SIZE,TYPE | grep -v part -echo "" -echo "Please type in the 'NAME' of the hard disk on which you want to" -echo "install Arch Linux:" -read disk -disk_path="/dev/$disk" -echo "" - - -echo "Please type in the hostname of your new machine:" -read hostname -echo "" - - -locales[1]="German / Germany" -cat << EOF -Please select one of the available localizations: - -[1] ${locales[1]} -EOF -read locale_id -echo "" - - -cat << EOF -################################################################# - - Summary - - Hard disk: - $disk - Hostname: - $hostname - Localization: - ${locales[$locale_id]} - -################################################################# - -EOF - -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 "Starting installation process - OK" - echo "" -else - echo "" - echo "Abort of installation process!" - exit -fi - - -# Check if booted with UEFI - -if [ -d "/sys/firmware/efi/efivars" ]; then - echo "Booted with UEFI - OK" - echo "" - sleep $DELAY -else - echo "Not booted with UEFI. Please enable it in your mainboard settings. - FAILED" - exit -fi - - -# Check internet connection - -TESTSERVER="8.8.8.8" # hostnames will not work properly - -if ping -w 1 -c 1 $TESTSERVER > /dev/null; then - echo "Internet connection is ready - OK" - echo "" - sleep $DELAY -else - echo "Could not reach testserver '$TESTSERVER' - FAILED" - exit -fi - - -# Update the system clock - -timedatectl set-ntp true -if [ $? -eq 0 ]; then - echo "Updated system clock - OK" - echo "" - sleep $DELAY -else - echo "Could not update system clock - FAILED" - exit -fi - - -# Partitioning - -wipefs -a $disk_path > /dev/null # make sure that fdisk does not ask for - # removing signatures which breaks the script -fdisk $disk_path > /dev/null 2> /dev/null << EOF -g -n -1 - -+512M -n -2 - - -p -w -EOF -boot_partition_path="${disk_path}1" -root_partition_path="${disk_path}2" -echo "Partitioning finished - OK" -sleep $DELAY -echo "" - - -# Create Filesystems - -mkfs.fat -F32 $boot_partition_path > /dev/null 2> /dev/null -mkfs.ext4 $root_partition_path > /dev/null 2> /dev/null -fatlabel $boot_partition_path "BOOT" > /dev/null -e2label $root_partition_path "ROOT" > /dev/null -echo "Created filesystems - OK" -sleep $DELAY -echo "" - - -# Mount Root Filesystem - -mount $root_partition_path /mnt -echo "Mounted root partition - OK" -sleep $DELAY -echo "" - - -# Install Base Packages - -echo "Going to install base packages ..." -sleep $DELAY -echo "" -pacstrap /mnt base -echo "" -echo "Installed base packages - OK" -sleep $DELAY -echo "" - - -# Generate /etc/fstab file - -genfstab -U /mnt >> /mnt/etc/fstab -echo "Generated /etc/fstab - OK" -sleep $DELAY -echo "" - - -# Deploy second Stage Script to new root - -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 - -rm /mnt/root/secondstage.sh -umount $root_partition_path -echo "Removed second stage script and unmounted root partition - OK" -sleep $DELAY -echo "" - - -# Final Messages - -cat << EOF -################################################################# -# # -# The default login is user root with password 'root'. # -# You can now power off your machine with 'poweroff', # -# remove the installation media and boot your new # -# Arch Linux machine! # -# # -################################################################# - -EOF -- cgit v1.2.3-70-g09d2