0

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!

1 Answers1

0

You can try this:

  • unpack the installation ISO
  • mount the file root-image.sqfs:

mount -o loop -t squashfs /path/to/root-image.sqfs /mnt/point

Now you should be able to modify the start-up scripts in rc.d to add your commands. Make sure to force pacman to install without user input by adding the flag --noconfirm.

pacman -Syu
pacman -S openssh --noconfirm
...

After that you can repack the ISO and use this one instead of the vanilla ISO to install Arch remotely.

You may want to try booting with the ISO locally first to make sure that SSH actually gets installed upon booting.