Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failed to validate a sane '/dev'. help pls
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
anonymous1234
n00b
n00b


Joined: 16 Sep 2024
Posts: 15

PostPosted: Sun Nov 17, 2024 8:57 am    Post subject: Failed to validate a sane '/dev'. help pls Reply with quote

I have experience installing gentoo and this is the first time I have found myself in this issue, Usually, I use the LiveGUI installer on my machines, but this time, I am using the minimal installer and may have just missed something in the handbook even though I have gone through it again...
issue:
When running emerge -webrsync i get the following output:
* Cleaning up ...
Failed to validate a sane '/dev'.
bash process substitution doesn't work; this may be an indication of a broken '/dev/fd'.
so, i went online and found a few results for this error and apprently (???) i havent mounted chroot properly? but I am litteraly copy pasting from the handbook, idk what went wrong this time haha.
So I went and attempted to follow the solution someone else used a few years ago and tried running:
mount --rbind /dev /mnt/mychroot/dev
and I got:
mount: /mnt/mychroot/dev: mount point does not exist.
dmesg(1) may have more information after failed mount system call.

could someone help me please? (running this in a VM, SSHing into it from host system so I can Copy Paste from handbook)
thanks!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3707
Location: Rasi, Finland

PostPosted: Sun Nov 17, 2024 9:35 am    Post subject: Re: Failed to validate a sane '/dev'. help pls Reply with quote

anonymous1234 wrote:
and I got:
mount: /mnt/mychroot/dev: mount point does not exist.
Does it exist?
What does this command output?
Code:
stat /mnt/mychroot/dev

_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
anonymous1234
n00b
n00b


Joined: 16 Sep 2024
Posts: 15

PostPosted: Sun Nov 17, 2024 11:56 am    Post subject: Thanks for getting back to me, it is much appreciated! Reply with quote

I ran stat /mnt/mychroot/dev in livecd ~ mode and got the following :(
livecd ~ # stat /mnt/mychroot/dev
stat: cannot statx '/mnt/mychroot/dev': No such file or directory

just in case, i tried it in chroot livecd and no luck :(
(chroot) livecd / # stat /mnt/mychroot/dev
stat: cannot statx '/mnt/mychroot/dev': No such file or directory
Thanks for getting back to me, it is much appreciated!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3707
Location: Rasi, Finland

PostPosted: Sun Nov 17, 2024 12:08 pm    Post subject: Reply with quote

You need to mount your filesystems outside the chroot. Including /dev.

Make sure you're out of chroot, then run the following:
Code:
mount; echo ====; ls -l /mnt/
... so we can get the picture of in what state your installation is at.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
anonymous1234
n00b
n00b


Joined: 16 Sep 2024
Posts: 15

PostPosted: Sun Nov 17, 2024 12:45 pm    Post subject: Reply with quote

I mounted all my fs like /dev/vda1 to 3 outside chroot by just following the guide, i just ran what you told me to and got this (i did this oustide chroot as instructed :) )

livecd ~ # mount; echo ====; ls -l /mnt/

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,size=10240k,nr_inodes=1522121,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,inode64)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)
/dev/sr0 on /run/initramfs/live type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
/dev/loop0 on /run/rootfsbase type squashfs (ro,relatime,errors=continue)
LiveOS_rootfs on / type overlay (rw,relatime,lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork,uuid=on)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/vda3 on /mnt/gentoo type jfs (rw,relatime)
/dev/vda1 on /mnt/gentoo/boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
====
total 8
drwxr-xr-x 16 root root 4096 Nov 10 22:09 gentoo

I then ran
(chroot) livecd / # emerge-webrsync
* PGP verification method: gemato
* Fetching most recent snapshot ...
* Latest snapshot date: 20241116
*
* Approximate snapshot timestamp: 1731804300
* Current local timestamp: 1731804000
*
* The current local timestamp is possibly identical to the
* timestamp of the latest snapshot. In order to force sync, use
* the --revert option or remove the timestamp file located at
* '/var/db/repos/gentoo/metadata/timestamp.x'.

And so i followed what it said and ran

(chroot) livecd / # emerge-webrsync --revert=20241115
* PGP verification method: gemato
Emaint: purgerepos revis... [<=> ]
* Trying to retrieve 20241115 snapshot from http://distfiles.gentoo.org ...
* Fetching file gentoo-20241115.tar.xz.md5sum ...
--2024-11-17 12:43:58-- http://distfiles.gentoo.org/snapshots/gentoo-20241115.tar.xz.md5sum
Resolving distfiles.gentoo.org... 89.187.167.39, 84.17.50.8, 2a02:6ea0:ca00::8, ...
Connecting to distfiles.gentoo.org|89.187.167.39|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 57 [application/x-xz]
Saving to: ‘/var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz.md5sum’

/var/tmp/portage/webrsync-6b 100%[==============================================>] 57 --.-KB/s in 0s

2024-11-17 12:43:58 (3.25 MB/s) - ‘/var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz.md5sum’ saved [57/57]

* Fetching file gentoo-20241115.tar.xz.gpgsig ...
--2024-11-17 12:43:58-- http://distfiles.gentoo.org/snapshots/gentoo-20241115.tar.xz.gpgsig
Resolving distfiles.gentoo.org... 89.187.167.38, 84.17.50.8, 2a02:6ea0:ca00::7, ...
Connecting to distfiles.gentoo.org|89.187.167.38|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 963 [application/x-xz]
Saving to: ‘/var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz.gpgsig’

