Qemu shows "No bootable device" when building image

656 views
Skip to first unread message

Winson Liu

unread,
Jan 30, 2018, 7:31:47 AM1/30/18
to S2E Developer Forum

Hi everyone,


I'm new to S2E. I'm trying to set up the S2E environment step by step according to the official document ( https://github.com/S2E/docs/blob/master/src/s2e-env.rst ). When executing the image_build command, I got the following error.

(venv) user@pc:~/s2e$ s2e image_build -g debian-8.7.1-x86_64

INFO: [image_build] The following images will be built:
INFO: [image_build]  * debian-8.7.1-x86_64
INFO: [image_build] Kernel repository already exists in /home/user/s2e/source/s2e-linux-kernel
make: Entering directory '/home/user/s2e/images'
[2018/01/30 Tuesday 19:55:33 CST] [/home/user/s2e/images/debian-8.7.1-x86_64/image.raw.s2e.ready] Creating snapshot...
LD_PRELOAD=/home/user/s2e/install/share/libs2e/libs2e-x86_64.so /home/user/s2e/install/bin/qemu-system-x86_64 -enable-kvm -drive if=ide,index=0,file=/home/user/s2e/images/debian-8.7.1-x86_64/image.raw.s2e,format=s2e,cache=writeback -serial file:/home/user/s2e/images/debian-8.7.1-x86_64/serial_ready.txt -enable-serial-commands -net none -net nic,model=e1000  -m 256M
Starting libs2e...
Opening /dev/kvm
Warning: vlan 0 is not connected to host network
Warning: vlan 0 is not connected to host network


It says "No bootable device". 


Can anyone tell me how to solve this problem? Thank you for taking time to read this thread.


Vitaly Chipounov

unread,
Jan 30, 2018, 9:01:14 AM1/30/18
to s2e...@googlegroups.com
Hi,

Looks like something is wrong with your image. Is this full log? Did you by any chance try to build several times and interrupted the process before? If so, you might need to delete image.raw.s2e and rebuild it again.

Vitaly

--
--
You received this message because you are a member of the S2E Developer Forum.
To post to this group, send email to s2e...@googlegroups.com
To unsubscribe from this group, send email to s2e-dev+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/s2e-dev

---
You received this message because you are subscribed to the Google Groups "S2E Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s2e-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Winson Liu

unread,
Jan 30, 2018, 9:10:54 AM1/30/18
to S2E Developer Forum
Hi Vitaly,

Thanks for your advice. I'm not sure whether I built the image several times or not. I'll try to rebuild it again. And I'll tell you the results later. Thanks again.
To unsubscribe from this group, send email to s2e-dev+u...@googlegroups.com

For more options, visit this group at http://groups.google.com/group/s2e-dev

---
You received this message because you are subscribed to the Google Groups "S2E Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s2e-dev+u...@googlegroups.com.

Winson Liu

unread,
Jan 31, 2018, 6:55:04 AM1/31/18
to S2E Developer Forum
Hi Vitaly,

I solved this problem. Maybe something was wrong when downloading files from debian's website. I run the following command twice.

s2e image_build debian-8.7.1-x86_64 -g

It failed when I run it the first time.

(venv) user@pc:~/s2e$ s2e image_build debian-8.7.1-x86_64 -g
INFO: [image_build] The following images will be built:
INFO: [image_build]  * debian-8.7.1-x86_64
INFO: [image_build] Kernel repository already exists in /home/user/s2e/source/s2e-linux-kernel
make: Entering directory '/home/user/s2e/images'
mkdir -p /home/user/s2e/images/debian-8.7.1-x86_64
cp "/home/user/s2e/images/.tmp-output/debian-8.7.1-x86_64/image.raw" "/home/user/s2e/images/debian-8.7.1-x86_64/image.raw.s2e"
[2018/01/31 Wednesday 10:28:18 CST] [/home/user/s2e/images/debian-8.7.1-x86_64/image.raw.s2e] Installing kernels...
virt-copy-in -a "/home/user/s2e/images/debian-8.7.1-x86_64/image.raw.s2e" /home/user/s2e/images/.tmp-output/linux-4.9.3-x86_64/*.deb /home/s2e
guestfish: no operating system was found on this disk

If using guestfish '-i' option, remove this option and instead
use the commands 'run' followed by 'list-filesystems'.
You can then mount filesystems you want by hand using the
'mount' or 'mount-ro' command.

If using guestmount '-i', remove this option and choose the
filesystem(s) you want to see by manually adding '-m' option(s).
Use 'virt-filesystems' to see what filesystems are available.

If using other virt tools, this disk image won't work
with these tools.  Use the guestfish equivalent commands
(see the virt tool manual page).
/home/user/s2e/source/guest-images//Makefile.linux:164: recipe for target '/home/user/s2e/images/debian-8.7.1-x86_64/image.raw.s2e' failed
make: *** [/home/user/s2e/images/debian-8.7.1-x86_64/image.raw.s2e] Error 1
make: Leaving directory '/home/user/s2e/images'
ERROR: [image_build]

  RAN: /usr/bin/make --directory=/home/user/s2e/images --file=/home/user/s2e/source/guest-images/Makefile -j 2 debian-8.7.1-x86_64

  STDOUT:


  STDERR:
  

Then I run the command again and QEMU shows the error message.

I'm not sure why it failed and how to fix it. But I found that I can download the image from Google Drive directly by specifying the '-d' parameter.

Cheers.


On Tuesday, January 30, 2018 at 10:01:14 PM UTC+8, Vitaly Chipounov wrote:
To unsubscribe from this group, send email to s2e-dev+u...@googlegroups.com

For more options, visit this group at http://groups.google.com/group/s2e-dev

---
You received this message because you are subscribed to the Google Groups "S2E Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s2e-dev+u...@googlegroups.com.

Vitaly Chipounov

unread,
Jan 31, 2018, 8:05:30 AM1/31/18
to s2e...@googlegroups.com
Hi,

Downloading pre-built images is indeed the simplest. I'll file an issue to implement extra sanity checks on guest images. It looks like the initial setup didn't work properly.

Vitaly

To unsubscribe from this group, send email to s2e-dev+unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/s2e-dev

---
You received this message because you are subscribed to the Google Groups "S2E Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s2e-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages