Cannot create vmware nor virtualbox image after successful build - get_block_dev_from_partition_dev: command not found

165 views
Skip to first unread message

fdimeglio

unread,
Jun 26, 2010, 1:19:30 PM6/26/10
to Chromium OS discuss
Hello,

After building, I wanted to create a VMware or VirtualBox image to be
able to test ChromeOS in a VM. Here is what I got for VMware image
creation:

fdimeglio@fdimeglio:/usr/local/google/chromiumos/chromiumos.git/src/
scripts$ ./image_to_vmware.sh --from=../build/images/x86-generic/
0.7.49.2010_06_26_0858-a1+ dd if=/usr/local/google/chromiumos/
chromiumos.git/src/build/images/x86-generic/0.7.49.2010_06_26_0858-a1/
chromiumos_image.bin of=part_1 bs=512 skip=1486848 count=1474560
1474560+0 records in
1474560+0 records out
754974720 bytes (755 MB) copied, 3.81401 s, 198 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_2
bs=512 skip=4096 count=8192
8192+0 records in
8192+0 records out
4194304 bytes (4.2 MB) copied, 0.0189981 s, 221 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_3
bs=512 skip=12288 count=1474560
1474560+0 records in
1474560+0 records out
754974720 bytes (755 MB) copied, 7.4647 s, 101 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_4
bs=512 skip=3026944 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 3.0452e-05 s, 16.8 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_5
bs=512 skip=3026945 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.249e-05 s, 22.8 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_6
bs=512 skip=34 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.0814e-05 s, 24.6 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_7
bs=512 skip=35 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.0953e-05 s, 24.4 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_8
bs=512 skip=2961408 count=32768
32768+0 records in
32768+0 records out
16777216 bytes (17 MB) copied, 0.10068 s, 167 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_9
bs=512 skip=36 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.7868e-05 s, 18.4 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_10
bs=512 skip=37 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 1.8928e-05 s, 27.0 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_11
bs=512 skip=38 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.9264e-05 s, 17.5 MB/s
+ dd if=/usr/local/google/chromiumos/chromiumos.git/src/build/images/
x86-generic/0.7.49.2010_06_26_0858-a1/chromiumos_image.bin of=part_12
bs=512 skip=2994176 count=32768
32768+0 records in
32768+0 records out
16777216 bytes (17 MB) copied, 0.101771 s, 165 MB/s
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.9893e-05 s, 17.1 MB/s
[sudo] password for fdimeglio:
/tmp/tmp.LjLgc13013/postinst: line 17:
get_block_dev_from_partition_dev: command not found

I have seen that there has been some recent changes about "Modify
postinstall to avoid x86-specific dependencies. (issue2742009)" with
https://groups.google.com/a/chromium.org/group/chromium-os-reviews/browse_thread/thread/eb2f1ae8504ff01b#

Is it related and how to fix this ?

Thank you,

Fabrice

Todd Deshane

unread,
Jun 26, 2010, 10:52:58 PM6/26/10
to fdim...@gmail.com, Chromium OS discuss, Chromium OS dev, Rahul Chaturvedi, Chris Sosa
I changed the line in src/scripts/fixup_image_for_qemu.py
from:

postinst = postinst[0:m1] + postinst[m2:]

to:

postinst = '. "$(dirname "$0")/usr/sbin/chromeos-common.sh"' + "\n" +
postinst[0:m1] + postinst[m2:]

The missing function call goes away, but the new error is:

ERROR: cgpt add: GptSanityCheck() returned 3: GPT_ERROR_INVALID_ENTRIES

I'm not sure where that is being check/called. This sort of error
might indicated a bigger problem?

Any ideas?

Thanks,
Todd

> --
> Chromium OS discuss mailing list: chromium-...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en
>

--
Todd Deshane
http://todddeshane.net
http://runningxen.com

fdimeglio

unread,
Jun 27, 2010, 12:08:35 AM6/27/10
to Chromium OS discuss
Thank you Todd.

This issue is tracked with: http://code.google.com/p/chromium-os/issues/detail?id=4351

It seems that we already have a fix proposal. Could you try it and
report your feedback ?

Fabrice

Mr Seb

unread,
Jun 27, 2010, 5:50:58 AM6/27/10
to fdim...@gmail.com, Chromium OS discuss
Does that solve the GptSanityCheck error though? Doesn't look related...

(I also have the same problem.)

-S

Todd Deshane

unread,
Jun 27, 2010, 2:09:12 PM6/27/10
to mrseb...@gmail.com, fdim...@gmail.com, Chromium OS discuss
I don't think it will fix the GptSanityCheck, since the patch
mentioned just adds the "chromeos-common.sh" and that I just fixes the
original problem.

