Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-21 Thread Clint Byrum
Excerpts from Jay Pipes's message of 2016-06-21 14:20:07 -0400:
> On 06/21/2016 02:01 PM, Andre Florath wrote:
> > Hello Jay,
> >
> > Yes - the partition alignment is a problem:
> > grub2 needs at least 63 blocks between the MBR and the first
> > partition.  Here for you the partition directly starts at block 1,
> > therefore grub has no way to put its data on the disk.
> >
> > The root cause is, that all the partitioning tools I found (like
> > parted or sfdisk) make some 'optimization': they do not what you
> > state but what they think you want. (And I have the impression that
> > their 'thinking' includes the moon phases and the biorhythm of the
> > user :-) .)
> >
> > Example in your case: sfdisk called with '1 - - *' creates on Ubuntu
> > Xenial a partition starting from block 1. On Debian 8.4 (my
> > development machine) it creates a partition starting from 2087.  This
> > gives some room for grub, but it horrible when it comes to alignment.
> >
> > Some possible workarounds:
> > o Use another host for creating the Ubuntu VM
> >(and hope, that sfdisk behaves 'better'.)
> > o Use a more recent version of diskimage-builder:
> >some time ago 'sfdisk' was replaced by 'parted'
> >(and hope, that 'parted' does a 'better' job for you).
> > o Under Ubuntu Xenial execute with 1.0.0 installed:
> >$ sudo vi 
> > /usr/share/diskimage-builder/elements/vm/block-device.d/10-partition
> >In line 23 replace
> >   1 - - *
> >with
> >   2048 - - *
> >(Note that this really only works on Ubuntu Xenial.)
> >
> > Hope this works and helps - was not able to test these things.
> >
> > If you are interested in some more background information:
> > I stumbled over the mostly random behavior of these tools last week.
> > One aspect is, that they optimize things for the current system (e.g.
> > reading some kernel parameters; especially IO buffer sizes).  These
> > sizes can be completely different on the target system - which might
> > lead to very poor disk performance.
> > During the last days I reworked my patch (which originally used
> > parted) to directly write the needed info to the boot records. [1]
> > More details can be found in the comments of MBR.py [2].
> >
> > Kind regards
> >
> > Andre
> 
> Thanks for the great information and help, all! I upgraded dib to 1.17, 
> re-ran the same command et voila, problem solved. :)
> 
> So, looks like parted vs. sfdisk is indeed the issue, and is solved in 
> modern dib versions. (Time to update Xenial's PPA for dib? ;)
> 

Just looks like it hasn't been uploaded in a while:

https://tracker.debian.org/pkg/python-diskimage-builder

Once 1.17+ gets into yakkety (The future Ubuntu 16.10) we can propose it
for xenial-backports.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-21 Thread Jay Pipes

On 06/21/2016 02:01 PM, Andre Florath wrote:

Hello Jay,

Yes - the partition alignment is a problem:
grub2 needs at least 63 blocks between the MBR and the first
partition.  Here for you the partition directly starts at block 1,
therefore grub has no way to put its data on the disk.

The root cause is, that all the partitioning tools I found (like
parted or sfdisk) make some 'optimization': they do not what you
state but what they think you want. (And I have the impression that
their 'thinking' includes the moon phases and the biorhythm of the
user :-) .)

Example in your case: sfdisk called with '1 - - *' creates on Ubuntu
Xenial a partition starting from block 1. On Debian 8.4 (my
development machine) it creates a partition starting from 2087.  This
gives some room for grub, but it horrible when it comes to alignment.

Some possible workarounds:
o Use another host for creating the Ubuntu VM
   (and hope, that sfdisk behaves 'better'.)
o Use a more recent version of diskimage-builder:
   some time ago 'sfdisk' was replaced by 'parted'
   (and hope, that 'parted' does a 'better' job for you).
o Under Ubuntu Xenial execute with 1.0.0 installed:
   $ sudo vi 
