Browse Source

updated to archiso v.46

master
Dan 6 months ago
parent
commit
6a60bd6b6b
Signed by: dan GPG Key ID: 7DFC51AC7A70FBAB
53 changed files with 592 additions and 193 deletions
  1. +0
    -0
      airootfs/etc/fstab
  2. +2
    -0
      airootfs/etc/hostname
  3. +3
    -0
      airootfs/etc/locale.conf
  4. +1
    -0
      airootfs/etc/localtime
  5. +69
    -0
      airootfs/etc/mkinitcpio.conf
  6. +11
    -0
      airootfs/etc/mkinitcpio.d/linux.preset
  7. +9
    -0
      airootfs/etc/motd
  8. +1
    -0
      airootfs/etc/passwd
  9. +1
    -0
      airootfs/etc/resolv.conf
  10. +1
    -0
      airootfs/etc/shadow
  11. +116
    -0
      airootfs/etc/ssh/sshd_config
  12. +5
    -0
      airootfs/etc/systemd/journald.conf.d/volatile-storage.conf
  13. +7
    -0
      airootfs/etc/systemd/logind.conf.d/do-not-suspend.conf
  14. +13
    -0
      airootfs/etc/systemd/network/20-ethernet.network
  15. +13
    -0
      airootfs/etc/systemd/network/20-wireless.network
  16. +4
    -1
      airootfs/etc/systemd/system/choose-mirror.service
  17. +1
    -0
      airootfs/etc/systemd/system/dbus-org.freedesktop.network1.service
  18. +1
    -0
      airootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service
  19. +3
    -0
      airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount
  20. +3
    -0
      airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf
  21. +1
    -0
      airootfs/etc/systemd/system/multi-user.target.wants/choose-mirror.service
  22. +1
    -0
      airootfs/etc/systemd/system/multi-user.target.wants/iwd.service
  23. +1
    -0
      airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service
  24. +1
    -0
      airootfs/etc/systemd/system/multi-user.target.wants/reflector.service
  25. +1
    -0
      airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service
  26. +1
    -0
      airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service
  27. +1
    -0
      airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
  28. +3
    -0
      airootfs/etc/systemd/system/pacman-init.service
  29. +44
    -0
      airootfs/etc/systemd/system/reflector.service
  30. +1
    -0
      airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket
  31. +6
    -0
      airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf
  32. +0
    -1
      airootfs/etc/udev/rules.d/81-dhcpcd.rules
  33. +3
    -3
      airootfs/root/.automated_script.sh
  34. +5
    -16
      airootfs/root/customize_airootfs.sh
  35. +1
    -1
      airootfs/root/home/user/pwoss-server-conf.sh
  36. +0
    -8
      airootfs/root/install.txt
  37. +5
    -0
      airootfs/usr/local/bin/Installation_guide
  38. +2
    -0
      airootfs/usr/local/bin/choose-mirror
  39. +156
    -115
      build.sh
  40. +7
    -4
      efiboot/loader/entries/archiso-x86_64-cd.conf
  41. +7
    -4
      efiboot/loader/entries/archiso-x86_64-usb.conf
  42. +0
    -2
      efiboot/loader/entries/uefi-shell-v1-x86_64.conf
  43. +0
    -2
      efiboot/loader/entries/uefi-shell-v2-x86_64.conf
  44. +4
    -1
      efiboot/loader/loader.conf
  45. +3
    -0
      isolinux/isolinux.cfg
  46. +0
    -2
      mkinitcpio.conf
  47. +27
    -11
      packages.x86_64
  48. +3
    -6
      pacman.conf
  49. +3
    -0
      syslinux/archiso.cfg
  50. +5
    -0
      syslinux/archiso_head.cfg
  51. +15
    -12
      syslinux/archiso_pxe.cfg
  52. +10
    -4
      syslinux/archiso_sys.cfg
  53. +11
    -0
      syslinux/archiso_tail.cfg

+ 0
- 0
airootfs/etc/fstab View File


+ 2
- 0
airootfs/etc/hostname View File

@ -1 +1,3 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
archiso

+ 3
- 0
airootfs/etc/locale.conf View File

@ -1 +1,4 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
LANG=en_US.UTF-8

+ 1
- 0
airootfs/etc/localtime View File

@ -0,0 +1 @@
/usr/share/zoneinfo/UTC

+ 69
- 0
airootfs/etc/mkinitcpio.conf View File

@ -0,0 +1,69 @@
#
# 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 memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block filesystems keyboard)
# 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_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

+ 11
- 0
airootfs/etc/mkinitcpio.d/linux.preset View File

@ -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/archiso.img"

+ 9
- 0
airootfs/etc/motd View File

