grub2: btrfs: not known to reserve space for DOS-style boot

Bug #757446 reported by Gene Cumm on 2011-04-11
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Medium
Colin Watson
Natty
Medium
Colin Watson

Bug Description

Binary package hint: grub2

# grub-install /dev/sda1

/usr/sbin/grub-setup: error: hd0 appears to contain a btrfs filesystem which isn't known to reserve space for DOS-style boot. Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwrittten by grub-setup (--skip-fs--probe disables this check, use at your own risk).

btrfs reserves the first 64kiB for boot loaders. grub_btrfs_fs in grub-core/fs/btrfs.c does not contain an assignment for reserved_first_sector like grub_ext2_fs in grub-core/fs/ext2.c.

Related branches

Colin Watson (cjwatson) on 2011-04-11
Changed in grub2 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in grub2 (Ubuntu Natty):
assignee: nobody → Colin Watson (cjwatson)
milestone: none → ubuntu-11.04-beta-2
Colin Watson (cjwatson) on 2011-04-11
Changed in grub2 (Ubuntu Natty):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.99~rc1-12ubuntu1

---------------
grub2 (1.99~rc1-12ubuntu1) natty; 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 aubergine 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.
    - Handle filesystems loop-mounted on file images.
    - Ignore devices loop-mounted from files in Linux grub.d scripts.
    - 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.
    - Add a grub-rescue-efi-amd64 package.
    - On Wubi, just update wubildr rather than asking for an install device.
    - 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.
    - Add grub-mount-udeb, containing just grub-mount.
  * Default to gfxpayload=keep if gfxblacklist.txt is missing (LP: #757603).
  * Depend on grub-gfxpayload-lists on i386 and amd64.

grub2 (1.99~rc1-12) unstable; urgency=low

  * Update branch_butter.patch:
    - Fix filename comparison.
    - Take extent offset in account on uncompressed extents.
    - Use filled extent size if available.
  * Allow use of first sector on btrfs (LP: #757446).
  * Merge from Ubuntu:
    - Build part_msdos and vfat into EFI boot images (LP: #677758).
 -- Colin Watson <email address hidden> Mon, 11 Apr 2011 17:39:23 +0100

Changed in grub2 (Ubuntu Natty):
status: Fix Committed → Fix Released
Gene Cumm (gene-cumm) wrote :

Fails. With the almost untested patch I just got today, it almost worked. I got to a "grub rescue>" prompt. Using the commands 'set prefix=(hd0,msdos1)/@/boot/grub; insmod normal; normal' (you noted this in bug 712029; https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/712029 ), everything worked and I have a successful install.

I think there's a bug here where this was addressed in Ubuntu but might not have made its way upstream yet.

Gene Cumm (gene-cumm) wrote :

Correction: I forgot the mount option "subvol=@". Specifying this resolves all issues.

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

Other bug subscribers