// post · 734

Running JunOS 12.1X47 on first gen SRX240H

·

So 12.1X47 just came out and no longer supports SRX devices with less than 2GB of ram.


I have a couple of spare Juniper SRX240Hs (so first gen devices with 1GB of ram) and would like to test 12.1X47 in my lab, unfortunately I don't have any 2GB ram devices in my lab.


When trying to install 12.1X47 on the SRX240H you get the following error:


Copying package ...

ERROR: Unsupported platform srx240h for 12.1X47 and higher

ERROR: validate-config: junos/+REQUIRE fails


So I decided to see if I could work around this and trick JunOS into installing on my 240H, I was successful :D


I wouldn't recommend ever using this in production, but I am sure it will work fine for the lab. The only difference between the 240H and the 240H2 is that the H2 has 2GB flash and 2GB ram, CPU is the same.


Now you can actually upgrade the ram in the SRX240H to 2GB, it just uses standard DDR2 PC ram (you just need to find a 2GB stick, I used 800MHz but 667MHz ram should work too).


First Upgrading SRX ram


Take off the SRX case and swap out the ram, easy!


Juniper SRX240H


Old Ram:


Old Ram


New Ram:
New Ram


As you can see the SRX now boots with 2GB of ram:


2GB Ram


Second modifying the installer checks


Unfortunately this isn't enough for 12.1X47 to install, the installer checks the model number not the amount of ram.


Copying package ...

ERROR: Unsupported platform srx240h for 12.1X47 and higher

ERROR: validate-config: junos/+REQUIRE fails

WARNING: Current configuration not compatible with /altroot/cf/packages/install-tmp/junos-12.1X47-D10.4-domestic


So it is time to modify junos-srxsme-12.1X47-D10.4-domestic.tgz to work on 240H devices.


I did this on Mac OS but any *nix system will work, it isn't that hard.


  1. Go and download junos-srxsme-12.1X47-D10.4-domestic.tgz from Juniper.

  2. Extract junos-srxsme-12.1X47-D10.4-domestic.tgz

  3. Now all we need to do is edit 2 files.
    1. In the +INSTALL file: Comment out line: 889 -> Error "Unsupported platform $product_model for 12.1X47 and higher" 

    2. In the +REQUIRE file: Comment out line: 889 -> Error "Unsupported platform $product_model for 12.1X47 and higher" 

      To comment out just add a # at the start of the line.


  4. Now we need to tar this back into a tgz file.
    1. So from the command line cd into the unzipped folder

    2. Now tar gz everything: tar czf ../junos-srxsme-12.1X47-D10.4-domestic-fixed.tgz *

    3. Once done I changed junos-srxsme-12.1X47-D10.4-domestic-fixed.tgz back to junos-srxsme-12.1X47-D10.4-domestic.tgz, not sure if that matters.


  5. Now you can install like any normal firmware upgrade: root> request system software add http://xxx/junos/junos-srxsme-12.1X47-D10.4-domestic.tgz reboot

Done!



 


Now this process still leaves the SRX 240H with only 1GB of flash, but even with a dual root partition there is still 100M+ free space on the primary mount point.


That should be fine for now, you might need to use external logging or a usb flash drive in future though.


Storage on 12.1X47


 


I am interested to know if this process works on 1GB ram devices, as these changes might allow JunOS X47 it install on them. Although I would recommend 2GB ram. 

// comments

· J guest
Thanks for sharing this.

I tried this on a 1Gig SRX210H-POE and it works..but flowd is running pretty hot in CPU utilization.
· Maurice Z guest
Awesome article! I was surprised when I tried installing X47 on my 210H's I was about to upgrade to 240H's thinking it would help. You just saved me a 2k!
· Iain guest
Thanks for this! It saved me getting a 220H cluster working with a dhcp client interface. Running a cluster on a pair of 1G SRX220H's now with dhcp support! They haven't burned up yet.
· Blockfish guest
This same procedure works on a SRX240B2 when upgrading to 12.3X48-D10.3. I upgraded the DRAM to 2GB as outlined by Michael. Note that the line numbers to the files to comment out are different than for version 12.1X47:

