summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2021-04-27 10:29:38 +0200
committerTom Barrett <tom@tombarrett.xyz>2021-04-27 10:29:38 +0200
commita4d0ccb56bf9b426f69d70c185d680b08b9bd25c (patch)
tree83aa6c3479378d6fa3164edc68be2adfddf865dc
start with baseline
-rw-r--r--airootfs/etc/mkinitcpio.conf70
-rw-r--r--airootfs/etc/mkinitcpio.d/linux.preset11
-rw-r--r--airootfs/etc/shadow1
-rw-r--r--airootfs/etc/ssh/sshd_config116
-rw-r--r--airootfs/etc/systemd/network/20-ethernet.network13
l---------airootfs/etc/systemd/system/cloud-init.target.wants/cloud-config.service1
l---------airootfs/etc/systemd/system/cloud-init.target.wants/cloud-final.service1
l---------airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service1
l---------airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init.service1
l---------airootfs/etc/systemd/system/multi-user.target.wants/sshd.service1
l---------airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service1
l---------airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service1
l---------airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service1
l---------airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket1
-rw-r--r--airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf5
-rw-r--r--efiboot/loader/entries/archiso-x86_64-linux.conf7
-rw-r--r--efiboot/loader/loader.conf5
-rw-r--r--packages.x86_649
-rw-r--r--pacman.conf102
-rw-r--r--profiledef.sh17
-rw-r--r--syslinux/syslinux-linux.cfg8
-rw-r--r--syslinux/syslinux.cfg11
22 files changed, 384 insertions, 0 deletions
diff --git a/airootfs/etc/mkinitcpio.conf b/airootfs/etc/mkinitcpio.conf
new file mode 100644
index 0000000..4b7b7fb
--- /dev/null
+++ b/airootfs/etc/mkinitcpio.conf
@@ -0,0 +1,70 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# vim:set ft=sh
+# MODULES
+# The following modules are loaded before any boot hooks are
+# run. Advanced users may wish to specify all system modules
+# in this array. For instance:
+# MODULES=(piix ide_disk reiserfs)
+MODULES=()
+
+# BINARIES
+# This setting includes any additional binaries a given user may
+# wish into the CPIO image. This is run last, so it may be used to
+# override the actual binaries included by a given hook
+# BINARIES are dependency parsed, so you may safely ignore libraries
+BINARIES=()
+
+# FILES
+# This setting is similar to BINARIES above, however, files are added
+# as-is and are not parsed in any way. This is useful for config files.
+FILES=()
+
+# HOOKS
+# This is the most important setting in this file. The HOOKS control the
+# modules and scripts added to the image, and what happens at boot time.
+# Order is important, and it is recommended that you do not change the
+# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
+# help on a given hook.
+# 'base' is _required_ unless you know precisely what you are doing.
+# 'udev' is _required_ in order to automatically load modules
+# 'filesystems' is _required_ unless you specify your fs modules in MODULES
+# Examples:
+## This setup specifies all modules in the MODULES setting above.
+## No raid, lvm2, or encrypted root is needed.
+# HOOKS=(base)
+#
+## This setup will autodetect all modules for your system and should
+## work as a sane default
+# HOOKS=(base udev autodetect block filesystems)
+#
+## This setup will generate a 'full' image which supports most systems.
+## No autodetection is done.
+# HOOKS=(base udev block filesystems)
+#
+## This setup assembles a pata mdadm array with an encrypted root FS.
+## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
+# HOOKS=(base udev block mdadm encrypt filesystems)
+#
+## This setup loads an lvm2 volume group on a usb device.
+# HOOKS=(base udev block lvm2 filesystems)
+#
+## NOTE: If you have /usr on a separate partition, you MUST include the
+# usr, fsck and shutdown hooks.
+HOOKS=(base udev modconf archiso block filesystems)
+
+# COMPRESSION
+# Use this to compress the initramfs image. By default, gzip compression
+# is used. Use 'cat' to create an uncompressed image.
+#COMPRESSION="gzip"
+#COMPRESSION="bzip2"
+#COMPRESSION="lzma"
+#COMPRESSION="xz"
+#COMPRESSION="lzop"
+#COMPRESSION="lz4"
+#COMPRESSION="zstd"
+
+# COMPRESSION_OPTIONS
+# Additional options for the compressor
+#COMPRESSION_OPTIONS=()
diff --git a/airootfs/etc/mkinitcpio.d/linux.preset b/airootfs/etc/mkinitcpio.d/linux.preset
new file mode 100644
index 0000000..d35f137
--- /dev/null
+++ b/airootfs/etc/mkinitcpio.d/linux.preset
@@ -0,0 +1,11 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# mkinitcpio preset file for the 'linux' package on archiso
+
+PRESETS=('archiso')
+
+ALL_kver='/boot/vmlinuz-linux'
+ALL_config='/etc/mkinitcpio.conf'
+
+archiso_image="/boot/initramfs-linux.img"
diff --git a/airootfs/etc/shadow b/airootfs/etc/shadow
new file mode 100644
index 0000000..7edfd69
--- /dev/null
+++ b/airootfs/etc/shadow
@@ -0,0 +1 @@
+root::14871::::::
diff --git a/airootfs/etc/ssh/sshd_config b/airootfs/etc/ssh/sshd_config
new file mode 100644
index 0000000..8ef1758
--- /dev/null
+++ b/airootfs/etc/ssh/sshd_config
@@ -0,0 +1,116 @@
+# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+#HostKey /etc/ssh/ssh_host_ed25519_key
+
+# Ciphers and keying
+#RekeyLimit default none
+
+# Logging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#PubkeyAuthentication yes
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+#AuthorizedPrincipalsFile none
+
+#AuthorizedKeysCommand none
+#AuthorizedKeysCommandUser nobody
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+ChallengeResponseAuthentication no
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+UsePAM yes
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PermitTTY yes
+PrintMotd no # pam does that
+#PrintLastLog yes
+#TCPKeepAlive yes
+#PermitUserEnvironment no
+#Compression delayed
+#ClientAliveInterval 0
+#ClientAliveCountMax 3
+#UseDNS no
+#PidFile /run/sshd.pid
+#MaxStartups 10:30:100
+#PermitTunnel no
+#ChrootDirectory none
+#VersionAddendum none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/ssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# PermitTTY no
+# ForceCommand cvs server
diff --git a/airootfs/etc/systemd/network/20-ethernet.network b/airootfs/etc/systemd/network/20-ethernet.network
new file mode 100644
index 0000000..efa309c
--- /dev/null
+++ b/airootfs/etc/systemd/network/20-ethernet.network
@@ -0,0 +1,13 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+[Match]
+Name=en*
+Name=eth*
+
+[Network]
+DHCP=yes
+IPv6PrivacyExtensions=yes
+
+[DHCP]
+RouteMetric=512
diff --git a/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-config.service b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-config.service
new file mode 120000
index 0000000..ebc50f0
--- /dev/null
+++ b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-config.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/cloud-config.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-final.service b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-final.service
new file mode 120000
index 0000000..80fa3c8
--- /dev/null
+++ b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-final.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/cloud-final.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service
new file mode 120000
index 0000000..dd8e9f1
--- /dev/null
+++ b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/cloud-init-local.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init.service b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init.service
new file mode 120000
index 0000000..24c7a26
--- /dev/null
+++ b/airootfs/etc/systemd/system/cloud-init.target.wants/cloud-init.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/cloud-init.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service b/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service
new file mode 120000
index 0000000..d21ebd9
--- /dev/null
+++ b/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/sshd.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service b/airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service
new file mode 120000
index 0000000..4c158e6
--- /dev/null
+++ b/airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/systemd-networkd.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service b/airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service
new file mode 120000
index 0000000..4f6ae34
--- /dev/null
+++ b/airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/systemd-resolved.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service b/airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
new file mode 120000
index 0000000..7d6ad92
--- /dev/null
+++ b/airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/systemd-networkd-wait-online.service \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket b/airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket
new file mode 120000
index 0000000..51942c8
--- /dev/null
+++ b/airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket
@@ -0,0 +1 @@
+/usr/lib/systemd/system/systemd-networkd.socket \ No newline at end of file
diff --git a/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf b/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf
new file mode 100644
index 0000000..a4d7442
--- /dev/null
+++ b/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+[Service]
+ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
diff --git a/efiboot/loader/entries/archiso-x86_64-linux.conf b/efiboot/loader/entries/archiso-x86_64-linux.conf
new file mode 100644
index 0000000..8dd7a16
--- /dev/null
+++ b/efiboot/loader/entries/archiso-x86_64-linux.conf
@@ -0,0 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+title Arch Linux (x86_64, UEFI)
+linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
+initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
+options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
diff --git a/efiboot/loader/loader.conf b/efiboot/loader/loader.conf
new file mode 100644
index 0000000..1ea5ce5
--- /dev/null
+++ b/efiboot/loader/loader.conf
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+timeout 3
+default archiso-x86_64-linux.conf
diff --git a/packages.x86_64 b/packages.x86_64
new file mode 100644
index 0000000..251e122
--- /dev/null
+++ b/packages.x86_64
@@ -0,0 +1,9 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+base
+cloud-init
+linux
+mkinitcpio
+mkinitcpio-archiso
+openssh
+syslinux
diff --git a/pacman.conf b/pacman.conf
new file mode 100644
index 0000000..9d895e9
--- /dev/null
+++ b/pacman.conf
@@ -0,0 +1,102 @@
+#
+# /etc/pacman.conf
+#
+# See the pacman.conf(5) manpage for option and repository directives
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+#
+# GENERAL OPTIONS
+#
+[options]
+# The following paths are commented out with their default values listed.
+# If you wish to use different paths, uncomment and update the paths.
+#RootDir = /
+#DBPath = /var/lib/pacman/
+#CacheDir = /var/cache/pacman/pkg/
+#LogFile = /var/log/pacman.log
+#GPGDir = /etc/pacman.d/gnupg/
+#HookDir = /etc/pacman.d/hooks/
+HoldPkg = pacman glibc
+#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
+#CleanMethod = KeepInstalled
+Architecture = auto
+
+# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
+#IgnorePkg =
+#IgnoreGroup =
+
+#NoUpgrade =
+#NoExtract =
+
+# Misc options
+#UseSyslog
+#Color
+#TotalDownload
+# We cannot check disk space from within a chroot environment
+#CheckSpace
+#VerbosePkgLists
+
+# By default, pacman accepts packages signed by keys that its local keyring
+# trusts (see pacman-key and its man page), as well as unsigned packages.
+SigLevel = Required DatabaseOptional
+LocalFileSigLevel = Optional
+#RemoteFileSigLevel = Required
+
+# NOTE: You must run `pacman-key --init` before first using pacman; the local
+# keyring can then be populated with the keys of all official Arch Linux
+# packagers with `pacman-key --populate archlinux`.
+
+#
+# REPOSITORIES
+# - can be defined here or included from another file
+# - pacman will search repositories in the order defined here
+# - local/custom mirrors can be added here or in separate files
+# - repositories listed first will take precedence when packages
+# have identical names, regardless of version number
+# - URLs will have $repo replaced by the name of the current repo
+# - URLs will have $arch replaced by the name of the architecture
+#
+# Repository entries are of the format:
+# [repo-name]
+# Server = ServerName
+# Include = IncludePath
+#
+# The header [repo-name] is crucial - it must be present and
+# uncommented to enable the repo.
+#
+
+# The testing repositories are disabled by default. To enable, uncomment the
+# repo name header and Include lines. You can add preferred servers immediately
+# after the header, and they will be used before the default mirrors.
+
+#[testing]
+#Include = /etc/pacman.d/mirrorlist
+
+[core]
+Include = /etc/pacman.d/mirrorlist
+
+[extra]
+Include = /etc/pacman.d/mirrorlist
+
+#[community-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+[community]
+Include = /etc/pacman.d/mirrorlist
+
+# If you want to run 32 bit applications on your x86_64 system,
+# enable the multilib repositories as required here.
+
+#[multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+#[multilib]
+#Include = /etc/pacman.d/mirrorlist
+
+# An example of a custom package repository. See the pacman manpage for
+# tips on creating your own repositories.
+#[custom]
+#SigLevel = Optional TrustAll
+#Server = file:///home/custompkgs
diff --git a/profiledef.sh b/profiledef.sh
new file mode 100644
index 0000000..7c89c0f
--- /dev/null
+++ b/profiledef.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+# shellcheck disable=SC2034
+
+iso_name="archlinux-baseline"
+iso_label="ARCH_$(date +%Y%m)"
+iso_publisher="Arch Linux <https://archlinux.org>"
+iso_application="Arch Linux baseline"
+iso_version="$(date +%Y.%m.%d)"
+install_dir="arch"
+bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
+arch="x86_64"
+pacman_conf="pacman.conf"
+airootfs_image_type="squashfs"
+airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
+file_permissions=(
+ ["/etc/shadow"]="0:0:400"
+)
diff --git a/syslinux/syslinux-linux.cfg b/syslinux/syslinux-linux.cfg
new file mode 100644
index 0000000..867d815
--- /dev/null
+++ b/syslinux/syslinux-linux.cfg
@@ -0,0 +1,8 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+LABEL arch
+MENU LABEL Arch Linux (x86_64, BIOS)
+LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
+INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
+APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
diff --git a/syslinux/syslinux.cfg b/syslinux/syslinux.cfg
new file mode 100644
index 0000000..88a36ea
--- /dev/null
+++ b/syslinux/syslinux.cfg
@@ -0,0 +1,11 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+UI menu.c32
+MENU TITLE Arch Linux
+MENU CLEAR
+
+DEFAULT arch
+TIMEOUT 30
+
+INCLUDE syslinux-linux.cfg