Compare commits
10 Commits
a48fa85737
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae03b5dbec | ||
|
|
a43df7e768 | ||
|
|
eb257125f4 | ||
|
|
d2623ec38d | ||
|
|
3f5b6ffc0f | ||
|
|
de7d994851 | ||
|
|
f0a2b7778d | ||
|
|
f0c5e5dc2d | ||
|
|
331e67879e | ||
|
|
a785ba7d5d |
13
README.md
13
README.md
@@ -18,3 +18,16 @@ $ ./install.sh
|
|||||||
|
|
||||||
The suggested post-install configuration steps are:
|
The suggested post-install configuration steps are:
|
||||||
- Configure the keymap for ttys via /etc/vconsole.conf
|
- 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.
|
||||||
|
|||||||
20
chroot.sh
20
chroot.sh
@@ -8,25 +8,21 @@ password=""
|
|||||||
echoerr() { cat <<< "$@" 1>&2; }
|
echoerr() { cat <<< "$@" 1>&2; }
|
||||||
|
|
||||||
# Set the time zone
|
# Set the time zone
|
||||||
while
|
while true; do
|
||||||
echo "[INFO] Time zone configuration. Type \"list\" to list time zones"
|
echo "[INFO] Time zone configuration."
|
||||||
read -p "Enter time zone (${timezone}): " input
|
read -p "Enter time zone (${timezone}): " input
|
||||||
|
|
||||||
if [[ "$input" == "list" ]]; then
|
if [[ -z "$input" ]]; then
|
||||||
awk '/^Z/ { print $2 }; /^L/ { print $3 }' /usr/share/zoneinfo/tzdata.zi | sort | less
|
break
|
||||||
continue
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$input" ]]; then
|
if [[ -f "/usr/share/zoneinfo/${input}" ]]; then
|
||||||
timezone="$input"
|
timezone="$input"
|
||||||
fi
|
break
|
||||||
|
else
|
||||||
if [[ ! -f "/usr/share/zoneinfo/${timezone}" ]]; then
|
|
||||||
echoerr "[ERROR] The selected time zone does not exist"
|
echoerr "[ERROR] The selected time zone does not exist"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
[[ ! -f "/usr/share/zoneinfo/${timezone}" ]]
|
|
||||||
do true; done
|
|
||||||
|
|
||||||
echo "[INFO] Setting ${timezone} as the time zone"
|
echo "[INFO] Setting ${timezone} as the time zone"
|
||||||
ln -sf "/usr/share/zoneinfo/${timezone}" /etc/localtime
|
ln -sf "/usr/share/zoneinfo/${timezone}" /etc/localtime
|
||||||
|
|||||||
17
install.sh
17
install.sh
@@ -83,10 +83,6 @@ echo w # Write changes
|
|||||||
|
|
||||||
# TODO: Check if fdisk terminated succesfully
|
# 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
|
# Format the partitions
|
||||||
echo "[INFO] Formatting the partitions"
|
echo "[INFO] Formatting the partitions"
|
||||||
mkfs.fat -F 32 "${disk}1" &>/dev/null
|
mkfs.fat -F 32 "${disk}1" &>/dev/null
|
||||||
@@ -98,7 +94,16 @@ mkfs.ext4 "${disk}2" &>/dev/null
|
|||||||
echo "[INFO] Mounting the file systems"
|
echo "[INFO] Mounting the file systems"
|
||||||
mount "${disk}2" /mnt
|
mount "${disk}2" /mnt
|
||||||
mount --mkdir "${disk}1" /mnt/boot
|
mount --mkdir "${disk}1" /mnt/boot
|
||||||
swapon /mnt/swapfile
|
|
||||||
|
# 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
|
# 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
|
arch-chroot /mnt bash /chroot.sh
|
||||||
|
|
||||||
# Unmount partitions
|
# Unmount partitions
|
||||||
umount -R /mnt
|
|
||||||
swapoff -a
|
swapoff -a
|
||||||
|
umount -R /mnt
|
||||||
|
|
||||||
# Tell the user that it's ok to reboot now
|
# 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"
|
echo "[INFO] Now you also can say \"I use Arch, BTW\". Reboot when you're ready"
|
||||||
|
|||||||
Reference in New Issue
Block a user