cannot find /bin/sh

If your (rooted) Toon doesn't do what it's supposed to, post here. Dutch allowed / Posten in 't Nederlands toegestaan.

Moderators: marcelr, TheHogNL, Toonz

Post Reply
dexternl
Starting Member
Starting Member
Posts: 12
Joined: Mon Feb 04, 2019 8:25 pm

cannot find /bin/sh

Post by dexternl »

after rooting my toon my dad wanted his toon also rooted. So i did the same steps as before (connect the toon to a pi and kicking of the root script). Everything looks fine but when he tries to reboot the toon it doesnt boot anymore. If i check using minicom what the toon is telling it ends in a panic with error cannot find /bin/sh.

So i tried following the manual of marcel and try to boot of a nfs image. it looks like its booting a bit but i dont get a shell i end up with these lines:

Code: Select all

eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:10, irq=-1)
ADDRCONF(NETDEV_UP): eth0: link is not ready
IP-Config: Complete:
     device=eth0, addr=172.16.0.100, mask=255.255.255.0, gw=172.16.0.1,
     host=toon, domain=, nis-domain=(none),
     bootserver=172.16.0.13, rootserver=172.16.0.13, rootpath=
Looking up port of RPC 100003/3 on 172.16.0.13
PHY: 1:10 - Link is Up - 100/Full
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Looking up port of RPC 100005/3 on 172.16.0.13
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing init memory: 116K
/bin/sh: can't access tty; job control turned off
/ # eth0: no IPv6 routers present

nfs: server 172.16.0.13 not responding, still trying
my exports file on the nfs server looks like this:

Code: Select all

/tftpboot/toon/rootfs    *(rw,sync,no_root_squash,no_subtree_check)
/tftpboot/toon           *(rw,sync,no_root_squash,no_subtree_check)
I can mount the nfs share via another server using nfs. And i am using ubuntu as nfs server. What can is do besides buying my dad a new Toon?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: cannot find /bin/sh

Post by TheHogNL »

Code: Select all

/bin/sh: can't access tty; job control turned off
/ # eth0: no IPv6 routers present
This is normal. There is no TTY support on the nfs booted Toon. You are presented the / # prompt from where you can go futher. Can't you type anything there?

Code: Select all

nfs: server 172.16.0.13 not responding, still trying
This is something to look at. Why did your toon boot from nfs but after booting it is not responding?

About how it happened,.. did you use an older version of the rooter? The newest version has a replaced dropbear package with no depencies. Probably you older package tried to update the libc also (from a ready to install 5.0.4).
Or do you have any other idea what happened during rooting?
Member of the Toon Software Collective
dexternl
Starting Member
Starting Member
Posts: 12
Joined: Mon Feb 04, 2019 8:25 pm

Re: cannot find /bin/sh

Post by dexternl »

Thanks for the quick response. No i cannot type anything thats what i find strange. I will try to install the tftp and nfs on a pi which i use for the serial connection and let you know. What are the best steps to take when i have a shell prompt? I have the feeling that i am only missing the sh. So is there an option to only restore the shell without wiping the partition?

For the rooting part i have used the latest version of the rooter from Github. I noticed that he tried installing the dropbear and another package which i dont know by head. But he failed both because he couldnt use sh anymore.
mAiden
Member
Member
Posts: 330
Joined: Mon Jul 10, 2017 10:22 am

Re: cannot find /bin/sh

Post by mAiden »

Do not even understand the NFS boot at all. If Toon gives the notification: "/bin/sh: can't access tty; job control turned off" then you can edit your inittab and iptables and passwd files?
Be careful that inittab does not empty, otherwise Toon will not start up.

If you can't type anything, than you have to switch RxD and TxD cables (RxD goes to TxD, and TxD goes to RxD), i think. :)
Member of the Toon Software Collective
dexternl
Starting Member
Starting Member
Posts: 12
Joined: Mon Feb 04, 2019 8:25 pm

Re: cannot find /bin/sh

Post by dexternl »

