找回密码
 立即注册
楼主: xsp1989

[原创] 完美解决猫盘群晖掉IP问题

 火... [复制链接]

0

主题

14

回帖

158

积分

初级渣柚V2

积分
158
mai852852 发表于 2023-1-14 21:57:46 | 显示全部楼层 IP:–河南–郑州 联通
学习一下

2

主题

5

回帖

51

积分

初级渣柚V2

积分
51
QQ
xietao2007a 发表于 2023-1-17 15:37:30 | 显示全部楼层 IP:–陕西–西安 电信
感谢分享。

0

主题

2

回帖

11

积分

初级渣柚V1

积分
11
QQ
chen95 发表于 2023-1-17 21:24:14 | 显示全部楼层 IP:–广东–深圳–盐田区 电信
看看怎么解决

1

主题

3

回帖

46

积分

初级渣柚V1

积分
46
gray19 发表于 2023-1-17 21:58:38 | 显示全部楼层 IP:–陕西 移动/全省通用
谢谢谢谢谢谢谢谢谢

0

主题

7

回帖

21

积分

初级渣柚V1

积分
21
QQ
nas66xcom 发表于 2023-1-18 09:18:32 | 显示全部楼层 IP:–河北–唐山 电信
转发:我好像解决部分猫盘刷群晖后掉IP的问题了. c1 h: |1 I! t" [) f  o7 p

2 \- y3 D+ m* K4 K$ q: {aquila995
8 B& @& q+ v7 S! U7 R5 j
4 }! w- |' X$ O于 2020-06-24 16:37:11 发布8 J6 `9 C) M) S7 K. {
- l# z8 _$ V; o) l
132151 G9 ], M1 m* n8 T% L& ?
收藏 13
6 I  `; M: Z1 I0 Q4 r8 n4 v/ n分类专栏: 群晖5 f7 H* }& R( O8 _% a! e
版权
: O) K1 ^0 C  I1 c
$ y' N  A+ n# p群晖
! Q! z1 c8 S5 _; A专栏收录该内容
: t& m7 }2 \& }1 篇文章0 订阅
" S+ a/ }; p8 }* f0 r订阅专栏' `* ~" V, I: C' S
我好像解决部分猫盘刷群晖后掉IP的问题了
8 R; }1 J6 j! ]
& u; f5 K% ^( \: G- {! h' C- a我好像解决部分猫盘刷群晖后掉IP的问题了. m" a8 T' y1 O
+ h1 T' t( `, U. r! q# J
先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。, h% t# D0 B6 h9 o- N2 {' F- ^
然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
' V$ e. R, b6 n' v
0 ]) c" \5 {/ a) o0 m* z跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。1 U1 @9 h7 m9 u% m- B- T

9 {) T% x4 S) |$ q/ W然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。/ T6 E: S0 S2 M. d% ~9 r+ f' b& F3 C

