View previous topic :: View next topic |
Author |
Message |
Adachi n00b
Joined: 28 May 2024 Posts: 4
|
Posted: Wed May 29, 2024 7:43 am Post subject: sys-fs/static-dev fails to emerge |
|
|
I have been following this guide: https://wiki.gentoo.org/wiki/Old_Fashioned_Gentoo_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: | (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 |
|
Back to top |
|
|
wless123 n00b
Joined: 27 Aug 2021 Posts: 40
|
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22657
|
Posted: Wed May 29, 2024 2:57 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
Adachi n00b
Joined: 28 May 2024 Posts: 4
|
Posted: Thu May 30, 2024 10:05 am Post subject: |
|
|
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: | (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'.
|
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:
Quote: | 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: | (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: | 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: | cp -ra /dev/* /mnt/gentoo/dev/
|
then I mounted all virtual filesystems except /dev:
Code: | 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: | 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: | 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 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Thu May 30, 2024 3:51 pm Post subject: |
|
|
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: | 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: | openpty failed: 'out of pty devices' | means that devpts is not mounted.
You need Code: | 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. |
|
Back to top |
|
|
Adachi n00b
Joined: 28 May 2024 Posts: 4
|
Posted: Tue Jun 04, 2024 3:09 pm Post subject: |
|
|
Quote: | Code: | openpty failed: 'out of pty devices' | means that devpts is not mounted.
You need
Code: | 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: | mount --types devpts /dev/pts /mnt/gentoo/dev/pts |
then I activated this kernel option just in case
Code: | 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: | (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 , definitely not old fashioned but 100% static |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Tue Jun 04, 2024 3:28 pm Post subject: |
|
|
Adachi,
Code: | 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. |
|
Back to top |
|
|
Adachi n00b
Joined: 28 May 2024 Posts: 4
|
Posted: Wed Jun 05, 2024 11:11 am Post subject: |
|
|
Quote: | As /dev is on the rootfs, its not possible to set mount options on directories. |
ah I didn't know
Quote: | 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
Quote: | I can share my kernel .config if you want. |
thanks but I'm good |
|
Back to top |
|
|
|
|
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
|
|