找回密码
 立即注册
楼主: 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的问题了9 r5 S, o" T2 ]
, N/ K& o  W2 K) [$ A
aquila995
5 |" s1 l; O" Q% Y) P# D0 P
- g6 m- {. j3 z# |, n3 [. |于 2020-06-24 16:37:11 发布$ U, i& p8 N' P/ s  H& p- F+ |! u$ O
6 u/ ^# ]6 R/ Z  L0 e
13215
, Y$ D0 N! q- m1 g 收藏 13& `1 S3 u! H' @8 ?  P; p; _8 u9 F4 l
分类专栏: 群晖
% Y; l5 y* a- v: @: O+ h版权* g& ~& ~; z" q
9 G1 B. r! A! F5 C. P4 H& p
群晖' \' z4 a# t! _' z7 Y; h: t* t( W
专栏收录该内容% f( P. y; w- [8 ^( q9 u
1 篇文章0 订阅
' c4 j6 A& A, n6 [! S( v* S订阅专栏
( F5 d, e6 z9 L' {我好像解决部分猫盘刷群晖后掉IP的问题了
, Y2 p4 ]6 ]. z; ?" J+ u1 b
) B, {: R9 K. d3 i6 Q+ w我好像解决部分猫盘刷群晖后掉IP的问题了# Q. s! Q1 ?5 S& G% V# _

5 l  X* ~9 x2 [5 P6 k, a2 \先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。
- k. s1 j2 G. Y* n- z5 \4 J. q4 l# X% ~然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。) Y1 D* ^8 [+ ]# m2 w

, }+ i3 y8 c# {* |跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。
) z7 ^  i' ^) u1 u% B' m. n
: Q8 [" {/ m$ i; ]5 ~$ y9 T然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。
  u! \+ t: C' `+ C$ m" F; s
( N! E, W* P- x5 R- W先看了下有什么可用的命令:' Y" H( ?/ X! I5 E1 x4 L
1 }. l5 u' ^6 c
Marvell>> help8 j" p- Y& O. O
?       - alias for 'help'4 p; h4 U* q! U# V8 k
base    - print or set address offset/ \9 p% E: s3 F
bdinfo  - print Board Info structure5 s$ M  d3 g! a# q$ [& d
blkcache- block cache diagnostics and control
5 _. i( J! e# q5 t8 Vboot    - boot default, i.e., run 'bootcmd', w5 C* T5 j* m
bootd   - boot default, i.e., run 'bootcmd'
; d% j4 ~6 }+ {7 }  t# R3 Cbootefi - Boots an EFI payload from memory
3 s4 }/ W$ k8 @: {bootelf - Boot from an ELF image in memory
% }' K- ^( r# E0 L6 cbooti   - boot arm64 Linux Image image from memory
$ h0 X# L; j, o; A  n4 ]bootm   - boot application image from memory
- Q5 {9 K$ l0 [7 a6 c+ v============================================================
  o! b/ P0 k, a. L3 m) ^; Ebootp   - boot image via network using BOOTP/TFTP protocol
8 f' v( N, z8 d* ~! O5 K) P============================================================
0 T5 f& N- t& r9 \+ s& t: abootvx  - Boot vxWorks from an ELF image
2 r; |) w" y* I7 ~; p0 g7 }bubt    - Burn a u-boot image to flash
9 E/ i; Z+ X2 t1 \cmp     - memory compare4 N6 b% D9 Q; I3 R/ i# ?& d
coninfo - print console devices and information4 V' p7 _+ I1 l- ^% p# ]
cp      - memory copy9 U' g* E2 {5 r6 \% }
crc32   - checksum calculation
! [- j7 k, S! C8 L* vdcache  - enable or disable data cache
( f1 E( }9 j3 X-------------------------------------------------------------
! e. x- e' e9 Ydhcp    - boot image via network using DHCP/TFTP protocol
/ F  C! A7 M2 {" X( l* Q-------------------------------------------------------------
, n' \, j6 R1 x6 ^2 l' bdm      - Driver model low level access/ A7 k: Y) ^- F+ V0 q
echo    - echo args to console
1 X6 \& u7 n; I% \! Qeditenv - edit environment variable
. B2 D6 O4 Z. ^8 I$ x& D( u3 penv     - environment handling commands- Q4 q+ O; f3 a9 a9 m
exit    - exit script
9 L( O0 ~: \" g2 r6 C0 \ext2load- load binary file from a Ext2 filesystem
' y3 _" k7 ~, F* ^ext2ls  - list files in a directory (default /)
+ X$ E  f2 L/ N; }6 bext4load- load binary file from a Ext4 filesystem
, n5 r7 k; z5 w  _! t) Lext4ls  - list files in a directory (default /)
" c, q/ V9 g9 pext4size- determine a file's size; ~: X7 T( S) @' {% O
ext4write- create a file in the root directory
  @$ s" r( N: U- vfalse   - do nothing, unsuccessfully9 n4 _2 g& v/ y& m
fatinfo - print information about filesystem
3 u8 i3 b  s) z- m* a1 `. g2 yfatload - load binary file from a dos filesystem  S. N( t* i- H+ X1 b; t8 y
fatls   - list files in a directory (default /)
: a; L2 A2 N, @8 z+ D: ?! @fatsize - determine a file's size
0 p! h1 w& V/ ^6 Qfdt     - flattened device tree utility commands* J7 H  _6 [7 w! J# ]
fstype  - Look up a filesystem type5 s7 L# Z% Y+ I' r4 W
go      - start application at address 'addr'/ y. ~3 `: i4 ?. L
gpio    - query and control gpio pins
  [/ C3 J" p0 h% T" [help    - print command description/usage/ \$ Y% M9 P3 g3 ?, C( }
i2c     - I2C sub-system2 p6 G  ~0 A  z( T
icache  - enable or disable instruction cache
3 S) w: }* v0 Eiminfo  - print header information for application image+ j" R% ^3 h% `" S- T: Y$ N
ir      - ir    - Reading and changing internal register values.7 B+ ?' R, j6 f7 Q7 _- ]& |
6 [2 x5 Q/ ^7 J1 w( O' S
* }( K" y' }# J9 G  b, F% t9 ~
itest   - return true/false on integer compare8 a* [( b+ J$ D7 Z( i
load    - load binary file from a filesystem
" f* W7 c- D- ]/ j6 Sloadb   - load binary file over serial line (kermit mode)
1 d2 a: N1 N+ _. N- h" U  iloads   - load S-Record file over serial line* n3 F* G4 E) b9 p& Z
loadx   - load binary file over serial line (xmodem mode)
$ n* J# V# F( s. L3 E9 |2 vloady   - load binary file over serial line (ymodem mode)( K! A, u# B6 {: w( x8 ~
loop    - infinite loop on address range
& l5 `) Y7 P, H8 I+ dls      - list files in a directory (default /)
% r" T( g5 v8 ], ?lzmadec - lzma uncompress a memory region9 k4 U: V* ^6 R8 [$ o
md      - memory display% E0 ]4 m. i$ [6 k* Q- Z! z- _2 a
mdio    - MDIO utility commands2 }+ N; X, E3 l& {: e
mii     - MII utility commands
; M1 Q9 k/ l0 `$ {/ wmm      - memory modify (auto-incrementing address), e3 G; X/ m+ {0 ]1 U
mmc     - MMC sub system
7 U) H8 u" Z6 ?mmcinfo - display MMC info. A0 m$ y- o/ j/ f: W7 q& q& M& E
mw      - memory write (fill)" J, L* w; x6 Z3 M8 \1 v% r* u
nfs     - boot image via network using NFS protocol
7 J+ q: O# D+ znm      - memory modify (constant address)
( d% E9 M2 i0 r" E& |9 @4 opart    - disk partition related commands
& P: ~) u4 D7 z0 l. z! b4 Vping    - send ICMP ECHO_REQUEST to network host$ I# L# T+ B- ?8 s7 F! b
printenv- print environment variables: [/ `1 f# T' ]0 T% D% a2 @
pxe     - commands to get and boot from pxe files
: R8 V" z. r/ ~) c) yregulator- uclass operations
7 T3 N4 m- W* _) `3 Y  lreset   - Perform RESET of the CPU
) _+ \# \" b$ f* p+ }+ {% Q. krun     - run commands in an environment variable, \! y3 f! G- \0 [. r% w% }/ u$ j
save    - save file to a filesystem
! ^6 s2 @) R# v4 \$ w7 C4 ~/ i0 a% @saveenv - save environment variables to persistent storage2 r6 Q4 E$ `% ^6 L1 n/ r/ L
scsi    - SCSI sub-system! W( ^+ w6 }! e5 {# A0 U
scsiboot- boot from SCSI device; z. N3 x0 r4 H9 p) p
setenv  - set environment variables
, a. u8 @0 w0 T5 k: q3 x  Nsf      - SPI flash sub-system
* {2 ~7 F8 V( ^4 o! e" a" rshowvar - print local hushshell variables! {- d8 ~1 Y* L6 Y( |
size    - determine a file's size
( p  N+ N" D( N5 osleep   - delay execution for some time
# C8 H8 ]% `3 j  g! ~source  - run script from memory
' E; O! @+ X) k% ksspi    - SPI utility command
7 `2 e1 U* p; G5 a. x0 _6 i7 ysysboot - command to get and boot from syslinux files
) B) w& C: l3 ptest    - minimal test like /bin/sh5 j7 l2 S2 q7 t3 P( O& w
tftpboot- boot image via network using TFTP protocol
, K+ P  n. D' ^* B% itime    - run commands and summarize execution time  ^9 F- S# ~. Z* Y% e, A
true    - do nothing, successfully
7 h3 e7 \0 ]1 a) ^usb     - USB sub-system% U4 t0 Z- |9 k
usbboot - boot from USB device
( t# b% E0 V  f5 x9 |6 L4 s& t( f! lversion - print monitor, compiler and linker version
" q! E/ h: A6 H
* \' M+ d5 X  h, T1 s- f发现了gpio& y$ Q# B; o9 t% x7 v9 d; q# M, x
) L, [/ {! Y! P9 d* Q9 P% X: m
arvell>> gpio0 Q( O9 [! T0 P, z( e
gpio - query and control gpio pins
) @! x% f3 m% s) v9 _( f $ ^" Y7 N  a5 ~7 g4 Q
  A/ ~" N/ W0 u' y2 h. e
Usage:
+ B2 F& @6 Q5 D# @8 X' X, f  y9 c+ Mgpio <input|set|clear|toggle> <pin>  g4 e5 H% K- l, L  A/ T
    - input/set/clear/toggle the specified pin
. R4 A+ K4 S6 L; a3 R* Ogpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs2 T' e6 x: s. E

  `. p# T) D$ d' P( E
5 \/ _: u$ F4 G9 k2 }+ aMarvell>> gpio status& p" q* Z4 f. m7 \
Bank GPIO2:
/ U/ z3 G" B2 W7 E1 [6 ?GPIO20: output: 1 [x] sata_pwr
- J- b/ z5 W5 k0 pGPIO221: output: 1 [x] phy_reset
' c. Z7 u( b& m. d 1 A8 z" S1 L( T/ ^9 p7 M& ?
可见的io脚* B9 e/ e  N4 w, @! F0 d

' y5 m2 m" F4 R$ cMarvell>> gpio status -a
7 e; W$ f6 c5 ^7 g1 a* U- {Bank GPIO1:
- ~, n( O3 A4 d! J6 z! }* LGPIO10: input: 0 [ ]( h5 G0 _5 B& e, M0 }0 W
GPIO11: input: 0 [ ]! s. w( ]& W2 a' Y0 @
GPIO12: input: 1 [ ]
* K6 w; M$ M7 [8 Z* _2 ~+ D5 NGPIO13: input: 1 [ ]
. b- g3 p5 z4 D0 @  TGPIO14: input: 1 [ ]
, @/ [+ I# Q' q. V' Z7 d3 h3 MGPIO15: input: 1 [ ]8 X3 `5 M8 `! j  Q. R
GPIO16: input: 0 [ ]
8 ^0 s) Y( m2 ?6 _4 a* DGPIO17: input: 0 [ ]
/ a$ {: o1 \$ K4 z& @GPIO18: input: 0 [ ]
% v3 U0 R7 S. R! w% B/ W& VGPIO19: input: 0 [ ]
" l% _* c( h6 [( aGPIO110: input: 1 [ ]
$ X& m) J6 K5 v/ TGPIO111: input: 0 [ ]% V, J6 M8 n& y8 q
GPIO112: input: 0 [ ]
$ Y! N9 A1 O2 R* q( B( d  _GPIO113: input: 0 [ ]5 j1 n6 n( E, u# O
GPIO114: input: 0 [ ]. |0 P  K7 }9 s* X$ O& ?
GPIO115: input: 1 [ ]: ^5 W: d- n4 c' |
GPIO116: input: 1 [ ]: B5 U$ t# z7 B! J% u1 t
GPIO117: input: 1 [ ]0 _0 D8 o7 t+ Z6 e
GPIO118: input: 1 [ ]  @0 i- o/ |, K7 d
GPIO119: input: 1 [ ]
5 C( |: m" y# C: f! i( PGPIO120: input: 0 [ ]8 \2 Z$ X" b5 a- _, F: Q
GPIO121: input: 0 [ ]0 |% ^/ N0 m7 z
GPIO122: input: 0 [ ]# E/ H& ]  @4 e# k  c
GPIO123: input: 0 [ ]
6 V3 s6 C7 X( Z% R& A8 dGPIO124: input: 0 [ ]2 p0 s1 D! _- N2 B6 }
GPIO125: input: 0 [ ]
8 e0 ]4 s' G4 W, oGPIO126: input: 0 [ ]" S- @* @( q! Z* A" E8 C1 M% h
GPIO127: input: 0 [ ]
. t2 K4 ?, @0 r# ]9 k3 wGPIO128: input: 0 [ ]! R+ i, V% N, g- K+ d0 _
GPIO129: input: 0 [ ]' Z9 F! Q7 w. J( ?* j- D
GPIO130: input: 0 [ ]
' l$ p" v$ J( X& LGPIO131: input: 0 [ ], J5 h0 @% y  z% k: v7 J8 C
GPIO132: input: 0 [ ]8 H! p, r( h3 P: L' k$ |  s/ }
GPIO133: input: 0 [ ]
8 G5 T2 B4 n* J1 J( ?* a& [GPIO134: input: 0 [ ]
, r* U- _5 @" v, r5 x4 C; cGPIO135: input: 0 [ ]
4 g9 m8 r8 d, b9 t( B  g- J
5 }) q8 s3 x" o! A 8 j8 W$ E' u1 s/ k/ v* k
Bank GPIO2:
( G, C. L1 ]0 CGPIO20: output: 1 [x] sata_pwr
2 F0 @; v7 _7 g" TGPIO21: input: 0 [ ]
% [! Q+ g- p$ ^* _GPIO22: input: 1 [ ]* z7 M. G6 ?6 b8 c
GPIO23: input: 1 [ ]: h; N1 a- p' u3 t
GPIO24: input: 1 [ ]! p! ~# c/ r) Q+ d' t& ^6 G8 J* h9 X
GPIO25: input: 1 [ ]
' h: s# R4 O8 ]# d# \- c3 yGPIO26: input: 0 [ ]
" u7 e* W7 V9 c- w. NGPIO27: input: 1 [ ]! P1 Z7 _8 N, t) E0 N% P# w: D" e  }
GPIO28: input: 1 [ ]
7 U) {% z! u( `. i& ?. u, G- f1 ?GPIO29: input: 1 [ ]
  V8 A: m( P. v  ?GPIO210: input: 1 [ ]7 F% K! _+ T/ v1 G/ B& J9 t0 P8 K6 G
GPIO211: input: 1 [ ]
+ ?! h5 A5 P) B# w: m$ V) aGPIO212: input: 0 [ ]
8 Y5 {5 q  L) p5 d. h/ W. f/ C2 b0 XGPIO213: input: 0 [ ]6 |! m+ {. A6 l" K1 E
GPIO214: input: 1 [ ]$ c$ c  k$ X3 Y1 P. Y* J- T$ {
GPIO215: input: 1 [ ]
! ]- j4 H' w5 o! ~2 dGPIO216: input: 1 [ ]
( k+ l) n  E3 b' eGPIO217: input: 1 [ ]. D$ ]9 U6 [" i5 ^/ c
GPIO218: input: 1 [ ]+ g8 b2 p# j: w! A: h- P
GPIO219: input: 1 [ ]) p9 c9 O* j1 g2 N6 ?+ ~7 _
GPIO220: input: 0 [ ]7 I6 l4 h+ l( [0 q
GPIO221: output: 1 [x] phy_reset
2 |  j- l3 H8 p; t* ]! GGPIO222: input: 1 [ ]) Z: s3 U+ r0 H( ]4 ]
GPIO223: input: 1 [ ]4 t/ @' a; w" i3 {% W6 k7 \! F
GPIO224: input: 1 [ ]
5 b1 }! |" v4 X* V2 ~) j; m' o  FGPIO225: input: 1 [ ]+ r  o  }6 b8 z+ O7 k( e+ L0 J  U
GPIO226: input: 1 [ ]
  U; N2 I: d4 B9 K& \# s; x( JGPIO227: input: 0 [ ]) V, D  y: r6 _7 ]( ~8 _! L  i
GPIO228: input: 0 [ ]9 ?3 n1 c6 O4 G$ P# w, s( v
GPIO229: input: 0 [ ]
9 e( B, H& A" ?- [. D: J
  m, u8 l/ `9 Y6 U" Y8 ^别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。
9 Y0 \" h0 B! B, I& T8 U # l9 I, d7 ^# n4 r, M, I
Marvell>> gpio% ]/ i' h3 ~6 T# ?7 u. R
gpio - query and control gpio pins! P/ d" x7 w; x2 J. j

6 w, ~: S0 E3 @* s3 h) N/ d
5 x. W, A2 e+ R+ R6 Z* VUsage:" V6 B, @4 \. B, U
gpio <input|set|clear|toggle> <pin>% k5 `0 D3 [: i% `. _# S; b
    - input/set/clear/toggle the specified pin
- y( R8 k# v/ P% C8 c" P; jgpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs
2 ^" u: z2 f" p! G: p
5 J  X+ H$ M+ I; Qset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)5 L6 r2 D+ s, @% `
: q+ S7 p; q: i8 y3 M2 |6 L
然后看到env有地方是参数设置,类似dos的环境变量吧8 J0 `& ]; ?, N: v# h. w

" P- ]' Y; ^4 mMarvell>> env print& f  _- Y  w3 j3 T3 H. _4 {& B6 U
arch=arm
6 K& k# Y1 X0 y) _baudrate=1152007 g* A  [  u$ v! f
board=mvebu_armada-37xx
& W' ^! h5 z, i' X+ f- G! @board_name=mvebu_armada-37xx9 f7 E: f; _( D$ n
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
  Q( V( z# M9 n) ~! cboot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
) {" U& @& e7 R( w+ gboot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};3 b. t1 n6 d6 j4 P- y
boot_targets=usb mmc0p1 mmc0p2 sata
8 I% W' s* g  D3 Cboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
4 x+ f. ^7 |. I0 B6 {) `bootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi! ^" O' T3 X6 [! i  f! Q# x
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
8 f# G( f6 r. ?0 [& hbootcmd_normal=run bootcmd_syno;
% r- S, y0 K- g5 f( fbootcmd_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;
' \" u+ a! E7 J$ Dbootdelay=16 Z: e5 p: @# M$ x! o7 e0 R
bootdev=scsi 0:1
0 r$ j7 m$ c: qconsole=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
7 M4 X, ]5 A1 r2 P1 {, lcpu=armv8- f1 c! r# G3 w$ V% Z! x
ethact=neta@30000: P1 W8 r& x& M2 }
ethaddr=00:11:32:11:22:00
/ X+ A- l2 ^- i* Q; s, W1 _ethprime=eth0
( M, J8 g- ~  X1 U. `$ A! Ufdt_addr=0x6000000
# e8 ?$ I* o/ Q& c- ]( e7 L/ ofdt_high=0xffffffffffffffff
1 n/ ?& r7 t- `# K0 o# }fdtcontroladdr=1f6437d0* ^& M$ A1 g+ h. B3 O' z2 Q
gatewayip=192.168.1.254
- I- Q1 S2 Y7 z: z: u  K9 Y- \0 h8 @5 fhostname=catdrive. P( A0 Z7 L. {
image_name=/vmlinuz- W2 `; l' m$ `$ K* e
initrd_addr=0x1100000: [1 j0 J' K6 U1 x8 Z4 u1 E# Y2 L
initrd_size=0x2000000
6 Y/ s3 p) D  A: f7 N: ]ipaddr=192.168.1.1195 n: J( w/ ~# c- I
kernel_addr=0x7000000; N. R* o* p  v) q1 L3 H
loadaddr=0x8000000- A' t. l0 s% j5 R
netdev=eth0
  O( B; ~1 C( znetmask=255.255.255.0
3 `; v6 q2 |4 @$ Y5 z" brootpath=/srv/nfs/7 y9 z# V; X0 X: g8 G+ ~
scriptaddr=0x6d00000
) N* Y7 O/ n5 ~% Cserverip=192.168.1.254
& C6 o7 x, z; d2 S1 c, rsoc=mvebu
$ B( h. a" }1 H  W' bstderr=serial@12000
* w# }- n. E0 Q; F. \9 ystdin=serial@12000) `9 O8 S/ b4 i  s
stdout=serial@12000/ i, _9 b, p0 ]2 a( d3 Q
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
' |, H& b- I5 V5 S( Xvendor=Marvell
+ I* o8 ^+ z5 @9 a5 x 4 G4 H% q" _7 O& u' W7 u  l1 c4 S- [
% j4 q0 o+ E! g% n: ]0 |9 w" }
Environment size: 2001/8188 bytes
- K7 I7 |% f' y; xMarvell>>
9 z" \2 A1 S. Q$ C8 [$ ^% c% n 6 p6 c) X- B6 p
看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.
  c5 W4 s/ x" k! z, D7 O5 A& f1 hbootcmd_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;
5 {- W- B, z- v* x5 M2 x" q 4 A4 W+ O: z5 J$ {- S
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了
7 r/ o6 u7 B  obootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒6 w5 D) g9 |4 t8 L0 R. _

0 o" s* V. F) y- G9 T2 ^: Q: P( 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;
/ D' j$ ?8 F6 k; g. l6 c, \
0 Q4 x) T3 E( {2 y注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。# U. w/ m) F4 P6 W
思路是:( M. W1 @$ j1 s. l( f1 t2 P, O
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
, i5 n& i5 D7 e+ N" R# y& U : l$ ?4 ]+ r% \
这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
8 b) b8 S" S. Z! N; X % E% {; F2 ~5 ^" g( D' @
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启
9 J% q  B- B  O4 s  `#!/bin/bash
6 E: ?/ q$ m& `$ sdt=`date '+%d/%m/%Y %H:%M:%S'`, {% g9 I# i6 w- }- c; E2 F
echo "$dt"
+ A) q& A( }/ z. `/ tsleep 60
* l9 v1 j6 M" Z+ {/ M* Mnum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
, J) p( |2 C% v; U! h+ B. J; X; }echo $num
  B. D& k0 S4 v  L% Iecho $?
. r; U1 x* T; K& Oif [ $? -eq 0 -a $num -eq 0 ]; then
1 u7 {. q5 y7 B! @! L    echo "$dt ok" >> /result.txt  V8 Y6 b; h0 I' _* G; Y. {
else
7 T* R; }) q( D: |4 ~- u    echo "$dt noip loss $num reboot" >> /result.txt, |' J: d6 z6 l
    reboot
3 p1 n: d% o; S& V: L4 vfi; y- q$ @5 t( J7 ^4 g& ]8 c
! z$ b) ^  B* ?8 {' q; B
第五行,ping后边的IP自己改,我用了一个外网的IP。
. f8 t! p7 E( {$ e' a1 h) X% q + C+ r& s. g6 Q9 N# `
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。2 t. F( C5 D- x$ W

1 F5 {. h' N) ~( ]" t; B5 h我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。5 v) ?' m  ^# u$ j
; _( Z5 C/ }# H6 z/ i
还是上边60秒的地方,再加一条
( b* I. @. H, Q- L
. J" ~9 L9 M# P/ S9 o: B) [
. o( k6 A$ C2 f0 p% p2cset -y -f 0 0x45 0x00 0x55
8 ?4 F" {7 Y" N  j% V# _i2cset -y -f 0 0x45 0x01 0x01
+ p6 |- f, W5 g, L7 D% ji2cset -y -f 0 0x45 0x30 0x07' B& k) _! C5 A: v# D6 s6 \
i2cset -y -f 0 0x45 0x31 0x72$ S, S: K5 _: y0 r- p) r8 s- v' [) x
i2cset -y -f 0 0x45 0x32 0x72, o" {2 Q+ n) S9 S( A, x- E# _! x
i2cset -y -f 0 0x45 0x33 0x72
+ s+ x! r4 z( Y; a2 L+ @. O7 D#调节三个灯灯每周期上升沿和最高亮度时间
6 k; a% `2 P0 Q- S$ A8 c" n$ j5 ]#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x441 [% s! |: k8 G4 ?
i2cset -y -f 0 0x45 0x37 0x44& D9 k2 n1 Y/ Q) Z* d
i2cset -y -f 0 0x45 0x3a 0x55
' ~; ?5 x( l9 X+ [- Ci2cset -y -f 0 0x45 0x3d 0x66$ u* ~' v5 Z5 y
#调节三个灯每周期下降沿时间和关机时间
8 q  ?- [$ J  ]8 v2 Yi2cset -y -f 0 0x45 0x38 0x44
1 P8 }. B' u: r5 B# li2cset -y -f 0 0x45 0x3b 0x55
, K+ q! H/ e; e) I* i9 I" gi2cset -y -f 0 0x45 0x3e 0x66
. A9 p, A+ h( J( L. i- _i2cset -y -f 0 0x45 0x39 0x40% x7 M7 H. [5 C" J
i2cset -y -f 0 0x45 0x3c 0x40
: z5 K/ Y5 {, \( c: T2 e5 x# Si2cset -y -f 0 0x45 0x3f 0x40
/ a' G. J$ X* }- `: o# 0-255,更亮8 c  d/ p# D3 z" e3 Q
i2cset -y -f 0 0x45 0x34 128& q6 ?! Q$ `7 ]& M2 @; @1 {9 V, m5 c8 p
i2cset -y -f 0 0x45 0x35 128. w6 o8 J5 i0 |- r. q
i2cset -y -f 0 0x45 0x36 128% u; [; k% M- `+ {3 R! b
) l; V, f  a8 r6 W! _- D" ?0 c; s
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
+ j5 ?0 G& z0 Y( ^ . W; {4 Y4 u& M8 }$ m2 T5 R
) Z: H5 n3 i' v, e8 z
我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。
$ g0 \( B% u+ l* G# C) g/ d( }
4 e9 U) b3 [1 d; B希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。' k- b# p, T4 j0 A" e

1

主题

4

回帖

260

积分

中级渣柚V1

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

5

主题

34

回帖

302

积分

中级渣柚V1

积分
302
binglongl 发表于 2023-2-1 16:28:20 | 显示全部楼层 IP:–辽宁 联通
多谢分享!!
6 C2 _3 \+ }  G8 K3 J, s2 S% r

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-4-27 13:28 , Processed in 0.087531 second(s), 30 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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