[SOLVED] qemu booting from CD won't reboot from CD
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After I boot from a CD rom in QEMU, trying to reboot within the virtual machine (e.g. doing the "reboot" command at the root shell on Linux running inside), fails. The OS goes through the motions and the virtual machine starts to reboot. But then it cannot get to the CD the 2nd time around. The message I see in QEMU is:
Code:
Starting SeaBIOS (version pre-0.6.1-20100902_143500-palmer)
Booting from CD-Rom...
Boot failed: Could not read from CDROM (code 0003)
No bootable device.
The qemu command I'm running is:
Code:
qemu-system-x86_64 -alt-grab -hda hda.img -cdrom cda.iso -m 1024 -boot d -net nic -net user -redir tcp:19043::22 -monitor stdio
SOLVED: not a QEMU problem at all ... installers eject CD media when done and QEMU emulates this action correctly.
Last edited by Skaperen; 05-19-2011 at 07:25 AM.
Reason: solved
Are all the images in the same sub-directory as the script? (I rather assume it is)
Just for grins try a different iso of some other distro and you don't have to do much more that -cdrom new.iso and see if you can reboot. If it works then use that to go back to the original iso. If it failed then look at qemu.
Are all the images in the same sub-directory as the script? (I rather assume it is)
Just for grins try a different iso of some other distro and you don't have to do much more that -cdrom new.iso and see if you can reboot. If it works then use that to go back to the original iso. If it failed then look at qemu.
I tried several Ubuntu and Slackware ISOs, and all have the same issue. OTOH, a hard-disk based installed system reboots just fine. I also notice that doing halt from the ISO leaves QEMU running (the kernel says halted), but doing halt from the HD systems causes QEMU to exit. Doing halt on the real machine from the ISO booted system does power the real hardware off. Something seems a bit odd with the CD handling.
I'm wanting to build CD/DVD booted production machines (benefits include the ability to "flip the OS" as needed, and that it can't be trojaned or infected from the system it brings up). I was wanting to use QEMU as a testing/staging platform for building the ISOs for these.
I use qemu a lot an never had that issue. It really is a stand alone deal and I can't think of any reason the host would cause it (but still could somehow).
What level of qemu are you using? Try an earlier version or newest one if not.
I can't see how the bios in qemu for boot order could cause it, even if you did edit it.
The hard drive deal install only difference that I can see is the -boot d deal. Could it be a syntax issue?
From qemu page.
-boot [order=drives][,once=drives][,menu=on|off]
Specify boot order drives as a string of drive letters. Valid drive letters depend on the target achitecture. The x86 PC uses: a, b (floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot from network adapter 1-4), hard disk boot is the default. To apply a particular boot order only on the first startup, specify it via once.
Interactive boot menus/prompts can be enabled via menu=on as far as firmware/BIOS supports them. The default is non-interactive boot.
# try to boot from network first, then from hard disk
qemu -boot order=nc
# boot from CD-ROM first, switch back to default order after reboot
qemu -boot once=d
Note: The legacy format '-boot drives' is still supported but its use is discouraged as it may be removed from future versions.
I use qemu a lot an never had that issue. It really is a stand alone deal and I can't think of any reason the host would cause it (but still could somehow).
What level of qemu are you using? Try an earlier version or newest one if not.
I can't see how the bios in qemu for boot order could cause it, even if you did edit it.
The hard drive deal install only difference that I can see is the -boot d deal. Could it be a syntax issue?
I think I figured it out by guessing. I just remembered that the install CDs will eject the CD media when the install is done. If QEMU emulates that eject command correctly, I suspect this is what should happen. So I will go ahead and mark this thread "solved" even though it really should be "was not really a problem because of operator not thinking". It's not an issue with QEMU at all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.