/usr/share/diskimage-builder/elements/vm/block-device.d/10-partition
   In line 23 replace
  1 - - *
   with
  2048 - - *
   (Note that this really only works on Ubuntu Xenial.)

Hope this works and helps - was not able to test these things.

If you are interested in some more background information:
I stumbled over the mostly random behavior of these tools last week.
One aspect is, that they optimize things for the current system (e.g.
reading some kernel parameters; especially IO buffer sizes).  These
sizes can be completely different on the target system - which might
lead to very poor disk performance.
During the last days I reworked my patch (which originally used
parted) to directly write the needed info to the boot records. [1]
More details can be found in the comments of MBR.py [2].

Kind regards

Andre


Thanks for the great information and help, all! I upgraded dib to 1.17, 
re-ran the same command et voila, problem solved. :)


So, looks like parted vs. sfdisk is indeed the issue, and is solved in 
modern dib versions. (Time to update Xenial's PPA for dib? ;)


Best,
-jay

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-21 Thread Andre Florath
Hello Jay,

Yes - the partition alignment is a problem:
grub2 needs at least 63 blocks between the MBR and the first
partition.  Here for you the partition directly starts at block 1,
therefore grub has no way to put its data on the disk.

The root cause is, that all the partitioning tools I found (like
parted or sfdisk) make some 'optimization': they do not what you
state but what they think you want. (And I have the impression that
their 'thinking' includes the moon phases and the biorhythm of the
user :-) .)

Example in your case: sfdisk called with '1 - - *' creates on Ubuntu
Xenial a partition starting from block 1. On Debian 8.4 (my
development machine) it creates a partition starting from 2087.  This
gives some room for grub, but it horrible when it comes to alignment.

Some possible workarounds:
o Use another host for creating the Ubuntu VM
  (and hope, that sfdisk behaves 'better'.)
o Use a more recent version of diskimage-builder:
  some time ago 'sfdisk' was replaced by 'parted'
  (and hope, that 'parted' does a 'better' job for you).
o Under Ubuntu Xenial execute with 1.0.0 installed:
  $ sudo vi /usr/share/diskimage-builder/elements/vm/block-device.d/10-partition
  In line 23 replace
 1 - - *
  with
 2048 - - *
  (Note that this really only works on Ubuntu Xenial.)

Hope this works and helps - was not able to test these things.

If you are interested in some more background information:
I stumbled over the mostly random behavior of these tools last week.
One aspect is, that they optimize things for the current system (e.g.
reading some kernel parameters; especially IO buffer sizes).  These
sizes can be completely different on the target system - which might
lead to very poor disk performance.
During the last days I reworked my patch (which originally used
parted) to directly write the needed info to the boot records. [1]
More details can be found in the comments of MBR.py [2].

Kind regards

Andre

[1] https://review.openstack.org/#/c/322671/
[2] 
https://review.openstack.org/#/c/322671/7/diskimage_builder/block_device/level1/MBR.py


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-21 Thread Jay Pipes

On 06/21/2016 12:37 AM, Andre Florath wrote:

Hi!

Before things getting said twice (looks that there is some
public interest here ;-) ):


:)


Can you please rerun and skip the partition part of
the loop device for fdisk -l?
E.g. instead of /dev/loop0p1 just /dev/loop0?
(This was my original intend but maybe not correctly
described.)


Got it. Here you go:

root@brix-1:/# fdisk -l /dev/loop0

Disk /dev/loop0: 10.7 GB, 10737418240 bytes
107 heads, 17 sectors/track, 11529 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xefd0e90b

  Device Boot  Start End  Blocks   Id  System
/dev/loop0p1   *   12097151910485759+  83  Linux

You'd mentioned in your previous private email to me that the start 
should be 2048. Clearly, it's 1 above. Is that an indication of a problem?



