Help: DNS Resolver and Root Shell
Hui Li
openlinuxsource at gmail.com
Sun Oct 20 16:31:26 UTC 2013
Hi,
I'm new to busybox and encountered 2 issues currently during building up
small rootfs.
1). DNS resolver is not valid. I googled some and it seems I need to
copy libnss_files/libnss_dns/libresolv libs to proper directory(/lib),
however it's still failed. The busybox is compiled in shared libraries
way. Here's arm ldd output:
$ arm-rpi-linux-gnueabi-ldd
--root /opt/arm/arm-rpi-linux-gnueabi/arm-rpi-linux-gnueabi/sysroot
busybox
libm.so.6 => /lib/libm.so.6 (0xdeadbeef)
ld-linux-armhf.so.3 => /lib/ld-linux-armhf.so.3 (0xdeadbeef)
libc.so.6 => /lib/libc.so.6 (0xdeadbeef)
And I also took reference to this thread
http://lists.busybox.net/pipermail/busybox/2001-November/005103.html to
add those LDFLAGS in menuconfig but looks like busybox does not use it
when I try to do make:
Trying libraries: crypt m nss_dns nss_files resolv
Library crypt is not needed, excluding it
Library m is needed, can't exclude it (yet)
Library nss_dns is not needed, excluding it
Library nss_files is not needed, excluding it
Library resolv is not needed, excluding it
Library m is needed, can't exclude it (yet)
Final link with: m
2). Root shell does start from /root. After I created the rootfs and
booting to login prompt the root user is under '/' not '/root'. I am
sure root user's home dir is /root in /etc/passwd and I have defined
HOME shell variable is '/root' in /etc/profile. I also found a bug
thread which opened to OpenWRT project related to this issue.
Unfortunately, this issue was marked as 'wontfix'. Bug URL:
https://dev.openwrt.org/ticket/2657
Can anyone show me some tips there?
Thanks.
Hui
More information about the busybox
mailing list