LINUX.ORG.RU

Fedora7 & chroot


0

0

При попытке создания chroot-окружения в Федоре 7(изкаробочной) получаю вот такое:

[arr_e@localhost ~]$ sudo /usr/sbin/chroot /home/arr_e/gentoo/ /bin/bash
/usr/sbin/chroot: cannot run command `/bin/bash': No such file or directory

баш на месте естественно =) wtf?

Ответ на: комментарий от birdie

[arr_e@localhost ~]$ sudo strace /usr/sbin/chroot /home/arr_e/gentoo/ /bin/bashexecve("/usr/sbin/chroot", ["/usr/sbin/chroot", "/home/arr_e/gentoo/", "/bin/bash"], [/* 19 vars */]) = 0
brk(0) = 0x9c77000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=46818, ...}) = 0
mmap2(NULL, 46818, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fcb000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320 K\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1673760, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fca000
mmap2(0x49c000, 1390032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x49c000
mmap2(0x5ea000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14e) = 0x5ea000
mmap2(0x5ed000, 9680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x5ed000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc9000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fc96c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0x5ea000, 8192, PROT_READ) = 0
mprotect(0x498000, 4096, PROT_READ) = 0
munmap(0xb7fcb000, 46818) = 0
brk(0) = 0x9c77000
brk(0x9c98000) = 0x9c98000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=65179696, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7dc9000
close(3) = 0
chroot("/home/arr_e/gentoo/") = 0
chdir("/") = 0
execve("/bin/bash", ["/bin/bash"...], [/* 19 vars */]) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "/usr/sbin/chroot: ", 18/usr/sbin/chroot: ) = 18
write(2, "cannot run command `/bin/bash\'", 30cannot run command `/bin/bash') = 30
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
) = 1
close(1) = 0
close(2) = 0
exit_group(127) = ?

По ходу онй баш ищет в новом руте уже...

rebarned
() автор топика
Ответ на: комментарий от rebarned

> По ходу онй баш ищет в новом руте уже...

Естественно, а как ты хотел?

Deleted
()
Ответ на: комментарий от rebarned

Кто-то снес все дерево внутри диры. Накатил backup, все заработало. Сорри =)

rebarned
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.