Also can you please send the parameters passed to parted?
(When running with trace enabled
this should be written to the logs. Please run something like
export DIB_DEBUG_TRACE="255"
disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm | tee o.log
and send the output of
grep parted o.log


Hmm, I get no output at all...

I've thrown the entire o.log contents into paste here:

http://paste.openstack.org/show/520928/

Best,
-jay



===

To be on the same page, here are the other infos Jay send:


o Can you please provide the DIB version?


ii  python-dib-utils 0.0.6-1
ii  python-diskimage-builder 1.0.0-1


o Are you using UEFI on the host system?
(For me your command works and this question is about
 a possible difference: '--target=i386-pc' appears
 not in my logs)


Yes, it's a UEFI-enabled host:

jaypipes@brix-1:~$ sudo efibootmgr
BootCurrent: 
Timeout: 1 seconds
BootOrder: ,0002,0001
Boot* ubuntu
Boot0001* Hard Drive
Boot0002* ubuntu

===

Kind regards

Andre

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Andre Florath
Hi!

Before things getting said twice (looks that there is some
public interest here ;-) ):

Can you please rerun and skip the partition part of
the loop device for fdisk -l?
E.g. instead of /dev/loop0p1 just /dev/loop0?
(This was my original intend but maybe not correctly
described.)

Also can you please send the parameters passed to parted?
(When running with trace enabled
this should be written to the logs. Please run something like
   export DIB_DEBUG_TRACE="255"
   disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm | tee o.log
and send the output of
   grep parted o.log
)

===

To be on the same page, here are the other infos Jay send:

> o Can you please provide the DIB version?

ii  python-dib-utils 0.0.6-1
ii  python-diskimage-builder 1.0.0-1

> o Are you using UEFI on the host system?
>(For me your command works and this question is about
> a possible difference: '--target=i386-pc' appears
> not in my logs)

Yes, it's a UEFI-enabled host:

jaypipes@brix-1:~$ sudo efibootmgr
BootCurrent: 
Timeout: 1 seconds
BootOrder: ,0002,0001
Boot* ubuntu
Boot0001* Hard Drive
Boot0002* ubuntu

===

Kind regards

Andre

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Gregory Haynes
On Mon, Jun 20, 2016, at 06:01 PM, Jay Pipes wrote:
> On 06/20/2016 06:41 PM, Paul Belanger wrote:
> > On Mon, Jun 20, 2016 at 04:52:38PM -0400, Jay Pipes wrote:
> >> Hi dib-gurus,
> >>
> >> I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX with 
> >> a
> >> AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd error.
> >> Hoping someone has some ideas...
> >>
> >> The command I am running is:
> >>
> >> disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm
> >>
> > Do you have the same issue if you use ubuntu-minimal? I only suggest it 
> > since
> > openstack-infra defaults to -minimal elements now, which is a more tested 
> > code
> > path IMO.
> 
> Hmm, unfortunately same error...
> 
> I've been working with Andre Florath on a private thread. He asked me to 
> drop dib into a debug shell and output the contents of:
> 
> /sbin/fdisk -l /dev/loop0p1
> 
> That returned some nastysauce:
> 
> root@brix-1:/# echo $IMAGE_BLOCK_DEVICE
> /dev/loop0p1
> root@brix-1:/# /sbin/fdisk -l /dev/loop0p1
> 
> Disk /dev/loop0p1: 1743 MB, 1743584768 bytes
> 255 heads, 63 sectors/track, 211 cylinders, total 3405439 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x
> 
> Disk /dev/loop0p1 doesn't contain a valid partition table
> 
> The quest continues... :)
> 
> -jay

Ah, the plot thickens.

Partition creation happens here:
http://git.openstack.org/cgit/openstack/diskimage-builder/tree/elements/vm/block-device.d/10-partition#n22

It might be worth dropping a bash right afterward to see whether that is
actually succeeding. Its possible that parted is failing but we aren't
catching that failure for some reason, or when we dd the image back on
to the block device we are failing horribly and writing over the
partition table (that would be a totally new bug to me though).

