Welcome! Log In Create A New Profile

Advanced

Shared libraries missing in Debian rootfs?

Posted by PawelW 
PawelW
Shared libraries missing in Debian rootfs?
July 25, 2017 02:44PM
I just created new clean rootfs and tried to execute commands as described but some libraries are missing.

root@debian:~# rm /etc/ssh/ssh_host*
root@debian:~# ssh-keygen -A
ssh-keygen: error while loading shared libraries: libcrypto.so.1.0.2: cannot open shared object file: No such file or directory
root@debian:~# apt-get update
apt-get: error while loading shared libraries: libapt-private.so.0.0: cannot open shared object file: No such file or directory
root@debian:~#  error while loading shared libraries: libapt-private.so.0.0:



Edited 1 time(s). Last edit at 07/25/2017 03:43PM by bodhi.
Re: Shared libraries missing in Debian rootfs?
July 25, 2017 03:46PM
PawelW,


> I just created new clean rootfs and tried to execu
> te commands as described but some libraries are mi
> ssing.
>
>
> root@debian:~# rm /etc/ssh/ssh_host*
> root@debian:~# ssh-keygen -A
> ssh-keygen: error while loading shared libraries:
> libcrypto.so.1.0.2: cannot open shared object file
> : No such file or directory
> root@debian:~# apt-get update
> apt-get: error while loading shared libraries: lib
> apt-private.so.0.0: cannot open shared object file
> : No such file or directory
> root@debian:~#  error while loading shared librari
> es: libapt-private.so.0.0:
>

I did not see this. If you can not do apt-get update, perhaps the rootfs creation was not done successfully or not according to intsruction.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shared libraries missing in Debian rootfs?
July 25, 2017 03:49PM
What do you see in the output of

ls -l /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.2

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 07/25/2017 09:24PM by bodhi.
PawelW
Re: Shared libraries missing in Debian rootfs?
July 26, 2017 04:55PM
It seems that problem was in corrupted file. I have downloaded it again and now no such errors.

But network interface is not detected in my Zyxel NSA 310.
It has red usb led so I am using kirkwood-nsa310b-lmsensor-redusbled.dtb also tried with kirkwood-nsa310a.dtb

log:
Configuring network interfaces (...)
cannot find device 'eth0'
failed to get interface index: No such device
ifup: failed to bring up eth0

ifconfig -a list "lo" and "enp1s0"
ifup enp1s0 gives "unknown interface enp1s0"
Re: Shared libraries missing in Debian rootfs?
July 26, 2017 06:08PM
PawelW Wrote:
-------------------------------------------------------
> It seems that problem was in corrupted file. I hav
> e downloaded it again and now no such errors.
>
> But network interface is not detected in my Zyxel
> NSA 310.
> It has red usb led so I am using kirkwood-nsa310b-
> lmsensor-redusbled.dtb also tried with kirkwood-ns
> a310a.dtb
>
> log:
> Configuring network interfaces (...)
> cannot find device 'eth0'
> failed to get interface index: No such device
> ifup: failed to bring up eth0
>
> ifconfig -a list "lo" and "enp1s0"
> ifup enp1s0 gives "unknown interface enp1s0"

Do you have serial console? if yes, login and then
fw_printenv

please post the entire log until the after output of fw_printenv

If you don't have serial console, post the output of
dmesg
fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
PawelW
Re: Shared libraries missing in Debian rootfs?
July 27, 2017 03:21AM
My FV env:
arcNumber=4022
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa310b-lmsensor-redusbled.dtb
ethact=egiga0
ethaddr=CC:5D:4E:xx:xx:xx
if_netconsole=ping $serverip
ipaddr=192.168.1.200
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.5
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15


Boot messages from serial console:
[    9.207174] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    9.212839] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[    9.256877] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0xd0d59000, 00:00:00:00:00:30, XID 083000c0 IRQ 33
[    9.302726] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    9.629379] r8169 0000:01:00.0 enp1s0: renamed from eth0
Begin: Loading essential drivers ... done.
[   10.132969] scsi 2:0:0:0: Direct-Access     USB      Flash Disk       1100 PQ: 0 ANSI: 4
[   10.147562] sd 2:0:0:0: [sdb] 15974400 512-byte logical blocks: (8.18 GB/7.62 GiB)
[   10.161441] sd 2:0:0:0: [sdb] Write Protect is off
[   10.173064] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   10.197758]  sdb: sdb1
[   10.207794] sd 2:0:0:0: [sdb] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Warning: fsck not present, so skipping root file system
[   19.799405] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Setting hostname to 'debian'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok
[   21.852547] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ ok                                             done.
[....] Waiting for /dev to be fully populated...[   22.146908] hwmon_vid: Unknown VRM version of your CPU
[   22.167942] lm85 0-002e: Starting monitoring
[   22.178468] orion_wdt: Initial timeout 21 sec
[   22.290625] marvell-cesa f1030000.crypto: CESA device successfully registered
[   22.298078] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   22.300872] sd 2:0:0:0: Attached scsi generic sg1 type 0
done.
[....] Activating swap:[   23.396563] random: crng init done
. ok
[   23.564118] EXT4-fs (sdb1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sdb1
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 14453/499712 files, 235844/1996544 blocks
. ok
[   23.830166] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
[ ok ] Will now activate lvm and md swap:done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables...done.
[ ok ] Initializing random number generator...done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Cannot find device "eth0"
Failed to get interface index: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..

exiting.
ifup: failed to bring up eth0
failed.
[   28.783350] NET: Registered protocol family 10
[   28.790430] Segment Routing with IPv6
[ ok ] Starting RPC port mapper daemon: rpcbind.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1290 (syslogd)
. ok
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1289 (klogd)
. ok
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 debian ttyS0

It seems that interface is renamed to enp1s0 during boot.
Re: Shared libraries missing in Debian rootfs?
July 27, 2017 03:38AM
PawelW,

> It seems that interface is renamed to enp1s0 durin
> g boot.

I see. I have not seen this reported before. Might be a new behavior after stretch? It is strange that the r8169 driver would change that drastically.

However, If your ifconfig show the interface is enp1s0:

ifconfig -a

Then the /etc/network/interfaces would need to be adjusted to reflect that.

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shared libraries missing in Debian rootfs?
July 27, 2017 04:24AM
PawelW Wrote:
-------------------------------------------------------

> It seems that interface is renamed to enp1s0 durin
> g boot.


This is a new udev thing and will be default by debian 10 and will not support the wlan0,eth0 etc.. naming anymore as I understand it.

see /usr/share/doc/udev/README.Debian.gz



Edited 1 time(s). Last edit at 07/27/2017 04:36AM by feas.
Re: Shared libraries missing in Debian rootfs?
July 27, 2017 05:07AM
Thanks feas!

Who said udev is independent? been assimilated by the borgs (aka systemd :)))

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shared libraries missing in Debian rootfs?
July 27, 2017 05:47AM
bodhi Wrote:
-------------------------------------------------------
> Thanks feas!
>
> Who said udev is independent? been assimilated by
> the borgs (aka systemd :)))


I really hate change just for the sake of changing stuff. This dog is too old to keep learning new tricks.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: