Description of problem: Doing 'chroot /mnt/sysimage' in rescue mode under qemu-system-ppc64 leads to "Illegal instruction" error. Version-Release number of selected component (if applicable): chroot (GNU coreutils) 8.21 Linux version 3.11.10-301.fc20.ppc64 How reproducible: Always. Steps to Reproduce: 1. boot in qemu-system-ppc64 using installation DVD qemu-system-ppc64 -m 2048 -net nic -net user,net=192.168.167.0/24 -hdb swap.img root.img -cdrom Fedora-20-ppc64-DVD.iso 2. try "chroot /mnt/sysimage" Actual results: Illegal instruction Expected results: Additional info: Running 'strace chroot /mnt/sysimage' ends with: chroot("/mnt/sysimage") = 0 chdir("/") = 0 execve("/bin/bash", ["/bin/bash", "-i"], [/* 19 vars */]) = 0 --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x1ffffffb7bc4} +++ killed by SIGILL +++ Illegal instruction
Adding Karsten/Dan to cc, as they take care of secondary arches. Any idea? I don't see anything strange in code - just execvp() and then exit.
What's on the root.img? It sounds like either a QEMU bug (or rather being incomplete with ppc64 emulation) or the bash from the root.img isn't a ppc64 binary.
Could be VSX? (bug 887978) Note that upstream qemu has seen patches posted to add VSX support earlier this month. Not sure if they went upstream yet or not.
1) content on the root.img: /tmp/mnt/usr/bin/bash: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x26685a161df8985d7281ced4e89d323ce73be86c, stripped 2) 'objdump -d' shows lxvd2x and stxvd2x instructions in libc.so.6 and ld64.so.1 libraries (not sure if it is VSX?). Tested on qemu 1.6.1 and Fedora's qemu 1.7.0-1, SIGILL is returned in both.
Does it work when you add the parameters '-cpu POWER7 -machine pseries' ?
It is the same with -cpu/-machine arguments. I've tried also following commands in rescue shell: /bin/bash # -> OK /mnt/sysimage/bin/bash # -> OK LD_LIBRARY_PATH=/mnt/sysimage/lib64 /mnt/sysimage/bin/bash # -> Illegal instruction (some libraries between /lib64 and /mnt/sysimage/lib64 differs, but the bash binaries are identical)
*** This bug has been marked as a duplicate of bug 1002077 ***