Juniper SRX系列防火墙 OS恢复过程

OS丢失后系统会不停的刷屏 如下:

U-Boot 1.1.6 (Build time: Dec 12 2009 - 17:17:55)

SRX_210_HIGHMEM board revision major:0, minor:28, serial #: AAAD7891
OCTEON CN5020-SCP pass 1.1, Core clock: 400 MHz, DDR clock: 200 MHz (400 Mhz data rate)
DRAM: 1024 MB
Starting Memory POST…
Checking datalines… OK
Checking address lines… OK
Checking 512K memory for U-Boot… OK.
Running U-Boot CRC Test… OK.
Flash: 4 MB
USB: scanning bus for devices… 3 USB Device(s) found
scanning bus for storage devices… 1 Storage Device(s) found
Clearing DRAM… done
BIST check passed.
Starting PCI
PCI Status: PCI 32-bit
PCI BAR 0: 0xf8000000, PCI BAR 1: Memory 0x00000000 PCI 0x00000000
Net: octeth0
POST Passed
Press SPACE to abort autoboot in 1 seconds

空格键停止启动,进入下面的界面

ELF file is 32 bit
Loading .text @ 0x8f000078 (241008 bytes)
Loading .rodata @ 0x8f03ade8 (13908 bytes)
Loading .rodata.str1.4 @ 0x8f03e43c (15972 bytes)
Loading set_Xcommand_set @ 0x8f0422a0 (96 bytes)
Loading .rodata.cst4 @ 0x8f042300 (20 bytes)
Loading .data @ 0x8f043000 (5572 bytes)
Loading .data.rel.ro @ 0x8f0445c4 (120 bytes)
Loading .data.rel @ 0x8f04463c (136 bytes)
Clearing .bss @ 0x8f0446c8 (8304 bytes)

Starting application at 0x8f000078 …

Consoles: U-Boot console
Found compatible API, ver. 1.6

FreeBSD/MIPS U-Boot bootstrap loader, Revision 1.6
(builder@ormonth.juniper.net, Sat Dec 12 15:59:41 UTC 2009)
Memory: 1024MB
[10]Booting from nand-flash slice 1
Un-Protected 1 sectors
writing to flash…
Protected 1 sectors
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ not found

U-Boot Exception, Cause: 4
Failed to load kernel.
zero: 00000000 at: acedbade v0: ffffffff v1: 00000000
a0: 8f011dc0 a1: 8f03efa0 a2: 8f011de8 a3: 8f05e2a0
t0: 8f064998 t1: 8f064a60 t2: 8f0460e8 t3: 00000000
t4: 00000000 t5: fffffffc t6: 800a5084 t7: 800b6598
t8: 00000080 t9: 800557ac s0: 00000000 s1: 8f0465b8
s2: 8f0465b8 s3: 8f01b6bc s4: 00000002 s5: 00000000
s6: 8f03efa0 s7: 00000000 k0: aaaaaaaa k1: aaaaaaaa
gp: 800a55a0 sp: 8f011db0 s8: 00000001 ra: 8f015d0c
sr: 504000e7 mullo: 0000000e mulhi: 000000e0 badvaddr: ffffffff
cause: 40008010 pc: ffffffff

