Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420151 - grub2-probe requires /sys to be mounted
Summary: grub2-probe requires /sys to be mounted
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on: 420159
Blocks:
  Show dependency tree
 
Reported: 2012-06-07 21:11 UTC by Michał Kudła
Modified: 2012-06-29 16:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Kudła 2012-06-07 21:11:55 UTC
/(chroot) Gentoo-2012 / # usr/sbin/grub2-probe --device /dev/sda3 --target=hints_string
/usr/sbin/grub2-probe: error: failed to get canonical path of /sys/block/sda.

this is called by
/usr/share/grub/grub-mkconfig_lib
/etc/grub.d/00_header

cause problem with
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...

but config is not generated - script broke on calling 
prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"`

after commented this line, generating config file reached end.


to order to install boo I must to 
#parted /dev/sda set 1 bios_grub on

my config

# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 234441648 sectors, 111.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): D42FA805-995D-41C7-AB90-B42A95F4B41C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF02  
   2          206848        21178367   10.0 GiB    8200  
   3        21178368       234440703   101.7 GiB   8300  




first partition has Code 8300 but [parted /dev/sda set 1 bios_grub on]  has changed this

fs sda1 is ext2
fs sda3 is btrfs
Comment 1 Michał Kudła 2012-06-07 21:17:47 UTC
under install procedure
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1#book_part1_chap5
chroot do not doing
mount --rbind /sys /mnt/gentoo/sys

After adding this line to chroot procedure everythings ok

(chroot) Gentoo-2012 sys # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.4.0-gentoo-m1k0
Found linux image: /boot/vmlinuz-3.4.0-gentoo
done
(chroot) Gentoo-2012 sys # /usr/sbin/grub2-probe --device /dev/sda3 --target=hints_string
--hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 
(chroot) Gentoo-2012 sys # grub2-install /dev/sda
Installation finished. No error reported.
(chroot) Gentoo-2012 sys #
Comment 2 Mike Gilbert gentoo-dev 2012-06-29 16:47:37 UTC
Hand book is fixed, so marking this resolved as well.