Compare commits

...

10 Commits

Author SHA1 Message Date
seajee
ae03b5dbec Fix time zone configuration loop 2024-09-02 05:40:19 +02:00
seajee
a43df7e768 Make swapfile optional 2024-09-02 05:27:30 +02:00
seajee
eb257125f4 Fix input overwrite on time zone configuration 2024-09-02 05:18:30 +02:00
seajee
d2623ec38d Fix default time zone configuration 2024-09-02 05:01:28 +02:00
seajee
3f5b6ffc0f Removed time zone list feature 2024-09-02 04:07:08 +02:00
seajee
de7d994851 Add more information about the end result 2024-08-12 10:49:48 +02:00
seajee
f0a2b7778d Don't change default timezone on user input part 2 2024-08-09 03:05:43 +02:00
seajee
f0c5e5dc2d Swapoff before unmounting the partitions 2024-08-09 02:55:03 +02:00
seajee
331e67879e Don't change default time zone on user input 2024-08-09 02:53:27 +02:00
seajee
a785ba7d5d Major fixes
- Preinstall on the new system the "less" package
- Create the swap file after mounting the root partition
2024-08-09 02:44:41 +02:00
3 changed files with 32 additions and 18 deletions

View File

@@ -18,3 +18,16 @@ $ ./install.sh
The suggested post-install configuration steps are:
- Configure the keymap for ttys via /etc/vconsole.conf
## End result
The installation scripts follow every step of the
[Arch Linux installation guide](https://wiki.archlinux.org/title/Installation_guide)
with no extra steps or modifications.
After the setup finishes you'll have a very basic Arch Linux installation with
just a root user and the only the necessary base packages installed.
Note:
- The installed bootloader is GRUB.
- The network configuration is done with NetworkManager.

View File

@@ -8,25 +8,21 @@ password=""
echoerr() { cat <<< "$@" 1>&2; }
# Set the time zone
while
echo "[INFO] Time zone configuration. Type \"list\" to list time zones"
while true; do
echo "[INFO] Time zone configuration."
read -p "Enter time zone (${timezone}): " input
if [[ "$input" == "list" ]]; then
awk '/^Z/ { print $2 }; /^L/ { print $3 }' /usr/share/zoneinfo/tzdata.zi | sort | less
continue
if [[ -z "$input" ]]; then
break
fi
if [[ -n "$input" ]]; then
if [[ -f "/usr/share/zoneinfo/${input}" ]]; then
timezone="$input"
fi
if [[ ! -f "/usr/share/zoneinfo/${timezone}" ]]; then
break
else
echoerr "[ERROR] The selected time zone does not exist"
fi
[[ ! -f "/usr/share/zoneinfo/${timezone}" ]]
do true; done
done
echo "[INFO] Setting ${timezone} as the time zone"
ln -sf "/usr/share/zoneinfo/${timezone}" /etc/localtime

View File

@@ -83,10 +83,6 @@ echo w # Write changes
# TODO: Check if fdisk terminated succesfully
# Swap file
echo "[INFO] Creating the swap file"
mkswap -U clear --size 4G --file /mnt/swapfile &>/dev/null
# Format the partitions
echo "[INFO] Formatting the partitions"
mkfs.fat -F 32 "${disk}1" &>/dev/null
@@ -98,7 +94,16 @@ mkfs.ext4 "${disk}2" &>/dev/null
echo "[INFO] Mounting the file systems"
mount "${disk}2" /mnt
mount --mkdir "${disk}1" /mnt/boot
# Swap file
echo "[INFO] Swapfile configuration"
read -p "Enable swap? [Y/n] " input
if [[ "$input" != [Nn]* ]]; then
echo "[INFO] Creating the swap file"
mkswap -U clear --size 4G --file /mnt/swapfile &>/dev/null
swapon /mnt/swapfile
fi
# TODO: Select the mirrors for faster download speeds
@@ -120,8 +125,8 @@ echo "[INFO] Changing root into the new system"
arch-chroot /mnt bash /chroot.sh
# Unmount partitions
umount -R /mnt
swapoff -a
umount -R /mnt
# Tell the user that it's ok to reboot now
echo "[INFO] Now you also can say \"I use Arch, BTW\". Reboot when you're ready"