Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] emerge: Failed to validate a sane '/dev'.
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
Gankfest
l33t
l33t


Joined: 01 Aug 2007
Posts: 946
Location: Miami Beach, FL

PostPosted: Fri Mar 31, 2017 2:22 pm    Post subject: [Solved] emerge: Failed to validate a sane '/dev'. Reply with quote

Trying to install Gentoo on a Intel64 notebook, and running into an issue that I can't figure out. Using the amd64 guide and a Ubuntu livecd, I can't use portage after chrooting. The code:

emerge --sync

Code:
Failed to validate a sane '/dev'.
bash process substitution doesn't work; this may be an indication of a broken '/dev/fd'.


I've never had a problem before, and can't find an answer on the Internet about this. I haven't deviated from what I normally do, so idk why it's giving this error. make.conf listed below.

make.conf

Code:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE and USE_EXPAND flags that were used for
# buidling in addition to what is provided by the profile.
USE="bindist"
CPU_FLAGS_X86="mmx sse sse2"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
MAKEOPTS="-j3"


[Moderator edit: Changed title to summarize the issue. Original title was Emerge Issue on new Install. -Hu]
_________________
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>


Last edited by Gankfest on Fri Mar 31, 2017 4:53 pm; edited 3 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Fri Mar 31, 2017 2:29 pm    Post subject: Reply with quote

Gankfest,

You forgot to bind mount /dev inside the chroot, so inside the chroot, its empty.
The same handbook section covers /proc and /sys
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gankfest
l33t
l33t


Joined: 01 Aug 2007
Posts: 946
Location: Miami Beach, FL

PostPosted: Fri Mar 31, 2017 2:36 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Gankfest,

You forgot to bind mount /dev inside the chroot, so inside the chroot, its empty.
The same handbook section covers /proc and /sys


Whats the syntax for that, I'm not seeing it the handbook under mounting:

Code:
root #mount -t proc /proc /mnt/gentoo/proc
root #mount --rbind /sys /mnt/gentoo/sys
root #mount --make-rslave /mnt/gentoo/sys
root #mount --rbind /dev /mnt/gentoo/dev
root #mount --make-rslave /mnt/gentoo/dev

_________________
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Mar 31, 2017 2:40 pm    Post subject: Reply with quote

Code:
root #mount --rbind /dev /mnt/gentoo/dev

Need a cup of coffee? :D
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Mar 31, 2017 2:42 pm    Post subject: Reply with quote

Gankfest wrote:
Whats the syntax for that, I'm not seeing it the handbook under mounting:

Code:
[...]
root #mount --rbind /dev /mnt/gentoo/dev
[...]

Gankfest ... that depends on which part of the handbook you look in ;)

best ... khay


Last edited by khayyam on Fri Mar 31, 2017 2:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gankfest
l33t
l33t


Joined: 01 Aug 2007
Posts: 946
Location: Miami Beach, FL

PostPosted: Fri Mar 31, 2017 2:43 pm    Post subject: Reply with quote

Jaglover wrote:
Code:
root #mount --rbind /dev /mnt/gentoo/dev

Need a cup of coffee? :D


I did that, but the error still exists.

Edit:

I'll take that cup of coffee lol

It should of been just:

Code:
   
mount -t proc /proc /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev


ok now emerge --sync is showing:

Code:
>>> Syncing repository 'gentoo' into '/usr/portage'...
!!! getaddrinfo failed for 'rsync.gentoo.org': [Errno -3] Temporary failure in name resolution
>>> Starting rsync with rsync://rsync.gentoo.org/gentoo-portage...
rsync: getaddrinfo: rsync.gentoo.org 873: Temporary failure in name resolution
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
>>> Retrying...
!!! Exhausted addresses for rsync.gentoo.org


and I can't select a profile with eselect failed to get a list of valid profiles and ls says the make.profile is non existent.
_________________
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Fri Mar 31, 2017 4:17 pm    Post subject: Reply with quote

You`ll prob need to copy /etc/resolv.conf into the chroot as a temp dns fix,
and if /usr/portage is completely empty then you wont be able to set a profile yet,
as what that does is create a symlink to a profile in /usr/portage/profiles/.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
Gankfest
l33t
l33t


Joined: 01 Aug 2007
Posts: 946
Location: Miami Beach, FL

PostPosted: Fri Mar 31, 2017 4:51 pm    Post subject: Reply with quote

Sadako wrote:
You`ll prob need to copy /etc/resolv.conf into the chroot as a temp dns fix,
and if /usr/portage is completely empty then you wont be able to set a profile yet,
as what that does is create a symlink to a profile in /usr/portage/profiles/.


that solved the issue, portage is working as intended.

Thanx!
_________________
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Back to top
View user's profile Send private message
rhoyerboat
n00b
n00b


Joined: 03 Sep 2011
Posts: 5

PostPosted: Wed Dec 26, 2018 4:13 pm    Post subject: also error from: Reply with quote

Had this error because I forgot to mount /proc inside the chroot.

(just posting for the next person who googles the error)
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Mon Jul 25, 2022 12:33 am    Post subject: Reply with quote

Here's another update to this. I had to run env-update to get this error to go away. I use a script to mount the needed things and it worked for a long time until today. Running env-update somehow fixed it. Just posting in case this may help someone else.

Sorry to revive a somewhat older thread but I thought it fit best here. Hopefully this will help someone else.

:D :D
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
crowbert
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2003
Posts: 140

PostPosted: Mon Sep 25, 2023 6:57 pm    Post subject: Reply with quote

I just hit this because I'm installing with a chroot from a non-Gentoo distribution. The /dev/fd entry is supposed to be a symlink to /proc/self/fd. Creating that symlink fixes it.
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