I would like to install a KVM-based Ubuntu guest to an LVM-based logical volume, without creating a partition table on the space first. There doesn't seem to be a way within the installer to mount my chosen logical volume as root. I can do this (of course) with Gentoo. Is there anyway to bypass this assumption with Ubuntu?


It's a best practice to use partitions, even if it's one and it spans the entire disk. There are tools out there that use that detail as part of their interrogation heuristics. I've also seen udev behave funny sometimes with partitionless drives. There's really no drawback to using partitions, no speed hit, nothing negative. It doesn't affect LVM at all as it's reading the disk and searching for metadata.

So you can swim upstream... or you can create a single partition. If you're that determined to make this work then I suggest that you get acquainted with the installer sources.


Or you can use Alternate (maybe) or Server (definitely) to get LVM support and have the logical volume treated properly. (You can also manually install lvm2 before you get to the partition tool to get this, but then it builds an initrd without lvm, or did when 11.04 was current.) (*I haven't done this in a long time)

Swim upstream: You can format the virtual disk before partitioning, and it will install, but GRUB will fail. This is not fixable because there is no MBR space for an LV but GRUB doesn't actually need to be installed because KVM provides it. The install script assumes GRUB is not installed and skips update-grub (which creates grub.cfg and maybe also device.map.) Get update-grub completed manually:

(From LiveCD iso)

ubuntu$ sudo su -
ubuntu# mount /dev/vda /mnt ; mount --bind /proc /mnt/proc \
; mount --bind /dev /mnt/dev ; mount --bind /sys /mnt/sys ; chroot /mnt
# update-grub
# exit
ubuntu# init 6

You may be able to update-grub from a an xterm or another VTY rather than doing the liveCD hoopla. I had rerun the install four times already so I didn't attempt that.

  • "sudo -i" not "sudo su -" :) – dannysauer Feb 23 '13 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.