Installing Olive 10.4R1 under VMware

It’s been a long time since I’ve taken a run at getting Olive up and working. I wanted to take another stab at it and document how to get a working Olive installation using the latest JUNOS code. I also wanted to document how to get Olive up inside VMware ESXi since I hadn’t actually done that before.

The e1000 adapter type causes VMware to present an Intel based chip to the VM which JUNOS is capable of using.

Hard drive

I used the default size of 8G which turns out to be more than enough. My final Olive install is sitting around 1G used.

Guest OS: FreeBSD 32-bit

Install FreeBSD

Through some experimentation and reading of the em(4) man page I found that FreeBSD 4.11 is the only 4.x release that supports the Intel 82545EM chipset. This is the chipset that is emulated by VMware (at least under ESXi 4.1) when choosing the e1000 network adapter type. If you install something older than 4.11 you will not have any network interfaces that are usable by Olive.

Once the VM was created I connected its CD/DVD drive to the FreeBSD ISO I downloaded and powered on the VM. I ran through the FreeBSD installation, choosing the “standard” installation. I told fdisk to use the entire disk (option A) and laid out my disklabels like so:

Part

Mount

Size

a

/

1G

b

swap

1G

e

/config

12M

f

/var

6G

The /var disklabel needs to be big enough to hold future software update bundles, core dumps, log files, etc. On my fresh install it’s sitting at just under 700M used. If the JUNOS installer doesn’t like your disk layout, it seems it’ll tweak it to meet its needs. It also doesn’t matter if you install FreeBSD on a UFS2 or softupdate-enabled disklabel as JUNOS will reformat it for UFS.

Finally, I chose the “user” distribution, waited for the files to copy and then said “no” to all of the questions the installer asks afterward (things like, install ports collection? enable NTP? setup the network? etc). After rebooting from the hard drive, I was ready to install JUNOS.

Installing JUNOS

Ok, as I wrote earlier, I downloaded the jinstall package from Juniper. This is basically a FreeBSD binary package that is installed with pkg_add(1). However, this package expects it’s being installed on true Juniper hardware so some of the checks it does during installation fail under generic FreeBSD.

This comes from the +INSTALL file because, as the first line in the error says, there is no hw.re.model sysctl oid in FreeBSD. I fixed this by uncompressing the jinstall-X-domestic-signed.tgz file and editing the +INSTALL file by replacing the sysctl line in the check_arch_compatibility() function with a line that assigns a dummy value to re_name.

Olive +INSTALL Script

Sadly, this same function needs fixing in two more locations both of which are inside the jinstall-X-domestic.tgz archive. It looks something like this:

jinstall-X-domestic-signed.tgz

+INSTALL — needs fixing here

jinstall-X-domestic.tgz

+INSTALL — needs fixing here

+REQUIRE — needs fixing here

Uncompress jinstall-X-domestic, edit +INSTALL and +REQUIRE and fix re_name. But before bundling it all back up, replace the well documented “checkpic” file which lives inside pkgtools.tgz which lives inside jinstall-X-domestic.tgz which lives inside jinstall-X-domestic-signed.tgz. Ugh! So the whole picture really looks like this:

jinstall-X-domestic-signed.tgz

+INSTALL — fix re_name

jinstall-X-domestic.tgz

+INSTALL — fix re_name

+REQUIRE — fix re_name

pkgtools.tgz

bin/checkpic — replace with /usr/bin/true

Once I made these changes, I was almost ready to bundle all the tgz files back up but first the signature and hash files needed to be removed from jinstall-X-domestic-signed.tgz because none of them will match up now that changes have been made inside the packages.

You’re the second person recently to tell me that they had this issue. The other guy also happened to be using 10.4R6.5. What we discovered was that the original jinstall file that he downloaded from Juniper gave the same error when he tried to install it. This ruled out an error on his part when he was bundling up the tar files as per above. He reported that vanilla 10.4R4.5 did not give the same errors so he was going to try using that for Olive.

I’m eager to try 10.4R6.5+ myself but I won’t have the free time for at least a few days.

