发布于 
pv: - | uv: -

DSM6.2.3 Update3 提示更新失败,文件已损毁

前些时候发现我的黑群晖有一个Update 3待更新,于是我便尝试更新,却一直提示“无法更新文件,文件可能已经损毁”于是我尝试了多次,却依然无果。

在通过搜索引擎的帮助下,我终于找到了解决方案,原来这是黑群晖的通病,白群晖并没有这个问题,下面记录下解决过程。

解决过程

1.创建sh文件, 内容如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/ash
# FixSynoboot() extracted from Jun 1.04b loader
# added hotplug-out event to gracefully clean up esata volumes 2020-Apr-18
# cleaned up share references in message log and root folder 2020-May-16

FixSynoboot()
{
if [ ! -e /dev/synoboot ]; then
tail -n+3 /proc/partitions | while read major minor sz name
do
if echo $name | grep -q "^sd[[:alpha:]]*$";then
basename=$name
minor0=$minor
synoboot1=""
synoboot2=""
continue
fi
if [ $name = "${basename}1" -a $sz -le 512000 ]; then
synoboot1="$name"
minor1=$minor
elif [ $name = "${basename}2" -a $sz -le 512000 ]; then
synoboot2="$name"
minor2=$minor
else
continue
fi
if [ -n "$synoboot1" -a -n "$synoboot2" ]; then
# begin hotplug event added
if [ -e /sys/class/block/$basename ]; then
port=$(synodiskport -portcheck $basename)
df | grep "^/dev/$basename." | while read share; do
share=$(echo $share | awk '{print $1,$NF}')
sharedir=$(echo $share | awk '{print $2}')
sharebase=$(echo $sharedir | awk -F\/ '{print $2}')
sharedir=$(echo $sharedir | awk -F\/ '{print $3}')
if ( synocheckshare --vol-unmounting $port $share ); then
umount $(echo $share | awk '{print $1}')
grep -v "^$share" /run/synostorage/volumetab >/tmp/volumetab
mv /tmp/volumetab /run/synostorage/volumetab
rm "/$sharebase/@eaDir/$sharedir/SYNO@.attr"
find "/$sharebase" -empty -type d -delete 2>/dev/null
fi
done
echo "remove" >/sys/class/block/$basename/uevent
fi
# end

rm "/dev/$basename"
rm "/dev/$synoboot1"
rm "/dev/$synoboot2"
rm "/dev/${basename}3"
mknod /dev/synoboot b $major $minor0
mknod /dev/synoboot1 b $major $minor1
mknod /dev/synoboot2 b $major $minor2
break
fi
done
fi
}

RUNAS="root"

case $1 in
start)
FixSynoboot
exit 0
;;
stop)
exit 0
;;
status)
exit 0
;;
log)
exit 1
;;
*)
exit 1
;;
esac

2.执行文件

在控制面板-终端机和SNMP中打开SSH权限,之后再通过CMD(Windows)执行ssh 用户名@IP -p 端口 密码为你的用户密码,直接赋予其775权限chmod -775 Filename 后执行它bash Filename.

3.更新系统

接着就可以直接更新您的群晖系统了.

其他

文件来源于网络