@ -0,0 +1,9 @@
To install Arch Linux follow the installation guide:
https://wiki.archlinux.org/index.php/Installation_guide
For Wi-Fi, authenticate to the wireless network using the iwctl utility.
Ethernet and Wi-Fi connections using DHCP should work automatically.
After connecting to the internet, the installation guide can be accessed
via the convenience script Installation_guide.

+ 1
- 0
airootfs/etc/passwd View File

@ -0,0 +1 @@
root:x:0:0:root:/root:/usr/bin/zsh

+ 1
- 0
airootfs/etc/resolv.conf View File

@ -0,0 +1 @@
/run/systemd/resolve/stub-resolv.conf

+ 1
- 0
airootfs/etc/shadow View File

@ -0,0 +1 @@
root::14871::::::

+ 116
- 0
airootfs/etc/ssh/sshd_config View File

@ -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

+ 5
- 0
airootfs/etc/systemd/journald.conf.d/volatile-storage.conf View File

@ -0,0 +1,5 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Journal]
Storage=volatile

+ 7
- 0
airootfs/etc/systemd/logind.conf.d/do-not-suspend.conf View File

@ -0,0 +1,7 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Login]
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore

+ 13
- 0
airootfs/etc/systemd/network/20-ethernet.network View File

@ -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

+ 13
- 0
airootfs/etc/systemd/network/20-wireless.network View File

@ -0,0 +1,13 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Match]
Name=wlp*
Name=wlan*
[Network]
DHCP=yes
IPv6PrivacyExtensions=yes
[DHCP]
RouteMetric=1024

+ 4
- 1
airootfs/etc/systemd/system/choose-mirror.service View File

@ -1,10 +1,13 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=Choose mirror from the kernel command line
ConditionKernelCommandLine=mirror
[Service]
Type=oneshot
ExecStart=/etc/systemd/scripts/choose-mirror
ExecStart=/usr/local/bin/choose-mirror
[Install]
WantedBy=multi-user.target

+ 1
- 0
airootfs/etc/systemd/system/dbus-org.freedesktop.network1.service View File

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-networkd.service

+ 1
- 0
airootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service View File

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-resolved.service

+ 3
- 0
airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount View File

@ -1,3 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=Temporary /etc/pacman.d/gnupg directory


+ 3
- 0
airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf View File

@ -1,3 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux

+ 1
- 0
airootfs/etc/systemd/system/multi-user.target.wants/choose-mirror.service View File

@ -0,0 +1 @@
../choose-mirror.service

+ 1
- 0
airootfs/etc/systemd/system/multi-user.target.wants/iwd.service View File

@ -0,0 +1 @@
/usr/lib/systemd/system/iwd.service

+ 1
- 0
airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service View File

@ -0,0 +1 @@
../pacman-init.service

+ 1
- 0
airootfs/etc/systemd/system/multi-user.target.wants/reflector.service View File

@ -0,0 +1 @@
../reflector.service

+ 1
- 0
airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service View File

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-networkd.service

+ 1
- 0
airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service View File

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-resolved.service

+ 1
- 0
airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service View File

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-networkd-wait-online.service

+ 3
- 0
airootfs/etc/systemd/system/pacman-init.service View File

@ -1,3 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=Initializes Pacman keyring
Wants=haveged.service


+ 44
- 0
airootfs/etc/systemd/system/reflector.service View File

@ -0,0 +1,44 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=pacman mirrorlist update
Wants=network-online.target
After=network-online.target nss-lookup.target
ConditionKernelCommandLine=!mirror
[Service]
Type=oneshot
ExecStart=/usr/bin/reflector --protocol https --latest 70 --sort rate --save /etc/pacman.d/mirrorlist
Restart=on-failure
RestartSec=10
CacheDirectory=reflector
CapabilityBoundingSet=~CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_CHOWN CAP_FSETID CAP_SETFCAP CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER CAP_IPC_OWNER CAP_NET_ADMIN CAP_SYS_TIME CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE CAP_KILL CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_RESOURCE CAP_MAC_ADMIN CAP_MAC_OVERRIDE CAP_SYS_BOOT CAP_LINUX_IMMUTABLE CAP_IPC_LOCK CAP_SYS_CHROOT CAP_BLOCK_SUSPEND CAP_LEASE CAP_SYS_PACCT CAP_SYS_TTY_CONFIG CAP_WAKE_ALARM
Environment=XDG_CACHE_HOME=/var/cache/reflector
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
PrivateUsers=true
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelTunables=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectSystem=strict
ReadWritePaths=/etc/pacman.d/mirrorlist
RemoveIPC=true
RestrictAddressFamilies=~AF_AX25 AF_IPX AF_APPLETALK AF_X25 AF_DECnet AF_KEY AF_NETLINK AF_PACKET AF_RDS AF_PPPOX AF_LLC AF_IB AF_MPLS AF_CAN AF_TIPC AF_BLUETOOTH AF_ALG AF_VSOCK AF_KCM AF_UNIX AF_XDP
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@resources @privileged
UMask=177
[Install]
WantedBy=multi-user.target

