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

geaplanet 556167 at bugs.launchpad.net
Wed Sep 12 09:00:37 UTC 2012


Hi! Two years later this bug continues. What is finally the right
solution. Pendrives partitioned with parted are impossible to use to
install on it linux distributions. GRUB2 don't find free space enough
because grub2 tries to be installed on the first track, but the first
track have only 32 sectors, not 63!

Actually, it starts on 2048 and grub has space enough for being
installed. Grub2 have a --force option that I have used sometimes on
Debian, but on Ubuntu doesn't work. It complains about that I have to
use -f or -s options using grub-install, but they don't work.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to parted in Ubuntu.
https://bugs.launchpad.net/bugs/556167

Title:
  vmbuilder uses parted to create disk images, which leads to broken
  sector counts (cannot use grub2 on disk images created by
  vmbuilder/parted)

Status in “parted” package in Ubuntu:
  Confirmed
Status in “vm-builder” package in Ubuntu:
  Confirmed

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/parted/+bug/556167/+subscriptions




More information about the foundations-bugs mailing list