If I knew where to find more about that I would look into the code
more. Any ideas?

Thanks,
Todd

--

Todd Deshane

unread,
Jun 27, 2010, 7:14:35 PM6/27/10
to fdim...@gmail.com, Chromium OS discuss, Chromium OS dev, Rahul Chaturvedi, Chris Sosa, Bill Richardson
I looked into a bit more.The problem is a call to install_gpt call
that is made in image_to_vm.sh

The original line was:
install_gpt "${TEMP_IMG}" "${TEMP_ROOTFS}" "${TEMP_KERN}" "${TEMP_STATE}" \
"${TEMP_PMBR}" "${TEMP_ESP}" true false ${FLAGS_rootfs_partition_size}

I changed it to:

install_gpt "${TEMP_IMG}" "${TEMP_ROOTFS}" "${TEMP_KERN}" "${TEMP_STATE}" \
"${TEMP_PMBR}" "${TEMP_ESP}" false ${FLAGS_rootfs_partition_size}

Which fixes the problem. Could somebody double check that I made the
right choice to get rid of the true and not the false?

Must be the install_gpt function had a change in parameters.

This will need to get fixed in the latest vm scripts patch before it
gets committed.

Thanks,
Todd

Mr Seb

unread,
Jun 27, 2010, 7:18:31 PM6/27/10
to desh...@gmail.com, fdim...@gmail.com, Chromium OS discuss, Chromium OS dev, Rahul Chaturvedi, Chris Sosa, Bill Richardson
Will check now -- and also see if vmware/virtualbox boot the GUI (with
USE -opengl)

-S

> --
> Chromium OS Developers mailing list: chromiu...@chromium.org


> View archives, change email options, or unsubscribe:

> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>

Mr Seb

unread,
Jun 27, 2010, 7:32:01 PM6/27/10
to desh...@gmail.com, fdim...@gmail.com, Chromium OS discuss, Chromium OS dev, Rahul Chaturvedi, Chris Sosa, Bill Richardson
Boots fine, like previous builds that I've done using the patched
image_to_vm.sh.

Still no GUI with USE -opengl

(Can anyone on the Chromium team suggest how we might get CrOS to run
in VirtualBox/VMware?

-S

Fabrice Di Meglio

unread,
Jun 27, 2010, 7:56:21 PM6/27/10
to Mr Seb, Fabrice Di Meglio, desh...@gmail.com, Chromium OS discuss, Chromium OS dev, Rahul Chaturvedi, Chris Sosa, Bill Richardson
Well, Todd, your change is strange as I have from "image_to_vmware.sh"
the following which is not the same as yours:

# Set up the partition table
install_gpt "$TEMP_IMG" "$TEMP_ROOTFS" "$TEMP_KERN" "$TEMP_STATE" \
"$TEMP_PMBR" "$TEMP_ESP" true

I updated this morning so I am wondering if you have the latest.

Fabrice

Todd Deshane

unread,
Jun 27, 2010, 11:17:45 PM6/27/10
to Fabrice Di Meglio, Mr Seb, Chromium OS discuss, Chromium OS dev, Rahul Chaturvedi, Chris Sosa
Hi Fabrice,

Do you have this patch:
http://codereview.chromium.org/2803015/show

(it changes image_to_vmware.sh to image_to_vm.sh, with lots of other
fixes... do ./image_to_vm.sh --help for options).

Todd

--

Todd Deshane

unread,
Jun 28, 2010, 8:59:12 AM6/28/10
to Rahul Chaturvedi, fdim...@gmail.com, Chromium OS discuss, Chromium OS dev, Chris Sosa
This one was just a hack to get rid of the "can't find method X". I
think I patch already went in that fixed this one.

On Mon, Jun 28, 2010 at 8:37 AM, Rahul Chaturvedi <r...@chromium.org> wrote:
> postinst = '. "$(dirname "$0")/usr/sbin/chromeos-common.sh"' + "\n" +
>

> I don't get why you're replacing the install script with the common script?


>
> On Sun, Jun 27, 2010 at 08:22, Todd Deshane <desh...@gmail.com> wrote:
>>
>> postinst = '. "$(dirname "$0")/usr/sbin/chromeos-common.sh"' + "\n" +
>
>

--

Todd Deshane

unread,
Jun 28, 2010, 9:00:47 AM6/28/10
to fdim...@gmail.com, Chromium OS discuss, Chromium OS dev, Rahul Chaturvedi, Chris Sosa, Bill Richardson
This is the important one though. Was this one fixed in the mean time
on either side of the call?
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages