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/10 and 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 jinstall64-14.2R8.4-domestic-signed.tgz as an example; make sure you substitute it for your version in the following:
>mv jinstall64-14.2R8.4-domestic-signed.tgz src
>tar –xzf jinstall64-14.2R8.4-domestic-signed.tgz
>mv jinstall64-14.2R8.4-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 (jinstall64-14.2R8.4-domestic.tgz) into the /var/tmp directory and delete all the rest of the files.
Now we need to move the file back into the /var/tmp/src directory and extract it:
>mv ../jinstall64-14.2R8.4-domestic.tgz .
>tar –xzf jinstall64-14.2R8.4-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 src
This can be a bit hard to follow but basically at the start you were in the /var/tmp/src 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.