From 1960fd07b1b65da2afe77e9c317210d38aaa0dce Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 12 Jan 2020 11:35:26 +0100 Subject: Removed UEFI advices from README.md. --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1968fb7..9a3ed39 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Note: There are many Arch Install scripts out there but I wanted to create my ow ## Usage 1. Download the Arch Linux .iso file (maybe [here](http://ftp.halifax.rwth-aachen.de/archlinux/iso/latest/)) and verify it. -2. Write the .iso to an USB stick (maybe with this [tool](https://www.balena.io/etcher/)) and boot the machine from this USB stick in UEFI mode. +2. Write the .iso to an USB stick (maybe with this [tool](https://www.balena.io/etcher/)) and boot the machine from this USB stick. 3. Download the script with 'curl -L archinstall.xengineering.eu > archinstall.sh'. 4. Run the script with 'bash archinstall.sh' and follow the instructions. @@ -23,14 +23,12 @@ Execute 'loadkeys de-latin1' after booting to live environment, if you want to s ### Usage with VirtualBox 1. Create a VirtualBox virtual machine (VM) for 64-bit Arch Linux with the default or customized settings. -2. Enable Extensible Firmware Interface (EFI) in the settings of this VM. -3. Start the VM and provide the .iso file if you are asked to. -4. You booted the Arch Linux live environment in VirtualBox. Proceed with the normal use of archinstall. +2. Start the VM and provide the .iso file if you are asked to. +3. You booted the Arch Linux live environment in VirtualBox. Proceed with the normal use of archinstall. ## Restrictions -- Just UEFI systems - Just german localization of the installed system - Just installation with cable network connection (no WiFi) -- cgit v1.2.3-70-g09d2 From 2f6a6e43c47a345ca72028177cea92e7307cebff Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 12 Jan 2020 17:40:15 +0100 Subject: First version of BIOS boot. --- README.md | 2 +- stages/first_stage.sh | 13 +++++++------ stages/second_stage.sh | 2 +- util/create_filesystems.sh | 22 ++++++++++++++++------ util/install_bootloader.sh | 23 +++++++++++++++++------ util/mount_filesystems.sh | 7 +++++-- util/partition_disk.sh | 28 ++++++++++++++++++++++++---- util/unmount_filesystems.sh | 4 +++- 8 files changed, 74 insertions(+), 27 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9a3ed39..a49cd5c 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ Execute 'loadkeys de-latin1' after booting to live environment, if you want to s (Highest priority first) - [ ] Support BIOS systems -- [ ] Use LVM - [ ] Create swap partition - [ ] Enable suspension to disk - [ ] Optimize mirrorlist @@ -47,6 +46,7 @@ Execute 'loadkeys de-latin1' after booting to live environment, if you want to s - [ ] Provide recommended package lists - [ ] Set a beautiful theme - [ ] Support english localization +- [ ] Use LVM - [ ] Package for the AUR diff --git a/stages/first_stage.sh b/stages/first_stage.sh index 037d554..cdf661e 100644 --- a/stages/first_stage.sh +++ b/stages/first_stage.sh @@ -38,9 +38,6 @@ python -u $REPOSITORY_PATH/util/write_config.py $CONFIG_FILE_PATH export disk=$(python -u $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "disk") export disk_path=/dev/$disk -export efi_partition_path="${disk_path}1" -export boot_partition_path="${disk_path}2" -export main_partition_path="${disk_path}3" export hostname=$(python -u $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "hostname") export desktop=$(python -u $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "desktop") export admin_username=$(python -u $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "admin_username") @@ -52,17 +49,21 @@ bash confirm_installation.sh $disk if [ "$(bash check_bootmode.sh)" == "Booted with UEFI" ];then echo "Booted with UEFI - OK" export boot_mode="UEFI" + export efi_partition_path="${disk_path}1" + export boot_partition_path="${disk_path}2" + export main_partition_path="${disk_path}3" elif [ "$(bash check_bootmode.sh)" == "Booted with legacy boot / BIOS" ];then echo "Booted with BIOS - OK" export boot_mode="BIOS" + export efi_partition_path="/dev/null" + export boot_partition_path="/dev/null" + export main_partition_path="${disk_path}1" else echo "Unknown boot mode - FAILED" exit fi -exit - -bash partition_disk.sh $disk_path +bash partition_disk.sh $disk_path $boot_mode if [ $system_encryption == "yes" ];then bash format_crypto_partition.sh $main_partition_path $DEFAULT_PASSWORD diff --git a/stages/second_stage.sh b/stages/second_stage.sh index c2c0b92..30dc495 100644 --- a/stages/second_stage.sh +++ b/stages/second_stage.sh @@ -33,6 +33,6 @@ bash configure_initramfs.sh bash configure_users.sh $admin_username $DEFAULT_PASSWORD -bash install_bootloader.sh $efi_partition_path $system_encryption $main_partition_path +bash install_bootloader.sh $efi_partition_path $system_encryption $main_partition_path $boot_mode bash configure_desktop.sh diff --git a/util/create_filesystems.sh b/util/create_filesystems.sh index 972eefd..917363e 100644 --- a/util/create_filesystems.sh +++ b/util/create_filesystems.sh @@ -18,15 +18,25 @@ # along with this program. If not, see . -efi_partition_path=$1 # e.g. /dev/sda1 -boot_partition_path=$2 # e.g. /dev/sda2 +efi_partition_path=$1 # e.g. /dev/sda1 or /dev/null if not needed +boot_partition_path=$2 # e.g. /dev/sda2 or /dev/null if not needed 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" +if [ "$efi_partition_path" != "/dev/null" ]; then # if efi partition is needed + echo "EFI partition needed." + mkfs.fat -F32 $efi_partition_path + fatlabel $efi_partition_path "EFI" +else + echo "EFI partition not needed." +fi +if [ "$boot_partition_path" != "/dev/null" ]; then # if boot partition is needed + echo "BOOT partition needed." + mkfs.ext4 $boot_partition_path + e2label $boot_partition_path "BOOT" +else + echo "BOOT partition not needed." +fi mkfs.ext4 $root_partition_path e2label $root_partition_path "ROOT" diff --git a/util/install_bootloader.sh b/util/install_bootloader.sh index 3f63f64..78ca49b 100644 --- a/util/install_bootloader.sh +++ b/util/install_bootloader.sh @@ -21,11 +21,19 @@ 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 +boot_mode=$4 # "UEFI" or "BIOS" + + +if [ "$boot_mode" == "UEFI" ]; then + mount $efi_partition_path /mnt + grub-install --target=x86_64-efi --efi-directory=/mnt --bootloader-id=GRUB \ + --removable +elif [ "$boot_mode" == "BIOS" ]; then + grub-install --target=i386-pc $disk_path +else + echo "Unknown boot mode - FAILED" + exit +fi if [ $system_encryption == "yes" ];then @@ -41,6 +49,9 @@ if [ $system_encryption == "yes" ];then fi grub-mkconfig -o /boot/grub/grub.cfg -umount $efi_partition_path + +if [ "$boot_mode" == "UEFI" ];then + umount $efi_partition_path +fi echo "Installed bootloader - OK" diff --git a/util/mount_filesystems.sh b/util/mount_filesystems.sh index f24421b..75bbb14 100644 --- a/util/mount_filesystems.sh +++ b/util/mount_filesystems.sh @@ -23,7 +23,10 @@ root_partition_path=$2 mount $root_partition_path /mnt -mkdir /mnt/boot -mount $boot_partition_path /mnt/boot + +if [ "$boot_partition_path" != "/dev/null" ];then + mkdir /mnt/boot + mount $boot_partition_path /mnt/boot +fi echo "Mounted filesystems - OK" diff --git a/util/partition_disk.sh b/util/partition_disk.sh index fcad5b9..6164d1b 100644 --- a/util/partition_disk.sh +++ b/util/partition_disk.sh @@ -19,11 +19,13 @@ disk_path=$1 # e.g. /dev/sda +boot_mode=$2 # "UEFI" or "BIOS" -wipefs -a $disk_path # make sure that fdisk does not ask for removing - # signatures which breaks the script -fdisk $disk_path << EOF +if [ "$boot_mode" == "UEFI" ]; then + 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 @@ -41,4 +43,22 @@ p w EOF -echo "Partitioned disk - OK" + echo "Partitioned disk for UEFI/GPT- OK" +elif [ "$boot_mode" == "BIOS" ]; then + wipefs -a $disk_path # make sure that fdisk does not ask for removing + # signatures which breaks the script + fdisk $disk_path << EOF +o +n +p +1 + + +p +w +EOF + + echo "Partitioned disk for BIOS/MBR - OK" +else + +fi diff --git a/util/unmount_filesystems.sh b/util/unmount_filesystems.sh index 6ccce3b..0980e5a 100644 --- a/util/unmount_filesystems.sh +++ b/util/unmount_filesystems.sh @@ -23,7 +23,9 @@ root_partition_path=$2 cd /root -umount $boot_partition_path +if [ "$boot_partition_path" != "/dev/null" ];then + umount $boot_partition_path +fi umount $root_partition_path echo "Unmounted filesystems - OK" -- cgit v1.2.3-70-g09d2 From c4f5f01100c08e0c992be2a15f2760bfca41a285 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 18 Jan 2020 10:33:19 +0100 Subject: Changed priorities. --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a49cd5c..fb72912 100644 --- a/README.md +++ b/README.md @@ -38,16 +38,19 @@ Execute 'loadkeys de-latin1' after booting to live environment, if you want to s (Highest priority first) - [ ] Support BIOS systems -- [ ] Create swap partition -- [ ] Enable suspension to disk -- [ ] Optimize mirrorlist - [ ] Automatic abort in case of errors +- [ ] Optimize mirrorlist - [ ] Support installation with WiFi (instead of cable connection) - [ ] Provide recommended package lists - [ ] Set a beautiful theme - [ ] Support english localization +- [ ] Create swap partition +- [ ] Enable suspension to disk - [ ] Use LVM - [ ] Package for the AUR +- [ ] Provide a custom boot stick for archinstall +- [ ] Provide automated testing +- [ ] Provide automated system maintenance ## Done -- cgit v1.2.3-70-g09d2