8 W4 r5 I3 Y' \  A& u( Q- T先看了下有什么可用的命令:' n5 g, G  m1 Y0 H4 {( I

; O* u7 G! Z# [5 [Marvell>> help- _0 B, w! C8 N4 J% Q, O/ ^
?       - alias for 'help'
/ ^7 G% t5 f/ C3 q2 q5 j( @base    - print or set address offset  O  k. D: O. V% w
bdinfo  - print Board Info structure& y# G; m+ X  }$ t6 T
blkcache- block cache diagnostics and control
. l8 g, l* f* M, dboot    - boot default, i.e., run 'bootcmd'
9 C! c$ y' m5 }bootd   - boot default, i.e., run 'bootcmd'
0 U5 F' `3 a4 B. H$ v8 K& Wbootefi - Boots an EFI payload from memory
9 x1 V" H( n) T9 O$ Lbootelf - Boot from an ELF image in memory
" u$ R. E1 u! mbooti   - boot arm64 Linux Image image from memory" U2 h( \0 C2 I( ^' J" F
bootm   - boot application image from memory$ a+ ]% ~2 F  r5 l0 ?6 A
============================================================
, C6 P; I1 ~$ O. J  O4 B; ?$ r5 I) ^bootp   - boot image via network using BOOTP/TFTP protocol
" q( e2 _+ E' W+ k- b============================================================6 u& X  U1 Q: H1 h
bootvx  - Boot vxWorks from an ELF image
* ]% b' Z6 u' lbubt    - Burn a u-boot image to flash) X5 K* T2 m1 G" G9 j& V
cmp     - memory compare; M7 U) `4 D9 f7 l' }5 k
coninfo - print console devices and information% ^9 m  q8 D6 K/ p3 r) |
cp      - memory copy
" ^- ?- H7 h' i6 ]! ?( T5 b. L! acrc32   - checksum calculation' Q$ w; `  f- O5 }' \2 ]& F1 ~! S
dcache  - enable or disable data cache
0 I) @  b* ]# x. V! T-------------------------------------------------------------
* w) L# m+ C3 Ydhcp    - boot image via network using DHCP/TFTP protocol( f# b+ F9 z# N9 m
-------------------------------------------------------------
& _* }6 x/ M& w2 adm      - Driver model low level access6 L3 G$ {2 x( V: o
echo    - echo args to console. K% [0 l: B" Z* B+ h
editenv - edit environment variable
" w3 o1 _3 R3 ?5 t! }env     - environment handling commands
! ?9 k9 W; g$ e: d6 |: b4 bexit    - exit script( x0 W- h1 F) m7 o9 @; P
ext2load- load binary file from a Ext2 filesystem. y2 K8 B8 P4 f% `6 P( `/ r% v3 |
ext2ls  - list files in a directory (default /)& `& V- U, Q+ ]: U# c2 J: S. |. V  Z
ext4load- load binary file from a Ext4 filesystem
' e! {2 X' f" ^. c7 t9 b3 @/ F+ e4 Bext4ls  - list files in a directory (default /)
; a3 `0 C0 s* o' F/ @ext4size- determine a file's size- Z1 a' i( p: G- C6 q1 P
ext4write- create a file in the root directory/ j5 r5 X9 ?3 V. C8 ^+ j
false   - do nothing, unsuccessfully( F( @; d: n$ `+ }' I+ g
fatinfo - print information about filesystem
' B  W) {% @4 p4 mfatload - load binary file from a dos filesystem* r0 h9 F# Q+ }  c% D
fatls   - list files in a directory (default /)( z* V, ~* s* Z7 E8 @8 S4 I  Q
fatsize - determine a file's size. h+ o: n1 z7 l1 S- |9 _
fdt     - flattened device tree utility commands
# b6 l# b- _% U; I/ L; X+ j( nfstype  - Look up a filesystem type
1 m, l5 y) l3 M2 d. \3 jgo      - start application at address 'addr'/ [, i1 P6 d) e0 g, I
gpio    - query and control gpio pins" q; ?3 A2 I9 |
help    - print command description/usage
2 E5 G* l2 t0 q+ Ai2c     - I2C sub-system
, e) t* r9 b( bicache  - enable or disable instruction cache
/ `0 p4 y, s0 G+ U% T( timinfo  - print header information for application image
) p: j( L4 [2 _ir      - ir    - Reading and changing internal register values.$ I; O" r! G# y) ]% B

" B) F; }4 X. A2 N8 m 4 |! e( f# ?( m0 C
itest   - return true/false on integer compare
6 _  t& f/ O# T6 yload    - load binary file from a filesystem3 T5 L6 @8 V$ P, z: A5 ]
loadb   - load binary file over serial line (kermit mode)% N" D% J/ X1 |( K: F  ^1 y
loads   - load S-Record file over serial line+ M7 @' b! M. V8 {
loadx   - load binary file over serial line (xmodem mode)1 O9 c. S6 p  Y6 _* M# t
loady   - load binary file over serial line (ymodem mode)
3 d) I# q6 |; l/ G. b: P4 N6 @loop    - infinite loop on address range  `0 w' d3 @8 F- A
ls      - list files in a directory (default /)
( }0 j$ y& X% Glzmadec - lzma uncompress a memory region
5 E2 z' J! f( G" b' U+ Zmd      - memory display
3 E, L4 K- Q1 w+ H, f. Tmdio    - MDIO utility commands
4 b. ]( v6 l: }& G3 ]+ u0 @5 Tmii     - MII utility commands' {" t3 `) c; B% ~& F. i/ M5 E
mm      - memory modify (auto-incrementing address)
- k9 P- s! z6 ammc     - MMC sub system* h6 ^! s+ _# L$ B( X7 t6 f0 F/ D+ E
mmcinfo - display MMC info
& o8 J0 j: D) a1 f/ zmw      - memory write (fill)0 j# \4 x) e0 v. u
nfs     - boot image via network using NFS protocol
# H" m; s3 @5 `" g- Nnm      - memory modify (constant address)
) l# G; \- ^& z! x2 Gpart    - disk partition related commands
+ C/ U6 S5 w- Q0 _ping    - send ICMP ECHO_REQUEST to network host+ V( i0 O3 {+ k& f5 y
printenv- print environment variables; j, \0 v4 r2 Y
pxe     - commands to get and boot from pxe files
% E- Z  L0 r% w% d) rregulator- uclass operations
" i7 z2 \0 G$ X( h0 B8 freset   - Perform RESET of the CPU( ?1 a' n' L+ b% V. s& ], J
run     - run commands in an environment variable" ?+ D" W" _! s1 v- C% R; ]" }
save    - save file to a filesystem5 H' r8 T: M0 b% A
saveenv - save environment variables to persistent storage
* q9 U# D1 j# A0 e& x/ Gscsi    - SCSI sub-system
, v. ~; _% [$ C! K' Y/ ^- d- hscsiboot- boot from SCSI device) D# \- P' q/ P1 m7 T$ `! O
setenv  - set environment variables
$ n6 U7 F8 q5 w4 Xsf      - SPI flash sub-system' k8 \: v3 j( E+ o+ g2 U  ^
showvar - print local hushshell variables8 N* P+ C+ T5 ^4 }, l% K! O5 O
size    - determine a file's size
5 @$ Z7 G- ~0 ]! W) f" e5 \& i3 usleep   - delay execution for some time
( N& |  [* e& t2 x; o( X8 t& Usource  - run script from memory
+ w; C) _& ~2 y7 b" Xsspi    - SPI utility command3 F; K3 p, d  t' N* o* t
sysboot - command to get and boot from syslinux files
; d) Q1 n9 E( M1 n# d- v+ stest    - minimal test like /bin/sh
9 l! U% a0 q/ X' e; `tftpboot- boot image via network using TFTP protocol
" o2 }0 i  F5 g; k) f" G% W- |time    - run commands and summarize execution time
! r7 \- v3 T, ^3 S2 Gtrue    - do nothing, successfully- F. k4 o; ]% G$ e" W* S5 B
usb     - USB sub-system) i' p: G9 W) @( S9 W& z4 t3 P+ T
usbboot - boot from USB device
$ D' L# b( N# V3 ?version - print monitor, compiler and linker version' w& @0 ~- A/ Z1 i. u3 }" s
% J" a7 g( ?/ @7 K9 y0 F5 D
发现了gpio
7 ^6 ~1 s" j: o8 o( ]0 [( { ' s3 `0 W4 B, s$ L
arvell>> gpio9 m& a5 M6 j8 `5 G' [
gpio - query and control gpio pins
* T# E( }$ [  |  j; M
0 Z0 q; Y- N! K3 o  h' A1 W
  g8 r! N$ H5 N! |9 u" LUsage:
- E+ l9 t! i" i* R# Q; g: rgpio <input|set|clear|toggle> <pin>
" u$ D' K& C6 w; u  }3 Y7 D    - input/set/clear/toggle the specified pin$ P+ t+ G9 {1 d5 o* a: n
gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs6 }' B' p: K4 n' n& k

  V8 _! l: \/ W1 @9 x 2 `: K5 O( O0 O* D( {: r: B6 [! H
Marvell>> gpio status
* S, f4 ?& R6 I. U4 b* `" Y( t+ Q9 kBank GPIO2:  |+ ?- l) d3 t/ F( `, p
GPIO20: output: 1 [x] sata_pwr2 x' `1 V* Q7 G7 W, l5 T. u
GPIO221: output: 1 [x] phy_reset# z" g% m' K. T. O! P) G" w9 T
" k) I7 q% E5 |: `' q8 @
可见的io脚4 [* f2 @  x7 e" E4 g. k4 {

$ E# ^. ]0 Z; A5 R7 L7 W# p, u8 YMarvell>> gpio status -a. l9 N# {3 F/ O! q- h
Bank GPIO1:
& e/ W9 G: U9 L: ~* xGPIO10: input: 0 [ ]
' M/ c7 f) y0 j) f2 V' dGPIO11: input: 0 [ ]
0 h# x: h% R$ E$ g. l" I( P4 ?GPIO12: input: 1 [ ]6 d& O! f9 b8 D, S" G. Q
GPIO13: input: 1 [ ]
6 M+ @1 _; u' G2 kGPIO14: input: 1 [ ]
: V# c( l" ?: E; Y# ?" t1 H$ ~2 bGPIO15: input: 1 [ ]( q2 b4 b: X# O5 D) o
GPIO16: input: 0 [ ]& G! b7 @6 o' q  `: o* ?0 D
GPIO17: input: 0 [ ]! D( q. U1 f% n6 K
GPIO18: input: 0 [ ]7 e/ [  q- e' A
GPIO19: input: 0 [ ]
1 p6 v4 q1 R' ?GPIO110: input: 1 [ ]8 I, b5 [& S5 d& O7 R/ |# f
GPIO111: input: 0 [ ]
; d( m+ R# P2 l, VGPIO112: input: 0 [ ]  L8 h+ s9 }2 J
GPIO113: input: 0 [ ]. G# h2 c2 H2 U' y, f! Q7 x" u
GPIO114: input: 0 [ ]) l* M- @  G; S" C9 N6 W
GPIO115: input: 1 [ ], x2 K' G& B/ ]
GPIO116: input: 1 [ ]7 A( |6 s7 y2 Q; [$ Z3 L) @% q$ V- D
GPIO117: input: 1 [ ]2 r' w9 _$ P4 w3 d( ^4 `. y  \( M6 C/ B
GPIO118: input: 1 [ ]
& {; b$ w$ s( F( XGPIO119: input: 1 [ ]
  Q% m9 V. n; T* i" P; B! ]GPIO120: input: 0 [ ]
4 q& _1 i6 h- a; hGPIO121: input: 0 [ ]3 F2 G' O2 ?! B# b4 v' `0 t8 }. q
GPIO122: input: 0 [ ]7 O6 G& u+ f. C) x
GPIO123: input: 0 [ ]' a- ^% ?. M8 S+ \2 C0 X! f2 `
GPIO124: input: 0 [ ]! p* j: Y# a! u2 i/ Q
GPIO125: input: 0 [ ]# Y% |! [9 H0 e' z+ `  P
GPIO126: input: 0 [ ]
7 s. F9 k8 y9 X' ]GPIO127: input: 0 [ ]7 R: y1 p0 [. K, [! w: {/ {
GPIO128: input: 0 [ ]" f$ K( D+ f' Z" g' x
GPIO129: input: 0 [ ]5 u. b# \% Q% k: \
GPIO130: input: 0 [ ]4 B1 \: o3 T9 B
GPIO131: input: 0 [ ]
: v$ F. G. F  c% |7 V1 ?GPIO132: input: 0 [ ]' [6 }3 O3 g% W/ a. `! J
GPIO133: input: 0 [ ]( `8 j- @1 L6 {8 a7 }6 j
GPIO134: input: 0 [ ]
, j; X' B0 y2 d3 P  T# zGPIO135: input: 0 [ ]6 v! k( g. c( t% T0 g" T
8 V% a5 a4 M- q) g
5 j+ I! n* Z) C3 u5 Z* y( n- c
Bank GPIO2:9 `  E8 r: j& ?0 K& ?/ y1 A+ L; L
GPIO20: output: 1 [x] sata_pwr
5 U0 x# q4 E* F+ }; W& `: AGPIO21: input: 0 [ ]
. T/ D$ Z1 p9 \5 EGPIO22: input: 1 [ ]1 f8 E  Z8 m. ]& Y+ o( ~
GPIO23: input: 1 [ ]
& I4 d  }  f: i; i1 a  RGPIO24: input: 1 [ ]! O0 C; R4 C3 f2 y# n  a- v
GPIO25: input: 1 [ ]
% P3 T0 X( O9 @. v3 g- cGPIO26: input: 0 [ ]2 V$ D, `( Q# a% |1 s' j- v
GPIO27: input: 1 [ ]# S$ ]. d0 Z) A3 s. o* _4 c1 A% z
GPIO28: input: 1 [ ]7 h7 |( Z4 \5 t, M( X2 M8 w( D% z& V
GPIO29: input: 1 [ ]( J; ]* l. a: U  m
GPIO210: input: 1 [ ]# p  K/ ?- g& p! g9 ^$ i
GPIO211: input: 1 [ ]
$ ^  i/ t3 H$ D: MGPIO212: input: 0 [ ]
$ w& L* q7 U# o$ @- LGPIO213: input: 0 [ ]6 M+ S& W- `% e# c5 u8 \9 T; U2 B; @& T( Q
GPIO214: input: 1 [ ]% E8 p! g5 m* Q5 }$ i% d
GPIO215: input: 1 [ ]0 }& U9 f1 z! a$ W4 b
GPIO216: input: 1 [ ]
8 C7 ~4 o0 X  U. Z1 P1 YGPIO217: input: 1 [ ]
  A6 S2 [7 Z& g: tGPIO218: input: 1 [ ]3 C# o1 I3 ^9 |3 L
GPIO219: input: 1 [ ]# ]# O2 v+ s* Q- Q/ L0 |
GPIO220: input: 0 [ ]
0 \. J4 b+ F# n) o. v! G' z; lGPIO221: output: 1 [x] phy_reset
" Q- c+ W) S7 x' `GPIO222: input: 1 [ ]# J2 W2 o8 }1 R% O5 {& r2 o
GPIO223: input: 1 [ ]7 s/ p6 Z; n( W
GPIO224: input: 1 [ ]
1 j. q1 t, c! d, T3 cGPIO225: input: 1 [ ]
+ @+ w, v8 `9 i' {$ _# n1 C! |3 }GPIO226: input: 1 [ ]$ q. Y; K" B( e
GPIO227: input: 0 [ ]5 {. G) h7 V/ l1 d' J
GPIO228: input: 0 [ ]
) f- l! {# a9 F8 P( I8 j2 CGPIO229: input: 0 [ ]
$ v0 R8 B7 ~/ @" D8 @ 3 s8 O3 @: R. z. c- l
别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。; }* I/ M/ u# M: a2 {- N
2 n" x+ Q, w# O6 ?
Marvell>> gpio0 @( C0 J. q8 y6 x+ m" p
gpio - query and control gpio pins* `: F! \& N- ^: ?4 Y3 R

, O, a! _$ |" Q% M . R% I: N1 H1 e' k
Usage:1 n% C# M: N, c' p. E
gpio <input|set|clear|toggle> <pin>: I6 u, w1 c2 k! X* R
    - input/set/clear/toggle the specified pin# ?2 q1 q/ G2 j( D0 N
gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs
7 R" u0 T4 S- Y+ n3 a/ b
9 L9 |6 y9 I. k  _. C! {  M" tset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)" b4 \6 K$ r9 h) Q1 N, A( s( {
" w* P* C' z/ [  t$ {7 D
然后看到env有地方是参数设置,类似dos的环境变量吧
6 X8 d9 p1 {5 U- V; `0 j8 ^
; h8 @. @9 v9 n9 K  F+ |Marvell>> env print
6 L1 Q: k  C7 J5 M. Parch=arm3 _% j1 W* P$ }
baudrate=115200/ d4 ?! H: h$ s8 W; m$ t
board=mvebu_armada-37xx# r# q! m5 z* D8 s3 s4 y9 ~
board_name=mvebu_armada-37xx. B( A) J* ?9 E. r' e( C
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
  O0 i5 F+ T9 C& uboot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};' p  J3 b0 T! y
boot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};. Y+ ?; C# x' E' u; b
boot_targets=usb mmc0p1 mmc0p2 sata
7 N2 ^0 x0 K# N- ?/ n1 F/ I. [boot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
% p4 i: C, Y4 M, M9 A5 z4 X/ Pbootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi
+ [9 H9 b. u$ f" Mbootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
3 m2 h: G" O2 u1 u  |bootcmd_normal=run bootcmd_syno;
9 G0 d& G6 S# W( U" N4 v7 p6 Ybootcmd_syno=run syno_bootargs;sf probe;sf read $loadaddr 0x0D5000 0x306000;echo "syno: start decompressing kernel... ";lzmadec $loadaddr $kernel_addr;sf read $initrd_addr 0x3DB000 0x410000;sf read $fdt_addr 0xd2000 0x3000;booti $kernel_addr $initrd_addr $fdt_addr;
" ]% e' `1 ?- p* {bootdelay=11 K7 W! B3 X0 `& V( O
bootdev=scsi 0:1/ z7 ^/ e' }' ^5 M8 H( Y
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
: J( O. s# i9 ^6 E& b5 M! j  Hcpu=armv8
, V6 p% ?* L1 [" d- r: o5 V" Bethact=neta@30000
5 k/ X. k& [8 o1 L6 \8 l5 dethaddr=00:11:32:11:22:00, Q3 [, E; A6 S- s# D
ethprime=eth0
" {* O$ t/ Y# r" [9 Nfdt_addr=0x6000000* S9 V2 h& l& Z
fdt_high=0xffffffffffffffff
2 S, ^% _/ S( b6 L8 C# q# ^fdtcontroladdr=1f6437d0
6 Y( e" ^) q( O  W. |. _gatewayip=192.168.1.254' ?( o2 A! ~5 K; p  F: K
hostname=catdrive) P7 j% I5 n. p  O$ A- x+ l% Z
image_name=/vmlinuz% C: j8 h+ e6 b# E  @' N
initrd_addr=0x1100000+ u9 s8 R3 }  u! y9 i% G0 [
initrd_size=0x2000000* r  T7 }/ ~- j. s4 e
ipaddr=192.168.1.119% R( d# ^3 y! m6 @2 {8 d
kernel_addr=0x7000000
# Y4 f' {7 \) {5 v$ h( @loadaddr=0x8000000
- b, p7 D; l1 `! b4 rnetdev=eth0
# k  {2 C2 T+ Y- o# A; P- jnetmask=255.255.255.0
4 V! l# y" e! @! G0 X9 i- j$ X( wrootpath=/srv/nfs/
* h) J. q* x3 ]& fscriptaddr=0x6d00000* p' Z6 r) V( I* C0 S
serverip=192.168.1.254% U! Z) E$ c1 ~1 j- u" n! k
soc=mvebu
! a+ S0 P, l. j( c# x% Istderr=serial@120003 t  o5 [& p, C& p9 I! S2 a3 U# d" l5 |
stdin=serial@12000
6 o; @4 k0 n. B/ U0 c+ M: L: Lstdout=serial@12000" A2 F2 t1 ~$ |8 r$ N* R
syno_bootargs=setenv bootargs console=ttyS0,115200 ip=off root=/dev/sda1 rw swiotlb=2048 syno_hw_version=DS119j syno_fw_version=M.246 syno_hdd_powerup_seq=1 ihd_num=1 netif_num=1 syno_hdd_enable=40 syno_hdd_act_led=10 flash_size=8 vendor=Marvell, t8 _, V; j3 C/ D: x1 ^
vendor=Marvell2 R, j5 Z  s& w
. |/ S1 Q  Q2 i' P, o! D& d; [

* A0 m% z; k! P9 XEnvironment size: 2001/8188 bytes
; p( q. G- m: a' i5 {Marvell>>
# l- w' j# e3 V
8 S% R3 N& g* c2 L看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.
8 e3 o. }1 {9 X; k, A' W7 t" |, Vbootcmd_syno=run syno_bootargs;sf probe;sf read $loadaddr 0x0D5000 0x306000;echo "syno: start decompressing kernel... ";lzmadec $loadaddr $kernel_addr;sf read $initrd_addr 0x3DB000 0x410000;sf read $fdt_addr 0xd2000 0x3000;booti $kernel_addr $initrd_addr $fdt_addr;
; V5 }$ X# a6 u% K: _
, \. g% j' S  Q5 n5 Z4 x, }这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了9 F" x: W! A8 O3 D
bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒
1 h/ K: n% `1 \) @3 O/ T9 m
! g3 ]7 W& c# ]; G/ q5 Abootcmd_syno=gpio clear GPIO221;sleep 10;gpio clear GPIO20;sleep 10;gpio set GPIO221;sleep 10;gpio set GPIO20;sleep 10;run syno_bootargs;sf probe;sf read $loadaddr 0x0D5000 0x306000;echo "syno: start decompressing kernel... ";lzmadec $loadaddr $kernel_addr;sf read $initrd_addr 0x3DB000 0x410000;sf read $fdt_addr 0xd2000 0x3000;booti $kernel_addr $initrd_addr $fdt_addr;
, L& ]. |" G8 @& ~9 b ( v' D. E6 O1 @( Q4 _
注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。$ @3 z- I& o3 k$ f/ @/ l. M* }' L
思路是:& H4 u1 Z1 b# V9 J6 e0 J, Y
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。8 |# L" l4 {( L* g% ^! L, O5 ~
) S& Z3 G  f8 D7 o3 \1 a
这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
& j+ e& B( G2 X# N8 ?+ B: \! F
% E3 e3 d8 k, l" u/ q) T控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启% ~' n* D5 X  c1 C4 I# v; \9 I/ W
#!/bin/bash3 i6 V- s$ e- L) f% _# R, l
dt=`date '+%d/%m/%Y %H:%M:%S'`' u/ A6 V7 U! u' z5 Y: u' [
echo "$dt"
5 K* L( i2 l3 E  Q3 f, E/ x# p6 ysleep 60- I" v$ Y$ x0 w) ?
num=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
' N, p, f, F# F" L3 I% Yecho $num/ M0 Y8 W3 p7 Y
echo $?' l* Q- \% G8 l+ C5 U4 p( e* W1 o7 C
if [ $? -eq 0 -a $num -eq 0 ]; then, _( V8 [2 q1 q4 w' |! M' D
    echo "$dt ok" >> /result.txt4 y( i' J" H+ B) A4 |
else4 Y9 \8 Y6 X0 d* ~; X% [3 _0 P/ G
    echo "$dt noip loss $num reboot" >> /result.txt
& Y; u2 B' `8 b# x/ L5 k3 b    reboot. a6 w8 G0 H7 a2 p* C0 ]
fi  n% F* _% f) \# k* o
) J* T" F' F! ]0 U; `0 k8 M
第五行,ping后边的IP自己改,我用了一个外网的IP。& A) _, h6 X/ |% J

' ]" K6 H5 i! M7 Z8 G( Z总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。  t  V/ h5 X# G: @) k+ X* z: X
) C( n1 G: X, ~6 i
我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。0 C! d: i. l6 |$ u" X

1 e+ ~' T/ \. l还是上边60秒的地方,再加一条
: m* ^) ?! ?2 o* W, T+ ~5 b   `- y+ d3 ?' k, Q

$ ]5 E* l& k5 K8 G  L2cset -y -f 0 0x45 0x00 0x55: R4 x3 t$ R. C- M  D
i2cset -y -f 0 0x45 0x01 0x01
) E+ X1 Z6 Z+ t2 q7 B  ii2cset -y -f 0 0x45 0x30 0x07: n/ ^7 R2 X6 y4 w& k& T5 b- |
i2cset -y -f 0 0x45 0x31 0x72
& M; t" o0 r% p) D- Ti2cset -y -f 0 0x45 0x32 0x729 G  `1 S8 S& G( _# {( o! p
i2cset -y -f 0 0x45 0x33 0x72& t5 u# S' M$ D( r
#调节三个灯灯每周期上升沿和最高亮度时间8 W( w8 Y% I' }0 X/ t9 d
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x449 u! d' J3 u+ D" Q1 L% L+ U+ \
i2cset -y -f 0 0x45 0x37 0x44
% t6 f6 g3 t1 T* u* D) [' E: ei2cset -y -f 0 0x45 0x3a 0x55% d6 |- Z" U: \! @3 }
i2cset -y -f 0 0x45 0x3d 0x66
8 r. g1 ]# [  W/ Q# O/ z: {#调节三个灯每周期下降沿时间和关机时间
7 \3 S& @. ?/ T( mi2cset -y -f 0 0x45 0x38 0x443 i2 s' l# ^$ u2 C2 B0 u* ^
i2cset -y -f 0 0x45 0x3b 0x55
; }9 g# p) o) Si2cset -y -f 0 0x45 0x3e 0x66
$ Z7 y' D* Y3 R! J3 U9 Z& A, R7 gi2cset -y -f 0 0x45 0x39 0x404 d) ?* t' m0 {- G6 T
i2cset -y -f 0 0x45 0x3c 0x40; |+ r' M  g$ {- i5 ^
i2cset -y -f 0 0x45 0x3f 0x40
  w) |6 E- P- H( [9 g! R# 0-255,更亮
( a4 s$ {) S, Y  d1 Pi2cset -y -f 0 0x45 0x34 128
6 F1 n5 m- i- U( F% A1 ?' S/ H. ti2cset -y -f 0 0x45 0x35 128
* x5 x' M8 b0 S* Ji2cset -y -f 0 0x45 0x36 128
7 K6 w& q3 p# E* X& C5 l+ q 8 m4 x9 n" A& T
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯' y$ n! M# L* o2 t" E
1 _# X3 N' w$ S8 p0 z8 Y
4 S, x, W& @0 i7 f. u$ g8 H
我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。
( X. O& X& u  j3 G! h6 z
/ l. j* {' j- _  g) Q0 W希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。
. U; F/ F! R1 V9 E4 U0 E

1

主题

4

回帖

262

积分

中级渣柚V1

积分
262
ggjy6689 发表于 2023-1-18 14:08:36 | 显示全部楼层 IP:–江苏–泰州 电信
时间问题?

5

主题

34

回帖

302

积分

中级渣柚V1

积分
302
binglongl 发表于 2023-2-1 16:28:20 | 显示全部楼层 IP:–辽宁 联通
多谢分享!!
/ l1 I0 O0 a6 h2 X" Y

2

主题

15

回帖

282

积分

中级渣柚V1

积分
282
安然若夏 发表于 2023-2-1 18:25:22 来自手机 | 显示全部楼层 IP:–江苏–苏州 电信
看一看学习

3

主题

32

回帖

330

积分

中级渣柚V1

积分
330
54hxz 发表于 2023-2-1 22:18:59 来自手机 | 显示全部楼层 IP:–广东–深圳 移动
学习学习
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|矿渣社区 ( 黔ICP备2024020525号-1 )

GMT+8, 2026-9-23 23:05 , Processed in 0.059256 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表