#!/hint/bash -euE # Copyright (C) 2023 Umorpha Systems # SPDX-License-Identifier: AGPL-3.0-or-later load_module "$(dirname -- "${BASH_SOURCE[0]}")/base-net.sh" packages+=( # Things to put in the initramfs: #bash # base #coreutils # base #grep # base #systemd # base #util-linux # base arch-install-scripts dosfstools e2fsprogs lvm2 pv # Other libisoburn syslinux ) pre_install+=(20:bootstrap:pre_install) bootstrap:pre_install() { local arg_mountpoint=$1 install -Dm644 /dev/stdin "$arg_mountpoint/etc/mkinitcpio.conf.d/umorpha-bootstrap.conf" <<'EOF' #!/hint/bash # Copyright (C) 2023 Umorpha Systems # SPDX-License-Identifier: AGPL-3.0-or-later # Insert 'umorpha-bootstrap' and 'lvm2' into HOOKS. for ((i=0; i<${#HOOKS[@]}; i++)); do if [[ ${HOOKS[i]} == filesystems ]]; then HOOKS=("${HOOKS[@]:0:i}" umorpha-bootstrap lvm2 "${HOOKS[@]:i}" ) break fi done EOF install -Dm644 /dev/stdin "$arg_mountpoint/usr/lib/initcpio/install/umorpha-bootstrap" <<'EOF' #!/hint/bash # Copyright (C) 2023 Umorpha Systems # SPDX-License-Identifier: AGPL-3.0-or-later build() { add_module cdrom add_binary eject add_runscript add_binary umorpha-install add_binary arch-chroot add_binary bash add_binary chroot add_binary readlink add_binary pv add_binary systemd-repart add_binary mkfs.ext4 add_binary mkfs.vfat add_binary pvcreate add_binary vgchange add_binary vgcreate add_binary vgremove add_binary lvcreate add_binary lsblk add_binary wipefs } help() { cat <