Alternatively, if you could paste a complete log of you image build
somewhere so we can dig through maybe we can spot something interesting.

Cheers,
Greg

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Jay Pipes

On 06/20/2016 06:41 PM, Paul Belanger wrote:

On Mon, Jun 20, 2016 at 04:52:38PM -0400, Jay Pipes wrote:

Hi dib-gurus,

I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX with a
AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd error.
Hoping someone has some ideas...

The command I am running is:

disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm


Do you have the same issue if you use ubuntu-minimal? I only suggest it since
openstack-infra defaults to -minimal elements now, which is a more tested code
path IMO.


Hmm, unfortunately same error...

I've been working with Andre Florath on a private thread. He asked me to 
drop dib into a debug shell and output the contents of:


/sbin/fdisk -l /dev/loop0p1

That returned some nastysauce:

root@brix-1:/# echo $IMAGE_BLOCK_DEVICE
/dev/loop0p1
root@brix-1:/# /sbin/fdisk -l /dev/loop0p1

Disk /dev/loop0p1: 1743 MB, 1743584768 bytes
255 heads, 63 sectors/track, 211 cylinders, total 3405439 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x

Disk /dev/loop0p1 doesn't contain a valid partition table

The quest continues... :)

-jay

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Clint Byrum
Excerpts from Gregory Haynes's message of 2016-06-20 17:24:28 -0500:
> On Mon, Jun 20, 2016, at 03:52 PM, Jay Pipes wrote:
> > Hi dib-gurus,
> > 
> > I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX 
> > with a AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd 
> > error. Hoping someone has some ideas...
> > 
> > The command I am running is:
> > 
> > disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm
> > 
> > Everything goes smoothly until trying to write the MBR, at which point I 
> > get the following error:
> > 
> > + /usr/sbin/grub-install '--modules=biosdisk part_msdos' 
> > --target=i386-pc /dev/loop0
> > Installing for i386-pc platform.
> > /usr/sbin/grub-install: warning: this msdos-style partition label has no 
> > post-MBR gap; embedding won't be possible.
> > /usr/sbin/grub-install: error: embedding is not possible, but this is 
> > required for cross-disk install.
> > /dev/loop0: [0047]:3 (/tmp/image.hk8wiFJe/image.raw)
> > 
> > Anybody got any ideas?
> > 
> > Thanks in advance!
> > -jay
> 
> Hey Jay,
> 
> I just tried to reproduce this on my 14.04 box and wasn't able to so I
> am betting there's some kind of new bug with us on 16.04. Do you get the
> same error if you run without --image-size=10? Last time we had an issue
> like this a new grub version changed the default behavior, so I'd
> suspect something along those lines.
> 
> I am trying out a new run on a 16.04 box but its going to be a bit
> before the cloud image downloads (cloud-image.ubuntu.com is pretty
> slow)...

I just completed a run on 16.04, so it's not that.

I wonder if it might be sensitive to disk geometry accidentally.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Clint Byrum
Ahh derp, that's not an ARM CPU. I read "A8" and "APU" and my brain
immediately lept to that. Ignore me.

