regression from 4k_sectors.patch: "non-sector-aligned data is found in the core file"

Bug #972250 reported by Tomi Hukkalainen
78
This bug affects 21 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Critical
Colin Watson

Bug Description

On a system installed with 11.10 and upgraded to 12.04 last week, today grub fails to apt-get upgrade with this error in /var/log/apt/term.log:

/usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
/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..
/usr/sbin/grub-setup: error: non-sector-aligned data is found in the core file.

The system has luks+lvm as installed by 11.10 alternative installation cd, and indeed seems to have GPT but no BIOS partition (system is running BIOS on Asus F1A75V-PRO motherboard).

Related branches

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
Miia Sample (myrtti)
description: updated
Revision history for this message
Stefan Bader (smb) wrote :

It feels like this may got introduced by 1.99-20ubuntu1. And maybe the GPT partition is not the causing factor. My setup uses normal DOS partition table but I use a 2 stage boot where the first boot loader is in the MBR and then boots secondary grub stages from extended partitions. The installation was successful and on previous upgrade I did not notice anything wrong. But the upgrade today produced the "error: non-sector-aligned data is found in the core file" message. The common point is both cases use the deprecated blocklists.
In my case, luckily the system can be booted still. But there is an error on boot saying something about "outside partition" which has to be overridden by typing enter.

Revision history for this message
Tomi Hukkalainen (tpievila) wrote :

I should also add that the system has booted up fine since the upgrade to precise, but haven't tested it today after the error.

Revision history for this message
wces (wces423) wrote :

I too got this error today after upgrading to 12.04 from 11.10. My Grub is installed on a partition and NOT in MBR. It worked perfectly fine in 11.10

These are my Grub related packages:

ii grub-common 1.99-20ubuntu1 GRand Unified Bootloader (common files)
ii grub-gfxpayload-lists 0.5 GRUB gfxpayload blacklist
ii grub-pc 1.99-20ubuntu1 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 1.99-20ubuntu1 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 1.99-20ubuntu1 GRand Unified Bootloader (common files for version 2)

Revision history for this message
caViator (caviator.pl) wrote :
Download full text (14.8 KiB)

I too got this error today after upgrading grub2. My grub2 is installed on a GPT.

================================================================

[code]# aptitude full-upgrade -sV
Następujące pakiety zostaną zaktualizowane:
  bash [4.2-1ubuntu3 -> 4.2-2ubuntu1] bash-builtins [4.2-1ubuntu3 -> 4.2-2ubuntu1] cups-pdf [2.6.1-5 -> 2.6.1-6]
  grub-common [1.99-18ubuntu1 -> 1.99-20ubuntu1] grub-pc [1.99-18ubuntu1 -> 1.99-20ubuntu1]
  grub-pc-bin [1.99-18ubuntu1 -> 1.99-20ubuntu1] grub2-common [1.99-18ubuntu1 -> 1.99-20ubuntu1]
  libsoup-gnome2.4-1 [2.38.0-0ubuntu1 -> 2.38.0-1] libsoup2.4-1 [2.38.0-0ubuntu1 -> 2.38.0-1]
Następujące pakiety POLECANE przez inne NIE zostaną zainstalowane:
  os-prober
9 pakietów aktualizowanych, 0 instalowanych, 0 do usunięcia i 0 nieaktualizowanych.
Do pobrania 4154 kB archiwów. Zajęte po rozpakowaniu: 47,1 kB.
Kontynuować? [Y/n/?]
Pakiety zostałyby pobrane/zainstalowane/usunięte.[/code]

================================================================

[code]# aptitude full-upgrade
Następujące pakiety zostaną zaktualizowane:
  bash bash-builtins cups-pdf grub-common grub-pc grub-pc-bin grub2-common libsoup-gnome2.4-1 libsoup2.4-1
Następujące pakiety POLECANE przez inne NIE zostaną zainstalowane:
  os-prober
