大网数据广告活动
服务器运维问答

chroot from live cd gives : /bin/bash: error while loading shared libraries: __vdso__time: invalid mode for dlopen(): Invalid argument

· 52CE 我爱测

Tried to fix boot problem kernel panic not syncing attemped to kill init exitcode=0x00000100 And trying to chroot from live cd and im getting this error: /bin/bash: error while loading shared libraries: __vdso__time: invalid mode…

问题原文

原帖链接 · mwweb · CC BY-SA 3.0

Tried to fix boot problem kernel panic not syncing attemped to kill init exitcode=0x00000100 And trying to chroot from live cd and im getting this error:

/bin/bash: error while loading shared libraries: __vdso__time: invalid mode for dlopen(): Invalid argument

Seems i messed up with some libraries. Anyone know how to fix this? thanks

已采纳解答

原帖链接 · adoado0 · CC BY-SA 3.0

It seems like you've messed something with 'glibc', it usually gives such error. The only solution that I can currently think of is to try rename your current 'lib' dirs (in environment you are trying to chroot to) and copy (i.e. from live cd) 'clean'. Make sure you keep old 'libs' so you can later reuse them.

For future, I'd recommend to compile and install additional libraries (especially those in different versions that default one) to separate directories, and then explictly point library path using LD_LIBRARY_PATH, when executing binary.

So for now I'd personally try to replace only /lib64 (but it depends on distribution). I can see that at Centos 6 box, /bin/bash depends on:

ldd /bin/bash
linux-vdso.so.1 =>  (0x00007ffd4db63000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f9f34f54000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9f34d50000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9f349bb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9f3517f000

Maybe try rename /lib64 to /lib64_messed and copy fresh /lib64 - it should be sufficient for /bin/bash execution. I am writing about most similar version of Live CD OS to that you are trying to chroot. Of course, there may arise new library dependency errors when trying execute diffirent command, but this way you should do the trick and fix your os for 'a bit' usable state.

And I assume that you are using x64 live cd and trying to chroot to x64 env.

Right now, I've checked at Ubuntu 16 box, and paths are bit different:

ldd /bin/bash 
linux-vdso.so.1 =>  (0x00007fffe3567000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f7611065000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7610e61000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7610a96000)
/lib64/ld-linux-x86-64.so.2 (0x000055f0e5734000)

So you'd need probably to replace /lib and /lib64 dirs, or only those particular libs.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-02-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。