I ran into the same problem with 10.4R7.5. The older versions of the outer +INSTALL file (verified in 10.4R4.5) run pkg_add directly on the inner jinstall file. The newer versions (>=10.4R6.5) extract that archive into a directory named jinstall_pkg and run pkg_add against that directory.

The pkg_add command (at least the one in FreeBSD 4.11) doesn’t like being run against a directory instead of a tarball, so it throws that error about not being able to find +CONTENTS.

I’m looking into either hacking up the +INSTALL file or using a newer version of FreeBSD as the base (maybe a newer pkg_add command will like running against a directory).

I know I’m a bit late for the party, but I thought I would share my solution here.

This is happening because whoever originally packaged the installation made an assumption that pkg_add can install from a directory. It can do that in later versions of BSD, but not in 4.11. This is how I solved the problem for 12.1R1.9.

When you extract the package (the big, outer one), edit the +INSTALL file and go all the way to the bottom. Just above a function named extractInner() is a variable declaration:

inner=jinstall_package

Change it to the actual name of the inner package:

inner=jinstall-12.1R1.9-domestic.tgz

A bit farther down, just above an if block is a line like this:

extractInner

Comment it out:

#extractInner

That will prevent the installer from trying to run pkg_install on a directory rather than an actual package file. Everything else in this post worked excellently.

Unfortunately I don’t have the spare cycles to commit to testing Junos 11.x. If you read carefully through the comments on this post, you should be able to piece together the necessary workarounds to get it up and working.

I got some running but am having a difficult time networking them. Can someone help me understand the em0 interfaces? ie… the olive I have has 3 virtual interfaces. I assume map to em0 em1 em2. am I right in assuming this?

After quite a bit of struggling I managed to get my own Olive up and running. A few notes:
1. Using ESXi5.1, make sure you add the hard disk as IDE and not SCSI.
2. JunOS 11.2R4.3 didn’t work with FreeBSD 4.11, I had to use FreeBSD 6.4 32bit.
3. Partitions needed some adjustments. I succeeded with /=1000M,swap=500M,/config=100M,/tmp=2000M and finally /var=remaining 4000M or so out of 8G total.
4. There’s no need to bother with the “outer” tarball (“jinstall-X-domestic-signed.tgz”), just hack, repack and install the inner one (“jinstall-X-domestic.tgz”) thus eliminating the whole “extractInner” script issue.
5. For JunOS version 7.4 and later, overwrite the file “boot/bin/checkpic” with “/bin/true” within “pkgtools.tar”. This is described in detail elsewhere on the net so I won’t go into it here.

I was a little disappointed though, when it finally dawned on me that my Olive can’t do any flow based stuff like security policies or NAT. From what I understand, only the SRX (RISC hardware based) and the Firefly (officially supported virtual appliance) can do this. Still, it was a fun exercise :-)

k, thanks. I have no idea why that happen. I used previously tar from linux box as it was easier for me to do all this stuff. Now I went through freebsd tar and still getting same error, so I was wondering whats wrong? :(

OK, so I used original package and it does not work either! So that’s the problem that even original package does not work and question is why it does not work?
here is pure output when I was installing original package. So seems they are broken or i need to have domestic version or … whatever… I still don’t get why i get this error. I even used 4.11 and 7.x FreeBSD, same error.

Hi all, I have some error Installing “jinstall-12.1R1.9-domestic-signed”
I succed install “jinstall-12.1R1.9-domestic-signed” but when trying install web interface with jweb-12.1R1.9-signed.tgz I have this Errors:
cd /var/tmp/;ls
ls
cli
root> request system software add jweb-9.6R1.13-signed.tgz

root> request system software add jweb-9.6R1.13-signed.tgz
ERROR: Attempt to install JUNOS 12.1 on system with 64 MB of RAM.
ERROR: For JUNOS 9.0 and higher, at least 512 MB of RAM is recommended.
ERROR: Upgrade the RAM to 512 MB or more and try installing again.
root>

Someone can tell me how to upgrade RAM memory on Installed Olive from 64 MB to 512 MB.