Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[Solved] Anyone having troubles with Ubuntu Server 14.04.1 amd64 on KVM?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[Solved] Anyone having troubles with Ubuntu Server 14.04.1 amd64 on KVM?

GoodHostingGoodHosting Member
edited September 2014 in Help

Solved

Ubuntu is stupid, and generates boot configuration files in /boot during installation, thus needing more than 256 inodes (the default partitioning scheme for /boot was somehow ext4 largefile, creating only one inode per MB on the disk.) It's worth noting that no other distribution does this out of: Debian 7.6.0, CentOS 6.5, CentOS 7.0, or ArchiLinux Dual.


Hello LowEndTalk,

While we were attempting to create templates for our customers with Ubuntu Server, we ran into (yet another) problem that we have never seen before with any other distribution (it goes without saying that I am not surprised at this point.)

The specific steps to reproduce, and materials used are listed below.


Materials

1) ubuntu-14.04.1-server-amd64.iso obtained from an official mirror, then tested (verifying the checksums, as well as the on-boot media self-check) to make sure it is authentic and not corrupt. We attached the CDROM using the hd/hda bus and target, with readonly set, and no cache.

http://mirrors.us.kernel.org/ubuntu-releases/trusty/ubuntu-14.04.1-server-amd64.iso

2) A 5120M qcow2 format disk image, created with the qemu-img create command. We attached the VHD using the vd/vda bus and target, with no cache (we also tried writethrough.) The qemu-img info confirms that the disk was created successfully, shown below for confirmation purposes:

image: disk.0
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 196K
cluster_size: 65536


Method

We then VNC into the machine after it's created, and follow the normal setup prompts to install the system. We check the media, then continue with the installation. We choose English, United States, English (US), English (US) as they come up as options (and do not do a keyboard layout detection, as there's no point.)

We then choose the following settings per the prompts as they come up, in order:

  • Hostname: localhost.localdomain

  • Full Name: toor

  • Username: toor

  • Password: toorPassw0rd! (test password)

  • Encrypt Home Directory: [no]

  • Timezone: Vancouver

  • Partitioning: Manual (Pretty standard really, 256M /boot EXT4, MAX / LVM2/EXT4)

Partitioning

  • Then wait ~ 30 seconds for the installation to complete.

  • Proxy: No Proxy

  • Wait for "Configuring Apt..." to retrieve 61 files... then retrieve 32 more... then 1 more...

  • Configuring Tasksel: No Automatic Updates

  • Software Selection: OpenSSH Server only

Software Selection

  • Wait for the system to retrieve 191 more files... (and prepare/configure them all)

  • Wait for the system to retrieve and install a language pack (en_base)...

  • Install Grub Boot Loader: [yes]

Install GRUB2 on MBR

  • Get shown this very shiny error message, that contains zero useful information

grub-install /dev/vda failed


Solution

So, how do we got about fixing what Canonical appears to have screwed up this time?

Is anyone else experiencing a problem given the above very common install procedure?

Comments

  • GoodHostingGoodHosting Member
    edited September 2014

    For the sake of completeness, here is the KVM XML that created this domain:

    <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>;
            <name>one-1204</name>
            <cputune>
                    <shares>1024</shares>
            </cputune>
            <memory>1048576</memory>
            <os>
                    <type arch='x86_64' machine='pc'>hvm</type>
                    <boot dev='hd'/>
            </os>
            <devices>
                    <emulator>/usr/libexec/qemu-kvm</emulator>
                    <disk type='file' device='cdrom'>
                            <source file='/var/lib/one/datastores/106/1204/disk.0'/>
                            <target dev='hda'/>
                            <readonly/>
                            <driver name='qemu' type='raw' cache='none'/>
                    </disk>
                    <disk type='file' device='disk'>
                            <source file='/var/lib/one/datastores/106/1204/disk.1'/>
                            <target dev='vda'/>
                            <driver name='qemu' type='qcow2' cache='none'/>
                    </disk>
                    <interface type='bridge'>
                            <source bridge='br0'/>
                            <mac address='02:00:32:1f:4c:9a'/>
                            <model type='virtio'/>
                    </interface>
                    <graphics type='vnc' listen='0.0.0.0' port='7104'/>
                    <input type='tablet' bus='usb'/>
            </devices>
            <features>
                    <acpi/>
            </features>
    </domain>
    
  • /boot under LVM ?

  • GoodHostingGoodHosting Member
    edited September 2014

    @nullnull said:
    /boot under LVM ?

    A surprising amount of Distributions do not support placing /boot under an LVM partition, Ubuntu would be one of them. Along with Debian 7.6.0 (which we just installed before Ubuntu, following the exact same process, and it worked.) As well as CentOS 6 and 7, both of which get very angry with XFS and with LVM having anything to do with /boot .

    The /boot is on the /dev/vda (/dev/vda1 specifically) in the partitioning we attempted here.

  • Check the install log maybe? If you escape I believe you can open a console. You could even try and run that comment there yourself to see what happens.

    Or just find an older ISO and install with that :-)

  • @mpkoosen ,

    I went and hit Ctrl+Alt+F2 to enter the second recovery console, and ran a few commands:

    busybox

    Seems Ubuntu really screwed something up in this release, something very obvious.

  • drserverdrserver Member, Host Rep

    create bigger disk image. Make install then shrink it. Most likely you have some temp files created by install process. BTW i cannot install 5 gb instance HVM also, it requires 8 gb

  • @drserver said:
    create bigger disk image. Make install then shrink it. Most likely you have some temp files created by install process. BTW i cannot install 5 gb instance HVM also, it requires 8 gb

    That's the interesting part, if you check the post above yours; I showed a df -h of the installation target disk (the /target/ as mounted by the installation) during the installation (at the apparently failed grub step.) It would appear that they screwed something up, or the maintainer for the grub2 package screwed something up, as per the version that this installer uses.

    The issue does not exists for 12.04.4, or 10.10 ; although it does exists for 12.04.3 .

  • drserverdrserver Member, Host Rep

    i have checked LVM size during install, it passes 5gb

  • I found the rather annoying issue shortly after the last response, A df -i shows that the culprit is that /boot was a largefile partition. (Thus for 256M there were only 256 inodes created, and apparently Ubuntu does some retarded configuration generating in /boot that even Debian doesn't do, hence leading to needing more than 256 file handles in /boot during the installation.)

Sign In or Register to comment.