* VMware disk image type
@ 2011-02-23 12:48 Mickael Chazaux
2011-02-23 21:42 ` Tom Rini
0 siblings, 1 reply; 7+ messages in thread
From: Mickael Chazaux @ 2011-02-23 12:48 UTC (permalink / raw)
To: openembedded-devel
Hi,
I see there is a vmware.conf in conf/machine, but it does not generate
vmdk (vmware virtual disk files) files. Here are the steps I take to
do that:
- create an empty file the size wanted (with dd),
- format it to ext3 (mkfs.ext3 myfile)
- mount it loopback (mount -o loop myfile /mnt)
- untar the OE-generated rootfs in /mnt
- create a /boot/extlinux.conf [1],
- install extlinux in /boot (extlinux -i /mnt/boot)
- umount,
- convert to vmdk (using qemu-img -O vmdk myfile myfile.vmdk)
- boot it in vmware.
Is it possible to add a "vmdk" image to openembedded to do this automatically?
Regards,
Mickael
[1]
/boot/extlinux.conf contents :
label a
kernel /boot/bzImage
append root=/dev/sda rw
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: VMware disk image type
2011-02-23 12:48 VMware disk image type Mickael Chazaux
@ 2011-02-23 21:42 ` Tom Rini
2011-04-04 11:21 ` Mickael Chazaux
0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2011-02-23 21:42 UTC (permalink / raw)
To: openembedded-devel
On 02/23/2011 05:48 AM, Mickael Chazaux wrote:
> Hi,
>
> I see there is a vmware.conf in conf/machine, but it does not generate
> vmdk (vmware virtual disk files) files. Here are the steps I take to
> do that:
>
> - create an empty file the size wanted (with dd),
> - format it to ext3 (mkfs.ext3 myfile)
> - mount it loopback (mount -o loop myfile /mnt)
> - untar the OE-generated rootfs in /mnt
> - create a /boot/extlinux.conf [1],
> - install extlinux in /boot (extlinux -i /mnt/boot)
> - umount,
> - convert to vmdk (using qemu-img -O vmdk myfile myfile.vmdk)
> - boot it in vmware.
>
> Is it possible to add a "vmdk" image to openembedded to do this automatically?
Yes, patches would be welcome. This would reside in conf/bitbake.conf.
See the ubi/ubifs image examples for how to generate slightly complex
images like this. And I would recommend adding vmdk.ext[234] as the
image names (and supply at least one of them, someone else might step up
and do the regex for the others if you don't). Thanks!
--
Tom Rini
Mentor Graphics Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: VMware disk image type
2011-02-23 21:42 ` Tom Rini
@ 2011-04-04 11:21 ` Mickael Chazaux
2011-04-04 13:56 ` Koen Kooi
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Mickael Chazaux @ 2011-04-04 11:21 UTC (permalink / raw)
To: openembedded-devel
Hi,
2011/2/23 Tom Rini <tom_rini@mentor.com>:
> On 02/23/2011 05:48 AM, Mickael Chazaux wrote:
>>
>> Hi,
>>
>> I see there is a vmware.conf in conf/machine, but it does not generate
>> vmdk (vmware virtual disk files) files. Here are the steps I take to
>> do that:
>>
>> - create an empty file the size wanted (with dd),
>> - format it to ext3 (mkfs.ext3 myfile)
>> - mount it loopback (mount -o loop myfile /mnt)
>> - untar the OE-generated rootfs in /mnt
>> - create a /boot/extlinux.conf [1],
>> - install extlinux in /boot (extlinux -i /mnt/boot)
>> - umount,
>> - convert to vmdk (using qemu-img -O vmdk myfile myfile.vmdk)
>> - boot it in vmware.
>>
>> Is it possible to add a "vmdk" image to openembedded to do this
>> automatically?
>
> Yes, patches would be welcome. This would reside in conf/bitbake.conf. See
> the ubi/ubifs image examples for how to generate slightly complex images
> like this. And I would recommend adding vmdk.ext[234] as the image names
> (and supply at least one of them, someone else might step up and do the
> regex for the others if you don't). Thanks!
>
The problem is the loopback mount, which requires root privileges, and
is required by extlinux for its installation. Is there another method?
Regards,
Mickael Chazaux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: VMware disk image type
2011-04-04 11:21 ` Mickael Chazaux
@ 2011-04-04 13:56 ` Koen Kooi
2011-04-04 14:00 ` Mike Westerhof
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Koen Kooi @ 2011-04-04 13:56 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04-04-11 13:21, Mickael Chazaux wrote:
> Hi,
>
> 2011/2/23 Tom Rini <tom_rini@mentor.com>:
>> On 02/23/2011 05:48 AM, Mickael Chazaux wrote:
>>>
>>> Hi,
>>>
>>> I see there is a vmware.conf in conf/machine, but it does not generate
>>> vmdk (vmware virtual disk files) files. Here are the steps I take to
>>> do that:
>>>
>>> - create an empty file the size wanted (with dd),
>>> - format it to ext3 (mkfs.ext3 myfile)
>>> - mount it loopback (mount -o loop myfile /mnt)
>>> - untar the OE-generated rootfs in /mnt
>>> - create a /boot/extlinux.conf [1],
>>> - install extlinux in /boot (extlinux -i /mnt/boot)
>>> - umount,
>>> - convert to vmdk (using qemu-img -O vmdk myfile myfile.vmdk)
>>> - boot it in vmware.
>>>
>>> Is it possible to add a "vmdk" image to openembedded to do this
>>> automatically?
>>
>> Yes, patches would be welcome. This would reside in conf/bitbake.conf. See
>> the ubi/ubifs image examples for how to generate slightly complex images
>> like this. And I would recommend adding vmdk.ext[234] as the image names
>> (and supply at least one of them, someone else might step up and do the
>> regex for the others if you don't). Thanks!
>>
>
> The problem is the loopback mount, which requires root privileges, and
> is required by extlinux for its installation. Is there another method?
If your user is in the 'disk' group it should also work. Narcissus runs
as 'www-data' and generated OMAP SD images with loopmounts, adding
'www-data' to 'disks' fixed the weird problems we were seeing (vfat loop
mounts worked, ext3 didn't0.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFNmc4iMkyGM64RGpERAuygAKCk1FXClMR8xQZU99Cu7d4ZIVsXhgCeP89h
XQPhqxENu/aE+9LsE9g1R88=
=J9PL
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: VMware disk image type
2011-04-04 11:21 ` Mickael Chazaux
2011-04-04 13:56 ` Koen Kooi
@ 2011-04-04 14:00 ` Mike Westerhof
2011-04-04 14:07 ` Phil Blundell
2011-04-04 14:46 ` Tom Rini
3 siblings, 0 replies; 7+ messages in thread
From: Mike Westerhof @ 2011-04-04 14:00 UTC (permalink / raw)
To: openembedded-devel
On 4/4/2011 6:21 AM, Mickael Chazaux wrote:
> Hi,
>
> 2011/2/23 Tom Rini <tom_rini@mentor.com>:
>> On 02/23/2011 05:48 AM, Mickael Chazaux wrote:
>>>
>>> Hi,
>>>
>>> I see there is a vmware.conf in conf/machine, but it does not generate
>>> vmdk (vmware virtual disk files) files. Here are the steps I take to
>>> do that:
>>>
>>> - create an empty file the size wanted (with dd),
>>> - format it to ext3 (mkfs.ext3 myfile)
>>> - mount it loopback (mount -o loop myfile /mnt)
>>> - untar the OE-generated rootfs in /mnt
>>> - create a /boot/extlinux.conf [1],
>>> - install extlinux in /boot (extlinux -i /mnt/boot)
>>> - umount,
>>> - convert to vmdk (using qemu-img -O vmdk myfile myfile.vmdk)
>>> - boot it in vmware.
>>>
>>> Is it possible to add a "vmdk" image to openembedded to do this
>>> automatically?
>>
>> Yes, patches would be welcome. This would reside in conf/bitbake.conf. See
>> the ubi/ubifs image examples for how to generate slightly complex images
>> like this. And I would recommend adding vmdk.ext[234] as the image names
>> (and supply at least one of them, someone else might step up and do the
>> regex for the others if you don't). Thanks!
>>
>
> The problem is the loopback mount, which requires root privileges, and
> is required by extlinux for its installation. Is there another method?
Can't you just copy or otherwise re-use the existing code for creating
ext3 images? (I think that uses fakeroot to do the job, which avoids
loopback mounts and all the potential problems that involves.)
-Mike (mwester)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: VMware disk image type
2011-04-04 11:21 ` Mickael Chazaux
2011-04-04 13:56 ` Koen Kooi
2011-04-04 14:00 ` Mike Westerhof
@ 2011-04-04 14:07 ` Phil Blundell
2011-04-04 14:46 ` Tom Rini
3 siblings, 0 replies; 7+ messages in thread
From: Phil Blundell @ 2011-04-04 14:07 UTC (permalink / raw)
To: openembedded-devel
On Mon, 2011-04-04 at 13:21 +0200, Mickael Chazaux wrote:
> Hi,
>
> 2011/2/23 Tom Rini <tom_rini@mentor.com>:
> > On 02/23/2011 05:48 AM, Mickael Chazaux wrote:
> >>
> >> Hi,
> >>
> >> I see there is a vmware.conf in conf/machine, but it does not generate
> >> vmdk (vmware virtual disk files) files. Here are the steps I take to
> >> do that:
> >>
> >> - create an empty file the size wanted (with dd),
> >> - format it to ext3 (mkfs.ext3 myfile)
> >> - mount it loopback (mount -o loop myfile /mnt)
> >> - untar the OE-generated rootfs in /mnt
> >> - create a /boot/extlinux.conf [1],
> >> - install extlinux in /boot (extlinux -i /mnt/boot)
> >> - umount,
> >> - convert to vmdk (using qemu-img -O vmdk myfile myfile.vmdk)
> >> - boot it in vmware.
> >>
> >> Is it possible to add a "vmdk" image to openembedded to do this
> >> automatically?
> >
> > Yes, patches would be welcome. This would reside in conf/bitbake.conf. See
> > the ubi/ubifs image examples for how to generate slightly complex images
> > like this. And I would recommend adding vmdk.ext[234] as the image names
> > (and supply at least one of them, someone else might step up and do the
> > regex for the others if you don't). Thanks!
> >
>
> The problem is the loopback mount, which requires root privileges, and
> is required by extlinux for its installation. Is there another method?
You could avoid the loopback mount for the first steps by using
genext2fs to create the image and then tune2fs to add a journal inode.
But I can't think of any way to avoid the need for loopback when
installing extlinux (apart, obviously, from patching either extlinux
itself or fakeroot).
p.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: VMware disk image type
2011-04-04 11:21 ` Mickael Chazaux
` (2 preceding siblings ...)
2011-04-04 14:07 ` Phil Blundell
@ 2011-04-04 14:46 ` Tom Rini
3 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2011-04-04 14:46 UTC (permalink / raw)
To: Mickael Chazaux; +Cc: openembedded-devel
On 04/04/2011 04:21 AM, Mickael Chazaux wrote:
> Hi,
>
> 2011/2/23 Tom Rini <tom_rini@mentor.com>:
>> On 02/23/2011 05:48 AM, Mickael Chazaux wrote:
>>>
>>> Hi,
>>>
>>> I see there is a vmware.conf in conf/machine, but it does not generate
>>> vmdk (vmware virtual disk files) files. Here are the steps I take to
>>> do that:
>>>
>>> - create an empty file the size wanted (with dd),
>>> - format it to ext3 (mkfs.ext3 myfile)
>>> - mount it loopback (mount -o loop myfile /mnt)
>>> - untar the OE-generated rootfs in /mnt
>>> - create a /boot/extlinux.conf [1],
>>> - install extlinux in /boot (extlinux -i /mnt/boot)
>>> - umount,
>>> - convert to vmdk (using qemu-img -O vmdk myfile myfile.vmdk)
>>> - boot it in vmware.
>>>
>>> Is it possible to add a "vmdk" image to openembedded to do this
>>> automatically?
>>
>> Yes, patches would be welcome. This would reside in conf/bitbake.conf. See
>> the ubi/ubifs image examples for how to generate slightly complex images
>> like this. And I would recommend adding vmdk.ext[234] as the image names
>> (and supply at least one of them, someone else might step up and do the
>> regex for the others if you don't). Thanks!
>>
>
> The problem is the loopback mount, which requires root privileges, and
> is required by extlinux for its installation. Is there another method?
See classes/syslinux.bbclass for how we handle doing syslinux today.
Something similar should be doable for extlinux if you can't use syslinux.
--
Tom Rini
Mentor Graphics Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-04-04 14:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 12:48 VMware disk image type Mickael Chazaux
2011-02-23 21:42 ` Tom Rini
2011-04-04 11:21 ` Mickael Chazaux
2011-04-04 13:56 ` Koen Kooi
2011-04-04 14:00 ` Mike Westerhof
2011-04-04 14:07 ` Phil Blundell
2011-04-04 14:46 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.