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.

Update June 3 2011: Mention that it’s ESXi that I’m working with.

Overview

The installation breaks down into four major steps:

  1. Gather prerequisites
  2. Create virtual machine
  3. Install FreeBSD
  4. Install JUNOS

Prerequisites

I had these items on-hand before starting:

  • FreeBSD 4.11 mini-iso (I specifically needed 4.11; more on this below)
  • A copy of the jinstall 10.4R1 package (specifically, I used the M/MX/T series install package)
  • A working installation of ESXi 4.1u1

I will not share copies of any Juniper software so please don’t ask. You will need a valid Juniper support contract to download the jinstall bundle.

Create the Virtual Machine

The VM is pretty basic:

  • 1 vCPU
  • 512MB RAM
  • CD/DVD drive
    • Not needed for Olive, but needed to install FreeBSD
  • e1000 network adapter(s)
    • 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.

The first error I got was:

sysctl: unknown oid ‘hw.re.model’
ERROR hw.re.name sysctl not supported.

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.

/var/tmp/jinstall# rm *.sig *.md5 *.sha1
/var/tmp/jinstall# tar zcf ../jinstall-X-olive.tgz *

The jinstall-X-olive.tgz package is now ready to install using pkg_add(1).

/var/tmp# pkg_add jinstall-X-olive.tgz

When the install is complete, reboot the system.

Results

During the reboot JUNOS will install itself and then automatically reboot the system again. It’ll then come up in JUNOS.

root> show version
Model: olive
JUNOS Base OS boot [10.4R1.9]
JUNOS Base OS Software Suite [10.4R1.9]
JUNOS Kernel Software Suite [10.4R1.9]
JUNOS Crypto Software Suite [10.4R1.9]
JUNOS Packet Forwarding Engine Support (M/T Common) [10.4R1.9]
JUNOS Packet Forwarding Engine Support (M20/M40) [10.4R1.9]
JUNOS Online Documentation [10.4R1.9]
JUNOS Voice Services Container package [10.4R1.9]
JUNOS Border Gateway Function package [10.4R1.9]
JUNOS Services AACL Container package [10.4R1.9]
JUNOS Services LL-PDF Container package [10.4R1.9]
JUNOS Services PTSP Container package [10.4R1.9]
JUNOS Services Stateful Firewall [10.4R1.9]
JUNOS Services NAT [10.4R1.9]
JUNOS Services Application Level Gateways [10.4R1.9]
JUNOS Services Captive Portal and Content Delivery Container package [10.4R1.9]
JUNOS Services RPM [10.4R1.9]
JUNOS AppId Services [10.4R1.9]
JUNOS IDP Services [10.4R1.9]
JUNOS Runtime Software Suite [10.4R1.9]
JUNOS Routing Software Suite [10.4R1.9]

