Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2-mkconfig error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
10B2
n00b
n00b


Joined: 28 May 2013
Posts: 65

PostPosted: Fri Aug 15, 2014 8:40 am    Post subject: grub2-mkconfig error Reply with quote

I use a Sony Vaio tap 11 with windows 8 preinstalled.
Have created 3 partitions for gentoo, boot (ext2), swap and the major linux partition (ext4), where I installed gentoo.
I am trying to dual boot in EFI mode with GRUB2.
The EFI partition set by the producer is the 3rd.
Mounted this latter partition onto /boot/efi.
Executed grub2-install; no problem.
Then I run 'grub2-mkconfig -o /boot/efi/EFI/GRUB2/grub.cfg ---->/usr/sbin/grub2-probe: error: failed to get canonical path of 'PARTUUID=...'
and the grub2 configuration file is not generated.

I can anyway boot from grub-2.00 console, which starts by default in uefi mode on my pc, using genkernel and initramfs.

I would believe that this might be related with partitions naming and filesystems. Indeed I noticed these issues:

- when booting in UEFI or legacy mode from usb drive, my partitions are named sdaX. When booting without usb they are renamed sdbX. This the reason why I modified fstab changing sda into sdb.

- in dmesg I get this error:EXT2-fs (sdb9) error: couldn't mount because of unsopported optional feature. May be this error would disappear
if unchecked ext2 filesystem in kernel, as I did with ext3 fs (which provided similar error). But since created a linux boot partition which is ext2, am not sure if I can without ext2 fs. What about changing the linux boot partition filesystem into efi? After all I mount in /boot/efi the original EFI partition of my pc.

- Once I would be able to boot gentoo from grub2 interface (not console), then I would add the menuentry for dual booting windows8

Thanks in advance
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Fri Aug 15, 2014 5:56 pm    Post subject: Reply with quote

One thing with UEFI, is that you only need 1 efi partition for the entire system, reguardless which drive it is on. Last I saw, windows 8 defaults to installing with EFI, so it would have created a efi partition already. So you do not need to make any other efi partitions. In general efi partitions are formated as a fat32 drive (excluding for OSX, and linux in general doesn't have to be, but generaly is). So you are perfectly fine to reusing the windows efi partition along with linux; it won't affect any files windows made, as both the linux efi and windows can coexist right next to each other happily. I can't say what effects the system will have if it encounters 2 seperate efi partitions. Grub2 should see the windows efi (assuming you are only using 1 efi partition), and automaticaly add that for you, so you don't have to add it in later.

Otherwise, I would recommend you DO compile in ext2 fs support into the kernel along with ext4 (for the /boot partition). The big reason is that a ext4 drive with all the default options enabled is not able to be mounted by ext2/3 (from my understanding, converting a ext2/3 drive into ext4 enables all except 1 option which has to be set when the partition is set). Another thing that will help you out on the unsupported optional feature error, is add this to your /etc/default/grub file.
Code:

GRUB_CMDLINE_LINUX="rootfstype=ext4"


Afterwards, be sure to rerun the grub2-mkconfig again, so grub.cfg is updated to have that line added to the boot. It tells the kernel what the root fs type is, so it doesn't have to guess. From what I've seen, it checks in the order of ext2, ext3, then ext4. My general rule of thumb that I use, is compile in the support of all filesystem types I use directly into the kernel (never as a module).
Back to top
View user's profile Send private message
10B2
n00b
n00b


Joined: 28 May 2013
Posts: 65

PostPosted: Sun Aug 17, 2014 4:07 pm    Post subject: Reply with quote

Still not working...not able to generate gub.cfg file:
error: failed to get canonical path of 'PARTUUID=...'

:( :( :( :( :( :( :(
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Tue Dec 23, 2014 6:08 am    Post subject: Reply with quote

Has there been any progress so far? I now can't generate a grub.cfg any more, the same error message appears. This is even the case after having udev creating symlinks to /dev/disk/by-partuuid/.
Back to top
View user's profile Send private message
bpkent
n00b
n00b


Joined: 17 Feb 2011
Posts: 14

PostPosted: Sun Mar 22, 2015 11:52 pm    Post subject: Reply with quote

Had a similar issue, when stracing grub2-probe I saw that it looked in current working directory for PARTUUID=<foo>. Symlinking the /dev/sd<bar> device to $PWD/PARTUUID=<foo> resulted in grub2-probe succeeding, as did grub2-mkconfig. My build_kernel script now has:

Code:
ln -s /dev/sdg2 "PARTUUID=604e76f6-02"
grub2-mkconfig -o /boot/grub/grub.cfg
rm "PARTUUID=604e76f6-02"


And I get a new grub.cfg :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum