diff options
-rw-r--r-- | airootfs/etc/pacman.d/mirrorlist | 1 | ||||
-rwxr-xr-x | airootfs/root/.loader | 18 | ||||
-rwxr-xr-x | airootfs/root/bootstrap | 19 | ||||
-rw-r--r-- | packages.x86_64 | 2 | ||||
-rw-r--r-- | profiledef.sh | 1 |
5 files changed, 41 insertions, 0 deletions
diff --git a/airootfs/etc/pacman.d/mirrorlist b/airootfs/etc/pacman.d/mirrorlist new file mode 100644 index 0000000..80dd158 --- /dev/null +++ b/airootfs/etc/pacman.d/mirrorlist @@ -0,0 +1 @@ +Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch diff --git a/airootfs/root/.loader b/airootfs/root/.loader new file mode 100755 index 0000000..3f4bed6 --- /dev/null +++ b/airootfs/root/.loader @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + +hwclock --systohc + +echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +locale-gen +echo "LANG=en_US.UTF-8" >> /etc/locale.conf + +echo "$2" > /etc/hostname +echo "127.0.0.1 localhost" > /etc/hosts +echo "::1 localhost" >> /etc/hosts +echo "127.0.1.1 $2.lan $2" >> /etc/hosts + +grub-install $1 +grub-mkconfig -o /boot/grub/grub.cfg diff --git a/airootfs/root/bootstrap b/airootfs/root/bootstrap index 456345c..7e65be7 100755 --- a/airootfs/root/bootstrap +++ b/airootfs/root/bootstrap @@ -11,18 +11,37 @@ if ! test -b "$1"; then exit fi +if [ -z "$2" ]; then + echo "Please pass a hostname also as the second argument." + exit +fi + parted -s "$1" mklabel gpt if ! test -f "/sys/firmware/efi/efivars"; then parted "$1" mkpart bios ext4 0% 513MiB + mkfs.ext4 "$1"1 parted "$1" set 1 bios_grub on parted "$1" mkpart home ext4 513MiB 100% else parted "$1" mkpart efi fat32 0% 513MiB + mkfs.fat -F 32 "$1"1 parted "$1" set 1 esp on parted "$1" mkpart home ext4 513MiB 100% fi +mkfs.ext4 "$1"2 + mount "$1"2 /mnt +mkdir -p /mnt/boot/efi +mount "$1"1 /mnt/boot/efi timedatectl set-ntp true + +pacman-key --init +pacman-key --populate +pacstrap /mnt base linux linux-firmware git vim grub + +genfstab -U /mnt > /mnt/etc/fstab +cp /root/.loader /mnt/root/loader +arch-chroot /mnt /root/loader $1 $2 diff --git a/packages.x86_64 b/packages.x86_64 index 8e8f80c..9c1bad1 100644 --- a/packages.x86_64 +++ b/packages.x86_64 @@ -1,6 +1,8 @@ +arch-install-scripts base bash cloud-init +dosfstools linux linux-firmware mkinitcpio diff --git a/profiledef.sh b/profiledef.sh index a44ab1a..fd65beb 100644 --- a/profiledef.sh +++ b/profiledef.sh @@ -15,4 +15,5 @@ airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' file_permissions=( ["/etc/shadow"]="0:0:400" ["/root/bootstrap"]="0:0:700" + ["/root/.loader"]="0:0:700" ) |