= > ?
? - alias for ‘help’
askenv - get environment variables from stdin
autoscr - run script from memory
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run ‘bootcmd’
bootd - boot default, i.e., run ‘bootcmd’
bootelf - Boot from an ELF p_w_picpath in memory
bootloader - upgrade u-boot
bootloader - upgrade loader
bootloader - upgrade ushell
bootloader - upgrade flash
bootloader - check u-boot
bootloader - check loader
bootm - boot application p_w_picpath from memory
bootoct - Boot from an Octeon Executive ELF p_w_picpath in memory
bootoctelf - Boot a generic ELF p_w_picpath in memory. NOTE: This command does not support
simple executive applications, use bootoct for those.
bootoctlinux - Boot from a linux ELF p_w_picpath in memory
bootp - boot p_w_picpath via network using BootP/TFTP protocol
bootvx - Boot vxWorks from an ELF p_w_picpath
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
cpld - peek/poke CPLD
crc32 - checksum calculation
dhcp - invoke DHCP client to obtain IP/boot params
dumpoct - dump octeon regs
dumpstats - dump cavium stats
echo - echo args to console
eeprom - EEPROM sub-system
erase - erase FLASH memory
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
flinfo - print FLASH memory information
go - start application at address ‘addr’
gpio - read/write on gpio pins
help - print online help
i2c - read/write on i2c bus
id_eeprom - peek/poke EEPROM
ide - IDE sub-system
iminfo - print header information for application p_w_picpath
imls - list all p_w_picpaths found in flash
itest - return true/false on integer compare
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls609x_read_reg - Read 88E6097 register
md - memory display
mdkinit - start MDK
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nfs - boot p_w_picpath via network using NFS protocol
nm - memory modify (constant address)
pci - list and access PCI Configuration Space
pciemd - pcie memory display
pciemw - pcie memory write
pciereset - do PCIE reset
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot p_w_picpath via network using RARP/TFTP protocol
read64 - read 64 bit word from 64 bit address
read64b - read 8 bit word from 64 bit address
read64l - read 32 bit word from 64 bit address
read_cmp - read and compare memory to val
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sleep - delay execution for some time
smi - peek/poke SMI devices
tftpboot- boot p_w_picpath via network using TFTP protocol
usb - USB sub-system
usbboot - boot from USB device
version - print monitor version
watchdog <start | stop | show | pat>
write64 - write 64 bit word to 64 bit address
write64b - write 8 bit word to 64 bit address
write64l - write 32 bit word to 64 bit address

清除 FLASH 中的配置并重启

=> erase ?

Usage:

erase - erase FLASH memory

=> reset

Consoles: U-Boot console
Found compatible API, ver. 7

FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.1 (marcelm@apg-bbuild01.juniper.net, Wed Feb 6 11:23:55 PST 2008)
Memory: 1024MB
Loading /boot/defaults/loader.conf
Unable to load a kernel!

can’t load ‘/kernel’
can’t load ‘/kernel.old’

Type ‘?’ for a list of commands, ‘help’ for more detailed help.
loader>

loader> set ipaddr=192.168.168.130

loader> set netmask=255.255.255.0

loader>

loader>

loader> install tftp://192.168.168.9/junos-srxsme-10.0R2.10-domestic.tgz

等待时间比较长。。。。

风不停
QQ 76900998
MSN yazai_200@hotmail.com
转载于:https://blog.51cto.com/genisystem/353710

