Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chroot segfaults 32 to 32 bit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Mon Jan 04, 2016 9:00 am    Post subject: chroot segfaults 32 to 32 bit Reply with quote

Hi Iam trying to chroot from a 32 to a 32 bit gentoo install. However it segfaults.
I know this behaviour from 32/64 bit chrooting but that is not the case.
I attached the last lines of the strace. i hope it helps.

Iam not familiar how chroot works, please someone let me know what it wrong.

Note: The chroot itself is a gentoo on a usb stick install - it works fine. I get no missing libraries or whatever when booting


Code:

mmap2(NULL, 104922, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb76f6000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\207\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1726032, ...}) = 0
mmap2(NULL, 1735212, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb754e000
mprotect(0xb76ef000, 4096, PROT_NONE)   = 0
mmap2(0xb76f0000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0xb76f0000
mmap2(0xb76f3000, 10796, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76f3000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb754d000
set_thread_area({entry_number:-1, base_addr:0xb754d700, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 (entry_number:6)
mprotect(0xb76f0000, 8192, PROT_READ)   = 0
mprotect(0x8050000, 4096, PROT_READ)    = 0
mprotect(0xb7733000, 4096, PROT_READ)   = 0
munmap(0xb76f6000, 104922)              = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=106102544, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb734d000
mmap2(NULL, 24576, PROT_READ, MAP_PRIVATE, 3, 0x2d5f000) = 0xb770a000
brk(0)                                  = 0x8052000
brk(0x8073000)                          = 0x8073000
mmap2(NULL, 229376, PROT_READ, MAP_PRIVATE, 3, 0x2d89000) = 0xb7315000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x2dc2000) = 0xb7709000
close(3)                                = 0
lstat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/mnt/diskless/surveillance1/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
chroot("/mnt/diskless/surveillance1/")  = 0
chdir("/")                              = 0
execve("/bin/bash", ["/bin/bash"], [/* 56 vars */]) = 0
brk(0)                                  = 0x80f9000
uname({sys="Linux", node="vm_1", ...})  = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb773f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb771c000
set_thread_area({entry_number:-1, base_addr:0xb771c680, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 (entry_number:6)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4} ---
+++ killed by SIGSEGV +++
Speicherzugriffsfehler
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Sun Jan 10, 2016 3:34 pm    Post subject: Reply with quote

If you call "/mnt/diskless/surveillance1/bin/bash" directly, does that also segfault?
What about "chroot /mnt/diskless/surveillance1/ /bin/bb"?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum