grub-installer fails to install when using btrfs

Bug #1266195 reported by Chris Samuel
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub-installer
New
Undecided
Unassigned
grub-installer (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

With the daily Kubuntu 14.04 installer I tried to install with a btrfs root filesystem and a swap partition (there's also a Dell specific DOS partition, but I'm leaving that alone) the installer says it fails to install grub.

 Jan 5 12:02:24 kubuntu grub-installer: info: Installing grub on '/dev/sda'
 Jan 5 12:02:25 kubuntu grub-installer: info: grub-install does not support --no-floppy
 Jan 5 12:02:25 kubuntu grub-installer: info: Running chroot /target grub-install --force "/dev/sda"
 Jan 5 12:02:26 kubuntu grub-installer: /usr/sbin/grub-bios-setup: warning: your core.img is unusually large. It won't fit in the embedding area.
 Jan 5 12:02:26 kubuntu grub-installer: /usr/sbin/grub-bios-setup: error: filesystem `btrfs' doesn't support blocklists.
 Jan 5 12:02:26 kubuntu grub-installer: error: Running 'grub-install --force "/dev/sda"' failed.

Needless to say the system fails to boot after that. :-(

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ubiquity 2.17.3
ProcVersionSignature: Ubuntu 3.12.0-7.15-generic 3.12.4
Uname: Linux 3.12.0-7-generic x86_64
ApportVersion: 2.12.7-0ubuntu3
Architecture: amd64
CasperVersion: 1.336ubuntu1
CurrentDesktop: KDE
Date: Sun Jan 5 23:02:33 2014
InstallCmdLine: file=/cdrom/preseed/kubuntu.seed boot=casper maybe-ubiquity initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity
LiveMediaBuild: Kubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140105)
MarkForUpload: True
SourcePackage: grub-installer
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chris Samuel (chris-csamuel) wrote :
tags: added: kubuntu
Revision history for this message
Phillip Susi (psusi) wrote :

It seems that you used a very old tool to partition the disk. You will need to repartition it so that the partition is correctly aligned to a 1 MiB boundary.

Revision history for this message
Chris Samuel (chris-csamuel) wrote :

I had deleted the existing Linux partitions and created new ones in the installer, was that not enough?

Revision history for this message
Phillip Susi (psusi) wrote :

That should do it... can you run parted -l and make sure the first partition starts at sector 2048?

Revision history for this message
Chris Samuel (chris-csamuel) wrote :

Remember I still have the Dell created first partition, then the first Linux extended partition starts at 41.9MB (parted doesn't appear to have options to output in sectors I'm afraid).

Using fdisk it appears the Dell partition (type de) starts at sector 63 and my extended partition starts at 81918 and my first Linux partition starts at 81920.

Note that this is after I got a working install by creating an ext4 /boot partition (which is the partition that starts at 81920).

It is a test machine though, so I could blow it away and test a new install if necessary.

Revision history for this message
Chris Murphy (dr4-b5gpiyla-tff) wrote :

Ideally the installer should test for a properly sized MBR gap earlier on, so it can fail before going to the trouble of installing the OS, only to have grub-install inevitably fail. Windows 7 uses LBA 2048/1MB aligned first partition, and maybe even Vista did. XP does not, it starts the first partition at LBA 63. Older versions of parted do the same.

Next, the use of the --force flag for grub-install on a whole block device seems ill advised. As far as I know, it's useful when directed to a partition formatted ext[234] so that the boot strap code and block list is placed in the VBR instead of the MBR gap. The --force flag will fail on XFS and Btrfs.

In any case, the work around is to repartition with something even somewhat recent, so that partition 1 starts at LBA 2048.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub-installer (Ubuntu):
status: New → Confirmed
Revision history for this message
Sam Vervaeck (samvv) wrote :

Any fix for this? I have my EFI partition aligned at sector 2048 and I'm getting the same error.

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.