9 pakietów aktualizowanych, 0 instalowanych, 0 do usunięcia i 0 nieaktualizowanych.
Do pobrania 4154 kB archiwów. Zajęte po rozpakowaniu: 47,1 kB.
Kontynuować? [Y/n/?]
Pobieranie: 1 http://cursa.canonical.com/ubuntu/ precise/universe bash-builtins i386 4.2-2ubuntu1 [110 kB]
Pobieranie: 2 http://cursa.canonical.com/ubuntu/ precise/main bash i386 4.2-2ubuntu1 [616 kB]
Pobieranie: 3 http://cursa.canonical.com/ubuntu/ precise/main libsoup2.4-1 i386 2.38.0-1 [211 kB]
Pobieranie: 4 http://cursa.canonical.com/ubuntu/ precise/main libsoup-gnome2.4-1 i386 2.38.0-1 [9548 B]
Pobieranie: 5 http://cursa.canonical.com/ubuntu/ precise/universe cups-pdf i386 2.6.1-6 [38,4 kB]
Pobieranie: 6 http://cursa.canonical.com/ubuntu/ precise/main grub-pc i386 1.99-20ubuntu1 [140 kB]
Pobieranie: 7 http://cursa.canonical.com/ubuntu/ precise/main grub-pc-bin i386 1.99-20ubuntu1 [841 kB]
Pobieranie: 8 http://cursa.canonical.com/ubuntu/ precise/main grub2-common i386 1.99-20ubuntu1 [94,2 kB]
Pobieranie: 9 http://cursa.canonical.com/ubuntu/ precise/main grub-common i386 1.99-20ubuntu1 [2094 kB]
Pobrano 4154 kB w 5s (768 kB/s)
(Odczytywanie bazy danych ... 257003 files and directories currently installed.)
Przygotowanie do zastąpienia bash-builtins 4.2-1ubuntu3 (wykorzystując .../bash-builtins_4.2-2ubuntu1_i386.deb) ...
Rozpakowanie pakietu zastępującego bash-builtins ...
Przygotowanie do zastąpienia bash 4.2-1ubuntu3 (wykorzystując .../bash_4.2-2ubuntu1_i386.deb) ...
Rozpakowanie pakietu zastępującego bash ...
Przetwarzanie wyzwalaczy dla man-db...
Przetwarzanie wyzwalaczy dla menu...
Konfigurowanie bash (4.2-2ubuntu1) ...
Instalowanie nowej wersji pliku konfiguracyjnego /etc/skel/.bashrc ...
Instalowanie nowej wersji pliku konfiguracyjnego /etc/bash.bashrc ...
update-alternatives: użycie /usr/share/man/man7/bash-builtins.7.gz jako dostarczającego /usr/share/man/man7/builtins.7.gz (builtins.7.gz) w tryb auto.
Prz...

