qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] boot order=d bug?
@ 2017-05-07  5:42 Carl Karsten
  2017-05-08  2:02 ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Carl Karsten @ 2017-05-07  5:42 UTC (permalink / raw)
  To: qemu-devel

In the real world I will have a machine with a sata hd and boot the
installer from a usb stick. I want to test this with 2 disk image files.

The usb stick will be built like so:
https://github.com/CarlFK/video-stack-deploy/blob/usbstick/scripts/mk_usb_installer.sh

but this will demo the problem I have run into with qemu:  how do I boot
from boot.img without using boot=menu?

# make a blank disk to install to
qemu-img create -f qcow2 disk.cow 8G

# get an installer image
wget
http://ftp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/hd-media/boot.img.gz
gunzip boot.img.gz

qemu-system-x86_64 -m 256 -display curses  \
    -drive file=disk.cow,index=0 \
    -drive file=boot.img,index=1 \
    -boot menu=on

# Hit esc and then #2 to boot the installer.

Press ESC for boot menu.
Select boot device:
1. ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (8192 MiBytes)
2. ata0-1: QEMU HARDDISK ATA-7 Hard-Disk (953 MiBytes)
3. Legacy option rom
4. Floppy [drive A]
5. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
6. iPXE (PCI 00:03.0)


juser@gator:~/temp/video-stack-deploy/scripts$ qemu-system-x86_64 -version
QEMU emulator version 2.8.1(Debian 1:2.8+dfsg-4+b1)
Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers


-- 
Carl K

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] boot order=d bug?
  2017-05-07  5:42 [Qemu-devel] boot order=d bug? Carl Karsten
@ 2017-05-08  2:02 ` Thomas Huth
  2017-05-08  4:22   ` Carl Karsten
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2017-05-08  2:02 UTC (permalink / raw)
  To: Carl Karsten, qemu-devel

On 07.05.2017 07:42, Carl Karsten wrote:
> In the real world I will have a machine with a sata hd and boot the
> installer from a usb stick. I want to test this with 2 disk image files.
> 
> The usb stick will be built like so:
> https://github.com/CarlFK/video-stack-deploy/blob/usbstick/scripts/mk_usb_installer.sh
> 
> but this will demo the problem I have run into with qemu:  how do I boot
> from boot.img without using boot=menu?

Have you already tried to use the bootindex property? See:

http://git.qemu.org/?p=qemu.git;a=blob;f=docs/bootindex.txt

 Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] boot order=d bug?
  2017-05-08  2:02 ` Thomas Huth
@ 2017-05-08  4:22   ` Carl Karsten
  2017-05-08  7:57     ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Carl Karsten @ 2017-05-08  4:22 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel

neat.  missed that.

except it doesn't work.

juser@gator:~/temp$ qemu-system-x86_64 -drive
file=boot.img,format=raw,bootindex=1
qemu-system-x86_64: -drive file=boot.img,format=raw,bootindex=1: Block
format 'raw' does not support the option 'bootindex'

juser@gator:~/temp$ qemu-system-x86_64 -drive
file=boot.img,bootindex=1WARNING: Image format was not specified for
'boot.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images,
write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-x86_64: -drive file=boot.img,bootindex=1: Block format 'raw'
does not support the option 'bootindex'


Is there a "yes you do --force" option ?


On Sun, May 7, 2017 at 9:02 PM, Thomas Huth <huth@tuxfamily.org> wrote:

> On 07.05.2017 07:42, Carl Karsten wrote:
> > In the real world I will have a machine with a sata hd and boot the
> > installer from a usb stick. I want to test this with 2 disk image files.
> >
> > The usb stick will be built like so:
> > https://github.com/CarlFK/video-stack-deploy/blob/
> usbstick/scripts/mk_usb_installer.sh
> >
> > but this will demo the problem I have run into with qemu:  how do I boot
> > from boot.img without using boot=menu?
>
> Have you already tried to use the bootindex property? See:
>
> http://git.qemu.org/?p=qemu.git;a=blob;f=docs/bootindex.txt
>
>  Thomas
>
>


-- 
Carl K

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] boot order=d bug?
  2017-05-08  4:22   ` Carl Karsten
@ 2017-05-08  7:57     ` Thomas Huth
  2017-05-08 15:01       ` Carl Karsten
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2017-05-08  7:57 UTC (permalink / raw)
  To: Carl Karsten; +Cc: qemu-devel

On 08.05.2017 06:22, Carl Karsten wrote:
> neat.  missed that.
> 
> except it doesn't work.
> 
> juser@gator:~/temp$ qemu-system-x86_64 -drive
> file=boot.img,format=raw,bootindex=1
> qemu-system-x86_64: -drive file=boot.img,format=raw,bootindex=1: Block
> format 'raw' does not support the option 'bootindex'

bootindex is a property of the "-device" parameter, not of "-drive", so
you've got to specify both parameters here (with "if=none" for -drive).
See bootindex.txt for details.

 Thomas

> On Sun, May 7, 2017 at 9:02 PM, Thomas Huth <huth@tuxfamily.org> wrote:
> 
>> On 07.05.2017 07:42, Carl Karsten wrote:
>>> In the real world I will have a machine with a sata hd and boot the
>>> installer from a usb stick. I want to test this with 2 disk image files.
>>>
>>> The usb stick will be built like so:
>>> https://github.com/CarlFK/video-stack-deploy/blob/
>> usbstick/scripts/mk_usb_installer.sh
>>>
>>> but this will demo the problem I have run into with qemu:  how do I boot
>>> from boot.img without using boot=menu?
>>
>> Have you already tried to use the bootindex property? See:
>>
>> http://git.qemu.org/?p=qemu.git;a=blob;f=docs/bootindex.txt
>>
>>  Thomas
>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] boot order=d bug?
  2017-05-08  7:57     ` Thomas Huth
@ 2017-05-08 15:01       ` Carl Karsten
  0 siblings, 0 replies; 5+ messages in thread
From: Carl Karsten @ 2017-05-08 15:01 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel

On Mon, May 8, 2017 at 2:57 AM, Thomas Huth <huth@tuxfamily.org> wrote:

> On 08.05.2017 06:22, Carl Karsten wrote:
> > neat.  missed that.
> >
> > except it doesn't work.
> >
> > juser@gator:~/temp$ qemu-system-x86_64 -drive
> > file=boot.img,format=raw,bootindex=1
> > qemu-system-x86_64: -drive file=boot.img,format=raw,bootindex=1: Block
> > format 'raw' does not support the option 'bootindex'
>
> bootindex is a property of the "-device" parameter, not of "-drive", so
> you've got to specify both parameters here (with "if=none" for -drive).
> See bootindex.txt for details.
>

got it.  Thank you and IRC folks for this:

qemu-system-x86_64 -m 256 \
    -drive file=disk.cow,index=0 \
    -drive file=/dev/sdb,index=1,format=raw,if=none,id=thumb \
      -device ide-hd,drive=thumb,bootindex=1




>
>  Thomas
>
> > On Sun, May 7, 2017 at 9:02 PM, Thomas Huth <huth@tuxfamily.org> wrote:
> >
> >> On 07.05.2017 07:42, Carl Karsten wrote:
> >>> In the real world I will have a machine with a sata hd and boot the
> >>> installer from a usb stick. I want to test this with 2 disk image
> files.
> >>>
> >>> The usb stick will be built like so:
> >>> https://github.com/CarlFK/video-stack-deploy/blob/
> >> usbstick/scripts/mk_usb_installer.sh
> >>>
> >>> but this will demo the problem I have run into with qemu:  how do I
> boot
> >>> from boot.img without using boot=menu?
> >>
> >> Have you already tried to use the bootindex property? See:
> >>
> >> http://git.qemu.org/?p=qemu.git;a=blob;f=docs/bootindex.txt
> >>
> >>  Thomas
> >>
> >>
> >
> >
>
>


-- 
Carl K

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-08 15:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-07  5:42 [Qemu-devel] boot order=d bug? Carl Karsten
2017-05-08  2:02 ` Thomas Huth
2017-05-08  4:22   ` Carl Karsten
2017-05-08  7:57     ` Thomas Huth
2017-05-08 15:01       ` Carl Karsten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).