PDA

Bekijk de volledige versie : chroot problem...:-/



macsat
26-04-2005, 19:52
Hi guys

I am playing around with my WL500gx - great toy, but I seem to have a small issue with chroot. I am running Oleg's 1.9.2.7-4 firmware, and get this everything I try to use chroot :


[root@utopia /]$ chroot /tmp/harddisk/debian /bin/bash
chroot: cannot execute /bin/bash: Input/output error

But as you can see, the dir DOES exits, and it is even a complete linux structure :-)


[root@utopia /]$ cd /tmp/harddisk/debian/
[root@utopia debian]$ ls
bin boot dev etc home lib mnt proc root sbin sys tmp usr var

hugo
27-04-2005, 09:33
devfs and proc is not monted when you chroot. i suggest to chroot without shell, then mont proc and devfs then run bash

macsat
27-04-2005, 13:32
I must admit, I dont get it :-)

What do you mean "without shell" ?

...could be do a fast step4step ?

hugo
27-04-2005, 16:33
Your command work on my wlhdd. It might be something with your install.

As for my steps, I would try a simple

chroot /tmp/harddisk/debian
then a mount -t proc none /proc
and mount -t devfs devfs /dev

then a /bin/bash

If you still get an errot, try removing the package and re add it.

macsat
27-04-2005, 19:02
Which package do you mean I should remove?

I believe chroot is part of busybox, so it is not really a package, it "comes with" the firmware...

Really strange...I still get :


[root@utopia root]$ chroot /tmp/harddisk/debian
chroot: cannot execute /bin/sh: Input/output error


damn annoying, since it kindda stops me from moving beoynd this point :-(

hugo
27-04-2005, 19:29
Your debian tree has something wrong. Try to redo it completly on your PC. :)

macsat
27-04-2005, 19:54
Sounds like a reasonable idea...

Can it be done on other distros than a debian?

I made it on a debian install in Virtual PC, since I dont run debian myselves....

I run Fedora on my desktop PC....(The Virtual PC is run at my work computer, so cant access it right now - that is why I ask ;-) )