btrfs core image too large for minimal MBRs

Bug #1045178 reported by axion
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Grub install failed at clean install. core.img too large to fit into 64 sectors ( 32Kb )

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: ubiquity 2.11.18
ProcVersionSignature: Ubuntu 3.5.0-6.6-generic 3.5.0
Uname: Linux 3.5.0-6-generic i686
ApportVersion: 2.4-0ubuntu5
Architecture: i386
CasperVersion: 1.320
Date: Mon Sep 3 07:48:03 2012
InstallCmdLine: file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity
LiveMediaBuild: Ubuntu 12.10 "Quantal Quetzal" - Alpha i386 (20120724.2)
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 TERM=linux
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SourcePackage: grub-installer
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
axion (bugzilla-axion) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Sep 3 05:24:47 ubuntu grub-installer: info: Installing grub on '/dev/sda'
Sep 3 05:24:47 ubuntu grub-installer: info: grub-install supports --no-floppy
Sep 3 05:24:47 ubuntu grub-installer: info: Running chroot /target grub-install --no-floppy --force "/dev/sda"
Sep 3 05:24:50 ubuntu grub-installer: /usr/sbin/grub-setup: warn: Your core.img is unusually large. It won't fit in the embedding area..
Sep 3 05:24:50 ubuntu grub-installer: /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Sep 3 05:24:55 ubuntu grub-installer: /usr/sbin/grub-setup: error: cannot read `/@/boot/grub/core.img' correctly.
Sep 3 05:24:55 ubuntu grub-installer: error: Running 'grub-install --no-floppy --force "/dev/sda"' failed.
Sep 3 05:30:01 ubuntu CRON[31461]: (root) CMD (start -q anacron || :)
Sep 3 05:47:31 ubuntu acpid: client 2863[0:0] has disconnected
Sep 3 05:47:31 ubuntu acpid: client connected from 2863[0:0]
Sep 3 05:47:31 ubuntu acpid: 1 client rule loaded
Sep 3 05:47:34 ubuntu ubiquity[2923]: Reverting lockdown of the desktop environment.
Sep 3 05:47:35 ubuntu activate-dmraid: No Serial ATA RAID disks detected
Sep 3 05:47:38 ubuntu ubiquity: umount: /target: device is busy.
Sep 3 05:47:38 ubuntu ubiquity: (In some cases useful info about processes that use
Sep 3 05:47:38 ubuntu ubiquity: the device is found by lsof(8) or fuser(1))
Sep 3 05:47:38 ubuntu ubiquity[2923]: debconffilter_done: ubi-partman (current: ubi-partman)
Sep 3 05:47:50 ubuntu ubiquity[2923]: Reverting lockdown of the desktop environment.
Sep 3 05:47:50 ubuntu ubiquity: umount: /target/cdrom: not mounted
Sep 3 05:47:50 ubuntu ubiquity:
Sep 3 05:47:50 ubuntu plugininstall.py: log-output -t ubiquity umount /target/cdrom
Sep 3 05:47:50 ubuntu finish-install: Disabling CD in sources.list
Sep 3 05:47:50 ubuntu plugininstall.py: Exception during installation:
Sep 3 05:47:50 ubuntu plugininstall.py: Traceback (most recent call last):
Sep 3 05:47:50 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1724, in <module>
Sep 3 05:47:50 ubuntu plugininstall.py: install.run()
Sep 3 05:47:50 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 81, in wrapper
Sep 3 05:47:50 ubuntu plugininstall.py: func(self)
Sep 3 05:47:50 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 229, in run
Sep 3 05:47:50 ubuntu plugininstall.py: self.configure_bootloader()
Sep 3 05:47:50 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1026, in configure_bootloader
Sep 3 05:47:50 ubuntu plugininstall.py: "GrubInstaller failed with code %d" % ret)
Sep 3 05:47:50 ubuntu plugininstall.py: ubiquity.install_misc.InstallStepError: GrubInstaller failed with code 1
Sep 3 05:47:50 ubuntu plugininstall.py:
Sep 3 05:48:02 ubuntu ubiquity: Gtk-Message: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

Changed in grub-installer (Ubuntu):
status: New → Invalid
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Just to confirm, you are using btrfs?!

Revision history for this message
axion (bugzilla-axion) wrote :

Yes using btrfs only

Revision history for this message
axion (bugzilla-axion) wrote :

However the problem of writing the core.img was solved by rewriting the mbr and partition table, the first partition started at 2048 blocks. However this is not handy for systems with smaller ssd drives where every mb counts.

summary: - grub-install failed
+ grub-install failed - "/usr/share/ubiquity/plugininstall.py", line 1724,
+ in <module>
Revision history for this message
axion (bugzilla-axion) wrote : Re: grub-install failed - "/usr/share/ubiquity/plugininstall.py", line 1724, in <module>

However the problem of writing the core.img was solved by rewriting the mbr and partition table, the first partition then started at block 2048. However this is not handy for systems with smaller ssd drives where every (m)b counts. You see originally the first partition of this hdd would begin at sector 65 and 64 sectors (32768Bytes ) is not large enough to contain the core file of 38304Bytes

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Hi Dmitrijs,
there are several crasher of this type that are on grub-install(Ubuntu) and not in ubiquity(Ubuntu). The traces are the same. I mark them as dublicates of this one here, but it is indicated that someone with knowledge on the installation system looks that they are really dubs.

greetings

melchiaros

Changed in grub-installer (Ubuntu):
status: Invalid → New
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
Changed in ubiquity (Ubuntu):
status: New → Confirmed
tags: added: ubiquity-2.11.30
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

That was it. The last one

https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1051293

is with ubiquity2.11.32

The syslog entries have changed a bit with version numbers. So, again I am not so sure about the dubs. Please dedub if needed.

tags: added: ubiquity-2.11.32
Revision history for this message
Johann Popper (jpopper7) wrote :

Bug #1050590 is marked as duplicate of this bug. Are you sure this is the case? I see nothing here to indicate the following issue described in Bug #1050590:

["'grub-efi' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot."

This exact error occurs on a Lenovo B570 while attempting to install UBuntu 12.10 daily builds, hence the special documentation for installing Ubuntu on Lenovo B570s with instructions for overriding grub-efi with 64-bit installations in order to boot after installation (the B570 uses MBR, not GPT) no longer works, since grub-efi-amd64 will not even install in the first place, for whatever reason.

This really ought to be dealt with before release. It's a show-stopping bug for affected hardware (at least some ASUS and Lenovo).]

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Q: Are you sure this is the case?

A:No,please read the previous comments(especially #7 and #10).

Revision history for this message
Colin Watson (cjwatson) wrote :

If you're not sure, then please don't mark them as duplicates in the first place. I'll spend some time now going through those logs and undoing the ones that don't match.

Colin Watson (cjwatson)
no longer affects: grub-installer (Ubuntu)
no longer affects: ubiquity (Ubuntu)
summary: - grub-install failed - "/usr/share/ubiquity/plugininstall.py", line 1724,
- in <module>
+ btrfs core image too large for minimal MBRs
Revision history for this message
Colin Watson (cjwatson) wrote :

axion, this is probably going to be very hard for us to fix and is not going to be a priority, as btrfs is a complex filesystem that requires considerable amounts of code in GRUB to read. Given that btrfs is known not to be terribly space-efficient in many cases, it seems an odd decision to use btrfs on a small drive and then skimp on space for the boot loader code required to read it. I would expect that the megabyte you'd spend on modern partition alignment (which, incidentally, will perform much better on SSDs than the old-style alignment - many of them really benefit from being aligned on 1024*1024-byte boundaries, or sometimes even larger) will be dwarfed by the space you'll lose to btrfs. So why worry about the pennies when you're already not worrying about pounds?

Besides, you have an 80GB drive here - a megabyte is not going to break the bank! I use an 80GB SSD myself and it is not a problem.

I recommend one or more of the following:

 * Align the first partition to a multiple of 1024*1024 bytes. Yes, really. It will be better.
 * Use a separate ext2 /boot partition if you absolutely must have minimal space in the MBR.

Changed in grub2 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
axion (bugzilla-axion) wrote :

Colin,
This is no a btrfs problem. I have this problem with most versions of ubuntu that use grub 2, since windows in many cases doesn't leave space but creates the first partition starting at sector 65. So the simple solution is to limit the size of the grub2-core image.

Revision history for this message
Philipp Schlesinger (philipp-sadleder) wrote :

Another solution would be to warn about that problem in advance and give instructions how to free space for grub2 (e.g. use gparted for that task).

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.