Colin Watson (cjwatson)
Changed in grub2 (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Colin Watson (cjwatson)
summary: - "This GPT partition label has no BIOS Boot Partition"
+ regression from 4k_sectors.patch: "non-sector-aligned data is found in
+ the core file"
tags: added: regression-release rls-p-tracking
Colin Watson (cjwatson)
Changed in grub2 (Ubuntu):
milestone: none → ubuntu-12.04
Revision history for this message
Colin Watson (cjwatson) wrote :

If need be, I'll back out 4k_sectors.patch, which is almost certainly what caused this. I intend to investigate a bit first, though. It reproduces easily in a VM, which helps a lot.

Colin Watson (cjwatson)
Changed in grub2 (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
kapetr (kapetr) wrote :

Hello.

I can confirm too. After last update in U12.04.
I have no GPT table - I use old DOS way.
Grub2 in /dev/sda3 (not in MBR).

At boot I get now: "error: out of partition"
but the systems boots (even without key pressing).

$ sudo grub-setup -f /dev/sda3
grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
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..
grub-setup: error: non-sector-aligned data is found in the core file.
$

Revision history for this message
linrunner (linrunner) wrote :

There is another bug related with his update: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/972221

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

This bug was fixed in the package grub2 - 1.99-21ubuntu1

---------------
grub2 (1.99-21ubuntu1) precise; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Adjust for default Ubuntu boot options ("quiet splash").
    - Default to hiding the menu; holding down Shift at boot will show it.
    - Set a monochromatic theme and an appropriate background for Ubuntu.
    - Apply Ubuntu GRUB Legacy changes to legacy update-grub script.
    - Fix backslash-escaping in merge_debconf_into_conf.
    - Remove "GNU/Linux" from default distributor string.
    - Add crashkernel option.
    - Bypass menu unless other OSes are installed or Shift is pressed.
    - Allow Shift to interrupt 'sleep --interruptible'.
    - Reduce visual clutter in normal mode.
    - Remove verbose messages printed before reading configuration.
    - Suppress kernel/initrd progress messages, except in recovery mode.
    - Show the boot menu if the previous boot failed.
    - Don't generate device.map during grub-install or grub-mkconfig.
    - Adjust upgrade version checks for Ubuntu.
    - Suppress "GRUB loading" message unless Shift is held down.
    - Adjust versions of grub-doc and grub-legacy-doc conflicts.
    - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
    - Look for .mo files in /usr/share/locale-langpack first.
    - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
    - Check hardware support before using gfxpayload=keep.
    - Put second and subsequent Linux menu entries in a submenu.
    - Preferred resolution detection for VBE.
    - Set vt.handoff=7 for smooth handoff to kernel graphical mode.
    - Update default/grub.md5sum to include maverick's default md5sum.
    - In recovery mode, add nomodeset to the Linux kernel arguments, and
      remove the 'set gfxpayload=keep' command.
    - Skip Windows os-prober entries on Wubi systems, and suppress the menu
      by default if those are the only other-OS entries.
    - Handle probing striped DM-RAID devices.
    - Replace 'single' by 'recovery' when friendly-recovery is installed.
    - Use qemu -no-kvm in tests for now to work around LP #947597.
    - Disable cursor as early as possible in grub_main.

grub2 (1.99-21) unstable; urgency=low

  * Backport from upstream:
    - Fix hook calling for unaligned segments (closes: #666992,
      LP: #972250).
 -- Colin Watson <email address hidden> Tue, 03 Apr 2012 18:15:58 +0100

Changed in grub2 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Philip Guyton (phil-lxnet) wrote :

Confirming this fixed the duplicate Bug #972411 for me. Thanks everyone.

Revision history for this message
Otus (jan-varho) wrote :

The problem reported in duplicate bug #972221 is not fixed for me even with these updates. Should I reopen one of these bugs or file a new one?

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

Since the person who filed that bug reported it as fixed, you must have a different issue, so file a new bug.

Revision history for this message
caViator (caviator.pl) wrote :
Download full text (3.2 KiB)

I installed the corrected version. There is no critical errors, grub starts correctly. However, during upgrades following warnings occurred:

===========================================================================

# aptitude full-upgrade -sV
Następujące pakiety zostaną zaktualizowane:
  grub-common [1.99-20ubuntu1 -> 1.99-21ubuntu1] grub-pc [1.99-20ubuntu1 -> 1.99-21ubuntu1]
  grub-pc-bin [1.99-20ubuntu1 -> 1.99-21ubuntu1] grub2-common [1.99-20ubuntu1 -> 1.99-21ubuntu1]
4 pakietów aktualizowanych, 0 instalowanych, 0 do usunięcia i 0 nieaktualizowanych.
Do pobrania 3204 kB archiwów. Zajęte po rozpakowaniu: 4096 B.
Kontynuować? [Y/n/?]
Pakiety zostałyby pobrane/zainstalowane/usunięte.

===========================================================================

# aptitude full-upgrade
Następujące pakiety zostaną zaktualizowane:
  grub-common grub-pc grub-pc-bin grub2-common
4 pakietów aktualizowanych, 0 instalowanych, 0 do usunięcia i 0 nieaktualizowanych.
Do pobrania 3204 kB archiwów. Zajęte po rozpakowaniu: 4096 B.
Kontynuować? [Y/n/?]
Pobieranie: 1 http://cursa.canonical.com/ubuntu/ precise/main grub-pc i386 1.99-21ubuntu1 [140 kB]
Pobieranie: 2 http://cursa.canonical.com/ubuntu/ precise/main grub-pc-bin i386 1.99-21ubuntu1 [875 kB]
Pobieranie: 3 http://cursa.canonical.com/ubuntu/ precise/main grub2-common i386 1.99-21ubuntu1 [94,0 kB]
Pobieranie: 4 http://cursa.canonical.com/ubuntu/ precise/main grub-common i386 1.99-21ubuntu1 [2095 kB]
Pobrano 3204 kB w 5s (585 kB/s)
(Odczytywanie bazy danych ... 252806 files and directories currently installed.)
Przygotowanie do zastąpienia grub-pc 1.99-20ubuntu1 (wykorzystując .../grub-pc_1.99-21ubuntu1_i386.deb) ...
Rozpakowanie pakietu zastępującego grub-pc ...
Przygotowanie do zastąpienia grub-pc-bin 1.99-20ubuntu1 (wykorzystując .../grub-pc-bin_1.99-21ubuntu1_i386.deb) ...
Rozpakowanie pakietu zastępującego grub-pc-bin ...
Przygotowanie do zastąpienia grub2-common 1.99-20ubuntu1 (wykorzystując .../grub2-common_1.99-21ubuntu1_i386.deb) ...
Rozpakowanie pakietu zastępującego grub2-common ...
Przygotowanie do zastąpienia grub-common 1.99-20ubuntu1 (wykorzystując .../grub-common_1.99-21ubuntu1_i386.deb) ...
Rozpakowanie pakietu zastępującego grub-common ...
Przetwarzanie wyzwalaczy dla man-db...
Przetwarzanie wyzwalaczy dla install-info...
Przetwarzanie wyzwalaczy dla ureadahead...
Konfigurowanie grub-common (1.99-21ubuntu1) ...
Konfigurowanie grub2-common (1.99-21ubuntu1) ...
Konfigurowanie grub-pc-bin (1.99-21ubuntu1) ...
Konfigurowanie grub-pc (1.99-21ubuntu1) ...
/usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
/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.
Installation finished. No error reported.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-21-generic
Found initrd image: /boot/initrd.img-3.2.0-21-generic
Found memtest86+ image: /memtest86+.bin
Found memdisk: /memdisk
Imagepath /boot/images not found
done

Bieżący sta...

Read more...

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 972250] Re: regression from 4k_sectors.patch: "non-sector-aligned data is found in the core file"

On Wed, Apr 04, 2012 at 02:35:55PM -0000, caViator wrote:
> I installed the corrected version. There is no critical errors, grub
> starts correctly. However, during upgrades following warnings occurred:
[...]
> /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
> /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.

Those warnings are not new, and are not errors. They aren't evidence of
any problem related to this bug. There is some technical background
here:

  http://www.gnu.org/software/grub/manual/grub.html#BIOS-installation

Revision history for this message
caViator (caviator.pl) wrote :

Thank you for the clarification and link. I do not have any more questions.

Revision history for this message
Wren Turkal (wt-penguintechs-org) wrote :

I am running a sputnik laptop in a dual boot configuration with Ubuntu 12.04. I just updated my grub-pc to version 1.99-21ubuntu3.4 and am getting the blocklists error. Selecting /dev/sda6 during the upgrade of the package fails. I had to select that I was okay skipping the installation of the bootloader to a drive to get out of the upgrade. After the package upgrade was done, I ran "grub-install -f /dev/sda" and got the warning about blocklists. I haven't been daring enough to restart my laptop yet. This is a pretty scary error message. Should I be afraid to restart my laptop?

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

Which exact error message? If it's:

  /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.

... then you'll get that any time you try to install GRUB to a partition rather than the MBR, unless the filesystem on that partition reserves space for boot loader code (basically, btrfs). The warning doesn't indicate a problem that would prevent your system booting next time round, but rather a general unreliability of this setup against things like aggressive fsck implementations.

It's only related to this bug if you're also getting "error: non-sector-aligned data is found in the core file".

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

Although it's a little odd to see that warning when you're installing to a disk rather than a partition. I'd need to see the full output.

(Also, best to use 'sudo dpkg-reconfigure grub-pc' so that future package upgrades will upgrade GRUB in the same location - grub-install alone is a one-shot kind of affair.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.