Excerpts from Clint Byrum's message of 2016-06-20 15:12:23 -0700:
> Excerpts from Jay Pipes's message of 2016-06-20 16:52:38 -0400:
> > Hi dib-gurus,
> > 
> > I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX 
> > with a AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd 
> > error. Hoping someone has some ideas...
> > 
> > The command I am running is:
> > 
> > disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm
> > 
> > Everything goes smoothly until trying to write the MBR, at which point I 
> > get the following error:
> > 
> > + /usr/sbin/grub-install '--modules=biosdisk part_msdos' 
> > --target=i386-pc /dev/loop0
> > Installing for i386-pc platform.
> > /usr/sbin/grub-install: warning: this msdos-style partition label has no 
> > post-MBR gap; embedding won't be possible.
> > /usr/sbin/grub-install: error: embedding is not possible, but this is 
> > required for cross-disk install.
> > /dev/loop0: [0047]:3 (/tmp/image.hk8wiFJe/image.raw)
> 
> I think you found a bug. The ARCH should be armhf, but
> elements/bootloader/finalise.d/50-bootloader doesn't know what to do with
> armhf, so it falls back to x86_64/amd64. Also, grub-pc is the package
> that bootloader claims to need in its pkg-map file, but you really need
> grub-efi-arm on arm boxes.
> 
> We may need to add the ability for pkg-map's to differentiate based on
> ARCH.
> 
> If you intended to build an amd64 image, you need to set ARCH=amd64
> before running disk-image-create, so it won't detect it by running
> 'dpkg --print-architecture'.
> 

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Jay Pipes

On 06/20/2016 06:24 PM, Gregory Haynes wrote:

On Mon, Jun 20, 2016, at 03:52 PM, Jay Pipes wrote:

Hi dib-gurus,

I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX
with a AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd
error. Hoping someone has some ideas...

The command I am running is:

disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm

Everything goes smoothly until trying to write the MBR, at which point I
get the following error:

+ /usr/sbin/grub-install '--modules=biosdisk part_msdos'
--target=i386-pc /dev/loop0
Installing for i386-pc platform.
/usr/sbin/grub-install: warning: this msdos-style partition label has no
post-MBR gap; embedding won't be possible.
/usr/sbin/grub-install: error: embedding is not possible, but this is
required for cross-disk install.
/dev/loop0: [0047]:3 (/tmp/image.hk8wiFJe/image.raw)

Anybody got any ideas?

Thanks in advance!
-jay


Hey Jay,

I just tried to reproduce this on my 14.04 box and wasn't able to so I
am betting there's some kind of new bug with us on 16.04. Do you get the
same error if you run without --image-size=10? Last time we had an issue
like this a new grub version changed the default behavior, so I'd
suspect something along those lines.

I am trying out a new run on a 16.04 box but its going to be a bit
before the cloud image downloads (cloud-image.ubuntu.com is pretty
slow)...


Thanks, Greg! Yeah, I guessed it might be something to do with the 
target image size maybe being too small or something, so I retried 
without the --image-size and got the same result. So, must be something 
different...


Best,
-jay

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Jay Pipes

On 06/20/2016 06:12 PM, Clint Byrum wrote:

Excerpts from Jay Pipes's message of 2016-06-20 16:52:38 -0400:

Hi dib-gurus,

I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX
with a AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd
error. Hoping someone has some ideas...

The command I am running is:

disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm

Everything goes smoothly until trying to write the MBR, at which point I
get the following error:

+ /usr/sbin/grub-install '--modules=biosdisk part_msdos'
--target=i386-pc /dev/loop0
Installing for i386-pc platform.
/usr/sbin/grub-install: warning: this msdos-style partition label has no
post-MBR gap; embedding won't be possible.
/usr/sbin/grub-install: error: embedding is not possible, but this is
required for cross-disk install.
/dev/loop0: [0047]:3 (/tmp/image.hk8wiFJe/image.raw)


I think you found a bug. The ARCH should be armhf, but
elements/bootloader/finalise.d/50-bootloader doesn't know what to do with
armhf, so it falls back to x86_64/amd64. Also, grub-pc is the package
that bootloader claims to need in its pkg-map file, but you really need
grub-efi-arm on arm boxes.

We may need to add the ability for pkg-map's to differentiate based on
ARCH.

If you intended to build an amd64 image, you need to set ARCH=amd64
before running disk-image-create, so it won't detect it by running
'dpkg --print-architecture'.


AMD A8 APU is actually amd64, AFAIK, Clint :) `dpkg 
--print-architecture` correctly returns 'amd64'.


