This post describes in detail (more or less) how to install the JUNOS 12.2R2.4 Software on FreeBSD to get the so called JUNOS Olive.
It explains which tools to use, shows how to setup the virtual machine using QEMU, links to the page to adapt the JUNOS package and finally goes through the installation process.
But before going into the details I really advise to read http://juniper.cluepon.net/index.php/Olive which will give some insights about Olive, what it is and why it is (still) available…
To do some testing and training with Juniper I decided to install Junos on FreeBSD to use it in GNS3. The GNS3 blog is basically a good starting point and I tested the installation based on it.
But compared to the instructions in their blog I wanted to
- use the latest Junos version 12.2R2.4
- run QEMU and GNS3 on Windows 7
To make it as easy as possible I recommend using QEMU Manager which is a GUI interface for QEMU. This will prevent you from struggling with the Windows command line and want you to take a hammer to destroy your screen… So many thanks for creating this excellent free tool!
For preparation
- Download the FreeBSD 4.11 image
- Install the QEMU Manager
- Install 7-Zip and notepad++ which you will need to easily apply changes to the Junos archive files. It’s also possible to uncompress and edit the archives in the virtual machine but due to wrong keyboard settings within the VM and much better performance on the host machine the first option worked better for me…
- Install freeSSHd which you will need to transfer files to and from the QEMU virtual machine
- Get the Juniper Install Package (jinstall-12.2R2.4-domestic-signed.tgz). I used the domestic image for M40 Series. Starting with M120 they use a 64bit OS.
- Important: Modify the Juniper Install Package as described in another post here
When everything is prepared launch QEMU Manager and create a new virtual machine using the wizard. Take care to choose an Intel E1000 as network card. Also configure the machine for 1024M RAM otherwise the installer will fail permanently. For hard disk choose a size of 10G which is more than sufficient. The final size of the virtual disk image after installation of the Juniper software will be about 5G.
The configuration should look like this:


Then startup the virtual machine.
When you reach the kernel configuration page, select “skip kernel configuration”.
At the sysinstall main menu select “standard installation” and proceed.
Now you will reach the FDISK partition editor. Simply press “a” and then “q” at this point to allocate all disk space and proceed.
On the next screen select “BootMgr” and go on. Confirm next screen with ok.
Now in the Disklabel Editor you have to create some mount points. We will create “/” (1G), “swap” (1G), “/config” (12M) and “/var” (the rest).
By pressing “c” you will enter the create dialogue which is shown only for the “/” mount point below.




Repeat the same for the other mentioned mount points and take care to choose “Swap” when creating the Swap… Finally it should look like this.

Press “q” to finish the configuration.
On the “Choose Distribution” Page select “Minimal” installation and select to install from CD on the next page. Start the installation process by confirming on the next screen.
When the installation process completed you will see a “Congratulation” screen which you confirm.
Answer all following questions with “No” or confirm them with “Ok”. Set the root password when prompted for it. Take care for the keyboard layout… Last question also a “No”.
Next screen shows the installation menu again so don’t be too quick with your hands and press only “Exit Install”. Confirm the reboot, turn off the virtual machine, remove the CD and startup again.
Wait for the system to be ready again and login with your root credentials.
Now we need to get an IP address by issuing “dhclient em0” and try to ping the host. You will notice that the VM will get an IP address from 10.0.2.x/24. The host has 10.0.2.2. I don’t know where this is configured but it’s important that it works at this point. QEMU training is another lesson…


Now start the freeSSHd and try to open a shell from the VM to the host to confirm that ssh works.

Looks good. Now it’s time to transfer the install file to the VM and start the installation process. We will use SFTP to accomplish this task.


After pkg_add completed you are asked to reboot. Do this by issuing “shutdown -r now”. When the system restarts you will notice the BTX boot loader.

I didn’t make it to redirect the serial console to standard out in QEMU Manager but if you are not too nervous just wait until the installer finishes… you should notice some CPU load and hard disk activity on your host machine. For me it took about 15 minutes until the installer completed and the device showed the Junos login prompt:

Congratulations!