In my previous post I told you how to prepare VirtualBox and FreeBSD to accept a Juniper Olive. Now we need to upload the JunOS software and install it.
In the good old days (JunOS 7.4) this was quite an easy task but since 8.4 things have got a bit more complicated, Juniper upgraded the version of FreeBSD and added a utility that verified the PICs meaning that the install would fail even if you tried to force it.
- This isn’t supported, Juniper will die a little inside if you ring the JTAC up and demand to know why your Olive doesn’t work. Enough of this and they will stop olives working altogether so play nice.
- I can’t supply JunOS to you, nor can I recommend anyone who can. If you don’t have access to it then you shouldn’t and you should go out for a nice pint or two instead.
- I’m a network engineer and have a very basic knowledge of BSD, feel free to mock my tar/gzip/shell skills or better yet tell me an easier way.
I’m assuming that you’ve followed the previous post and are sitting at the root prompt of your FreeBSD VM.
First thing you need to do is get the jinstall tarball onto your VM, I have a FTP server running on my PC for this purpose but you may have one on the internet or a home server etc. If you don’t and you need a good FTP server I can recommend FileZilla just make sure that if you’re running Windows 7 or Vista you enable the server exe in your firewall.
Creating the Olive Installer
Use the FTP CLI within FreeBSD to get the jinstall into your home directory. I’ve used the following filename as an example; make sure you substitute it for your version:
Do the following:
>mv jinstall-9.4R4.5-domestic-signed.tgz tmp
>tar –xzf jinstall-9.4R4.5-domestic-signed.tgz
>mv jinstall-9.4R4.5-domestic.tgz ..
>rm –r *
Because this is a signed version of JunOS you need to extract the non-signed version out of the tarball, once done we move the non-signed version (jinstall-9.4R4.5-domestic.tgz) into our home directory and delete all the rest of the files.
Now we need to move the file back into the tmp directory and extract it:
>mv ../jinstall-9.4R4.5-domestic.tgz .
>tar –xzf jinstall-9.4R4.5-domestic.tgz
In this directory you will now see all the detail of the package, the file we are immediately interested in is the pkgtools.tgz file. Create a new tmp folder and extract this file into it.
>tar –xzf ../pkgtools.tgz
Now we need to replace the checkpic binary with something that will give a more positive response when called:
>cp /usr/bin/true bin/checkpic
This means that every time the installer runs this to check the validity of the PICs it will be told that everything is a-ok. Now we need to package this back up, remove our temporary files then repackage the whole thing up into our modified jinstaller.
>tar –czf ../pkgtools.tgz *
>rm –r tmp
>tar –czf ../jinstall-olive.tgz *
>rm –r tmp
This can be a bit hard to follow but basically at the start you were in the /root/tmp/tmp directory where the pkgtools were stored and have tar and zipped all the files up. I’m sure this whole page can be done in a single line of shell but I don’t have the slightest clue how.
If everything has gone to plan you should be left in the root home directory with a file called “jinstall-olive.tgz”. If you want you can copy this over to your ftp server so if you want to use it again you don’t have to follow the above process a second time.
Installing the software from here is quite easy:
>pkg_add –f jinstall-olive.tgz
It will throw up a load of warnings (too late you used the –f force switch) and tell you that you need to reload. Issue the “shutdown –r now” command and hope for the best.
If all goes will the VM will reboot, get to the boot loader then then appear to stop. This just means that output is redirected to COM1 port, new versions of JunOS (not 8.4) now enable login on the console screen so you don’t need to play about with the COM1 port (if you remember we enabled it but ignored it in the last post).
After about 5 minutes it will reboot again and then after a further few minutes you should end up with a login prompt. Login is root with no password and you should be dumped to the new Olive shell. Enter “cli” and you are now running your own Juniper Olive.