Best,
-jay



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Gregory Haynes
On Mon, Jun 20, 2016, at 03:52 PM, Jay Pipes wrote:
> Hi dib-gurus,
> 
> I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX 
> with a AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd 
> error. Hoping someone has some ideas...
> 
> The command I am running is:
> 
> disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm
> 
> Everything goes smoothly until trying to write the MBR, at which point I 
> get the following error:
> 
> + /usr/sbin/grub-install '--modules=biosdisk part_msdos' 
> --target=i386-pc /dev/loop0
> Installing for i386-pc platform.
> /usr/sbin/grub-install: warning: this msdos-style partition label has no 
> post-MBR gap; embedding won't be possible.
> /usr/sbin/grub-install: error: embedding is not possible, but this is 
> required for cross-disk install.
> /dev/loop0: [0047]:3 (/tmp/image.hk8wiFJe/image.raw)
> 
> Anybody got any ideas?
> 
> Thanks in advance!
> -jay

Hey Jay,

I just tried to reproduce this on my 14.04 box and wasn't able to so I
am betting there's some kind of new bug with us on 16.04. Do you get the
same error if you run without --image-size=10? Last time we had an issue
like this a new grub version changed the default behavior, so I'd
suspect something along those lines.

I am trying out a new run on a 16.04 box but its going to be a bit
before the cloud image downloads (cloud-image.ubuntu.com is pretty
slow)...

Cheers,
Greg

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Clint Byrum
Excerpts from Jay Pipes's message of 2016-06-20 16:52:38 -0400:
> Hi dib-gurus,
> 
> I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX 
> with a AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd 
> error. Hoping someone has some ideas...
> 
> The command I am running is:
> 
> disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm
> 
> Everything goes smoothly until trying to write the MBR, at which point I 
> get the following error:
> 
> + /usr/sbin/grub-install '--modules=biosdisk part_msdos' 
> --target=i386-pc /dev/loop0
> Installing for i386-pc platform.
> /usr/sbin/grub-install: warning: this msdos-style partition label has no 
> post-MBR gap; embedding won't be possible.
> /usr/sbin/grub-install: error: embedding is not possible, but this is 
> required for cross-disk install.
> /dev/loop0: [0047]:3 (/tmp/image.hk8wiFJe/image.raw)

I think you found a bug. The ARCH should be armhf, but
elements/bootloader/finalise.d/50-bootloader doesn't know what to do with
armhf, so it falls back to x86_64/amd64. Also, grub-pc is the package
that bootloader claims to need in its pkg-map file, but you really need
grub-efi-arm on arm boxes.

We may need to add the ability for pkg-map's to differentiate based on
ARCH.

If you intended to build an amd64 image, you need to set ARCH=amd64
before running disk-image-create, so it won't detect it by running
'dpkg --print-architecture'.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [diskimage-builder] ERROR: embedding is not possible, but this is required for cross-disk install

2016-06-20 Thread Jay Pipes

Hi dib-gurus,

I'm trying to build a simple ubuntu VM image on a local Gigabyte BRIX 
with a AMD A8-5557M APU with Ubuntu 16.04 installed and getting an odd 
error. Hoping someone has some ideas...


The command I am running is:

disk-image-create -o /tmp/ubuntu.qcow2 --image-size=10 ubuntu vm

Everything goes smoothly until trying to write the MBR, at which point I 
get the following error:


+ /usr/sbin/grub-install '--modules=biosdisk part_msdos' 
--target=i386-pc /dev/loop0

Installing for i386-pc platform.
/usr/sbin/grub-install: warning: this msdos-style partition label has no 
post-MBR gap; embedding won't be possible.
/usr/sbin/grub-install: error: embedding is not possible, but this is 
required for cross-disk install.

/dev/loop0: [0047]:3 (/tmp/image.hk8wiFJe/image.raw)

Anybody got any ideas?

Thanks in advance!
-jay

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev