chroot nie dziala

goro

Passing Basics
Beginner
Dec 6, 2008
15
0
1
jakakolwiek sciezke bym nie podal (oprocz "/") to dostaje ten sam komunikat:

Code:
[/] # chroot /root
chroot: cannot execute /bin/sh: No such file or directory

normalnie wywolanie z linii polecen /bin/sh dziala:
Code:
[/] # bin/sh


BusyBox v1.01 (2008.10.21-04:24+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/root rowniez znajduje sie w drzewie
Code:
[/] # ls -la
drwxr-xr-x   13 administ administ     1024 Dec 12 21:46 .
drwxr-xr-x   13 administ administ     1024 Dec 12 21:46 ..
lrwxrwxrwx    1 administ administ       18 Oct 23 14:00 Qmultimedia -> /share/Qmultimedia
drwxr-xr-x    2 administ administ     1024 Oct 23 14:00 bin
drwxr-xr-x    4 administ administ     3072 Jan  1  1970 dev
drwxr-xr-x   10 administ administ     1024 Dec 12 19:42 etc
lrwxrwxrwx    1 administ administ       13 Jan  1  1970 home -> /mnt/ext/home
drwxr-xr-x    3 administ administ     2048 Oct 23 13:59 lib
lrwxrwxrwx    1 administ administ       11 Oct 23 14:00 linuxrc -> bin/busybox
drwx------    2 administ administ    12288 Oct 23 14:00 lost+found
drwxr-xr-x    5 administ administ     1024 Jan  1  1970 mnt
lrwxrwxrwx    1 administ administ       29 Dec 12 19:42 opt -> /share/HDA_DATA/.qpkg/Optware
dr-xr-xr-x   58 administ administ        0 Jan  1  1970 proc
drwxr-xr-x    2 administ administ     1024 Dec 12 22:05 root
drwxr-xr-x    2 administ administ     2048 Oct 23 14:00 sbin
drwxrwxr-x   29 administ administ     1024 Dec 12 19:42 share
-rw-r--r--    1 administ administ        5 Dec 12 21:46 stunnel.pid
lrwxrwxrwx    1 administ administ       18 Dec 13 03:41 tmp -> /mnt/HDA_ROOT/.tmp
lrwxrwxrwx    1 administ administ       12 Jan  1  1970 usr -> /mnt/ext/usr
drwxrwxrwx    6 administ administ     1024 Dec 13 13:45 var

jakies pomysly co moze byc nie tak?
 
ok, wyglada na to ze sie zainstalowalo poprawnie:

Code:
[~] # ipkg install bash
Installing bash (3.2.33-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts101/cross/unstable/bash_3.2.33-1_powerpc.ipk
Installing readline (5.2-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts101/cross/unstable/readline_5.2-2_powerpc.ipk
Configuring bash
Configuring readline
Successfully terminated.

[~] # bash
[administrator@QNAP ~]#
[administrator@QNAP ~]# exit
exit
 
sprawdz czy masz plik /bin/sh lub /opt/bin/sh w optware
jesli sie znajduje w /bin/sh to nie wiem o co chodzi...
natomiast kiedy znajduje sie w /opt/bin to sprobuj przegrac liby z /lib do /opt/lib
powinno rozwiazac kwestie i wtedy nie bedziesz musial podawac nazwy softu ktory chcesz uruchomic na chroot'ie (/opt/bin/bash)
 
po prostu opornie mi szlo zorientowanie sie, ze chroot tak naprawde przyslania sciezke do roota i program uruchamiany z jego pomoca nie widzi nic ponizej poziomu nowego roota.

tak wiec dzieki wielkie ;)