+INSTALL: line number 1043
+REQUIRE: line number 1043
· Michael Dale user
Thanks for the comments!

I was able to get 12.1X47 working on an SRX100B (512mb ram)! But it was really slow and not recommended.

I'd love to hack a SRX100B into an SRX100H, that should be possible as both have 1GB ram onboard.

I had a quick play with it, I suspect something in the uboot system needs changing though, so a bit more difficult.
· Tony guest
I just used this method to upgrade my SRX240H-POE to the just-released 12.3X48-D15.4 and it worked. I did have to upgrade the RAM to 2GB as with only 1GB it kept rebooting right before the login prompt.

So far it looks good. My data RAM usage is at 45% (less than it was at 1GB running 12.1X46.D25) and the data CPU utilization is almost nil.

The only thing that looks a little out of whack is I get the following POST errors when it first boots up:

BIST check passed.
PCIe: Initializing port 0
PCIe: Initializing port 1
Boot Media: nand-flash usb
Net: octeth0
BOARD NOT SUPPORTED
BOARD NOT SUPPORTED
Error: Broadcom Mini-Driver Kit Initialization failed
POST Passed

It doesn't seem to affect anything. I've put the firewall through its paces and so far so good. I have 14+ VPNs and five VLANs and it passes traffic as expected.

· michael guest
Hello.
I try do do this upgrade but it's give me error not a package or cannot open package(error 79)/

can you please specified which version of tar ar you using and specify for dummy command used for this?
Thanks.
· Michael Dale user
Hi Guys,

Possible issue to 12.1X46-D35.

With 2GB ram on my SRX240H1 at times I was getting:
panic: Error: Failed to find a valid wired memory profile

Tried this on two different SRX240H1s with 2GB ram and same issue.

So I suspect there is something checking the ram on boot up causing this version of JunOS to fail.

After downgrading back to the original 1GB stick it seems to be working again.

The setup was working fine with X44 so not sure if specifically broken by Juniper or just a bug.

Was an odd bug as only occurred on cold boot up.
· Tony guest
You can perform this same procedure with a Windows workstation. Just install Notepad++ as it keeps the UNIX formatting when editing the +INSTALL and +REQUIRE files and 7-Zip which will allow you to extract and re-inject the modified files. I just upgraded my SRX240H to 12.3X48-D40.5-domestic.tgz using these and it worked like a champ. You do need the 2GB upgrade though as 1GB will sit in a reboot cycle.
· Mark Guzman guest
I've found that order matters when creating the tar file. I borked my initial upgrade and then ran into the error Michael Dale encountered except in my case it happened when I tried to boot the previously working 12.1 image. Attempting to remotely install the same previously working image resulted in the kernel panic.

At this point I have 12.3X48-D45.6 running but not after MUCH effort. I had to use the loader to install via tftp which led me to finding the additional +INSTALL script copy in the isofs file. Some work with a hex editor to skip the check and boot so I could recover my device.

If anyone needs to try this again, I suggest tar -tvvvf to get the correct file order so that loader will find the kernel file.
· Richard guest
Works fine until a cold boot....always get then with 2GB RAM:

Booting [/kernel]...
Kernel entry at 0x801000e0 ...
init regular console
Primary ICache: Sets 64 Size 128 Asso 4
Primary DCache: Sets 1 Size 128 Asso 64
Secondary DCache: Sets 512 Size 128 Asso 8
GDB: debug ports: uart
GDB: current port: uart
KDB: debugger backends: ddb gdb
KDB: current backend: ddb
kld_map_v: 0x8ff80000, kld_map_p: 0x0
panic: Error: Failed to find a valid wired memory profile

· Kris guest
Hi Michael I had issues. I can't find the line or maybe I'm doing it wrong. Upgrading a 240h to h2 . It has 2gb dram but I need 12.3 which and needs h2 for a dhcp fix.

