junper交换机升级JUNOS

以下为个人操作的备用记录,并不适用于生产环境操作,且本人实际其中的操作过程中有翻车。

升级分2部分,分别是jloader和jinstall。

插上串行线,用putty之类的客户端,链接COM3端口。


进入系统后cli模式运行命令

先查看版本和固件并记录下来。  

>show version
>show chassis firmware

升级文件之前已经放在了内网搭建的ftp server上了,如果嫌弃麻烦可以U盘挂载升级。

request system software add ftp://junos:[email protected]/jloader-ex-3242-11.3I20110326_0802_hmerge-signed.tgz no-copy no-validate unlink reboot

重启后再查看一下jloader版本是否更新,没有对就再刷一次。


刷jinstall也是在cli命令下直接操作,show version则会显示JUNOS各项版本号和时间。

request system software add ftp://junos:[email protected]/jinstall-ex-4200-12.3R3.4-domestic-signed.tgz  no-copy no-validate unlink reboot

升级完后firmware会显示UBOOT版本的更新时间,

[email protected]> show chassis firmware
Part                     Type       Version
FPC 0                    uboot      U-Boot 1.1.6 (Mar 26 2011 - 04:42:33) 1.0.0
loader     FreeBSD/PowerPC U-Boot bootstrap loader 2.4
{master:0}
[email protected]> show version
fpc0:
--------------------------------------------------------------------------
Hostname: sg.gre1.klayer.com
Model: ex4200-48t
JUNOS Base OS boot [12.3R2.5]
JUNOS Base OS Software Suite [12.3R2.5]
JUNOS Kernel Software Suite [12.3R2.5]
JUNOS Crypto Software Suite [12.3R2.5]
JUNOS Online Documentation [12.3R2.5]
JUNOS Enterprise Software Suite [12.3R2.5]
JUNOS Packet Forwarding Engine Enterprise Software Suite [12.3R2.5]
JUNOS Routing Software Suite [12.3R2.5]
JUNOS Web Management [12.3R2.5]
JUNOS FIPS mode utilities [12.3R2.5]
JUNOS loader upgrade [11.3I20110326_0802_hmerge]

{master:0}
mount_msdosfs /dev/da1s1 /mnt
cp /mnt/jinstall-ex.tgz /var/tmp
umount /mnt
cli
root@SRX> request system software add /var/tmp/jinstall-ex.tgz
root@SRX> request system snapshot slice alternate
root@SRX> show system snapshot media internal
root@SRX> show system software backup

Jloader安装方式,重启后按住空格键进入jloader

#然后用install从U盘内安装
install file:///jinstall-ex.tgz


刷机有风险稍不注意就容易翻车。

我在刷jinstall精力涣散的情况下发生了翻车,系统启动停留在loader>命令行翻阅了官方资料后才重新刷好了系统。

准备一个U盘:
1.格式化FAT32再重写一次mbr引导记录。
2.将jinstall的文件拷贝到U盘。
3.断电重启设备,在终端按空格键扫描U盘,然后再boot命令
4.用install --format fille:///jinstall.tgz进行安装系统

用install可能会遇上cannot open package (error 22) 的错误,来回折腾了几次都失败。
用winrar打开包拖出里面的jinstall的tgz包放入U盘再用install执行安装成功了,不知是否是个例问题。

官方升级文档: https://www.juniper.net/documentation/en_US/junos14.1/topics/task/installation/jloader-install.html
http://www.juniper.net/techpubs/en_US/junos10.4/topics/task/installation/ex-series-software-installing-single-routing-engine-cli.html
http://www.juniper.net/techpubs/en_US/junos15.1/topics/task/configuration/ex-series-system-snapshot-boot-directory.html

USB挂载的一些文档。

https://kb.juniper.net/InfoCenter/index?page=content&id=KB12880&actp=RSS&smlogin=true
https://kb.juniper.net/InfoCenter/index?page=content&id=KB10800&actp=search

关于U盘的官方文档摘取转载如下

http://www.juniper.net/techpubs/en_US/release-independent/junos/topics/reference/specifications/port-ex-series-usb.html  

All USB flash drives used on EX Series switches must have the following features:

USB 2.0 or later.
Formatted with a FAT or MS-DOS file system.
If the switch is running Junos OS Release 9.5 or earlier, the formatting method must use a master boot record. Microsoft Windows formatting, by default, does not use a master boot record. See the documentation for your USB flash drive for information about how your USB flash drive is formatted.

添加新评论 »