57 thoughts on “Installing Olive 10.4R1 under VMware”

  1. Tried this on 10.4R6.5 and ran into issues.

    followed your directions, then:
    pkg_add jinstall-10.4R6.5-domestic-olive.tgz
    Adding jinstall..
    /usr/bin/tar: This does not look like a tar archive
    /usr/bin/tar: Skipping to next header
    /usr/bin/tar: +CONTENTS not found in archive
    /usr/bin/tar: Error exit delayed from previous errors
    pkg_add: tar extract of /var/tmp/instmp.fl9hIO/jinstall_pkg failed
    pkg_Add: unable to extract table of contents file from /var/tmp/instmp.fl9hIO/jinstall_pkg – not a package?
    pkg_add: install script returned error status

    1. 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.

      1. 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).

        :w

        1. Great testing!!!.
          for 10.4R7.5 what are the names of the directories to use?, i.e.
          /var/tmp/jinstall_pkg and
          /var/tmp/jinstall_pkg/jinstall

          or /var/tmp/jinstall and
          /var/tmp/jinstall/jinstall_pkg

          we are pkg_add from /var/tmp ??? or from some other directory ?

          thanks
          P.S. I am having the same problems with 10.4R6.5 and 10.4R7.5

      2. 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.

    2. Wish you all a very Happy New Year 2012 !!!

      As a new year gift, do the below changes to get the installation of JunOS >=10.4R6.5 like 11.2R2.4 work :)

      Only the outer +INSTALL file need changes

      1. Comment the extractInner line

      # extractInner

      2. Comment and add like the following

      # pkg_add $PKG_FORCE $inner || fail=1
      pkg_add $PKG_FORCE jinstall-11.2R2.4-domestic.tgz || fail=1

      Now pack them and do the pkg_add and it should install successfully … :)

      1. I did this on in the 12.1R1.9 and it worked perfectly. I did have to remove the full extractInner script completely.

        Thanks!

        1. Hi Christine,
          Mine 12.1R1.9 has stuck during first reboot at:

          Setting packlist=jbundle-12.1R1.9-domestic.tgz

          do you maybe know what might be a problem?

          Thanks

          1. I get stuck on the same thing, it just hangs forever on jbundle-12.1R1.9-domestic.tgz

            I’ve trued Qemu, virtualbox & Vmware… all the same.

  2. I followed the instructions above to create a new tar for 10.4R4.5. I get the following error while booting:

    md0: Preloaded image 7729152 bytes at 0xc0a7e288
    WATCHDOG_TIMER : Loss of soft watchdog
    panic:
    db_log_stack_trace_cmd(c094e900,c094e900,e04e3b28,e04e3b14,e04e3b14) at db_log_stack_trace_cmd+0x36
    ….

    I’m using ESXi 5.0.0 btw

  3. I got the same issue with JunOS 11.4R1.14. Therefore, I took the +INSTALL files of JunOS 11.1R1.14 that was installing fine, I replaced the version numbers.

    And… victory 11.4R1.14 can be installed in VMWare (VMware player 4.0.1)

  4. I am stymied at the pkg_add – it absolutely fails every time. I tried the modifications suggested here – no luck. Anyone else get a fix for this?

  5. Dear Joel
    Could you do a tutorial for the instalation from Junos 11.xx or later.. pls ? .. because till now there is not nothing clear with this.

    Best Regards

    1. Hi Jhon,

      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.

  6. 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?

  7. Hi
    I get following error message, please help
    Adding jinstall
    ERROR: Package jinstall is not compatible -i386 vs {amd64}

    1. Did you install the amd64 version of FreeBSD? Check with “uname -m” at the shell. You must install the i386 version.

  8. Thanks Joel
    I did install amd64 version as i386 did not detect realtek adapter.
    I will try again installing i 386 version
    cheers
    Nik

  9. 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 :-)

  10. I’ve replaced re_model… with re_model=”olive” and I’m getting different error:

    This base version of JUNOS will not support this package. Please install base OS 6.4 or newer first. You can do this via jinstall package or install-media.

    any ideas?

  11. Hey, I was trying with SRX version. I’ve downloaded the J-series version now:
    jinstall64-13.3R1.6-export-signed.tgz

    I did as you wrote in your very good tutorial. I’ve replaced value for re_model on “olive”, replaced that file in pkgtool.tgz and packed that again.

    However I have now different issue:
    olive# uname -r
    4.11-RELEASE
    olive# ll
    total 715188
    -rw-r–r– 1 root wheel 732139052 Feb 13 12:05 jinstall64-13.3R1.6-olive.tgz
    drwxr-xr-x 2 root wheel 512 Feb 13 09:45 preinstall
    drwxrwxrwt 2 root wheel 512 Feb 13 09:28 vi.recover
    olive# pwd
    /var/tmp
    olive# uname -r
    4.11-RELEASE
    olive# pkg_add jinstall64-13.3R1.6-olive.tgz
    sysctl: unknown oid ‘hw.product.model’
    sysctl: unknown oid ‘hw.product.model’
    Adding jinstall64…

    gzip: stdin: not in gzip format
    /usr/bin/tar: Child returned status 1
    /usr/bin/tar: +CONTENTS: Not found in archive
    /usr/bin/tar: Error exit delayed from previous errors
    pkg_add: tar extract of /var/tmp/instmp.ZTL02z/jinstall64_pkg failed!
    pkg_add: unable to extract table of contents file from ‘/var/tmp/instmp.ZTL02z/jinstall64_pkg’ – not a package?
    pkg_add: install script returned error status
    olive#

    Do I need any partivular version of Junos to download to make this work like for J-Series, M-series, MX-seriver etc?

    I want to do lab at home for MPLS and BGP, but HW is very expensive and that would help.

    Thanks!

    1. just to clarify:

      For creating OLIVE it is required FreeBSD 4.11?
      Even for the newest packages where or I should get 64 bit FeeBSD and particular version?

    2. Hey Luk. It kind of looks like one of the inner tgz files either wasn’t built or wasn’t gzipped properly. Can you repeat the steps of extracting everything and bundling it all back up again?

      I don’t know if anything newer than 4.11 will work. Try it and see.

      1. ok, i’ve got same issue :(

        olive#pkg_add -v junos.tgz
        Requested space: 1628775408 bytes, free space: 13699745792 bytes in /var/tmp/instmp.ApgQkX
        Running pre-install for jinstall-11.4R10.3-export-signed..
        extract: Package name is jinstall-11.4R10.3-export-signed
        extract: CWD to .
        Running post-install for jinstall-11.4R10.3-export-signed..
        Adding jinstall…
        tar: Unrecognized archive format: Inappropriate file type or format
        tar: Error exit delayed from previous errors.
        pkg_add: tar extract of /var/tmp/instmp.ApgQkX/jinstall_pkg failed!
        pkg_add: unable to extract table of contents file from ‘/var/tmp/instmp.ApgQkX/jinstall_pkg’ – not a package?
        pkg_add: install script returned error status
        Change working directory to .
        pkg_add: 1 package addition(s) failed
        olive#

        it’s like it never gets proper or at all jinstall_pkg file for some reason. :/

        1. Hey Luk,

          From the brief output you pasted, I still suspect an issue with how things are being tarred back up. If I had spare time to try an install for myself, I would.

          1. olive# cd /var/tmp
            olive# ll
            total 342482
            -rw-r–r– 1 root wheel 350495681 Feb 23 16:42 jinstall-10.4R16.3-export-signed.tgz
            drwxrwxrwt 2 root wheel 512 Feb 16 18:01 vi.recover
            olive# tar xf jinstall-10.4R16.3-export-signed.tgz
            olive# rm jinstall-10.4R16.3-export-signed.tgz
            olive# mkdir jins
            olive# cp jinstall-10.4R16.3-export.tgz jins
            olive# cd jins
            olive# tar xvf jinstall-10.4R16.3-export.tgz
            olive# rm jinstall-10.4R16.3-export.tgz
            olive# mkdir pkg
            olive# cp pkgtools.tgz pkg
            olive# cd pkg
            olive# cp /usr/bin/true bin/checkpic
            olive# tar zcvf ../pkgtools.tgz *
            olive# cd ..
            olive# rm -fR pkg
            olive# vi ./+INSTALL
            (do stuff with re_name)
            olive# vi ./+REQUIRE
            (do stuff with re_name)
            olive# tar zcvf ../jinstall-10.4R16.3-export.tgz *
            a +COMMENT
            a +CONTENTS
            a +DEINSTALL
            a +DESC
            a +INSTALL
            a +REQUIRE
            a bootstrap-install-10.4R16.3.tar
            a jbundle-10.4R16.3-export.tgz
            a pkgtools.tgz
            olive# cd ..
            olive# rm -Rf jins
            olive# tar zcvf jinstall-10.4R16.3-olive.tgz *
            a +COMMENT
            a +CONTENTS
            a +DESC
            a +INSTALL
            a certs.pem
            a issu-indb.tgz
            a jinstall-10.4R16.3-export.tgz
            a vi.recover
            olive# pkg_add jinstall-10.4R16.3-olive.tgz
            Adding jinstall…
            tar: Unrecognized archive format: Inappropriate file type or format
            tar: Error exit delayed from previous errors.
            pkg_add: tar extract of /var/tmp/instmp.QaZy7e/jinstall_pkg failed!
            pkg_add: unable to extract table of contents file from ‘/var/tmp/instmp.QaZy7e/jinstall_pkg’ – not a package?
            pkg_add: install script returned error status
            olive#

            whatever I’m doing, installer has a problem with unpacking this stuff :(

  12. 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? :(

  13. Still doing investigation why that’s does not work

    even if I will do 1st level of extraction (i do not extract jinstall-10.4R16.3-export.tgz which i’ve extracted to jinst) and pack it back it does not work, so I don’t know how i should pack it.

    1. 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.

      olive# pkg_add jinstall-10.4R16.3-export-signed.tgz
      Verified SHA1 checksum of jinstall-10.4R16.3-export.tgz
      Adding jinstall…
      /usr/bin/tar: This does not look like a tar archive
      /usr/bin/tar: Skipping to next header
      /usr/bin/tar: +CONTENTS: Not found in archive
      /usr/bin/tar: Error exit delayed from previous errors
      pkg_add: tar extract of /var/tmp/instmp.Ah8ONH/jinstall_pkg failed!
      pkg_add: unable to extract table of contents file from ‘/var/tmp/instmp.Ah8ONH/jinstall_pkg’ – not a package?
      pkg_add: install script returned error status
      olive#

  14. Alll righty! :) It finally works!

    I used also some help from here:
    http://forum.ivorde.com/juniper-junos-11-4r8-based-olive-t14251.html

    I was using FreeBSD 7.0 i386 and jinstall-11.4R10.3-export-signed.tgz package.
    So..
    copy junos package to /var/tmp.
    I’ve used this simple script (located in /var/tmp) to do main work:

    #/bin/bash
    set f1=$1
    set f2=`echo $f1 | cut -d’-‘ -f1-3`”.tgz”
    echo “tar zxf of file: $f1”
    mkdir jinst
    cd jinst
    tar zxf ../$f1
    echo “unpacked. Removing $f2.*”
    rm $f2.*
    echo “creating export dir, and extracting next level”
    mkdir export
    cd export
    tar zxf ../$f2
    mkdir pkgtools
    cd pkgtools
    tar zxf ../pkgtools.tgz
    cp /usr/bin/true bin/checkpic
    tar zcvf ../pkgtools.tgz *
    cd ..
    rm -rf pkgtools

    after that:
    1. Modify +INSTALL.
    a). Change re_name value to re_name=”Olive”
    b). replace line: rootdev_size=`disklabel ${rootdev%a} | sed -n ‘/sectors.unit:/s,.*:,,p’` with: rootdev_size=”999999999999″
    2. Modify +REQUIRED.
    a). Change re_name value to re_name=”Olive”
    b). replace line: rootdev_size=`disklabel ${rootdev%a} | sed -n ‘/sectors.unit:/s,.*:,,p’` with: rootdev_size=”999999999999″
    3. Modify accordingly +CONTENTS and update MD5 sums (i don’t know if that solved problem)
    4. then:
    tar zcvf ../jinstall-11.4R10.3-export.tgz
    cd ..
    rm -rf export
    5. Modify +INSTALL.
    a). Change re_name value to re_name=”Olive”
    b). replace line “pkg_add $PKG_FORCE $inner || fail=1” with “pkg_add $PKG_FORCE /var/tmp/jinst/jinstall-11.4R10.3-export.tgz || fail=1″
    6. Modify again accordingly +CONTENTS and update MD5 sums (i don’t know if that solved problem)
    7. do not delete /var/tmp/jinst ! from here there will be pacakge installed later on.
    8. do:
    tar zcvf ../jinstall-11.4R10.3-olive.tgz *
    cd ..
    9. pkg_add -v /var/tmp/jinstall-11.4R10.3-olive.tgz
    10. add: console=”vidconsole” to /boot/loader.conf
    11. reboot :) and your are done! :D

    Thanks Joel for your help! Please try in your free time and check if that works for you as well.

  15. I’ve just finised scipt which will do all work for you.
    just copy junos image and this sctip to /var/tmp

    then ./script jinstal-some_version.tgz
    and you are done, just reboot after script will finish

    #!/bin/sh
    #get file arguments
    f1=$1
    f2=`echo $f1 | cut -d”-” -f1-3`”.tgz”

    #prepare 1st level
    echo “level1: tar zxf of file: $f1”
    mkdir jinst
    cd jinst
    tar zxf ../$f1
    echo “Extracted. Removing $f2.*”
    rm $f2.*

    #prepare 2nd level
    echo “level2: creating export dir, and extracting next level”
    mkdir export
    cd export
    tar zxf ../$f2

    #prepare pkgtools
    echo “level3: prepare pkgtools:”
    mkdir pkgtools
    cd pkgtools
    tar zxf ../pkgtools.tgz
    cp /usr/bin/true bin/checkpic
    tar zcvf ../pkgtools.tgz *
    cd ..
    rm -rf pkgtools

    #preparing INSTALL and REQUIRE files
    echo “level2: Editig files: INSTALL and REQUIRE”

    re_line=`grep -n “re_name=” +INSTALL | cut -d’:’ -f1`
    echo “level2: +INSTAL re_name”

    /bin/sh << EOF2
    #!/bin/sh
    ed +INSTALL << EOF
    $re_line
    a
    re_name='Olive'
    .
    $re_line
    d
    w
    q
    EOF
    EOF2

    echo "level2: REQUIREi re_name"
    /bin/sh << EOF2
    #!/bin/sh
    ed +REQUIRE << EOF
    $re_line
    a
    re_name='Olive'
    .
    $re_line
    d
    w
    q
    EOF
    EOF2

    #chaging space available for installation, make it static instead of checkign real disk space
    echo "setting up static disk space in files INSTALL and REQUIRE"

    rootd=`grep -n "rootdev_size=" +REQUIRE | cut -d':' -f1`
    echo "level2: INSTALL & rootdev_size"

    /bin/sh << EOF2
    #!/bin/sh
    ed +INSTALL << EOF
    $rootd
    a
    rootdev_size="9999999999999999"
    .
    $rootd
    d
    w
    q
    EOF
    EOF2

    echo "level2: REQUIRE & rootdev_size"

    /bin/sh << EOF2
    #!/bin/sh
    ed +REQUIRE << EOF
    $rootd
    a
    rootdev_size="9999999999999999"
    .
    $rootd
    d
    w
    q
    EOF
    EOF2

    echo "level2: compressing back to $f2, and going back to level1"
    tar zcvf ../$f2 *
    cd ..
    rm -rf export

    #preparing INSTALL file
    echo "level1: Editig files: INSTALL"

    re_line=`grep -n "re_name=" +INSTALL | cut -d':' -f1`
    echo "level1: +INSTAL re_name"

    /bin/sh << EOF2
    #!/bin/sh
    ed +INSTALL << EOF
    $re_line
    a
    re_name='Olive'
    .
    $re_line
    d
    w
    q
    EOF
    EOF2

    echo "level1: INSTALL changing path"

    path_line=`grep -n 'pkg_add $PKG_FORCE $inner' +INSTALL | cut -d':' -f1`

    /bin/sh << EOF2
    #!/bin/sh
    ed +INSTALL <> /boot/loader.conf

    echo “done. reboot whenever your are ready”

    1. Cool, thanks Luk. Is it just certain versions of junos that this needs to be done for? When did things change where these extra steps are now necessary?

  16. I try to install jinstall64-12.1X48-D60.4-domestic-signed.tgz on FreeBSD4.11(Vbox, base memory 512Mb) but system saw only 64 Mb memory. How can it work without kernel recompiling with option MAXMEM?

    1. OK with memory (/boot/loader.conf ->hw.physmem=”512M”)

      But after installation:

      Initialized the environment
      Routing engine model is Olive
      Discovered that flash disk = , hard disk = ad0
      ERROR: discover_install_drive: tmp/preinstall/install.conf not found
      You are now in a debugging subshell (you may not see a prompt)…
      # df -h
      Filesystem Size Used Avail Capacity Mounted on
      /dev/md0 8.1M 8.1M 0B 100% /
      devfs 1.0K 1.0K 0B 100% /dev
      devfs 1.0K 1.0K 0B 100% /dev
      /dev/ad0s1f 197M 2.0K 181M 0% /mnt

  17. 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.

    Thank

    1. Hi Bob,

      That will depend on which hypervisor you’re running Olive on. If you google around for how to configure a VM on your hypervisor, you should find the answer.

      1. Hi Joel,
        I use Oracle VirtualBox 4.3.10 to run Olive.
        When set the VM RAM for 512MB to 1024MB and reboot the VM I have the same Error when run jweb again

  18. Hi Joel,
    I use Oracle VirtualBox version 4.3.10 to run Olive.
    But when I set my MV memory directly from 512MB to 1024MB, I have the same Error

Leave a Reply

Your email address will not be published. Required fields are marked *

Would you like to subscribe to email notification of new comments? You can also subscribe without commenting.