Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

sys-fs/static-dev fails to emerge

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
Adachi
n00b
n00b
User avatar
Posts: 4
Joined: Tue May 28, 2024 4:23 am

sys-fs/static-dev fails to emerge

  • Quote

Post by Adachi » Wed May 29, 2024 7:43 am

I have been following this guide: https://wiki.gentoo.org/wiki/Old_Fashio ... oo_Install alongside the amd64 handbook on gentoo's official livegui on QEMU/KVM , but it fails when I try to emerge sys-fs/static-dev after unmerging sys-apps/systemd-utils:

Code: Select all

(speedrun) livecd / # emerge --ask sys-fs/static-dev

 * IMPORTANT: 16 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.98 s (backtrack: 0/20).

[ebuild  N     ] acct-group/uucp-0-r3 
[ebuild  N     ] sys-apps/makedev-3.23.1-r3  USE="-build (-selinux)" 
[ebuild  N     ] sys-fs/static-dev-0.1-r3 

Would you like to merge these packages? [Yes/No] Yes

>>> Verifying ebuild manifests

>>> Running pre-merge checks for acct-group/uucp-0-r3

>>> Running pre-merge checks for sys-fs/static-dev-0.1-r3
 * We have detected that you currently use udev or devfs or devtmpfs
 * and this ebuild cannot install to the same mount-point.
 * ERROR: sys-fs/static-dev-0.1-r3::gentoo failed (pretend phase):
 *   Cannot install on udev/devfs tmpfs.
 * 
 * Call stack:
 *                  ebuild.sh, line 136:  Called pkg_pretend
 *   static-dev-0.1-r3.ebuild, line  35:  Called bailout
 *   static-dev-0.1-r3.ebuild, line  19:  Called die
 * The specific snippet of code:
 *              die "Cannot install on udev/devfs tmpfs."
 * 
 * If you need support, post the output of `emerge --info '=sys-fs/static-dev-0.1-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-fs/static-dev-0.1-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-fs/static-dev-0.1-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/static-dev-0.1-r3/temp/die.env'.
 * Working directory: '/var/tmp/portage/sys-fs/static-dev-0.1-r3/empty'
 * S: '/var/tmp/portage/sys-fs/static-dev-0.1-r3/work/static-dev-0.1'

>>> Failed to emerge sys-fs/static-dev-0.1-r3, Log file:

>>>  '/var/tmp/portage/sys-fs/static-dev-0.1-r3/temp/build.log'

 * Messages for package sys-fs/static-dev-0.1-r3:

 * We have detected that you currently use udev or devfs or devtmpfs
 * and this ebuild cannot install to the same mount-point.
 * ERROR: sys-fs/static-dev-0.1-r3::gentoo failed (pretend phase):
 *   Cannot install on udev/devfs tmpfs.
 * 
 * Call stack:
 *                  ebuild.sh, line 136:  Called pkg_pretend
 *   static-dev-0.1-r3.ebuild, line  35:  Called bailout
 *   static-dev-0.1-r3.ebuild, line  19:  Called die
 * The specific snippet of code:
 *              die "Cannot install on udev/devfs tmpfs."
 * 
 * If you need support, post the output of `emerge --info '=sys-fs/static-dev-0.1-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-fs/static-dev-0.1-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-fs/static-dev-0.1-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/static-dev-0.1-r3/temp/die.env'.
 * Working directory: '/var/tmp/portage/sys-fs/static-dev-0.1-r3/empty'
 * S: '/var/tmp/portage/sys-fs/static-dev-0.1-r3/work/static-dev-0.1'
when I unmounted /proc it also didn't fix the problem so I had to mount it again. also tried searching gentoo's forums and wiki but no luck

I think it would be cool to install old fashioned gentoo on a vm even if it's just for checking out on what I missed out since I installed gentoo very recently
Top
wless123
n00b
n00b
Posts: 40
Joined: Fri Aug 27, 2021 7:28 pm

  • Quote

Post by wless123 » Wed May 29, 2024 10:22 am

Haven't read it, but there is a newer version (cudos to Neddy):

https://wiki.gentoo.org/wiki/User:Neddy ... 21_Edition
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Wed May 29, 2024 2:57 pm

Welcome to the forums.

The error message says you are using a devtmpfs or similar. It makes no mention of /proc, so I would not expect unmounting that to help. What happens if you unmount the dynamic dev, like the error message wants you to do? If you are worried, you could do that unmount in a mount namespace so that only Portage sees the unmount initially. This would let other programs continue to see your dynamic dev until you have the static one ready.
Top
Adachi
n00b
n00b
User avatar
Posts: 4
Joined: Tue May 28, 2024 4:23 am

  • Quote

Post by Adachi » Thu May 30, 2024 10:05 am

Hu wrote: Welcome to the forums.
thanks! still getting used to how forums work
Hu wrote: What happens if you unmount the dynamic dev, like the error message wants you to do? If you are worried, you could do that unmount in a mount namespace so that only Portage sees the unmount initially.
I tried doing it but:

Code: Select all

(speedrun) livecd / # unshare --mount
livecd / # umount -l devtmpfs
livecd / # emerge --ask sys-fs/static-dev
Failed to validate a sane '/dev'.
bash process substitution doesn't work; this may be an indication of a broken '/dev/fd'.
wless123 wrote: Haven't read it, but there is a newer version (cudos to Neddy):

