WD My Cloud libc.so.6 救砖实录

本文仅针对 WD My Cloud Gen1。

症状

使用apt-get安装软件时,更新了libc到2.19导致的。

WD-peczis:/lib# /usr/local/sbin/updateFirmwareFromFile.sh /DataVolume/shares/Public/sq-040104-422-20150423.deb
 basename: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 date: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 logger: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 tee: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 touch: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 date: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 tee: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 find: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
 grep: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference

解决方法

There is a solution if there is a ssh connection and a working share.

You should download file http://ftp.altlinux.org/pub/people/boyarsh/wd/libc.so.633 (or extract /lib/arm-linux-gnueabihf/libc-2.17.so from firmware image and name it libc.so.6) and put it on share.

Let it be /DataVolume/shares/Public/libc.so.6

Then you can type in you ssh connection:

export LD_PRELOAD=/DataVolume/shares/Public/libc.so.6

and then you can execute most commands.

Personally, I uploaded a tar image of rootfs extracted from firmware to share, untared it and rsynced /lib /usr and /var/lib from it to device rootfs.

You can also go to /lib/arm-linux-gnueabihf/ and relink all links from *2.19* to 2.17

just a to help other to “relink”

ldconfig -l -v /lib/arm-linux-gnueabihf/libc-2.17.so

下面是翻译

  1. 前提是还有ssh连接和samba共享可用
  2. 找到libc-2.17.so,重命名为libc.so.6,放置于/DataVolume/shares/Public/libc.so.6(这时应该还可以访问samba共享文件夹)
  3. export LD_PRELOAD=/DataVolume/shares/Public/libc.so.6
  4. 现在也许可以运行大多数命令,也许不行
  5. 尝试重链接所有*2.19* 到 2.17(删除所有2.19,用 ln 重新链接到2.17,有很多个文件)
  6. ldconfig -l -v /lib/arm-linux-gnueabihf/libc-2.17.so(我在输入这条命令后可以运行大多数命令)

补充:所有relink完成后,系统基本可用,重启成功,唯独samba服务不可用,恢复原厂固件后一切正常

/usr/local/sbin/updateFirmwareFromFile.sh /DataVolume/shares/Public/sq-040104-422-20150423.deb

原贴链接:https://community.wd.com/t/possibly-played-too-much/93709/11

发表评论

电子邮件地址不会被公开。 必填项已用*标注