Can you show your full syntax and line you commented out ? Thankyou
· Nkosana Nkosi guest
Hi all, please assist. I'm trying to upgrade a software for cluster devices SRX240H2 and they have only one IP. I can login to node1 from node0 successfully, but when I tried to copy file from node0 to node1 I get errors.

Would you be able to assist please?

Thank you!!
· Roy guest
I'm seeing the exact same thing going on here. However, when trying to install an old version of the Junos Software from USB the "install file:///" command actually boots the broken image.

It's a bit unfortunate that this does not work, now it is time to find a way to revert back to any older software
· Victor Hooi guest
Hi,

I just tried this with "junos-srxsme-12.3X48-D70.3-domestic" on a SRX240 with upgraded 2GB of RAM.

It errors out with:

```
root> ...srxsme-12.3X48-D70.3-domestic.tgz no-validate no-copy
Installing package '/tmp/usb/junos-srxsme-12.3X48-D70.3-domestic.tgz' ...
Verified junos-boot-srxsme-12.3X48-D70.3.tgz signed by PackageProductionRSA_2018
Verified junos-srxsme-12.3X48-D70.3-domestic signed by PackageProductionRSA_2018
mount: /altroot: unknown special file or file system
WARNING: /altroot mount failed.

WARNING: This installation attempt will be aborted.
WARNING: If you wish to force the installation despite these warnings
WARNING: you may use the 'force' option on the command line.
ERROR: junos-12.3X48-D70.3-domestic fails requirements check
Installation failed for package '/tmp/usb/junos-srxsme-12.3X48-D70.3-domestic.tgz'
```

However, if I try to add the "force" option like it suggests, it says:

```
root> ...3X48-D70.3-domestic.tgz no-validate no-copy force
error: command is not valid on the srx240h
```

Any suggestions please?

Thanks!
Victor
· Partition Man guest
Hi, i patched the needed lines within this image "junos-srxsme-12.3X48-D100.1-domestic.tgz" on Debian as descripted ebove. After upgrading the RAM up to 2GB i was able to install this patched packed successfully on my SRX240H without any trouble. The SRX240 works great for me :) Thanks a lot for this descriptions Michael :)) Many thanks from Germany.
· Someone Special guest
Hey all this works with SRX240b2 on the recently security patch release 12.3X48-D101to patch JSA11021 (see: https://kb.juniper.net/InfoCenter/index?page=content&id=JSA11021), the critical security vulnerability in J-Web and web based (HTTP/HTTPS) services.
· Anonymous guest
FWIW you can avoid the "Failed to find a valid wired memory profile" error by setting the following at the loader prompt.

set wmem_selector=0
· Fabian guest
I only have access to "junos-srxsme-12.3X48-D90.2-domestic" and i wonder what rows should be commented out for a SRX210HE ?
· sharin guest
12.3X48-D105.4

line 1071

· sharin guest
search:
srxsme:srx[12][0-9][0-9]*:*)


comment the next line
"Unsupported platform $product_model for 12.1X47 and higher"
· Jet.Jake guest
Initial it didn't work for me!
Having OS [12.1R4.7] just swapped to a 2GB stick and rebooted.
The loader halted and said something like: 'No entry att address 0x????
Swapped back and it booted.
Then i saw in your pic that ju had 'U-Boot 1.1.6-JNPR-2.5'
I had 'U-Boot 1.1.6-JNPR-1.7 (Build time: May 4 2010 - 06:59:58)'
The remedy was with OS [12.1R4.7] and 1GB, enter Shell and issuing commands:
bootupgrade –u /boot/uboot
bootupgrade –l /boot/loader
That gave me: 'U-Boot 1.1.6-JNPR-2.8 (Build time: Feb 10 2015 - 01:03:41)'
Swapped back and Hey Presto it booted.

// leave a comment

> click for comments help

HTML allowed: <a href="" title="" rel=""></a> <b></b> <blockquote cite=""></blockquote> <em></em> <i></i> <strike></strike> <strong></strong> <li></li> <ol></ol> <ul></ul>
ie: <b>bold</b>

Your comment may need to be reviewed before it is published.