https://wiki.gentoo.org/wiki/User:Neddy ... 21_Edition
thanks, I read the guide and it says to rm -rf /mnt/gentoo/dev and replace it with the system's own /dev with cp -a /dev/* /mnt/gentoo/dev inside the stage3 tarball or inside the /mnt/gentoo before entering chroot, I think if doing this + not mounting /dev as a tmpfs/devtmpfs(or not mounting /dev at all) would fix the problem I think?

the guide said to:
Follow the handbook for /proc and /sys. /dev is quite different to the handbook. Its going to be static.
I'm not sure if I'm supposed to only mount /proc and /sys but I'll mount /run too


wait I did it! I emerged sys-fs/static-dev

so let me explain what I did:

I unmounted everything while not inside the chroot:

Code: Select all

(speedrun) livecd / # exit
livecd /mnt # umount -l /mnt/gentoo/dev{/shm,/pts,}
livecd /mnt # umount -R /mnt/gentoo
then I mounted only the partitions first:

Code: Select all

livecd /mnt # lsblk
livecd /mnt # mount /dev/vda2 /mnt/gentoo
livecd /mnt # mount /dev/vda1 /mnt/gentoo/boot
then I copied my gentoo livegui's /dev into /mnt/gentoo/dev without replacing the existing console device nor the null device:

Code: Select all

cp -ra /dev/* /mnt/gentoo/dev/
then I mounted all virtual filesystems except /dev:

Code: Select all

livecd /mnt # mount --types proc /proc /mnt/gentoo/proc
livecd /mnt # mount --rbind /sys /mnt/gentoo/sys
livecd /mnt # mount --make-rslave /mnt/gentoo/sys
livecd /mnt # mount --bind /run /mnt/gentoo/run
livecd /mnt # mount --make-slave /mnt/gentoo/run 
now inside the chroot:

Code: Select all

livecd / # source /etc/profile
livecd / # export PS1="(speedrun) ${PS1}"
(speedrun) livecd / # emerge --ask --unmerge sys-apps/systemd-utils
(speedrun) livecd / # emerge --ask sys-fs/static-dev
portage displays this warning before installing:

Code: Select all

openpty failed: 'out of pty devices'
but portage works so I think it's ok to ignore this

btw thanks for recommending the newer version of the old fashioned gentoo guide, without it I wouldn't have solved this :mrgreen:
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56075
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu May 30, 2024 3:51 pm

Adachi,

sys-fs/static-dev is mostly not useful now. It's full of floppy and IDE /dev nodes.
NVMe and /dev/sda are mostly missing too, so you need to make friends with mknod.

That's why my 2021 guide says to

Code: Select all

cp -a /dev /mnt/gentoo
as it gives you all your devtmpfs entries from the boot media as a starting point for your static /dev
That will be on top of whatever the stage3 provides, if anything. It also provides correct permissions.

Code: Select all

openpty failed: 'out of pty devices'
means that devpts is not mounted.

You need

Code: Select all

devpts                                          /dev/pts                devpts  rw,nosuid,noexec,relatime,gid=5,mode=620        0 0
in fstab.
glibc is very fussy about the group and mode. It won't build if its not correct.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Adachi
n00b
n00b
User avatar
Posts: 4
Joined: Tue May 28, 2024 4:23 am

  • Quote

Post by Adachi » Tue Jun 04, 2024 3:09 pm

Code: Select all

 openpty failed: 'out of pty devices' 
means that devpts is not mounted.

You need

Code: Select all

devpts                                          /dev/pts                devpts  rw,nosuid,noexec,relatime,gid=5,mode=620        0 0	
in fstab.
nice, I added it to /etc/fstab, then I mounted devpts for the chroot

Code: Select all

 mount --types devpts /dev/pts /mnt/gentoo/dev/pts 
then I activated this kernel option just in case

Code: Select all

Device Drivers --->
  Generic Driver Options --->
    [*]   Use nosuid,noexec mount options on devtmpfs


I actually managed to boot gentoo without udev, I had to deviate from the old fashioned gentoo guide and not mask any packages(or else the kernel wouldn't install because of lack of sys-apps/systemd-utils[udev]), but udev can still not be used with:

Code: Select all

(chroot) livecd / # rc-update delete udev sysinit
(chroot) livecd / # rc-update delete udev-trigger sysinit
so I guess technically that counts as a static /dev gentoo :wink:, definitely not old fashioned but 100% static
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56075
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jun 04, 2024 3:28 pm

Adachi,

Code: Select all

Device Drivers --->
  Generic Driver Options --->
    [*]   Use nosuid,noexec mount options on devtmpfs
You should not have a DEVTMPFS option set in the kernel, so that option won't do anything.
As /dev is on the rootfs, its not possible to set mount options on directories.

sys-apps/systemd-utils[udev] wiil be required with a modern openrc.
I have sys-apps/openrc-0.17 which provides the bits that were split out later.
That won't build with current gcc. It needs some source code updates, which are outside of my skill set.
Horrible hack: It needs -fcommon passed to gcc.

Your use of udev like that is interesting.
Are you sure its not adding /dev entries?

I can share my kernel .config if you want.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Adachi
n00b
n00b
User avatar
Posts: 4
Joined: Tue May 28, 2024 4:23 am

  • Quote

Post by Adachi » Wed Jun 05, 2024 11:11 am

As /dev is on the rootfs, its not possible to set mount options on directories.
ah I didn't know
Are you sure its not adding /dev entries?
yep I think so, udev isn't running afaik since I disabled it with rc-update, I think I'd have to start udev with rc-service udev start for udev to operate

I can share my kernel .config if you want.
thanks but I'm good
Top
Post Reply

8 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy