Install FreeBSD from remote SSH session

       198 words, 1 minutes

I’m actually playing with a FreeBSD virtual instance on ESXi. I’m accessing the console from VMware vSphere client, running in a remote Windows XP instance that I access using TSE from my MacBook… A nice feature I saw on Debian is SSH remote installation.

Here’s how to install FreeBSD using a remote SSH connection.

Boot the FreeBSD Live CD ; I’m using FreeBSD-9.0-RELEASE-amd64-dvd1.iso in this example.

On the “Welcome” dialog box, select the “” option. Enter “root” as the login name ; no password is configured (yet). If required, you can use the “sysinstall” tool to configure a non-English keyboard. Go to “Configure / Console / Keymap”.

Before starting the SSH dæmon, we have to create a writable /etc space:

  # mkdir /tmp/etc
  # mount_unionfs /tmp/etc /etc

Then, configure SSH to allow remote root login and start the dæmon:

  # vi /etc/ssh/sshd_config
  PermitRootLogin yes
  # /etc/rc.d/sshd onestart

Finally, set the root password and configure the network interface:

  # passwd root
  # ifconfig em0 inet netmask up
  # route add default

From there, connect to the IP you configured using any SSH client and run “sysinstall” to install your FreeBSD instance.

That’s All Folks!