找回密码
 立即注册
楼主: 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的问题了
* A1 i4 v0 r( h# u% g2 E! R( J8 r- `
aquila9959 Y& G- ?1 |, |

% Z3 L. J$ M( s. F& C% K( S" M9 v于 2020-06-24 16:37:11 发布
6 o( s% L: {; n4 W4 v8 P3 q! ~% e. a" I. g+ M6 C0 q  v
13215
$ J3 F2 @% e7 u: i( p' D 收藏 13& A9 H" m" Z3 Y1 T% K1 }# K) W5 s6 I
分类专栏: 群晖
0 w9 z' U; M' |7 W+ {, K7 x版权- o- e% |: k3 i0 D0 E$ C% @& k

1 O5 I3 [: \% d3 L, D* E2 C% ^群晖! V2 l4 o8 p5 d% j! \8 O
专栏收录该内容% Q1 O9 |8 v8 e; O- A9 h# R0 ?
1 篇文章0 订阅
% w  {0 r' }. ]+ w+ F! t订阅专栏
# Q5 E- L% z. K1 c8 V我好像解决部分猫盘刷群晖后掉IP的问题了7 Q$ q/ c+ r$ Z$ n/ j( C1 e9 `

2 @, T  e" h# c) }+ a我好像解决部分猫盘刷群晖后掉IP的问题了, w5 ]$ S1 ^; Z" k% A
7 G! u$ N& d, a1 {( r4 u
先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。" v7 N$ l+ f, }; g  r
然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
9 u4 q0 T  ^- z/ u1 y( D
3 T7 g- m# u& T! P2 F跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。
) T3 c$ K6 D9 V8 t# Y! U; R
" [- q& ~/ b2 w  [5 _然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。
2 T+ v$ t5 v$ V5 F! T$ |
* l; p+ a5 m1 [& [, k3 m先看了下有什么可用的命令:
+ [: G. _# I) J# T6 G7 E4 }  v3 F
4 G  ^1 H9 v$ X, q, R9 `Marvell>> help5 T5 D% e- G) m. U! T. K
?       - alias for 'help'
- T+ R$ E( N/ Zbase    - print or set address offset- s  e( }9 L( e) O) I
bdinfo  - print Board Info structure
! w5 M" y+ k* }8 Mblkcache- block cache diagnostics and control
3 z8 O7 B) \: q4 eboot    - boot default, i.e., run 'bootcmd'3 W# O" e2 |/ m! O) a
bootd   - boot default, i.e., run 'bootcmd'
# t- o- S4 Z6 E% tbootefi - Boots an EFI payload from memory4 o3 R$ {* X5 b4 L7 C
bootelf - Boot from an ELF image in memory/ A3 W+ x4 ?! @. D
booti   - boot arm64 Linux Image image from memory
: C. c& u7 Q8 E5 nbootm   - boot application image from memory- E' u2 c( g. J. k
============================================================8 A9 d* }0 p" [8 S, K
bootp   - boot image via network using BOOTP/TFTP protocol
8 |6 p" J! _) u: I' b============================================================
. V. C: s* Y! Tbootvx  - Boot vxWorks from an ELF image: r+ u% W. A& F, f3 @. }7 P2 B
bubt    - Burn a u-boot image to flash
5 A+ ~6 i+ ~# a( u3 m$ k/ Pcmp     - memory compare! i3 v/ r+ g. x' q* @" ~, A
coninfo - print console devices and information
! k4 [3 J+ ?' N/ icp      - memory copy
8 m; Z3 G# O' e; Bcrc32   - checksum calculation1 }% N/ x- [  j1 Z9 \5 H6 @
dcache  - enable or disable data cache
% G7 B. @. d3 t- K0 U" z4 T5 M' Z" _; J-------------------------------------------------------------
+ M7 C2 @, g9 {4 ~5 Rdhcp    - boot image via network using DHCP/TFTP protocol  J( x9 f( k9 ^! i" D7 v0 x
-------------------------------------------------------------
6 v4 _' A/ {& z3 @dm      - Driver model low level access
& |6 a. u! B! m* Oecho    - echo args to console
4 B$ f* Y' |6 z1 c3 beditenv - edit environment variable
. L% e4 u3 ]/ B$ d' a/ O3 E5 ^env     - environment handling commands
( E) A' y& ?0 H/ K9 g; dexit    - exit script# p4 v4 G- l& A' ~4 g. i" }3 ]# [; e
ext2load- load binary file from a Ext2 filesystem% g# r# F( I( Z6 C6 p8 n
ext2ls  - list files in a directory (default /)8 l: ^8 {# a' s$ k0 f( `
ext4load- load binary file from a Ext4 filesystem
/ J7 x: _' u# Fext4ls  - list files in a directory (default /)
7 N1 p$ e  i- ]ext4size- determine a file's size
" K& ?7 |0 \/ ^4 hext4write- create a file in the root directory
0 A7 h) R/ @- u1 z8 \) ufalse   - do nothing, unsuccessfully+ v0 [# t) d0 d) ^8 P% G
fatinfo - print information about filesystem
+ r/ n4 L5 K  i& _3 T  h: Ifatload - load binary file from a dos filesystem
; O% P4 D3 [: @& Mfatls   - list files in a directory (default /)
: O+ Z# E6 r. O  V3 Rfatsize - determine a file's size# R! Q  Z* T6 I2 K
fdt     - flattened device tree utility commands
1 ], k8 {0 k. Y! Yfstype  - Look up a filesystem type
+ E) t8 {3 D5 r7 F- v7 |& Qgo      - start application at address 'addr'
. w/ ^, l, Z3 C5 J% {. Bgpio    - query and control gpio pins; R; R6 |% A2 {7 J
help    - print command description/usage$ |! d2 R2 f7 B  H9 o" B. e
i2c     - I2C sub-system
$ c9 z4 R/ F3 `5 z8 `! Licache  - enable or disable instruction cache% Z) \) c0 g/ L  A+ y7 H; N! I
iminfo  - print header information for application image( _5 y  e8 z. Y7 p% @6 g$ L
ir      - ir    - Reading and changing internal register values.3 U+ z3 Q, {1 L/ a, Y
' d/ f& }9 Y- i4 x

- d" K8 n1 j4 pitest   - return true/false on integer compare
- u9 Q: a5 I3 }, S9 J& hload    - load binary file from a filesystem8 f; R  c* {' d2 Z/ b1 y, T
loadb   - load binary file over serial line (kermit mode)
% Q+ d/ u8 z' u, p3 ]loads   - load S-Record file over serial line/ P: x4 y* i+ {6 }, `* P4 o
loadx   - load binary file over serial line (xmodem mode)$ i3 o) W) a2 m. G( N: |
loady   - load binary file over serial line (ymodem mode)
/ N* f3 }) z1 ?- R3 iloop    - infinite loop on address range
! ]$ B0 w3 T% T5 X7 uls      - list files in a directory (default /)9 p& Y: W+ u; m1 m, U* o; m$ V$ v0 o
lzmadec - lzma uncompress a memory region; u# d% x- u8 F% N* ?: X
md      - memory display8 I1 g/ j  M. N! M& S
mdio    - MDIO utility commands
: l+ ]3 _5 }& s) Q6 c; H" Fmii     - MII utility commands7 C8 O. [4 u4 T  A. j
mm      - memory modify (auto-incrementing address)
: l3 \1 P! B+ |. ^: K' M$ d1 fmmc     - MMC sub system
) t1 [$ V3 G5 [, nmmcinfo - display MMC info
0 d# p; \9 t+ }9 u8 E0 omw      - memory write (fill)9 ^+ u/ Q/ ~/ D5 B# @- s8 k
nfs     - boot image via network using NFS protocol9 J) g% k1 v; s* W/ o
nm      - memory modify (constant address); w1 e  e, N8 b& z, m
part    - disk partition related commands
( F* J# k& d7 o+ |- _0 D. Lping    - send ICMP ECHO_REQUEST to network host
% B& R. i; R/ Z+ g( Y0 O8 Qprintenv- print environment variables
: ]7 w7 D/ t4 H; A% S8 w# _0 n" qpxe     - commands to get and boot from pxe files
; V4 `) ]5 a4 O: x1 y6 B0 Vregulator- uclass operations; Q' f6 o* P  Z4 D' `; M
reset   - Perform RESET of the CPU1 S5 f1 G- ?! `
run     - run commands in an environment variable0 E" [4 ]. n" w1 G
save    - save file to a filesystem2 o1 f4 T4 ?. s  C/ K: y
saveenv - save environment variables to persistent storage
3 {8 D, @8 k: Zscsi    - SCSI sub-system
$ t+ \, r% d  T# ?; z* c. @scsiboot- boot from SCSI device4 ?# {3 B3 u; \. E0 j  N  v  K
setenv  - set environment variables
1 w1 t1 I1 x: m$ u; isf      - SPI flash sub-system
- j1 B2 z; Z6 R2 @7 qshowvar - print local hushshell variables7 o3 n7 @: ]3 F! T% v' p
size    - determine a file's size  e1 N7 ]6 S* Q3 e
sleep   - delay execution for some time- F3 `2 Q' ~/ |. c- ~  q
source  - run script from memory
/ A. _8 L6 Y2 J9 O% T  r) H9 A$ O" X& Esspi    - SPI utility command! F. B8 G2 f3 @& B3 ?
sysboot - command to get and boot from syslinux files7 v" {7 |; ~' R" r/ z
test    - minimal test like /bin/sh/ A7 s; ^6 S. F# X
tftpboot- boot image via network using TFTP protocol9 N+ x& d2 h0 A
time    - run commands and summarize execution time
; x4 {+ v; C" l! b" @: R' htrue    - do nothing, successfully
0 \3 y3 P" R$ |4 T' fusb     - USB sub-system2 a7 N3 f" x. z' o
usbboot - boot from USB device
3 X4 Z7 t+ X3 q1 W5 ?version - print monitor, compiler and linker version: j, e1 l1 w. X. R* Q  |8 R8 F
' j8 D) A% L0 e6 C6 t- r
发现了gpio
+ w* `! d& j  l+ J- X& I: X0 g * R( ?0 Z6 v! Z+ @3 C
arvell>> gpio& y* B  ]  s+ S$ i1 ]
gpio - query and control gpio pins
) @) c0 I9 G+ B 2 s, e# B  C6 _

* F6 z8 z: i4 G& {Usage:5 R: ~1 [4 H6 b9 `3 q* E5 M
gpio <input|set|clear|toggle> <pin>) m( I* t- ^8 _/ s; }
    - input/set/clear/toggle the specified pin6 r- W4 w: P) ?) r5 l. k3 v0 C
gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs; F0 r5 H& x( O- m- x4 X
" ^) z" d: S( t% k, ~! J
! G; w# U) o4 ~( H( C  G3 |
Marvell>> gpio status( H( T5 @0 m: D+ m" X1 P
Bank GPIO2:/ `0 D0 i5 w' t  U
GPIO20: output: 1 [x] sata_pwr; ?9 [* P- R! |9 f
GPIO221: output: 1 [x] phy_reset
7 F% F9 m0 P2 b% k & r3 S$ v8 s2 R
可见的io脚
' P5 V7 ]& f" D) |4 R5 f, d ; j% k0 j0 l/ I+ j; ?$ a6 S  ?
Marvell>> gpio status -a8 w' c* n0 H* B7 q- r: L
Bank GPIO1:8 M8 D3 a% b. r- r2 t) [+ p# }
GPIO10: input: 0 [ ]
8 @  I& }5 J+ N" S5 QGPIO11: input: 0 [ ]
& O5 Z9 s1 U$ k0 a/ y  M8 @! y6 iGPIO12: input: 1 [ ]* T- k  E+ S1 H; k
GPIO13: input: 1 [ ]
  C( o& i3 \7 h0 B- EGPIO14: input: 1 [ ]
% u% X3 I8 v& C7 x9 M- NGPIO15: input: 1 [ ]) L) e0 N. Z. S/ |: J* x- v
GPIO16: input: 0 [ ]
3 ~- \2 `  |  A# sGPIO17: input: 0 [ ]$ z6 @; `2 k$ i$ q2 Y( S- F
GPIO18: input: 0 [ ]
# p, Q. _/ z) v" _GPIO19: input: 0 [ ]
; c: v' C, R! ?) M$ P( t; q& vGPIO110: input: 1 [ ]4 M8 T( |$ w2 m% A+ o* @" M
GPIO111: input: 0 [ ]" {" Q' F6 @1 H6 C+ @8 X5 Z
GPIO112: input: 0 [ ]2 ]  o$ V- y# ]. j7 F6 \& k
GPIO113: input: 0 [ ]
" S; K' e" |  O* m. m- [8 I4 EGPIO114: input: 0 [ ]) E9 a- T* [" F: d$ }
GPIO115: input: 1 [ ]
9 r5 c4 S+ ?& [GPIO116: input: 1 [ ]& W5 n0 N* y. |
GPIO117: input: 1 [ ]1 {- Q& D: z9 [: ~+ G! n
GPIO118: input: 1 [ ]
. V/ E- F) [- DGPIO119: input: 1 [ ]
; d8 \7 F3 y/ Y. A2 IGPIO120: input: 0 [ ]
6 @3 S! p# ^! X) w5 SGPIO121: input: 0 [ ]6 q9 a$ O/ J6 {3 h- H( }* |
GPIO122: input: 0 [ ]
, i2 x6 N- K- [8 U, oGPIO123: input: 0 [ ]% C" s2 B2 ]/ @9 H4 A* o  g. g
GPIO124: input: 0 [ ]
. ^: w# a) r9 k$ a9 D6 W( uGPIO125: input: 0 [ ]# R/ X- B# m6 w
GPIO126: input: 0 [ ]
9 y$ k" \  V- E2 O% h) cGPIO127: input: 0 [ ]
2 l: ^" G! R, ^1 D* |GPIO128: input: 0 [ ]* Q, M3 z  ^- t% a% M; z5 R( c
GPIO129: input: 0 [ ]" w  z0 N9 P1 F
GPIO130: input: 0 [ ]; x5 S* C' D% ?- N) {/ H2 ]" z
GPIO131: input: 0 [ ]. m$ D9 O. S5 o6 E( G/ t3 K
GPIO132: input: 0 [ ]
1 s! u& u% b! [GPIO133: input: 0 [ ]
" @; R2 s' c% T8 s( j7 PGPIO134: input: 0 [ ]
6 l" H5 g% e  f$ m$ J" ]9 h' ?" oGPIO135: input: 0 [ ]0 {+ z+ L5 |4 J8 f( w, V
- a' e* J( H" P1 n7 ~8 [& w
+ u0 _" o1 `1 i" q% b
Bank GPIO2:. p8 V8 ?: w, k. Z! s9 }
GPIO20: output: 1 [x] sata_pwr
# Y& P- x, |8 R8 eGPIO21: input: 0 [ ]) [! g: d: C- U; O7 o
GPIO22: input: 1 [ ]+ c4 j) V, o) e3 E" ~- w$ A7 U
GPIO23: input: 1 [ ]8 x5 }: O9 E$ f! X* \5 g' A; M
GPIO24: input: 1 [ ]
1 }6 q; R1 x2 o% F7 oGPIO25: input: 1 [ ]
4 Q* V' o4 y( K4 Q! d; DGPIO26: input: 0 [ ]6 }+ _0 G+ T$ ~7 m+ M( N+ Y' Z
GPIO27: input: 1 [ ]
; k9 K. H. `* {+ B! ~* wGPIO28: input: 1 [ ]* X- l/ ]( I! n/ F
GPIO29: input: 1 [ ]7 {) @* n* C4 a3 {/ R
GPIO210: input: 1 [ ]. f8 ~- d8 {$ J/ U; N; B: a
GPIO211: input: 1 [ ]
8 k5 W1 t" l7 u# t: O. ?GPIO212: input: 0 [ ]
8 b3 S- X/ G; m* [( kGPIO213: input: 0 [ ]
2 G+ v! L6 c1 D" B1 o; zGPIO214: input: 1 [ ]2 r# X) J4 h+ x3 {7 S& `$ |$ j
GPIO215: input: 1 [ ]
+ V5 z& R$ k& d9 U6 t2 {GPIO216: input: 1 [ ]  o' U+ W# O8 r$ F( Z6 f/ f
GPIO217: input: 1 [ ]/ b4 t* r" i. a3 ]/ {# s. E
GPIO218: input: 1 [ ]% c# ^/ U" A4 k. \  x
GPIO219: input: 1 [ ]
4 e- Z& P: c( f$ q3 f; mGPIO220: input: 0 [ ]* `$ l) T+ U7 B/ g8 |0 T
GPIO221: output: 1 [x] phy_reset/ G) D" {* S* v. l, z
GPIO222: input: 1 [ ]5 d- D% R% Q8 T7 I
GPIO223: input: 1 [ ]; ?3 i  {* X, Q9 u% |5 @
GPIO224: input: 1 [ ]1 M# s- V2 [% Q( h* K- P
GPIO225: input: 1 [ ]
+ `: e* K' X5 q, qGPIO226: input: 1 [ ], U4 c3 {- j0 t
GPIO227: input: 0 [ ]
8 p' N  `+ [/ [  i# b9 k! YGPIO228: input: 0 [ ]1 t' u$ L5 P5 D. y
GPIO229: input: 0 [ ]
/ U3 ^4 `* j; ~: ]! E# v/ |0 w % Z# q! h1 {4 F# \7 f; T# M: Z6 |
别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。
6 b3 S; [1 I( c
3 g: s9 u" ~# Q: O* A" v! z  _Marvell>> gpio
( K" M+ w/ w+ ~. r0 egpio - query and control gpio pins$ A& W4 o. n8 @: Q5 G6 {4 Y
" \8 x0 `7 W0 d* Q/ _  V$ k% \

6 j5 u  d: c4 h# n0 r) g. V, cUsage:! d/ k7 C! p; e" P
gpio <input|set|clear|toggle> <pin>: f: g; ?3 J+ Y" _
    - input/set/clear/toggle the specified pin; [: z! J. u: M
gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs" t. ]  f/ k1 k* v6 u

+ Z# F$ g1 G+ i/ ]9 bset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)
5 t% |3 j$ w+ T  S/ `1 r1 F* Z% q % w4 i) |4 o- _& V9 `
然后看到env有地方是参数设置,类似dos的环境变量吧
3 i  C: F) f; s* \' Z& e
. {/ B$ l3 `: y5 |" \; [4 N4 pMarvell>> env print+ K5 ?0 d8 ]# f
arch=arm
  B3 }* N3 @) f6 U9 p3 [* A9 V8 dbaudrate=1152006 E; U6 p0 F! C1 V) D0 {* U
board=mvebu_armada-37xx
3 b3 l' `% J& f; Eboard_name=mvebu_armada-37xx
# L& b/ V: ~  D/ f! Uboot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
9 o# l3 V; T# T! P1 |; M/ L/ ~boot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
5 Y" g' b+ T% k  Vboot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
3 {) H6 s9 g6 K. l; Zboot_targets=usb mmc0p1 mmc0p2 sata
4 V9 F- p3 R% t0 D6 u: Pboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};# W" p/ A( U3 J7 m
bootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi
! ^- A/ A+ F0 Y2 o4 Jbootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
0 ~$ T8 N/ p: h8 j" Mbootcmd_normal=run bootcmd_syno;
3 ?( j8 J" f& v) s* bbootcmd_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;
+ p; a3 Q4 W3 |9 R: I* X: mbootdelay=1
5 @5 Z- R$ O& Z  I$ {$ T7 l! ~& ?bootdev=scsi 0:1
7 o/ V9 @- Z: z: N6 ^console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd00120005 a4 i" ?3 k+ ]- o7 J) O7 m+ y
cpu=armv8( d% U6 ?2 p) x7 Y
ethact=neta@30000
0 }1 w8 U$ b. W) w2 Z$ J) _) Dethaddr=00:11:32:11:22:00$ L7 O7 {! s$ X. E
ethprime=eth0$ _, W( m7 I+ [5 k
fdt_addr=0x6000000: M3 S4 I1 Z9 ~6 L" k. f! `+ a4 x
fdt_high=0xffffffffffffffff0 U& d6 b5 d( E5 ~; c/ L1 G
fdtcontroladdr=1f6437d0% Z- }: p0 j0 d" v7 L* Z, U0 j* O- R7 m
gatewayip=192.168.1.2548 |/ ^6 w; f3 z  I$ E$ t% C9 J
hostname=catdrive/ O' ^7 W  @: l& y# H: b! s( w2 L
image_name=/vmlinuz7 k9 p# e' h7 F& O" ]. ]& l6 H, }
initrd_addr=0x1100000
8 Y9 m0 ]( q9 R/ @initrd_size=0x2000000/ @4 `/ Z6 r& P; W! X/ V
ipaddr=192.168.1.119
, ~* v. p* W4 w$ }2 F0 Okernel_addr=0x70000003 m$ K% U7 l4 C' K6 ^
loadaddr=0x8000000: `+ v' d3 n5 w+ S4 E5 s" _
netdev=eth0
: n1 ]. ?7 J9 W) |netmask=255.255.255.0! p) [0 R0 c6 K( P9 s& e& A
rootpath=/srv/nfs/5 N  P/ x% h/ A
scriptaddr=0x6d00000
! ^- J' [5 F1 E# \/ m  ~& |serverip=192.168.1.2546 I6 C0 {) r' w. m$ h" x
soc=mvebu; A  c; b+ n6 [; v
stderr=serial@12000
9 O* @6 w. K7 K: o* ostdin=serial@120004 n2 j. Y# ?. @; k
stdout=serial@12000
# Z) h. o2 d# ~+ k2 `* asyno_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
8 h- W0 c: L+ Y' U* K7 E# G, }" Gvendor=Marvell
: i$ b2 f7 m% F4 {3 [  D2 i6 e
' `2 e( I% F8 U. l/ R  w6 n2 y6 o 6 C( B2 J; O7 D% q$ n# @  R& ^0 Y( j
Environment size: 2001/8188 bytes' @& l3 P/ ?  c' W
Marvell>>
* _8 E; X8 l  I! `1 M5 N / R2 h" R* E9 n$ k# O
看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.# k; H! x. ^8 e; g
bootcmd_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;8 B: i  t7 |9 o
" t6 Y1 Y& E+ @0 P0 w% V! ^
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了7 x: M- t9 U/ M
bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒5 r8 W3 q+ x& X9 m3 e, h# N6 L. {9 G- ]

' F9 o2 ~/ M, s' B( M5 _bootcmd_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;. Y: i6 X. L; Q$ R

5 z& n; R; M2 p/ g8 ^) q% U注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。) Q+ |" S4 a, J2 g4 K
思路是:- r. K5 g& b& e$ Z% x; F
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
- n- o( I" [9 s: A4 A
# N! V2 c/ p5 m2 s2 A  h这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
+ C+ b  s& e. O0 O# J
3 k& q4 i( W4 w, z控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启; E4 S, l% W/ |- h- b) u3 ^
#!/bin/bash; T, V1 C) p7 m% F6 d. Z( \
dt=`date '+%d/%m/%Y %H:%M:%S'`% j7 K1 ?; y) _: E' m" n7 A
echo "$dt"
2 h# V8 E% d5 |8 s0 K4 u$ E* S/ usleep 60
; j4 @* u% x4 ^3 Knum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
6 I' ^' s, X: V1 d6 k( J( D$ Gecho $num: c! i9 s% u* `$ P
echo $?9 d  J) n' l" W" X: [( t8 W
if [ $? -eq 0 -a $num -eq 0 ]; then+ F' I8 G' G" E! Q. a$ f5 Q) p
    echo "$dt ok" >> /result.txt2 ]: R$ c- z+ J4 l
else  {( y& C5 A; a8 |" I
    echo "$dt noip loss $num reboot" >> /result.txt! ^& W- T- M# b) Y/ T2 j5 O! l
    reboot
+ p, i. @: N* |$ O+ D7 F" Yfi
1 Q& a0 L% R' c% R' V 5 h. a( {. F# P* J" I
第五行,ping后边的IP自己改,我用了一个外网的IP。* i, o& c% c5 U1 o4 B5 V  V
) A% S% J2 W% \( B( i
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
* Q6 N" R& K# G5 D" w7 q, A 9 b2 R+ Q3 O- `% s3 e; |
我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。, D- Y7 _& _' K( G1 G* ?! \' R) x
9 i2 o0 ?% v( [- {2 I5 v
还是上边60秒的地方,再加一条+ C! ], N) _2 U' S
; {( B4 M& q3 {+ k) O# ?, A+ P" R
* N2 @- m3 g* j& o3 N- t4 I2 l' @
2cset -y -f 0 0x45 0x00 0x55
: ?: ^  j3 i& y: ]  ii2cset -y -f 0 0x45 0x01 0x01
- }7 y& z5 J& _& K( I- ki2cset -y -f 0 0x45 0x30 0x07
: S7 n9 _8 \. G) [1 y# |i2cset -y -f 0 0x45 0x31 0x72, B0 K# }2 A8 r! U" e* f! H- T! ^
i2cset -y -f 0 0x45 0x32 0x72
1 R, Z7 p% ^( x% F4 Oi2cset -y -f 0 0x45 0x33 0x72$ G% E' D& Q5 n( Y7 I* C$ B
#调节三个灯灯每周期上升沿和最高亮度时间. @( R7 d5 w" ~
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44; P& f/ j3 ]( u$ C8 }
i2cset -y -f 0 0x45 0x37 0x44
+ U4 W0 t8 }( d, P1 y( p4 xi2cset -y -f 0 0x45 0x3a 0x55% m+ F; {' m% |" i% S& t
i2cset -y -f 0 0x45 0x3d 0x663 F) m# P6 p! X/ I, l
#调节三个灯每周期下降沿时间和关机时间6 ^  O, [$ `6 F5 c
i2cset -y -f 0 0x45 0x38 0x44
" L4 S, I6 n7 S7 G. m1 \. E# ?i2cset -y -f 0 0x45 0x3b 0x55% p  N4 @& [: k
i2cset -y -f 0 0x45 0x3e 0x663 C* e8 D8 o' \, ]% z
i2cset -y -f 0 0x45 0x39 0x40
. w( g4 B" {) x" f' Ni2cset -y -f 0 0x45 0x3c 0x40: u+ E) E. e; B" D
i2cset -y -f 0 0x45 0x3f 0x400 B+ I. G; ]8 o1 `0 }" E0 ?
# 0-255,更亮
  U% N: d7 [: b* X- Li2cset -y -f 0 0x45 0x34 128
$ G  [/ S. u' ^1 Si2cset -y -f 0 0x45 0x35 128
( O' W% G3 H+ G! k  ci2cset -y -f 0 0x45 0x36 128
" T/ B$ s% D2 `4 k* h" s" P$ K9 Z' m / _4 m: h5 n) c0 b+ {3 ]1 M
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
2 }  W, J) @% `6 h) i
2 O# O: q: R, e9 a& n
" C8 B" J! s* h5 G我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。
; u- f. R8 r) M% M( I0 @, A) i* Q 4 M0 _1 T8 b/ R! s
希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。3 z8 o9 ?! @1 t. \

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:–辽宁 联通
多谢分享!!+ X" l) e1 W& s5 D! ?' P3 u( J- q

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 11:48 , Processed in 0.089515 second(s), 30 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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