Comment 0 for bug 1349538

Revision history for this message
Scott Moser (smoser) wrote :

This was originally reported with subject 'Greater than 1TiB boot disks for the
Cloud Image' [1]. When running grub-install to a large disk with MSDOS
partition table that has a single partition, we are seeing errors.

  [1] https://lists.ubuntu.com/archives/ubuntu-cloud/2014-July/thread.html#969

## either of these exhibit the problem.
## 'current' for trusty=20140726 utopic=20140728
$ img_url="http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img"
$ img_url="http://cloud-images.ubuntu.com/utopic/current/utopic-server-cloudimg-amd64-disk1.img"

## Get the download image
$ wget "$img_url" -O "disk1.img.dist"

## create a seed image for cloud-init.
$ printf "#%s\n%s\n%s\n%s\n" "cloud-config" "password: passw0rd" \
    "chpasswd: { expire: False }" "ssh_pwauth: True" > my-user-data
$ cloud-localds my-seed.img my-user-data

## create a raw image from that and resize it to 2T
$ qemu-img convert -O raw disk1.img.dist disk1.img
$ qemu-img resize disk1.img 2T
$ qemu-img info disk1.img
image: disk1.img
file format: raw
virtual size: 2.0T (2199023255552 bytes)
disk size: 799M

## boot it, in qemu
$ qemu-system-x86_64 -enable-kvm \
    -drive if=virtio,file=disk1.img -drive if=virtio,file=my-seed.img \
    -device virtio-net-pci,netdev=net00 \
    -serial file:serial.log \
    -netdev type=user,id=net00 -m 1024

##
## now, logged in as 'ubuntu' and 'passw0rd'
##
% lsb_release -sc
utopic

% cat /etc/cloud/build.info
build_name: server
serial: 20140728

% dpkg-query --show grub-pc
grub-pc 2.02~beta2-10

% sudo sfdisk -l -uS /dev/vda
Disk /dev/vda: 4260880 cylinders, 16 heads, 63 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/4/32 (instead of 4260880/16/63).
For this listing I'll assume that geometry.
Units = sectors of 512 bytes, counting from 0

   Device Boot Start End #sectors Id System
/dev/vda1 * 2048 4294967295 4294965248 83 Linux
/dev/vda2 0 - 0 0 Empty
/dev/vda3 0 - 0 0 Empty
/dev/vda4 0 - 0 0 Empty

% df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 2.0T 757M 1.9T 1% /

% cat /proc/partitions
major minor #blocks name

 253 0 2147483648 vda
 253 1 2147482624 vda1
 253 16 366 vdb
  11 0 1048575 sr0

% grep "resized:" /var/log/cloud-init.log
2014-07-28 18:50:11,906 - cc_growpart.py[INFO]: '/' resized: changed (/dev/vda, 1) from 2146435072 to 2199022206976

% sudo update-grub
Generating grub configuration file ...
grub-probe: error: unknown filesystem.

% sudo grub-install /dev/vda
Installing for i386-pc platform.
grub-install: error: unknown filesystem.

% sudo grub-install -v /dev/vda > grub-install-verbose-vda.log 2>&1
## see attached.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: grub-pc 2.02~beta2-10
ProcVersionSignature: User Name 3.16.0-5.10-generic 3.16.0-rc6
Uname: Linux 3.16.0-5-generic x86_64
ApportVersion: 2.14.4-0ubuntu2
Architecture: amd64
Date: Mon Jul 28 18:10:47 2014
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)