You are not logged in.

#1 2010-06-27 21:39:57

Malstrond
Member
From: Germany
Registered: 2009-06-03
Posts: 98

grub-mkconfig fails with btrfs root

Hi,
I was trying to change the color scheme and resolution of GRUB2.
The wiki mentions grub-mkconfig should be used, but it always fails on an btrfs root with the following error message:
/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
I tried to use the "deprecated" method mentioned in the wiki by adding the options directly to grub.cfg. That worked for the color changes, but not for the resolution changes.

These are the relevant parts of my current grub.cfg:

if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode="1024x768x32"
  insmod gfxterm
  insmod vbe
  terminal_output gfxterm
  if terminal_output gfxterm; then true ; else
     terminal gfxterm
  fi
fi

set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue

# Timeout for menu
set timeout=1

# Set default boot entry as Entry 0
set default=0

[cut boot entries]

But GRUB will not switch to 1024x768.
Running vbeinfo in the GRUB2 command line tells me that 1024x768x32 is indeed supported by my (V)BIOS and known as mode 0x118.

Does anyone know of a way to get grub-mkconfig working (a friend told me the Ubuntu guys supposedly did it), or if something is wrong with my config?
Is the if loadfont ... part really correct? GRUB2 resides on a seperate partition (sda1) while / is on sda3 and a btrfs partition, so it shouldn't have access to /usr/... . Can I just remove the condition?
I can't change the path either as GRUB2 can currently not read btrfs partitions.

Offline

#2 2010-06-27 23:28:20

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: grub-mkconfig fails with btrfs root

grub2 has zero support for btrfs. Searching google and/or the ubuntu forums for a post by 'ibuclaw' about btrfs will lead to some patchwork to get update-grub (an ubuntu anomaly) to recognize a btrfs root. Perhaps the logic can be hacked in to grub-mkconfig.

Personally, I'd pick one of the following options:

1) maintain grub.cfg yourself
2) get a real bootloader (grub .97)

Offline

#3 2010-09-06 22:23:23

tcp
Member
Registered: 2010-04-01
Posts: 14

Re: grub-mkconfig fails with btrfs root

I applied the patch mentioned here (manually). Good workaround.

Last edited by tcp (2010-09-06 22:23:51)

Offline

#4 2010-09-06 23:14:07

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: grub-mkconfig fails with btrfs root

This thread is old...

I recently stumbled about grub2-btrfs in AUR:
http://aur.archlinux.org/packages.php?ID=39314
IF someone wants to experiment.,


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#5 2010-09-08 10:26:04

Vamp898
Member
From: 東京
Registered: 2009-01-03
Posts: 909
Website

Re: grub-mkconfig fails with btrfs root

Im using syslinux/extlinux and its working like a harm (only 1 partition, as /, btrfs)

Offline

Board footer

Powered by FluxBB