I created a custom Arch distro iso with Archiso and I wrote an installation script that prompts the user for input for install options. So far, the installation process is:

  1. boot the arch iso
  2. execute the installation script with:

    $ ./install.sh

  3. input when prompted

Your typical-user-friendly-installer boots right to the installer and gets going. I'd like to do that by having ./install.sh run automatically instead of being executed by the user, so that step #2 is eliminated.

if I understand correctly, the arch iso gets the user to a terminal via a systemd service that calls /sbin/agetty. I think I either need to modify or replace that service to make it something that calls my script, but I'm not sure how to go about that, or if this is even close to the right approach.

What's the proper way to boot to an installer script on a distro live CD?

  • I solved it using my own services to execute my script on a different tty and then switch the active tty to that one. I'll post an answer demonstrating this when I can work on it a little more.
    – m59
    Jun 11 '17 at 20:58

You can run a script on boot by passing the script kernel boot parameter in the ISOs boot loader config files.

This assumes you are using the archiso package to create your ISO image.

Put your script somewhere like releng/airootfs/root/install.sh and set the executable permission bit on the script.

In releng/efiboot/loader/entries/archiso-x86_64-cd.conf append script=/root/install.sh to the options line.

In releng/syslinux/archiso_sys.cfg append script=/root/install.sh to the APPEND line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.