LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-17-2011, 08:06 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
qemu booting from CD won't reboot from CD


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
 
Old 05-17-2011, 05:14 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Almost seems to be a fail in 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.
 
Old 05-18-2011, 01:37 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by jefro View Post
Almost seems to be a fail in 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.
 
Old 05-18-2011, 04:43 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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.

Last edited by jefro; 05-18-2011 at 04:48 PM.
 
Old 05-19-2011, 07:22 AM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by jefro View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] arm linux kernel booting problems with qemu vinodk_gautam Linux - Mobile 1 04-20-2011 11:16 PM
Error while booting from QEMU Muthu I Linux - Newbie 2 06-29-2010 03:39 PM
Is it possible to be able to decrease the time in booting on OS takes to boot in QEMU tkmsr Linux - Virtualization and Cloud 6 05-24-2010 02:34 AM
Solaris 10 guest endless reboot under KVM/Qemu green_dood Linux - Software 6 12-13-2009 01:20 AM
booting installed windows using qemu lefty.crupps Linux - Software 0 11-27-2005 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration