You can run JunOS software on a FreeBSD box with no major problems it’s called a Juniper Olive and it’s a great way of studying for your JNCIx exams, this post aims to improve on a the basic installation method you see elsewhere on the web.
Basic disclaimer I stole from Sid Smokes site:
A note about the JUNOS software: I will not send anyone Juniper software. Don't ask. If you don't know how to get it, then you're probably not supposed to have it anyway. You can download it from the Juniper site if you have an account. Don't bug Juniper JTAC about olives either. They are not supported.”
The improvements here are two fold, firstly this is a fresh install of JunOS 14.2R8.4 without having to install a previous version and upgrade from there. Secondly I like the idea of having a lab running on a single box so I prefer my Juniper Olives to be virtualised – I know it can be done with VMWare but the way it handles serial ports, HDD (SCSI instead of IDE) and so on means that VirtualBox is my VM platform of choice for a hassle free installation.
Previously this guide only supported JunOS 32bit version, but I've since tested with 64bit and it works just fine. I'll provide notes where needed for the version you want to use.
Requirements (Software versions I’ve used are in brackets).
- Windows (Windows 10).
- Oracle VirtualBox (Version 5.2.4 r119785)
- FreeBSD 6.4 - Either:
- JunOS jinstall package.
- 32bit procedure tested on 8.4, 8.5, 9.4, 10.0 and 12.3
- 64bit procedure tested on 14.2
VirtualBox Step-By-Step
First thing you want to do is install Oracle VirtualBox – the default install options will be just fine.
Once done create a new VM as follows:
Create VM
- Select New VM
- Name: “JunOS64” (Original yes?)
- O/S: BSD
- Version: FreeBSD 32bit or 64bit.
- Memory: 2048Mb (You can reduce this down depending on your version - but start with 2G)
- Hard Disk - You’ll need to create a new hard disk using the wizard in this window. Create a dynamically expanding disk of about 50Gb.
- Finish
You now need to edit the settings of the newly created VM, right click on the VM and select “settings”. Yes I know I’m teaching you to suck eggs.
Verify your settings are as follows:
- System
- Motherboard
- Disable Floppy from Boot Order
- Extended Features: IO APIC & EFI both disabled.
- Processor
- One CPU
- Extended Features: PAE/NX enabled.
- Acceleration
- VT-x/AMD-V: Enabled - If you do not have the option then you may not be able to run JunOS in VirtualBox, some people report success but I've never been able to make it work. The only workaround is to install JunOS on another computer with virtualisation technology and move the VM over to this computer – I may tutorial this later but it’s a terrible pain in the arse.
- Nested Paging: Enabled.
- Display: Defaults
- Storage
- IDE Primary: Juniper Olive 1.vdi
- IDE Secondary: FreeBSD CD ISO
- Floppy: Empty.
- Audio: Disabled.
- Network:
- Adaptor 1 – Enabled.
- Attached to: Bridged Adaptor (You can also use NAT, this adaptor will enable you to share your internet connection so you can access your FTP server. If your PC is connected to a router for your DSL/Cable then select bridged. If your computer connects directly to the internet with a USB dongle or DSL/Cable card then select NAT).
- Name: Whatever your current local network card is called.
- Serial Ports
- Port 1 Enabled
- Port Number: COM1
- Port Mode: Disconnected
- USB: Disabled
- Shared Folders: None.
That’s a bit of a long list of stuff and we’re not done yet but basically once you’re done your settings should look a little bit like this:
FreeBSD Install
Go ahead and fire up your VM, it should boot up and load the FreeBSD installer. Once you have chosen your language and keymap you will get to the main menu, you should select “Express - Quick installation (for experts)”.
When FDISK starts select “Use entire disk” (A key) then select the middle entry and make the disk bootable (S Key) then exit out (Q Key).
Let FreeBSD install the BootManager unless you have a pressing need to do otherwise.
You will now have to slice the disk as follows:
ad0s1a 1000M /
ad0s1b 500M swap
ad0s1d 10M /spacer
ad0s1e 500M /config
ad0a1f
/var
The spacer partition ensures that /config and /var have the correct designation (ad0s1e and ad0s1f respectively) – if your designations look a bit different that’s not a big problem. If anyone knows how to specify the slice so there’s no need to have the spacer mount then let me know. Save those slices off and you’ll be taken back to the menu.
Select the Minimal Distribution then select your install media. If you have the full FreeBSD install on CD then you should use that – if you booted from a Net install CD then you need to specify an FTP site.
The URL for the site is as follows:
32bit - ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/
64bit -
ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/
(That may change, you may need to hunt about for the correct location.)
During the FTP install you will be asked if you want to set up your network, do so and enter your network IP/Mask and gateway as requested.
For a CD install you may not get asked so select it from the menu so your network is up and running when FreeBSD starts.
Install FreeBSD – Once it’s complete, un-mount your CD and reboot into FreeBSD. Login as root with no password and you are good to go to the next stage documented
here.