Install FreeBSD from remote SSH session

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 “<Live CD>” 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 192.168.0.2 netmask 255.255.255.0 up # route add default 192.168.0.1

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

That’s All Folks!

1 Comment

  • Jouni Sat, 29 Sep 2012 22:33:00 +0000 Reply

    THANKS!

Leave a Reply

%d bloggers like this: