On Sat, Jan 28, 2012 at 10:49 AM, Vijay Sankar <[email protected]> wrote:
> Hi,
>
> Sorry for the long message. I am not able to figure out a good solution for
> the following:
>
> Right now, what I do to test ports etc., is download install51.iso, run it
> within qemu, and then do the work. To test the port on a different server
> (which is on a different network), I end up burning a new CD or use PXE
boot
> within my LAN when that is possible, so that the latest version is on a USB
> stick. However, I would like to have -current or -beta on a USB drive
> without having to burn a CD or use PXE boot.
>
> Is it possible to install OpenBSD on a USB drive from within qemu and then
> use that USB drive to boot a laptop?
>
> For example, I installed 5.1 -beta as follows using qemu on my 5.0 desktop:
>
> qemu-system-x86_64 -m 1024 -monitor stdio -no-fd-bootchk -hda /dev/rsd6c
> -cdrom
> home/vsankar/downloads/openbsd/jan27-2012/install51.iso -boot d
>
> From my 5.0 desktop, I am able to do the following and boot OpenBSD within
a
> VM
>
> sudo env ETHER=em0 qemu-system-x86_64 \
>        -m 1200 -no-fd-bootchk -hda /dev/rsd6c
>
> I thought this would allow me to take the USB drive and boot from it on my
> notebook. When it did not, I did a disklabel (on the qemu host -- OpenBSD
> 5.0 amd64) and saw the following:
>
> disklabel sd6
> # /dev/rsd6c:
> type: SCSI
> disk: SCSI disk
> label: DT 101 G2
> duid: 0000000000000000
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 973
> total sectors: 15644912
> boundstart: 0
> boundend: 15644912
> drivedata: 0
>
> 16 partitions:
> #                size           offset  fstype [fsize bsize  cpg]
>  c:         15644912                0  unused
>
> But when I boot the 5.1 VM, everything works from the USB and disklabel
> shows all the partitions. Should I not see partition a through k on the USB
> stick when using disklabel on the qemu host also?
>
> I was expecting to see something like this from the qemu host as well as
the
> guest VM:
>
> disklabel -A sd6
> # /dev/rsd6c:
> type: SCSI
> disk: SCSI disk
> label: DT 101 G2
> duid: 0000000000000000
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 973
> total sectors: 15644912
> boundstart: 0
> boundend: 15644912
> drivedata: 0
>
> 16 partitions:
> #                size           offset  fstype [fsize bsize  cpg]
>  a:           240320                0  4.2BSD   2048 16384 1 # /
>  b:           240340           240320    swap
>  c:         15644912                0  unused
>  d:           368128           480672  4.2BSD   2048 16384 1 # /tmp
>  e:           362720           848800  4.2BSD   2048 16384 1 # /var
>  f:          1919680          1211520  4.2BSD   2048 16384 1 # /usr
>  g:          1094464          3131200  4.2BSD   2048 16384 1 # /usr/X11R6
>  h:          4347296          4225664  4.2BSD   2048 16384 1 # /usr/local
>  i:          2143040          8572960  4.2BSD   2048 16384 1 # /usr/src
>  j:          2143040         10716000  4.2BSD   2048 16384 1 # /usr/obj
>  k:          2785728         12859040  4.2BSD   2048 16384 1 # /home
>
> Any clues greatly appreciated.
>
> Thanks very much,
>
> Vijay
>
> Vijay Sankar, M.Eng., P.Eng.
> ForeTell Technologies Limited
> [email protected]
>
> Vijay Sankar, M.Eng., P.Eng.
> ForeTell Technologies Limited
> [email protected]
>
> ---------------------------------------------
> This message was sent using ForeTell-POST 4.9
>

I've done exactly what you are talking about with Virtualbox. I
basically told Virtualbox to mount the USB stick as its drive and
installed OpenBSD in the normal manner.

If I had to guess, I think your problem is in your qemu invocation.
You seem to be telling qemu to only use the `c' slice of the stick.
Maybe you should invoke it like so:

sudo env ETHER=em0 qemu-system-x86_64 \
        -m 1200 -no-fd-bootchk -hda /dev/rsd6

i.e., /dev/rsd6 rather than /dev/rsd6c.

You may have to use the block device, too, rather than the character
one, i.e. /dev/sd6 rather than /dev/rsd6.

Just some random thoughts. I've never tried this with qemu. But what
you want is definitely possible, and OpenBSD is so lightweight it
works great with a decent USB stick.

Corey

Reply via email to