+ 1
- 0
airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket View File

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-networkd.socket

+ 6
- 0
airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf View File

@ -0,0 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any

+ 0
- 1
airootfs/etc/udev/rules.d/81-dhcpcd.rules View File

@ -1 +0,0 @@
ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="en*|eth*", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service"

+ 3
- 3
airootfs/root/.automated_script.sh View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
script_cmdline ()
{
@ -15,8 +15,8 @@ automated_script ()
local script rt
script="$(script_cmdline)"
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then
wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null
if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then
curl "${script}" --retry-connrefused -s -o /tmp/startup_script >/dev/null
rt=$?
else
cp "${script}" /tmp/startup_script


+ 5
- 16
airootfs/root/customize_airootfs.sh View File

@ -1,23 +1,12 @@
#!/bin/bash
#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -e -u
echo 'Warning: customize_airootfs.sh is deprecated! Support for it will be removed in a future archiso version.'
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
locale-gen
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
usermod -s /usr/bin/zsh root
cp -aT /etc/skel/ /root/
chmod 700 /root
sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
systemctl enable pacman-init.service choose-mirror.service
systemctl set-default multi-user.target

+ 1
- 1
airootfs/root/home/user/pwoss-server-conf.sh View File

@ -33,7 +33,7 @@
PACKAGES="freshrss adminer pi-hole-server downgrade etc-update" # AUR packages
## Necessary Seafile AUR pkgs
SEAFILE="seahub libselinux"
SEAFILE="seahub libselinux python-wsgidav-seafile"
# AUR Helper - pikaur
git clone https://aur.archlinux.org/pikaur.git


+ 0
- 8
airootfs/root/install.txt View File

@ -1,8 +0,0 @@
View the Arch official installation guide online at
https://wiki.archlinux.org/index.php/Installation_Guide
Check PwOSS - Wiki guide at
https://wiki.pwoss.org/content/server/arch-x86_64
Create an issue at PwOSS - Gitea if you run into any problems
https://git.pwoss.org/server/iso/issues

+ 5
- 0
airootfs/usr/local/bin/Installation_guide View File

@ -0,0 +1,5 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-3.0-or-later
exec lynx 'https://wiki.archlinux.org/index.php/Installation_guide'

airootfs/etc/systemd/scripts/choose-mirror → airootfs/usr/local/bin/choose-mirror View File

@ -1,4 +1,6 @@
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
get_cmdline() {
local param

+ 156
- 115
build.sh View File

@ -1,4 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -e -u
@ -10,10 +12,10 @@ iso_version=$(date +%Y.%m.%d)
install_dir=arch
work_dir=work
out_dir=out
gpg_key=
gpg_key=""
verbose=""
script_path=$(readlink -f ${0%/*})
script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && pwd )"
umask 0022
@ -40,188 +42,228 @@ _usage ()
echo " Default: ${out_dir}"
echo " -v Enable verbose output"
echo " -h This help message"
exit ${1}
exit "${1}"
}
# Helper function to run make_*() only one time per architecture.
run_once() {
if [[ ! -e ${work_dir}/build.${1} ]]; then
$1
touch ${work_dir}/build.${1}
if [[ ! -e "${work_dir}/build.${1}" ]]; then
"$1"
touch "${work_dir}/build.${1}"
fi
}
# Setup custom pacman.conf with current cache directories.
make_pacman_conf() {
local _cache_dirs
_cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${work_dir}/pacman.conf
_cache_dirs=("$(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')")
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n "${_cache_dirs[@]}")|g" \
"${script_path}/pacman.conf" > "${work_dir}/pacman.conf"
}
# Base installation, plus needed packages (airootfs)
make_basefs() {
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" init
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh efitools" install
# Prepare working directory and copy custom airootfs files (airootfs)
make_custom_airootfs() {
local _airootfs="${work_dir}/x86_64/airootfs"
mkdir -p -- "${_airootfs}"
if [[ -d "${script_path}/airootfs" ]]; then
cp -af --no-preserve=ownership -- "${script_path}/airootfs/." "${_airootfs}"
[[ -e "${_airootfs}/etc/shadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/shadow"
[[ -e "${_airootfs}/etc/gshadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/gshadow"
# Set up user home directories and permissions
if [[ -e "${_airootfs}/etc/passwd" ]]; then
while IFS=':' read -a passwd -r; do
[[ "${passwd[5]}" == '/' ]] && continue
if [[ -d "${_airootfs}${passwd[5]}" ]]; then
chown -hR -- "${passwd[2]}:${passwd[3]}" "${_airootfs}${passwd[5]}"
chmod -f 0750 -- "${_airootfs}${passwd[5]}"
else
install -d -m 0750 -o "${passwd[2]}" -g "${passwd[3]}" -- "${_airootfs}${passwd[5]}"
fi
done < "${_airootfs}/etc/passwd"
fi
fi
}
# Additional packages (airootfs)
# Packages (airootfs)
make_packages() {
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "$(grep -h -v ^# ${script_path}/packages.x86_64)" install
}
# Copy mkinitcpio archiso hooks and build initramfs (airootfs)
make_setup_mkinitcpio() {
local _hook
mkdir -p ${work_dir}/x86_64/airootfs/etc/initcpio/hooks
mkdir -p ${work_dir}/x86_64/airootfs/etc/initcpio/install
for _hook in archiso archiso_shutdown archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_loop_mnt; do
cp /usr/lib/initcpio/hooks/${_hook} ${work_dir}/x86_64/airootfs/etc/initcpio/hooks
cp /usr/lib/initcpio/install/${_hook} ${work_dir}/x86_64/airootfs/etc/initcpio/install
done
sed -i "s|/usr/lib/initcpio/|/etc/initcpio/|g" ${work_dir}/x86_64/airootfs/etc/initcpio/install/archiso_shutdown
cp /usr/lib/initcpio/install/archiso_kms ${work_dir}/x86_64/airootfs/etc/initcpio/install
cp /usr/lib/initcpio/archiso_shutdown ${work_dir}/x86_64/airootfs/etc/initcpio
cp ${script_path}/mkinitcpio.conf ${work_dir}/x86_64/airootfs/etc/mkinitcpio-archiso.conf
gnupg_fd=
if [[ ${gpg_key} ]]; then
gpg --export ${gpg_key} >${work_dir}/gpgkey
exec 17<>${work_dir}/gpgkey
if [[ "${gpg_key}" ]]; then
gpg --export "${gpg_key}" > "${work_dir}/gpgkey"
exec 17<>"${work_dir}/gpgkey"
fi
ARCHISO_GNUPG_FD=${gpg_key:+17} mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' run
if [[ ${gpg_key} ]]; then
if [ -n "${verbose}" ]; then
ARCHISO_GNUPG_FD="${gpg_key:+17}" mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
-p "$(grep -h -v '^#' "${script_path}/packages.x86_64"| sed ':a;N;$!ba;s/\n/ /g')" install
else
ARCHISO_GNUPG_FD="${gpg_key:+17}" mkarchiso -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
-p "$(grep -h -v '^#' "${script_path}/packages.x86_64"| sed ':a;N;$!ba;s/\n/ /g')" install
fi
if [[ "${gpg_key}" ]]; then
exec 17<&-
fi
}
# Customize installation (airootfs)
make_customize_airootfs() {
cp -af ${script_path}/airootfs ${work_dir}/x86_64
cp ${script_path}/pacman.conf ${work_dir}/x86_64/airootfs/etc
if [[ -e "${script_path}/airootfs/etc/passwd" ]]; then
while IFS=':' read -a passwd -r; do
[[ "${passwd[5]}" == '/' ]] && continue
cp -RdT --preserve=mode,timestamps,links -- "${work_dir}/x86_64/airootfs/etc/skel" "${work_dir}/x86_64/airootfs${passwd[5]}"
chown -hR -- "${passwd[2]}:${passwd[3]}" "${work_dir}/x86_64/airootfs${passwd[5]}"
curl -o ${work_dir}/x86_64/airootfs/etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&use_mirror_status=on'
lynx -dump -nolist 'https://wiki.archlinux.org/index.php/Installation_Guide?action=render' >> ${work_dir}/x86_64/airootfs/root/install.txt
done < "${script_path}/airootfs/etc/passwd"
fi
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -r '/root/customize_airootfs.sh' run
rm ${work_dir}/x86_64/airootfs/root/customize_airootfs.sh
if [[ -e "${work_dir}/x86_64/airootfs/root/customize_airootfs.sh" ]]; then
if [ -n "${verbose}" ]; then
mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
-r '/root/customize_airootfs.sh' run
else
mkarchiso -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
-r '/root/customize_airootfs.sh' run
fi
rm "${work_dir}/x86_64/airootfs/root/customize_airootfs.sh"
fi
}
# Prepare kernel/initramfs ${install_dir}/boot/
make_boot() {
mkdir -p ${work_dir}/iso/${install_dir}/boot/x86_64
cp ${work_dir}/x86_64/airootfs/boot/archiso.img ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img
cp ${work_dir}/x86_64/airootfs/boot/vmlinuz-linux ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz
mkdir -p "${work_dir}/iso/${install_dir}/boot/x86_64"
cp "${work_dir}/x86_64/airootfs/boot/archiso.img" "${work_dir}/iso/${install_dir}/boot/x86_64/"
cp "${work_dir}/x86_64/airootfs/boot/vmlinuz-linux" "${work_dir}/iso/${install_dir}/boot/x86_64/"
}
# Add other aditional/extra files to ${install_dir}/boot/
make_boot_extra() {
cp ${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin ${work_dir}/iso/${install_dir}/boot/memtest
cp ${work_dir}/x86_64/airootfs/usr/share/licenses/common/GPL2/license.txt ${work_dir}/iso/${install_dir}/boot/memtest.COPYING
cp ${work_dir}/x86_64/airootfs/boot/intel-ucode.img ${work_dir}/iso/${install_dir}/boot/intel_ucode.img
cp ${work_dir}/x86_64/airootfs/usr/share/licenses/intel-ucode/LICENSE ${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE
cp ${work_dir}/x86_64/airootfs/boot/amd-ucode.img ${work_dir}/iso/${install_dir}/boot/amd_ucode.img
cp ${work_dir}/x86_64/airootfs/usr/share/licenses/amd-ucode/LICENSE ${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE
if [[ -e "${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin" ]]; then
# rename for PXE: https://wiki.archlinux.org/index.php/Syslinux#Using_memtest
cp "${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin" "${work_dir}/iso/${install_dir}/boot/memtest"
mkdir -p "${work_dir}/iso/${install_dir}/boot/licenses/memtest86+/"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/common/GPL2/license.txt" \
"${work_dir}/iso/${install_dir}/boot/licenses/memtest86+/"
fi
if [[ -e "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" ]]; then
cp "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/"
mkdir -p "${work_dir}/iso/${install_dir}/boot/licenses/intel-ucode/"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/intel-ucode/"* \
"${work_dir}/iso/${install_dir}/boot/licenses/intel-ucode/"
fi
if [[ -e "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" ]]; then
cp "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/"
mkdir -p "${work_dir}/iso/${install_dir}/boot/licenses/amd-ucode/"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/amd-ucode/"* \
"${work_dir}/iso/${install_dir}/boot/licenses/amd-ucode/"
fi
}
# Prepare /${install_dir}/boot/syslinux
make_syslinux() {
_uname_r=$(file -b ${work_dir}/x86_64/airootfs/boot/vmlinuz-linux| awk 'f{print;f=0} /version/{f=1}' RS=' ')
mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux
for _cfg in ${script_path}/syslinux/*.cfg; do
_uname_r=$(file -b "${work_dir}/x86_64/airootfs/boot/vmlinuz-linux"| awk 'f{print;f=0} /version/{f=1}' RS=' ')
mkdir -p "${work_dir}/iso/${install_dir}/boot/syslinux"
for _cfg in "${script_path}/syslinux/"*.cfg; do
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/iso/${install_dir}/boot/syslinux/${_cfg##*/}
s|%INSTALL_DIR%|${install_dir}|g" "${_cfg}" > "${work_dir}/iso/${install_dir}/boot/syslinux/${_cfg##*/}"
done
cp ${script_path}/syslinux/splash.png ${work_dir}/iso/${install_dir}/boot/syslinux
cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/*.c32 ${work_dir}/iso/${install_dir}/boot/syslinux
cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/lpxelinux.0 ${work_dir}/iso/${install_dir}/boot/syslinux
cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/memdisk ${work_dir}/iso/${install_dir}/boot/syslinux
mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux/hdt
gzip -c -9 ${work_dir}/x86_64/airootfs/usr/share/hwdata/pci.ids > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/pciids.gz
gzip -c -9 ${work_dir}/x86_64/airootfs/usr/lib/modules/${_uname_r}/modules.alias > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/modalias.gz
cp "${script_path}/syslinux/splash.png" "${work_dir}/iso/${install_dir}/boot/syslinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/"*.c32 "${work_dir}/iso/${install_dir}/boot/syslinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/lpxelinux.0" "${work_dir}/iso/${install_dir}/boot/syslinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/memdisk" "${work_dir}/iso/${install_dir}/boot/syslinux/"
mkdir -p "${work_dir}/iso/${install_dir}/boot/syslinux/hdt"
gzip -c -9 "${work_dir}/x86_64/airootfs/usr/share/hwdata/pci.ids" > \
"${work_dir}/iso/${install_dir}/boot/syslinux/hdt/pciids.gz"
gzip -c -9 "${work_dir}/x86_64/airootfs/usr/lib/modules/${_uname_r}/modules.alias" > \
"${work_dir}/iso/${install_dir}/boot/syslinux/hdt/modalias.gz"
}
# Prepare /isolinux
make_isolinux() {
mkdir -p ${work_dir}/iso/isolinux
sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg
cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/isolinux.bin ${work_dir}/iso/isolinux/
cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/isohdpfx.bin ${work_dir}/iso/isolinux/
cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/ldlinux.c32 ${work_dir}/iso/isolinux/
mkdir -p "${work_dir}/iso/isolinux"
sed "s|%INSTALL_DIR%|${install_dir}|g" \
"${script_path}/isolinux/isolinux.cfg" > "${work_dir}/iso/isolinux/isolinux.cfg"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/isolinux.bin" "${work_dir}/iso/isolinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/isohdpfx.bin" "${work_dir}/iso/isolinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/ldlinux.c32" "${work_dir}/iso/isolinux/"
}
# Prepare /EFI
make_efi() {
mkdir -p ${work_dir}/iso/EFI/boot
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/iso/EFI/boot/bootx64.efi
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/iso/EFI/boot/
mkdir -p "${work_dir}/iso/EFI/boot"
cp "${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" \
"${work_dir}/iso/EFI/boot/bootx64.efi"
cp ${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/iso/EFI/boot/loader.efi
mkdir -p ${work_dir}/iso/loader/entries
cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/
cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/loader/entries/
cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/loader/entries/
mkdir -p "${work_dir}/iso/loader/entries"
cp "${script_path}/efiboot/loader/loader.conf" "${work_dir}/iso/loader/"
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g" \
${script_path}/efiboot/loader/entries/archiso-x86_64-usb.conf > ${work_dir}/iso/loader/entries/archiso-x86_64.conf
"${script_path}/efiboot/loader/entries/archiso-x86_64-usb.conf" > \
"${work_dir}/iso/loader/entries/archiso-x86_64.conf"
# EFI Shell 2.0 for UEFI 2.3+
curl -o ${work_dir}/iso/EFI/shellx64_v2.efi https://raw.githubusercontent.com/tianocore/edk2/UDK2018/ShellBinPkg/UefiShell/X64/Shell.efi
# EFI Shell 1.0 for non UEFI 2.3+
curl -o ${work_dir}/iso/EFI/shellx64_v1.efi https://raw.githubusercontent.com/tianocore/edk2/UDK2018/EdkShellBinPkg/FullShell/X64/Shell_Full.efi
# edk2-shell based UEFI shell
# shellx64.efi is picked up automatically when on /
cp "${work_dir}/x86_64/airootfs/usr/share/edk2-shell/x64/Shell_Full.efi" "${work_dir}/iso/shellx64.efi"
}
# Prepare efiboot.img::/EFI for "El Torito" EFI boot mode
make_efiboot() {
mkdir -p ${work_dir}/iso/EFI/archiso
truncate -s 64M ${work_dir}/iso/EFI/archiso/efiboot.img
mkfs.fat -n ARCHISO_EFI ${work_dir}/iso/EFI/archiso/efiboot.img
mkdir -p ${work_dir}/efiboot
mount ${work_dir}/iso/EFI/archiso/efiboot.img ${work_dir}/efiboot
mkdir -p "${work_dir}/iso/EFI/archiso"
truncate -s 64M "${work_dir}/iso/EFI/archiso/efiboot.img"
mkfs.fat -n ARCHISO_EFI "${work_dir}/iso/EFI/archiso/efiboot.img"
mkdir -p ${work_dir}/efiboot/EFI/archiso
cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi
cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img
mkdir -p "${work_dir}/efiboot"
mount "${work_dir}/iso/EFI/archiso/efiboot.img" "${work_dir}/efiboot"
cp ${work_dir}/iso/${install_dir}/boot/intel_ucode.img ${work_dir}/efiboot/EFI/archiso/intel_ucode.img
cp ${work_dir}/iso/${install_dir}/boot/amd_ucode.img ${work_dir}/efiboot/EFI/archiso/amd_ucode.img
mkdir -p "${work_dir}/efiboot/EFI/archiso"
cp "${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz-linux" "${work_dir}/efiboot/EFI/archiso/"
cp "${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img" "${work_dir}/efiboot/EFI/archiso/"
mkdir -p ${work_dir}/efiboot/EFI/boot
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/efiboot/EFI/boot/
cp "${work_dir}/iso/${install_dir}/boot/intel-ucode.img" "${work_dir}/efiboot/EFI/archiso/"
cp "${work_dir}/iso/${install_dir}/boot/amd-ucode.img" "${work_dir}/efiboot/EFI/archiso/"
cp ${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/efiboot/EFI/boot/loader.efi
mkdir -p "${work_dir}/efiboot/EFI/boot"
cp "${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" \
"${work_dir}/efiboot/EFI/boot/bootx64.efi"
mkdir -p ${work_dir}/efiboot/loader/entries
cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/
cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/loader/entries/
cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/loader/entries/
mkdir -p "${work_dir}/efiboot/loader/entries"
cp "${script_path}/efiboot/loader/loader.conf" "${work_dir}/efiboot/loader/"
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g" \
${script_path}/efiboot/loader/entries/archiso-x86_64-cd.conf > ${work_dir}/efiboot/loader/entries/archiso-x86_64.conf
"${script_path}/efiboot/loader/entries/archiso-x86_64-cd.conf" > \
"${work_dir}/efiboot/loader/entries/archiso-x86_64.conf"
cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/
cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
# shellx64.efi is picked up automatically when on /
cp "${work_dir}/iso/shellx64.efi" "${work_dir}/efiboot/"
umount -d ${work_dir}/efiboot
umount -d "${work_dir}/efiboot"
}
# Build airootfs filesystem image
make_prepare() {
cp -a -l -f ${work_dir}/x86_64/airootfs ${work_dir}
mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" pkglist
mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" ${gpg_key:+-g ${gpg_key}} prepare
rm -rf ${work_dir}/airootfs
# rm -rf ${work_dir}/x86_64/airootfs (if low space, this helps)
cp -a -l -f "${work_dir}/x86_64/airootfs" "${work_dir}"
if [ -n "${verbose}" ]; then
mkarchiso -v -w "${work_dir}" -D "${install_dir}" pkglist
mkarchiso -v -w "${work_dir}" -D "${install_dir}" ${gpg_key:+-g ${gpg_key}} prepare
else
mkarchiso -w "${work_dir}" -D "${install_dir}" pkglist
mkarchiso -w "${work_dir}" -D "${install_dir}" ${gpg_key:+-g ${gpg_key}} prepare
fi
rm -rf "${work_dir}/airootfs"
# rm -rf "${work_dir}/x86_64/airootfs" (if low space, this helps)
}
# Build ISO
make_iso() {
mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -P "${iso_publisher}" -A "${iso_application}" -o "${out_dir}" iso "${iso_name}-${iso_version}-x86_64.iso"
if [ -n "${verbose}" ]; then
mkarchiso -v -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -P "${iso_publisher}" \
-A "${iso_application}" -o "${out_dir}" iso "${iso_name}-${iso_version}-x86_64.iso"
else
mkarchiso -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -P "${iso_publisher}" \
-A "${iso_application}" -o "${out_dir}" iso "${iso_name}-${iso_version}-x86_64.iso"
fi
}
if [[ ${EUID} -ne 0 ]]; then
@ -249,12 +291,11 @@ while getopts 'N:V:L:P:A:D:w:o:g:vh' arg; do
esac
done
mkdir -p ${work_dir}
mkdir -p "${work_dir}"
run_once make_pacman_conf
run_once make_basefs
run_once make_custom_airootfs
run_once make_packages
run_once make_setup_mkinitcpio
run_once make_customize_airootfs
run_once make_boot
run_once make_boot_extra


+ 7
- 4
efiboot/loader/entries/archiso-x86_64-cd.conf View File

@ -1,6 +1,9 @@
title Arch Linux archiso x86_64 UEFI CD
linux /EFI/archiso/vmlinuz.efi
initrd /EFI/archiso/intel_ucode.img
initrd /EFI/archiso/amd_ucode.img
#
# SPDX-License-Identifier: GPL-3.0-or-later
title Arch Linux install medium (x86_64, UEFI)
linux /EFI/archiso/vmlinuz-linux
initrd /EFI/archiso/intel-ucode.img
initrd /EFI/archiso/amd-ucode.img
initrd /EFI/archiso/archiso.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%

+ 7
- 4
efiboot/loader/entries/archiso-x86_64-usb.conf View File

@ -1,6 +1,9 @@
title Arch Linux archiso x86_64 UEFI USB
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz
initrd /%INSTALL_DIR%/boot/intel_ucode.img
initrd /%INSTALL_DIR%/boot/amd_ucode.img
#
# SPDX-License-Identifier: GPL-3.0-or-later
title Arch Linux install medium (x86_64, UEFI)
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/intel-ucode.img
initrd /%INSTALL_DIR%/boot/amd-ucode.img
initrd /%INSTALL_DIR%/boot/x86_64/archiso.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%

+ 0
- 2
efiboot/loader/entries/uefi-shell-v1-x86_64.conf View File

@ -1,2 +0,0 @@
title UEFI Shell x86_64 v1
efi /EFI/shellx64_v1.efi

+ 0
- 2
efiboot/loader/entries/uefi-shell-v2-x86_64.conf View File

@ -1,2 +0,0 @@
title UEFI Shell x86_64 v2
efi /EFI/shellx64_v2.efi

+ 4
- 1
efiboot/loader/loader.conf View File

@ -1,2 +1,5 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
timeout 3
default archiso-x86_64
default archiso-x86_64.conf

+ 3
- 0
isolinux/isolinux.cfg View File

@ -1,3 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
PATH /%INSTALL_DIR%/boot/syslinux/
DEFAULT loadconfig


+ 0
- 2
mkinitcpio.conf View File

@ -1,2 +0,0 @@
HOOKS=(base udev memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block filesystems keyboard)
COMPRESSION="xz"

+ 27
- 11
packages.x86_64 View File

@ -1,5 +1,10 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
amd-ucode
arch-install-scripts
b43-fwcutter
base
bind-tools
broadcom-wl
btrfs-progs
clonezilla
@ -8,13 +13,12 @@ darkhttpd
ddrescue
dhclient
dhcpcd
dialog
diffutils
dmraid
dnsmasq
dnsutils
dosfstools
elinks
edk2-shell
efibootmgr
ethtool
exfat-utils
f2fs-tools
@ -23,31 +27,39 @@ gnu-netcat
gpm
gptfdisk
grml-zsh-config
grub
haveged
hdparm
intel-ucode
ipw2100-fw
ipw2200-fw
irssi
iwd
jfsutils
kitty-terminfo
lftp
linux
linux-atm
linux-firmware
lsscsi
lvm2
lynx
man-db
man-pages
mc
mdadm
memtest86+
mkinitcpio
mkinitcpio-archiso
mkinitcpio-nfs-utils
mtools
nano
nbd
ndisc6
netctl
nfs-utils
nilfs-utils
nmap
ntfs-3g
ntp
nvme-cli
openconnect
openssh
openvpn
@ -56,26 +68,30 @@ parted
partimage
ppp
pptpclient
refind-efi
reflector
reiserfsprogs
rp-pppoe
rsync
rxvt-unicode-terminfo
sdparm
sg3_utils
smartmontools
sudo
syslinux
systemd-resolvconf
tcpdump
terminus-font
termite-terminfo
testdisk
usb_modeswitch
usbutils
vi
vim-minimal
vim
vpnc
wget
wireless-regdb
wireless_tools
wpa_supplicant
wvdial
xfsprogs
xl2tpd
reflector
zsh
wget

+ 3
- 6
pacman.conf View File

@ -2,6 +2,8 @@
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# GENERAL OPTIONS
@ -16,10 +18,9 @@
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
@ -99,7 +100,3 @@ Include = /etc/pacman.d/mirrorlist
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
#[pwoss]
#SigLevel = Optional TrustAll
#Server = https://repo.pwoss.org/server/$arch/pkgs

+ 3
- 0
syslinux/archiso.cfg View File

@ -1,3 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
DEFAULT select
LABEL select


+ 5
- 0
syslinux/archiso_head.cfg View File

@ -1,3 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
SERIAL 0 38400
UI boot/syslinux/vesamenu.c32
MENU TITLE Arch Linux
@ -23,3 +26,5 @@ MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
MENU CLEAR

+ 15
- 12
syslinux/archiso_pxe.cfg View File

@ -1,35 +1,38 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
INCLUDE boot/syslinux/archiso_head.cfg
LABEL arch64_nbd
TEXT HELP
Boot the Arch Linux (x86_64) live medium (Using NBD).
Boot the Arch Linux install medium using NBD.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (NBD)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
MENU LABEL Arch Linux install medium (x86_64, NBD)
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver}
SYSAPPEND 3
LABEL arch64_nfs
TEXT HELP
Boot the Arch Linux (x86_64) live medium (Using NFS).
Boot the Arch Linux live medium using NFS.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (NFS)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
MENU LABEL Arch Linux install medium (x86_64, NFS)
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt
SYSAPPEND 3
LABEL arch64_http
TEXT HELP
Boot the Arch Linux (x86_64) live medium (Using HTTP).
Boot the Arch Linux live medium using HTTP.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (HTTP)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
MENU LABEL Arch Linux install medium (x86_64, HTTP)
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/
SYSAPPEND 3


+ 10
- 4
syslinux/archiso_sys.cfg View File

@ -1,13 +1,19 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
INCLUDE boot/syslinux/archiso_head.cfg
DEFAULT arch64
TIMEOUT 30
LABEL arch64
TEXT HELP
Boot the Arch Linux (x86_64) live medium.
Boot the Arch Linux install medium on BIOS.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
MENU LABEL Arch Linux install medium (x86_64, BIOS)
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
INCLUDE boot/syslinux/archiso_tail.cfg

+ 11
- 0
syslinux/archiso_tail.cfg View File

@ -1,3 +1,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
LABEL existing
TEXT HELP
Boot an existing operating system.
@ -19,9 +22,17 @@ COM32 boot/syslinux/hdt.c32
APPEND modules_alias=boot/syslinux/hdt/modalias.gz pciids=boot/syslinux/hdt/pciids.gz
LABEL reboot
TEXT HELP
Reboot computer.
The computer's firmware must support APM.
ENDTEXT
MENU LABEL Reboot
COM32 boot/syslinux/reboot.c32
LABEL poweroff
TEXT HELP
Power off computer.
The computer's firmware must support APM.
ENDTEXT
MENU LABEL Power Off
COM32 boot/syslinux/poweroff.c32

Loading…
Cancel
Save