the tty message is presented when i boot the toon via nfs. when i normally boot my broken toon i get a kernel panic.
The RX and TX must be correct because i can enter command until the moment of booting via nfs.
aabre
Starting Member
Starting Member
Posts: 42
Joined: Sun Nov 05, 2017 1:26 pm
Location: Schiedam

Re: cannot find /bin/sh

Post by aabre »

dexternl wrote:/tftpboot/toon/rootfs *(rw,sync,no_root_squash,no_subtree_check)
/tftpboot/toon *(rw,sync,no_root_squash,no_subtree_check)

Hoi dexternl
Check your path on your rpi /tftpboot
I had some problems too with the configuration and the path
My file system (image-base-qb2.tar.gz) is located in /tftpboot/rootfs and not in /tftpboot/toon/rootfs

hope it wil help :-)
mAiden
Member
Member
Posts: 330
Joined: Mon Jul 10, 2017 10:22 am

Re: cannot find /bin/sh

Post by mAiden »

dexternl wrote:the tty message is presented when i boot the toon via nfs. when i normally boot my broken toon i get a kernel panic.
The RX and TX must be correct because i can enter command until the moment of booting via nfs.
Oke..
What is the error that Kernel Panic gives you? :)
Member of the Toon Software Collective
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: cannot find /bin/sh

Post by marcelr »

Probably VFS error, can't find the root filesystem, or something along these lines?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: cannot find /bin/sh

Post by TheHogNL »

dexternl wrote: For the rooting part i have used the latest version of the rooter from Github. I noticed that he tried installing the dropbear and another package which i dont know by head. But he failed both because he couldnt use sh anymore.
I think you are hitting the same as Aabre did in this post: viewtopic.php?f=101&t=11230&p=89178#p89178
Does that look familiar?
Member of the Toon Software Collective
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: cannot find /bin/sh

Post by TheHogNL »

Also for you, check my post at viewtopic.php?f=101&t=11230&p=89640#p89640
Member of the Toon Software Collective
dexternl
Starting Member
Starting Member
Posts: 12
Joined: Mon Feb 04, 2019 8:25 pm

Re: cannot find /bin/sh

Post by dexternl »

TheHogNL wrote:Also for you, check my post at viewtopic.php?f=101&t=11230&p=89640#p89640
Thanks if i use your image as rootfs and boot via nfs i get a toon screen but i am now a bit confused how to proceed.

If i boot the toon normally i get the following kernel panic:

Code: Select all

UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   117833728 bytes (115072 KiB, 112 MiB, 928 LEBs)
UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)
usb 2-1: new high speed USB device using mxc-ehci and address 2
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 104K
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
[<c00273d0>] (unwind_backtrace+0x0/0xf0) from [<c029e720>] (panic+0x60/0x190)
[<c029e720>] (panic+0x60/0x190) from [<c00223dc>] (init_post+0x78/0xc4)
[<c00223dc>] (init_post+0x78/0xc4) from [<c0008b54>] (kernel_init+0x110/0x14c)
[<c0008b54>] (kernel_init+0x110/0x14c) from [<c00238ec>] (kernel_thread_exit+0x)
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: cannot find /bin/sh

Post by TheHogNL »

You first need to boot from the NFS image as you did before and mount your broken rootfs again (under /mnt/rootfs or something like that).
Then, after making a backup (especially a backup of (/mnt/rootfs)/etc/openvpn) remove everything in that folder and unpack my image there.

You might also just copy the /lib and /usr/lib files from my image to your broken rootfs.
Member of the Toon Software Collective
dexternl
Starting Member
Starting Member
Posts: 12
Joined: Mon Feb 04, 2019 8:25 pm

Re: cannot find /bin/sh

Post by dexternl »

You are all the best i managed to restore the toon. But before i break it again. Do i need to do something to root it or is this image already rooted?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: cannot find /bin/sh

Post by TheHogNL »

Image already rooted. Password 'toon'
Member of the Toon Software Collective
Post Reply

Return to “Toon issues and support (Nederlands toegestaan)”