/var/tmp/portage/webrsync-6b 100%[==============================================>] 963 --.-KB/s in 0s

2024-11-17 12:43:59 (44.9 MB/s) - ‘/var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz.gpgsig’ saved [963/963]

* Fetching file gentoo-20241115.tar.xz ...
--2024-11-17 12:43:59-- http://distfiles.gentoo.org/snapshots/gentoo-20241115.tar.xz
Resolving distfiles.gentoo.org... 89.187.167.38, 84.17.50.8, 2a02:6ea0:ca00::7, ...
Connecting to distfiles.gentoo.org|89.187.167.38|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 47295432 (45M) [application/x-xz]
Saving to: ‘/var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz’

/var/tmp/portage/webrsync-6b 100%[==============================================>] 45.10M 23.9MB/s in 1.9s

2024-11-17 12:44:01 (23.9 MB/s) - ‘/var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz’ saved [47295432/47295432]

* Checking digest ...
* Checking signature ...
[ INFO] Refreshing keys...
[ INFO] Keys refreshed.
[ INFO] File /var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz verified successfully against the signature in /var/tmp/portage/webrsync-6bhmsc/gentoo-20241115.tar.xz.gpgsig:
[ INFO] - status: OpenPGPSignatureStatus.GOOD
[ INFO] - valid: True, trusted: True
[ INFO] - primary key: DCD05B71EAB94199527F44ACDB6B8C1F96D8BF6D
[ INFO] - subkey: E1D6ABB63BFCFB4BA02FDF1CEC590EEAC9189250
[ INFO] - timestamp: 2024-11-16 00:56:48 UTC
* Getting snapshot timestamp ...
* Syncing local repository ...

Number of files: 152,392 (reg: 125,176, dir: 27,216)
Number of created files: 233 (reg: 231, dir: 2)
Number of deleted files: 157 (reg: 150, dir: 7)
Number of regular files transferred: 761
Total file size: 227.68M bytes
Total transferred file size: 7.88M bytes
Literal data: 7.88M bytes
Matched data: 0 bytes
File list size: 458.73K
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 9.33M
Total bytes received: 50.55K

sent 9.33M bytes received 50.55K bytes 3.75M bytes/sec
total size is 227.68M speedup is 24.27
* Cleaning up ...
Failed to validate a sane '/dev'.
bash process substitution doesn't work; this may be an indication of a broken '/dev/fd'.
Back to top
View user's profile Send private message
anonymous1234
n00b
n00b


Joined: 16 Sep 2024
Posts: 15

PostPosted: Sun Nov 17, 2024 12:48 pm    Post subject: Reply with quote

Is there a reason for this occuring because I have installed gentoo like atleast 7 times now and following the book, never had such an issue, I also went on youtube to a channel called kernotex to see what happened when he installed gentoo, we took the same steps and he didnt get these errors?? Is this an issue with my VM this time?
thanks!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3707
Location: Rasi, Finland

PostPosted: Sun Nov 17, 2024 2:27 pm    Post subject: Reply with quote

  • You don't have /mnt/mychroot, but instead you have /mnt/gentoo
    • That's why your mount command failed
  • You only have mounted your "real" filesystems under /mnt/gentoo
    • You're missing all the special filesystems from the chroot


The Gentoo Wiki states the following:
Mounting the necessary filesystems wrote:
    Tip
    If using Gentoo's install media, this step can be replaced with simply: arch-chroot /mnt/gentoo.


In a few moments, the Linux root will be changed towards the new location.

The filesystems that need to be made available are:

/proc/ is a pseudo-filesystem. It looks like regular files, but is generated on-the-fly by the Linux kernel
/sys/ is a pseudo-filesystem, like /proc/ which it was once meant to replace, and is more structured than /proc/
/dev/ is a regular file system which contains all device. It is partially managed by the Linux device manager (usually udev)
/run/ is a temporary file system used for files generated at runtime, such as PID files or locks

The /proc/ location will be mounted on /mnt/gentoo/proc/ whereas the others are bind-mounted. The latter means that, for instance, /mnt/gentoo/sys/ will actually be /sys/ (it is just a second entry point to the same filesystem) whereas /mnt/gentoo/proc/ is a new mount (instance so to speak) of the filesystem.
Code:
root #mount --types 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
root #mount --bind /run /mnt/gentoo/run
root #mount --make-slave /mnt/gentoo/run
... so mount those filesystems outside of chroot, then chroot back into your gentoo installation.
Wiki assumes your gentoo system is located in the usual location of /mnt/gentoo, so adjust the mount commands accordingly if your environment differs from that, then chroot in to it.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
anonymous1234
n00b
n00b


Joined: 16 Sep 2024
Posts: 15

PostPosted: Sun Nov 17, 2024 3:26 pm    Post subject: Reply with quote

Thanks a TONNE!!! that totally worked, I wonder if this is because this is the first time i am installing gentoo from the minimal iso isntead of the LiveGUI like a I usually do. In the LiveGUI i always skip this mounting step, but it seems in the minimal, i cant. Again, thanks a lot!!
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