* [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
@ 2016-04-03 13:50 Marwa Hamza
2016-04-03 18:20 ` Pranith Kumar
2016-04-03 18:38 ` Pranith Kumar
0 siblings, 2 replies; 8+ messages in thread
From: Marwa Hamza @ 2016-04-03 13:50 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]
hello , i tried to run qemu on x64 system ,
those are steps that i followed
i compile the kernel 4.4.1 with arch =i386
i download busybox 1.21.0
make ARCH=i386 menuconfig
I checked the option to compile Busybox as a static executable
make ARCH=i386 install
cd _install
mkdir proc sys dev lib etc etc/init.d
gedit etc/inittab
::sysinit:/etc/init.d/rcS
sudo chmod +x etc/inittab
sudo gedit etc/init.d/rcS
#!/bin/sh
echo “hello” // hello display when starting the qemu
mount -t proc none /proc
mount -t sysfs none /sys
/sbin/mdev -s
sudo chmod +x _install/etc/init.d/rcS
find . | cpio -o –format=newc > ../rootfs.img
cd ..
gzip -c rootfs.img > rootfs.img.gz
./i386-softmmu/qemu-system-i386 -M pc -kernel
/home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
-initrd /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
-append “root=/dev/ram rdinit=/sbin/init”
i have tried this command too
./i386-softmmu/qemu-system-i386 -M pc -kernel
/home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
-initrd /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
-append “root=/dev/ram rdinit=/bin/sh”
but i got this msg in qemu ‘shell
starting init :/bin/sh exists but couldn’t execute it
kernel panic – not syncing no working init found
should i work with another file system ? or create a new one , I got the
same error with x86 , , any one please can help me to get qemu working
perfectly
thanks
[-- Attachment #2: Type: text/html, Size: 1824 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
2016-04-03 13:50 [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system Marwa Hamza
@ 2016-04-03 18:20 ` Pranith Kumar
2016-04-03 18:30 ` Marwa Hamza
2016-04-03 18:38 ` Pranith Kumar
1 sibling, 1 reply; 8+ messages in thread
From: Pranith Kumar @ 2016-04-03 18:20 UTC (permalink / raw)
To: Marwa Hamza; +Cc: qemu-devel
On Sun, Apr 3, 2016 at 9:50 AM, Marwa Hamza <marwahamza63@gmail.com> wrote:
> hello , i tried to run qemu on x64 system ,
>
> those are steps that i followed
> i compile the kernel 4.4.1 with arch =i386
> i download busybox 1.21.0
> make ARCH=i386 menuconfig
> I checked the option to compile Busybox as a static executable
> make ARCH=i386 install
> cd _install
> mkdir proc sys dev lib etc etc/init.d
> gedit etc/inittab
> ::sysinit:/etc/init.d/rcS
> sudo chmod +x etc/inittab
> sudo gedit etc/init.d/rcS
> #!/bin/sh
Can you try changing this line to: "#!/sbin/ash"?
I am not sure busybox has sh shell installed or configured properly.
That is what your error message is pointing to atleast.
> starting init :/bin/sh exists but couldn’t execute it
> kernel panic – not syncing no working init found
Thanks!
--
Pranith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
2016-04-03 18:20 ` Pranith Kumar
@ 2016-04-03 18:30 ` Marwa Hamza
0 siblings, 0 replies; 8+ messages in thread
From: Marwa Hamza @ 2016-04-03 18:30 UTC (permalink / raw)
To: Pranith Kumar; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
but i tried the same thing with arm arch ( file system made by busybox) and
i used sh shell and it worked well
2016-04-03 20:20 GMT+02:00 Pranith Kumar <bobby.prani@gmail.com>:
> On Sun, Apr 3, 2016 at 9:50 AM, Marwa Hamza <marwahamza63@gmail.com>
> wrote:
> > hello , i tried to run qemu on x64 system ,
> >
> > those are steps that i followed
> > i compile the kernel 4.4.1 with arch =i386
> > i download busybox 1.21.0
> > make ARCH=i386 menuconfig
> > I checked the option to compile Busybox as a static executable
> > make ARCH=i386 install
> > cd _install
> > mkdir proc sys dev lib etc etc/init.d
> > gedit etc/inittab
> > ::sysinit:/etc/init.d/rcS
> > sudo chmod +x etc/inittab
> > sudo gedit etc/init.d/rcS
> > #!/bin/sh
>
> Can you try changing this line to: "#!/sbin/ash"?
>
> I am not sure busybox has sh shell installed or configured properly.
> That is what your error message is pointing to atleast.
>
>
> > starting init :/bin/sh exists but couldn’t execute it
> > kernel panic – not syncing no working init found
>
>
> Thanks!
> --
> Pranith
>
[-- Attachment #2: Type: text/html, Size: 1669 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
2016-04-03 13:50 [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system Marwa Hamza
2016-04-03 18:20 ` Pranith Kumar
@ 2016-04-03 18:38 ` Pranith Kumar
2016-04-03 19:49 ` Marwa Hamza
1 sibling, 1 reply; 8+ messages in thread
From: Pranith Kumar @ 2016-04-03 18:38 UTC (permalink / raw)
To: Marwa Hamza; +Cc: qemu-devel
On Sun, Apr 3, 2016 at 9:50 AM, Marwa Hamza <marwahamza63@gmail.com> wrote:
> ./i386-softmmu/qemu-system-i386 -M pc -kernel
> /home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
> -initrd /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
> -append “root=/dev/ram rdinit=/sbin/init”
>
Can you post the output when you run this command? In particular, does
the /sbin/init exist in the rootfs?
--
Pranith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
2016-04-03 18:38 ` Pranith Kumar
@ 2016-04-03 19:49 ` Marwa Hamza
2016-04-03 20:02 ` Pranith Kumar
2016-04-03 20:13 ` Marwa Hamza
0 siblings, 2 replies; 8+ messages in thread
From: Marwa Hamza @ 2016-04-03 19:49 UTC (permalink / raw)
To: Pranith Kumar; +Cc: qemu-devel
[-- Attachment #1.1: Type: text/plain, Size: 1085 bytes --]
the output of this command > ./i386-softmmu/qemu-system-i386 -M pc -kernel
>
/home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
> -initrd
/home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
> -append “root=/dev/ram rdinit=/sbin/init”
>
starting init :/sbin/init exists but couldn't execute it (error -8)
starting init : /bin/sh exists but couldn't execute it (error -8)
kernel panic not syncing : no working init found , try passing init= option
to kernel
2016-04-03 19:38 GMT+01:00 Pranith Kumar <bobby.prani@gmail.com>:
> On Sun, Apr 3, 2016 at 9:50 AM, Marwa Hamza <marwahamza63@gmail.com>
> wrote:
>
> > ./i386-softmmu/qemu-system-i386 -M pc -kernel
> >
> /home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
> > -initrd
> /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
> > -append “root=/dev/ram rdinit=/sbin/init”
> >
>
> Can you post the output when you run this command? In particular, does
> the /sbin/init exist in the rootfs?
>
> --
> Pranith
>
[-- Attachment #1.2: Type: text/html, Size: 1784 bytes --]
[-- Attachment #2: kernelpanic.png --]
[-- Type: image/png, Size: 93431 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
2016-04-03 19:49 ` Marwa Hamza
@ 2016-04-03 20:02 ` Pranith Kumar
2016-04-03 20:13 ` Marwa Hamza
1 sibling, 0 replies; 8+ messages in thread
From: Pranith Kumar @ 2016-04-03 20:02 UTC (permalink / raw)
To: Marwa Hamza; +Cc: qemu-devel
On Sun, Apr 3, 2016 at 3:49 PM, Marwa Hamza <marwahamza63@gmail.com> wrote:
> the output of this command > ./i386-softmmu/qemu-system-i386 -M pc -kernel
>>
>> /home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
>> -initrd
>> /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
>> -append “root=/dev/ram rdinit=/sbin/init”
>>
> starting init :/sbin/init exists but couldn't execute it (error -8)
> starting init : /bin/sh exists but couldn't execute it (error -8)
> kernel panic not syncing : no working init found , try passing init= option
> to kernel
>
I don't think this is a qemu problem. From the error message it looks
like init in your busybox root image is not configured properly. I
would focus on finding why the init file is not able to
run(permissions, maybe?).
--
Pranith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
2016-04-03 19:49 ` Marwa Hamza
2016-04-03 20:02 ` Pranith Kumar
@ 2016-04-03 20:13 ` Marwa Hamza
2016-04-03 20:14 ` Marwa Hamza
1 sibling, 1 reply; 8+ messages in thread
From: Marwa Hamza @ 2016-04-03 20:13 UTC (permalink / raw)
To: Pranith Kumar; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
it shows:
-rwxr-xr-x 1 root root 265848 يول 18 2014 /sbin/init
2016-04-03 20:49 GMT+01:00 Marwa Hamza <marwahamza63@gmail.com>:
> the output of this command > ./i386-softmmu/qemu-system-i386 -M pc
> -kernel
> >
> /home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
> > -initrd
> /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
> > -append “root=/dev/ram rdinit=/sbin/init”
> >
> starting init :/sbin/init exists but couldn't execute it (error -8)
> starting init : /bin/sh exists but couldn't execute it (error -8)
> kernel panic not syncing : no working init found , try passing init=
> option to kernel
>
> 2016-04-03 19:38 GMT+01:00 Pranith Kumar <bobby.prani@gmail.com>:
>
>> On Sun, Apr 3, 2016 at 9:50 AM, Marwa Hamza <marwahamza63@gmail.com>
>> wrote:
>>
>> > ./i386-softmmu/qemu-system-i386 -M pc -kernel
>> >
>> /home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
>> > -initrd
>> /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
>> > -append “root=/dev/ram rdinit=/sbin/init”
>> >
>>
>> Can you post the output when you run this command? In particular, does
>> the /sbin/init exist in the rootfs?
>>
>> --
>> Pranith
>>
>
>
[-- Attachment #2: Type: text/html, Size: 2214 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system
2016-04-03 20:13 ` Marwa Hamza
@ 2016-04-03 20:14 ` Marwa Hamza
0 siblings, 0 replies; 8+ messages in thread
From: Marwa Hamza @ 2016-04-03 20:14 UTC (permalink / raw)
To: Pranith Kumar; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]
it shows:
-rwxr-xr-x 1 root root 265848 يول 18 2014 /sbin/init
2016-04-03 21:13 GMT+01:00 Marwa Hamza <marwahamza63@gmail.com>:
> it shows:
> -rwxr-xr-x 1 root root 265848 يول 18 2014 /sbin/init
>
>
> 2016-04-03 20:49 GMT+01:00 Marwa Hamza <marwahamza63@gmail.com>:
>
>> the output of this command > ./i386-softmmu/qemu-system-i386 -M pc
>> -kernel
>> >
>> /home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
>> > -initrd
>> /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
>> > -append “root=/dev/ram rdinit=/sbin/init”
>> >
>> starting init :/sbin/init exists but couldn't execute it (error -8)
>> starting init : /bin/sh exists but couldn't execute it (error -8)
>> kernel panic not syncing : no working init found , try passing init=
>> option to kernel
>>
>> 2016-04-03 19:38 GMT+01:00 Pranith Kumar <bobby.prani@gmail.com>:
>>
>>> On Sun, Apr 3, 2016 at 9:50 AM, Marwa Hamza <marwahamza63@gmail.com>
>>> wrote:
>>>
>>> > ./i386-softmmu/qemu-system-i386 -M pc -kernel
>>> >
>>> /home/marwa/Bureau/lauterbach/i386_qemu/linux-4.1.18/arch/i386/boot/bzImage
>>> > -initrd
>>> /home/marwa/Bureau/lauterbach/i386_qemu/busybox-1.21.0/rootfs.img.gz
>>> > -append “root=/dev/ram rdinit=/sbin/init”
>>> >
>>>
>>> Can you post the output when you run this command? In particular, does
>>> the /sbin/init exist in the rootfs?
>>>
>>> --
>>> Pranith
>>>
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 2662 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-04-03 20:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-03 13:50 [Qemu-devel] run qemu on x64 system ( ARCH=i386 or ARCH=x86-64) and on x86 system Marwa Hamza
2016-04-03 18:20 ` Pranith Kumar
2016-04-03 18:30 ` Marwa Hamza
2016-04-03 18:38 ` Pranith Kumar
2016-04-03 19:49 ` Marwa Hamza
2016-04-03 20:02 ` Pranith Kumar
2016-04-03 20:13 ` Marwa Hamza
2016-04-03 20:14 ` Marwa Hamza
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.