View previous topic :: View next topic |
Author |
Message |
mahdi.sh n00b
Joined: 11 Nov 2014 Posts: 4
|
Posted: Tue Nov 11, 2014 3:16 pm Post subject: grub2 install |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Tue Nov 11, 2014 9:29 pm Post subject: |
|
|
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 |
|
|
mahdi.sh n00b
Joined: 11 Nov 2014 Posts: 4
|
Posted: Wed Nov 12, 2014 8:40 am Post subject: |
|
|
i did this steps,but there is this problem. |
|
Back to top |
|
|
N8Fear Tux's lil' helper
Joined: 15 Apr 2013 Posts: 140 Location: Berlin (Germany)
|
Posted: Wed Nov 12, 2014 8:46 am Post subject: |
|
|
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 |
|
|
DoK_- n00b
Joined: 20 Nov 2014 Posts: 2 Location: GB
|
Posted: Thu Nov 20, 2014 10:38 pm Post subject: |
|
|
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 |
|
|
ShanaXXII Apprentice
Joined: 29 Jun 2014 Posts: 283 Location: Canada
|
Posted: Thu Nov 20, 2014 10:49 pm Post subject: |
|
|
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 |
|
|
DoK_- n00b
Joined: 20 Nov 2014 Posts: 2 Location: GB
|
Posted: Thu Nov 20, 2014 10:51 pm Post subject: |
|
|
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 |
|
|
mreff555 Apprentice
Joined: 10 Mar 2011 Posts: 231 Location: Philadelphia
|
Posted: Wed Feb 04, 2015 2:06 am Post subject: |
|
|
Hmmm... I have the same problem. Never seen this one before |
|
Back to top |
|
|
ChoiZ n00b
Joined: 21 Feb 2015 Posts: 4
|
Posted: Sat Feb 21, 2015 5:10 pm Post subject: |
|
|
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. |
|
|
Back to top |
|
|
psva00 n00b
Joined: 05 Sep 2011 Posts: 16
|
Posted: Mon Feb 23, 2015 4:25 pm Post subject: |
|
|
What is the output of 'mount' (with no params).
Please post your /etc/fstab |
|
Back to top |
|
|
mreff555 Apprentice
Joined: 10 Mar 2011 Posts: 231 Location: Philadelphia
|
Posted: Tue Mar 10, 2015 12:20 am Post subject: |
|
|
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 |
|
|
dpshak Apprentice
Joined: 05 May 2005 Posts: 183 Location: Wisconsin
|
Posted: Thu Dec 10, 2015 6:10 am Post subject: |
|
|
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 |
|
|
red-0ne n00b
Joined: 23 Oct 2009 Posts: 8
|
Posted: Tue Dec 15, 2015 12:10 pm Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Thu Dec 17, 2015 6:47 pm Post subject: |
|
|
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 |
|
|
red-0ne n00b
Joined: 23 Oct 2009 Posts: 8
|
Posted: Thu Dec 17, 2015 7:47 pm Post subject: |
|
|
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 |
|
|
|