How to run some commands after booting from ArchLinux disk? Or how to change some settings in .iso before booting?

Posted by Alexander Ovchinnikov on Server Fault See other posts from Server Fault or by Alexander Ovchinnikov
Published on 2011-03-15T14:48:13Z Indexed on 2011/06/24 8:24 UTC
Read the original article Hit count: 620

Filed under:
|
|

How to install Arch Linux with traditional installer with only ssh-access to server? There is nice guide: https://wiki.archlinux.org/index.php/Install_from_SSH

I try test this on my home vps:

  1. Start VPS with any linux bootable cd and login to remote server (vps)
  2. wget http://mirrors.kernel.org/archlinux/iso/latest/archlinux-2010.05-netinstall-x86_64.iso
  3. dd if=archlinux-2010.05-netinstall-x86_64.iso of=/dev/sda
  4. reboot ... I see, it works but without ssh connection...

I need make script, which will send this commands after reboot:

  1. aif -p partial-configure-network (and write some information about my server ip etc.)
  2. /etc/rc.d/sshd start (need to start sshd)
  3. echo "sshd: ALL" >> /etc/hosts.allow (to allow me login to server, by default deny all)
  4. passwd (by default its empty, can't login via ssh with empty password)

Can I edit .iso or may be /dev/sda? May be I need write script, which will start after system boot and do this things or may be I can set this settings by default and system will start with correct settings (i think its possible at least in 2. and 3.).

Thank you!

© Server Fault or respective owner

Related posts about installation

Related posts about boot