[Bug 556167] [NEW] vmbuilder uses parted to create disk images, which leads to broken sector counts (cannot use grub2 on disk images created by vmbuilder/parted)

Kees Cook kees at ubuntu.com
Tue Apr 6 02:59:26 BST 2010


Public bug reported:

parted uses a fixed sector count of "32" when writing partitions to a
non-block device.  (See init_file() via linux_new() in
libparted/arch/linux.c)  As a result, the track size of disks created
with vmbuilder is 32 sectors, not the generally expected 63 sectors
(used with LBA mode).  This means that the "embedding region" between
the end of the MBR and the start of partition 1 is half the "normal"
size, and grub2 will not install.

/usr/sbin/grub-setup: warn: Your embedding area is unusually small.
core.img won't fit in it..

Fastest solution I see is to use an environment override as already done
in init_file() for sector size.  Perhaps PARTED_SECTORS?  And then set
this to 63 when calling parted from vm-builder.

** Affects: vm-builder (Ubuntu)
     Importance: Undecided
         Status: New

-- 
vmbuilder uses parted to create disk images, which leads to broken sector counts (cannot use grub2 on disk images created by vmbuilder/parted)
https://bugs.launchpad.net/bugs/556167
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to vm-builder in ubuntu.



More information about the Ubuntu-server-bugs mailing list