Dapper images fail to boot

Bug #285093 reported by Nick Barcet
4
Affects Status Importance Assigned to Milestone
VMBuilder
Fix Released
Undecided
Unassigned
vm-builder (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

sudo vmbuilder kvm ubuntu --suite dapper

Resulting image fails to boot with grub error 2

I have fixed a couple issues in the way device.map and menu.lst were generated for dapper in rev 239 (trunk), and entire /boot/* seems now identical to what is generated by ubuntu-vm-builder (which boots), but this does no seem to be enough.

Related branches

Nick Barcet (nijaba)
Changed in vm-builder:
assignee: nobody → soren
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Albert Damen (albrt) wrote :

Recently I had the grub error 2 when I wanted to move my system from an old hard-disk to a new one.
It turned out recent mkfs will create the filesystem with inode size 256. This is only supported by grub since hardy (grub 0.97-29ubuntu19).

ubuntu-vm-builder on hardy uses inode size 128 both for a hardy and dapper vm.
vmbuilder on intrepid uses inode size 256 for a hardy vm.
My guess is vmbuilder on intrepid will also use inode size 256, which is not supported by dapper's grub. I guess you need to pass -I 128 to mkfs.ext2 to make it work. Unfortunately I couldn't find the right place to do that, so I could not test this yet.

Revision history for this message
Albert Damen (albrt) wrote :

Ah, that was not too hard.

In /usr/share/pyshared/VMBuilder/disk.py line 282/283, I changed:
    def mkfs_fstype(self):
        return { TYPE_EXT2: ['mkfs.ext2', '-F'], TYPE_EXT3: ['mkfs.ext3', '-F'], TYPE_XFS: ['mkfs.xfs'], TYPE_SWAP: ['mkswap'] }[self.type]

into:
    def mkfs_fstype(self):
        return { TYPE_EXT2: ['mkfs.ext2', '-F'], TYPE_EXT3: ['mkfs.ext3', '-I 128', '-F'], TYPE_XFS: ['mkfs.xfs'], TYPE_SWAP: ['mkswap'] }[self.type]

This made the dapper vm boot.
However, the kernel line in grub is not correct and needed to be edited during the boot:
kernel /boot/vmlinuz-2.6.15-52-amd64-server root=/dev/hd<bound method Disk.devletters of <VMBuilder.disk.Disk object at 0x7feee257c8d0>>1 ro quiet splash

Revision history for this message
Nick Barcet (nijaba) wrote : Re: [Bug 285093] Re: Dapper images fail to boot

Albert Damen wrote:
> However, the kernel line in grub is not correct and needed to be edited during the boot:
> kernel /boot/vmlinuz-2.6.15-52-amd64-server root=/dev/hd<bound method Disk.devletters of <VMBuilder.disk.Disk object at 0x7feee257c8d0>>1 ro quiet splash

Thanks a lot to your insight, the first part of the bug is on its way to
be fixed and I have already fixed the second part a few days ago
(already comited to trunk).

Changed in vm-builder:
assignee: soren → nijaba
status: Confirmed → In Progress
Changed in vmbuilder:
status: New → In Progress
Revision history for this message
Nick Barcet (nijaba) wrote :

rev 250 of trunk includes the fix for the inode.
I decided to use 128 bit inode for dapper, edgy and feisty, as gutsy and > seems to boot with 256 bit. Will run some test again on all suite to check.

Changed in vmbuilder:
status: In Progress → Fix Committed
Changed in vm-builder:
assignee: nijaba → nobody
status: In Progress → Fix Committed
Revision history for this message
Albert Damen (albrt) wrote :

Nick, I am surprised Gutsy works for you with inode size 256, given the grub change was first made in Hardy (and even Debian got that fix only in 0.97-30, Feb 2008). So I tested this and for me the Gutsy vm fails to boot with grub error 2, just like Dapper did.

Revision history for this message
Nick Barcet (nijaba) wrote :

Yep, it failed for me when I redid the tests, so now hardy is in 128bit
as well. Thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vm-builder - 0.9-0ubuntu3

---------------
vm-builder (0.9-0ubuntu3) intrepid; urgency=low

  [ Johan Euphrosine ]
  * Fix exception when suite provided does not exist (LP: #281801)
    and provide unit test for it.

  [ Chuck Short ]
  * Added parameters required for EC2 plugin.
  * Use ec2_name instead of hostname when submitting an AMI.
  * Update xen_kernel_path and xen_ramdisk_path for intrepid.
  * Default to amazon kernels/ramdisk pairs for now.
  * Split out ec2 module into its own package. (LP: #284762)

  [ Nicolas Barcet ]
  * Error out if domain is undefined (LP: #280125)
  * Fix --dest so that it is actually used now (LP: #280091)
  * Fix -c handling, values are now used (LP: #279159)
  * Create /var/run/network to fix bug LP: #276365
  * Handle fsimage type vms (Xen) in fstab and (hopefully) libvirt (LP: #282109)
  * Components where not parsed correctly (LP: #283263)
  * preflight_check() was called twice in a row in vm.py for no aparant
    reasons
  * Change default suite to intrepid
  * Intrepid needs groot=uuid, else update-grub tries to outsmart us later on
    and it won't boot as it cannot guess the uuid right.
  * Couple fixes when calling devletters, which is a function
  * Double parenthesis removed in devicemap.tmpl
  * Added function isDomain to fix bug LP: #284746
  * Documented unusual conf name value in help to fix bug LP: #284614
  * Fixed a bug in set_defaults occuring on reading untyped value from the
    configuration file
  * Match ec2 vocabulary by adding option name and clarifying help
    (LP: #284765, LP: #285170, LP: #285165)
  * Added a check for xen hypervisor when ec2 is selected (LP: #285191)
  * Added checks for presence of bucket, access key and secret key for ec2
    (LP: #284757)
  * Older suite need 128 bit inode for grub to recognize os. Thanks to Albert
    Damen for the pointer (LP: #285093)
  * The libvirt plugin now errors out if used with something else than KVM, as
    nothing else is supported yet.
  * Write out disk info in vmware's .vmx, converting it to use template while
    at it (LP: #286487)
  * Add 'config.version = "8"' to vmware.tmpl to fix LP: #286531

  [ Mathias Gug ]
  * Fix --templates option.

  [ Soren Hansen ]
  * Create /var/{run,lock} on the root filesystem, just like d-i.

 -- Soren Hansen <email address hidden> Fri, 24 Oct 2008 13:15:23 +0200

Changed in vm-builder:
status: Fix Committed → Fix Released
Nick Barcet (nijaba)
Changed in vmbuilder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.