feat(archiso): auto-start guided installer on boot, use answerfile for unattended mode
.zlogin execs .automated_script.sh on login, which checks for /answerfile.json; if present it runs the auto installer (passing the path), otherwise launches the guided installer directly — no manual invocation needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
33934f633d
commit
278ffb4a5a
|
|
@ -88,6 +88,7 @@ cp "$DOTFILES_DIR/setup/arch-autoinstall.sh" "$PROFILE/airootfs/root/in
|
|||
|
||||
chmod 755 \
|
||||
"$PROFILE/airootfs/root/launch.sh" \
|
||||
"$PROFILE/airootfs/root/.automated_script.sh" \
|
||||
"$PROFILE/airootfs/usr/local/bin/install-arch" \
|
||||
"$PROFILE/airootfs/root/installer/"*.sh
|
||||
|
||||
|
|
@ -106,4 +107,6 @@ ls -lh "$OUT_DIR/"*.iso 2>/dev/null || true
|
|||
|
||||
if [[ -n "$PRECONF_FILE" ]]; then
|
||||
echo "Answerfile embedded — automated install will activate on boot."
|
||||
else
|
||||
echo "No answerfile — guided (manual) installer will start automatically on boot."
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# Modules explicitly included because mkinitcpio's autodetection runs on the
|
||||
# build host and won't pick up filesystem/storage drivers needed at live boot.
|
||||
MODULES=(squashfs overlay iso9660 loop dm_mod xhci_pci xhci_hcd ehci_pci ehci_hcd usb_storage uas)
|
||||
HOOKS=(base udev microcode modconf kms memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs block filesystems keyboard)
|
||||
COMPRESSION="zstd"
|
||||
COMPRESSION_OPTIONS=(-9 --long)
|
||||
|
|
@ -4,9 +4,10 @@
|
|||
| by The_miro |
|
||||
+-----------------------------------------------------+
|
||||
|
||||
Commands:
|
||||
install-arch guided installer (recommended)
|
||||
install-arch auto automated installer (no prompts)
|
||||
The installer starts automatically on login.
|
||||
To re-run manually:
|
||||
install-arch guided installer (manual mode)
|
||||
install-arch auto automated installer (requires answerfile)
|
||||
|
||||
Scripts are also at: ~/installer/
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ANSWERFILE="/answerfile.json"
|
||||
|
||||
if [[ -f "$ANSWERFILE" ]]; then
|
||||
exec /root/launch.sh auto "$ANSWERFILE"
|
||||
else
|
||||
exec /root/launch.sh guided
|
||||
fi
|
||||
|
|
@ -0,0 +1 @@
|
|||
exec /root/.automated_script.sh
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
INSTALLER_DIR="$HOME/installer"
|
||||
case "${1:-guided}" in
|
||||
auto) exec bash "$INSTALLER_DIR/arch-autoinstall.sh" ;;
|
||||
auto) exec bash "$INSTALLER_DIR/arch-autoinstall.sh" "${@:2}" ;;
|
||||
guided) exec bash "$INSTALLER_DIR/archbaseos-guided-install.sh" ;;
|
||||
*) exec bash "$INSTALLER_DIR/archbaseos-guided-install.sh" ;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -15,8 +15,10 @@ airootfs_image_tool_options=('-comp' 'zstd' '-Xcompression-level' '15')
|
|||
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
|
||||
file_permissions=(
|
||||
["/etc/shadow"]="0:0:400"
|
||||
["/etc/mkinitcpio.conf.d/archiso.conf"]="0:0:644"
|
||||
["/root"]="0:0:750"
|
||||
["/root/.automated_script.sh"]="0:0:755"
|
||||
["/root/.zlogin"]="0:0:644"
|
||||
["/root/launch.sh"]="0:0:755"
|
||||
["/root/installer/archbaseos-guided-install.sh"]="0:0:755"
|
||||
["/root/installer/arch-autoinstall.sh"]="0:0:755"
|
||||
|
|
|
|||
Loading…
Reference in New Issue