<think>好的,我现在需要解决用户提到的在IAAS环境中运行iaas-install-mysql.sh脚本时报错“can't read /etc/etcd”的问题。首先,我得理解这个错误的原因。用户是在安装MySQL时遇到问题,而脚本试图读取/etc/etcd目录,但可能该目录不存在或权限不足。 首先,我应该确认/etc/etcd目录的作用。Etcd通常用于分布式系统中的键值存储,比如Kubernetes等容器编排系统。在MySQL安装脚本中为什么会涉及到这个目录呢?可能这个IAAS环境需要依赖Etcd服务来存储某些配置信息,比如数据库的元数据或者集群信息。如果脚本需要访问Etcd的配置文件或数据,但目录不存在,就会报错。 接下来,可能的几个原因和解决方法: 1. **检查/etc/etcd目录是否存在**:用户需要先确认该目录是否存在。如果不存在,可能需要安装Etcd服务或者创建该目录。但如果是脚本的问题,可能需要检查脚本的逻辑是否有误,是否错误地引用了该路径。 2. **权限问题**:即使目录存在,运行脚本的用户可能没有读取权限。需要检查目录的权限设置,使用ls -l /etc/etcd查看,并用chmod或chown调整权限。 3. **Etcd服务未安装**:如果IAAS环境依赖Etcd,但未正确安装,那么需要先安装并配置Etcd。可能需要通过包管理器安装etcd相关的软件包,并启动服务。 4. **脚本错误**:检查脚本中引用/etc/etcd的部分是否正确,是否是拼写错误或路径错误。可能用户提供的脚本有bug,需要修改脚本中的路径。 5. **环境配置问题**:可能IAAS环境需要特定的配置,比如环境变量指向正确的Etcd路径,或者配置文件中的设置需要调整。 接下来,我需要给出具体的解决步骤: - 首先,确认/etc/etcd是否存在:运行`ls /etc/etcd`,如果不存在,可能需要安装etcd或者联系环境管理员。 - 检查权限:使用`ls -ld /etc/etcd`查看权限,确保运行脚本的用户有读取权限。 - 安装Etcd:如果Etcd未安装,根据操作系统使用yum或apt-get安装,比如`yum install etcd`,然后启动服务。 - 检查脚本内容:查看iaas-install-mysql.sh脚本中引用/etc/etcd的部分,确认是否正确,可能需要修改路径或修复脚本。 - 查看日志:运行脚本时的详细日志可能提供更多线索,添加set -x或查看错误输出。 另外,用户提到的参考引用中有MySQL 5.7手册和Unix论坛的链接,可能与MySQL安装依赖的环境有关,比如某些集群配置需要Etcd的支持。需要确保IAAS环境的所有依赖服务都已正确配置。 最后,如果用户无法自行解决,可能需要联系IAAS环境的技术支持,确认安装MySQL的前提条件是否满足,或者获取修正后的安装脚本。</think>[用户可见层] ### 解决`iaas-install-mysql.sh`报错“can't read /etc/etcd”的步骤分析 #### 1. 确认`/etc/etcd`目录状态 - **检查目录是否存在** 执行命令: ```bash ls /etc/etcd ``` - 如果目录不存在:说明Etcd服务未安装或配置错误,需安装Etcd(见步骤2)[^1]。 - 如果目录存在:检查权限问题(见步骤3)。 #### 2. 安装并配置Etcd服务(若目录不存在) - **通过包管理器安装** - CentOS/RHEL系统: ```bash yum install etcd -y systemctl start etcd systemctl enable etcd ``` - Ubuntu/Debian系统: ```bash apt-get install etcd -y service etcd start ``` - **验证安装** 检查服务状态: ```bash systemctl status etcd # CentOS/RHEL service etcd status # Ubuntu/Debian ``` 若服务启动失败,需检查配置文件(通常位于`/etc/etcd/etcd.conf`)或端口冲突。 #### 3. 检查目录权限 - **查看权限设置** ```bash ls -ld /etc/etcd ``` 输出示例: ```bash drwxr-x--- 2 etcd etcd 4096 Jun 10 10:00 /etc/etcd ``` - 若运行脚本的用户(如`root`或`mysql`)不在`etcd`组或无读取权限,需调整权限: ```bash chmod 755 /etc/etcd # 开放读权限 chown -R etcd:etcd /etc/etcd # 确保归属正确 ``` #### 4. 检查脚本逻辑 - **查看脚本中`/etc/etcd`的引用** 使用文本编辑器打开`iaas-install-mysql.sh`,搜索`/etc/etcd`: ```bash grep -rn "/etc/etcd" iaas-install-mysql.sh ``` - 若路径被硬编码且实际环境路径不同(如`/opt/etcd`),需修改脚本中的路径。 - 若脚本依赖Etcd的配置文件(如`etcd.conf`),需确保文件存在。 #### 5. 查看详细错误日志 - **启用脚本调试模式** 在脚本开头添加`set -x`以输出执行细节: ```bash #!/bin/bash set -x # 添加此行 ``` 重新运行脚本,观察具体报错位置。 #### 6. 联系IAAS环境支持 如果上述步骤无效,可能是IAAS平台对MySQL安装有特殊限制,需提供以下信息给技术支持: - 完整的脚本报错日志 - 操作系统版本(`cat /etc/os-release`) - Etcd服务状态及版本(`etcd --version`) ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值