Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2 install
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
mahdi.sh
n00b
n00b


Joined: 11 Nov 2014
Posts: 4

PostPosted: Tue Nov 11, 2014 3:16 pm    Post subject: grub2 install Reply with quote

hello my friends
i am installing the gentoo for amd64
in step that shoud install grub2 ,this error appear,

#grub2-install /dev/sda
this error :
installing for i386-pc platform
grub2-install: error: failed to get canonical path of `aufs'.

thanks
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Tue Nov 11, 2014 9:29 pm    Post subject: Reply with quote

are you sure you were properly in the chroot when you ran grub2-install /dev/sda ?

nominally: boot the live media then run:
Code:
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash


Code:
source /etc/profile
export PS1="(chroot) $PS1"
grub2-install /dev/sda

_________________
Defund the FCC.
Back to top
View user's profile Send private message
mahdi.sh
n00b
n00b


Joined: 11 Nov 2014
Posts: 4

PostPosted: Wed Nov 12, 2014 8:40 am    Post subject: Reply with quote

i did this steps,but there is this problem.
Back to top
View user's profile Send private message
N8Fear
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2013
Posts: 140
Location: Berlin (Germany)

PostPosted: Wed Nov 12, 2014 8:46 am    Post subject: Reply with quote

Did you mount /proc (inside the chroot) with mount -t proc proc proc or witrh mount -o bind /proc /<path to chroot-root>/proc ?
Back to top
View user's profile Send private message
DoK_-
n00b
n00b


Joined: 20 Nov 2014
Posts: 2

PostPosted: Thu Nov 20, 2014 10:38 pm    Post subject: Reply with quote

Hi, i followed the handbook on a fresh new install of gentoo and i'm stuck with the same problem :/ did the procedure to be in chroot cleanly as well as i had an issue with it before.

My proc is mounted as well.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 283
Location: Canada

PostPosted: Thu Nov 20, 2014 10:49 pm    Post subject: Reply with quote

DONAHUE wrote:
are you sure you were properly in the chroot when you ran grub2-install /dev/sda ?

nominally: boot the live media then run:
Code:
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash


Code:
source /etc/profile
export PS1="(chroot) $PS1"
grub2-install /dev/sda

Isn't the command in the Handbook like this?
Code:
mount -t proc proc /mnt/gentoo/proc
Back to top
View user's profile Send private message
DoK_-
n00b
n00b


Joined: 20 Nov 2014
Posts: 2

PostPosted: Thu Nov 20, 2014 10:51 pm    Post subject: Reply with quote

It is

Code:
Code Listing 1.4: Mounting /proc and /dev

# mount -t proc proc /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev


Edit: I posted a bit quickly and due to some language bug, ( changed it ) my actual error is :

grub2-install: error: failed to get canonical path of `/boot/grub'.
Back to top
View user's profile Send private message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Wed Feb 04, 2015 2:06 am    Post subject: Reply with quote

Hmmm... I have the same problem. Never seen this one before
Back to top
View user's profile Send private message
ChoiZ
n00b
n00b


Joined: 21 Feb 2015
Posts: 4

PostPosted: Sat Feb 21, 2015 5:10 pm    Post subject: Reply with quote

Same problem for me.

Code:
grub2-install /dev/sda
Installing for i386-pc platform.
grub2-install : erreur : impossible d'obtenir le chemin canonique de « /boot/grub ».


And I have resolved it with:

Code:
mount -o rw,remount /dev/sda2


Code:
grub2-install /dev/sda
Installing for i386-pc platform.
Installation terminée, sans erreur.


:D
Back to top
View user's profile Send private message
psva00
n00b
n00b


Joined: 05 Sep 2011
Posts: 16

PostPosted: Mon Feb 23, 2015 4:25 pm    Post subject: Reply with quote

What is the output of 'mount' (with no params).

Please post your /etc/fstab
Back to top
View user's profile Send private message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Tue Mar 10, 2015 12:20 am    Post subject: Reply with quote

Found a solution. Honestly this should either be classified as a bug, the handbook should be appended or this topic should be a sticky since it happens every time without fail if you follow the gentoo handbook verbatim.

Assuming everything else is correct, from inside chroot, unmount your boot partition and then remount it from within. Thats it.
I've recently installed gentoo three times and this was the issue all tree times.

I would really like to know an explanation if anyone has any idea. My guess is that it has to do with the fact that Grub2 really likes to address drives by their GUID. All I can think is that by mounting it outside of chroot, and then chrooting the mounted drive somehow doesn't pass all the information needed to be passed. Just a guess.
Back to top
View user's profile Send private message
dpshak
Apprentice
Apprentice


Joined: 05 May 2005
Posts: 170
Location: Wisconsin

PostPosted: Thu Dec 10, 2015 6:10 am    Post subject: Reply with quote

Hmm, this is the first time I'm seeing that as well - and I recently put a new hard drive in this machine...

There was this:
Code:
INFO: postinst                                                                                                     
Your boot partition, detected as being mounted at /boot, is read-only.                                             
It will be remounted in read-write mode temporarily.                                                               
Automatically remounting /boot as ro as it was previously.
after the compilation of grub (2.02_beta2-r7) that I haven't seen before, either.
Back to top
View user's profile Send private message
red-0ne
n00b
n00b


Joined: 23 Oct 2009
Posts: 8

PostPosted: Tue Dec 15, 2015 12:10 pm    Post subject: Reply with quote

dpshak wrote:
Hmm, this is the first time I'm seeing that as well - and I recently put a new hard drive in this machine...

There was this:
Code:
INFO: postinst                                                                                                     
Your boot partition, detected as being mounted at /boot, is read-only.                                             
It will be remounted in read-write mode temporarily.                                                               
Automatically remounting /boot as ro as it was previously.
after the compilation of grub (2.02_beta2-r7) that I haven't seen before, either.


This is certainly a bug. It was introduced by /usr/portage/eclass/mount-boot.eclass.

Testing if the boot partition is read only at line 61 is successful because proc_ro searches for a /boot readonly mount point and wrongly assumes that (for me) /dev/sr0 /livemnt/boot iso9660 ro,relatime,mode=0644 0 0 is the mount point he's looking for.
You can workaround the issue by replacing the sed command with sed -n '/^\/boot at line 57 of mount-boot.eclass by
Code:

local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts | sed -n '/^\/boot .*,ro,/p')


Last edited by red-0ne on Thu Dec 17, 2015 7:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3698
Location: Hamburg

PostPosted: Thu Dec 17, 2015 6:47 pm    Post subject: Reply with quote

Code:
t44 ~ # awk '{ print $2 " ," $4 "," }' /proc/mounts | sed -n '^/\/boot .*,ro,/p'
sed: -e expression #1, char 1: unknown command: `^'
You should NOT made such advices which are completely untested, or ?
Back to top
View user's profile Send private message
red-0ne
n00b
n00b


Joined: 23 Oct 2009
Posts: 8

PostPosted: Thu Dec 17, 2015 7:47 pm    Post subject: Reply with quote

Thank you for your notice, of course, I should've copied the working command. I wrote it by hand and switched ^ and /. Here is the right one
Code:

local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts | sed -n '/^\/boot .*,ro,/p')


Also it's line 58 and not 57. I'll edit my post to put the right command.
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