Summary: | Remove sys-apps/makedev from profiles/default/linux/packages.build | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Mike Gilbert <floppym> |
Component: | Profiles | Assignee: | Gentoo Release Team <releng> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | base-system, bkohler, flow |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=909661 https://github.com/gentoo/baselayout/pull/5 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Mike Gilbert
![]() As followup from bug 909661. switch_root behavior: util-linux switch_root moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the new root filesystem and starts init process. busybox switch_root does *NOT* move the psuedo-filesystems. If the initramfs does not move them, then there is a risk depending on the newroot's /dev contents: As of 2023/07/05, I have verified that the minimal contents are /dev/null & /dev/console. If those are missing, and /dev is not mounted some other way, then sysvinit will NOT start (specifically will appear to hang and not print "INIT: version 3.07 booting" This situation is not hypothetical, a number of older infra systems somehow ended up with the underlying rootfs /dev being empty. This worked fine until the busybox module was enabled in dracut, at which point the system behavior changed and the system failed to boot. Dracut could have explicitly. One concern I have is how to ensure user systems correctly have those two nodes underneath the devtmpfs. Helper script that does a bindmount of the rootfs and checks it is probably the best way. (In reply to Robin Johnson from comment #1) > As of 2023/07/05, I have verified that the minimal contents are /dev/null & > /dev/console. Thanks for verifying that. > This situation is not hypothetical, a number of older infra systems somehow > ended up with the underlying rootfs /dev being empty. This worked fine until > the busybox module was enabled in dracut, at which point the system behavior > changed and the system failed to boot. Dracut could have explicitly. While I understand this bit you in the ass, I'm not too worried about it affecting users en masse. I think it is fairly atypical for users to make fundamental changes to their boot process (like messing with dracut modules) after initial installation. > One concern I have is how to ensure user systems correctly have those two > nodes underneath the devtmpfs. Helper script that does a bindmount of the > rootfs and checks it is probably the best way. I don't like the idea of messing with mounts in an ebuild context. I think any script would need to be invoked manually by the user. If you want to spread the word, maybe write a news item? This change (along with the baselayout change) looks good to me. FYI if /dev is empty on your rootfs, then someone probably made a mistake during a rootfs migration or backup/restore. This is a specific misconfiguration, even if it's somewhat common in the wild. A properly installed gentoo will have a populated /dev on rootfs. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=5c926abe03ba6e17ba58faa71a512b3f6db90b19 commit 5c926abe03ba6e17ba58faa71a512b3f6db90b19 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-07-06 17:25:46 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-07-09 01:16:36 +0000 Makefile: create /dev/console and /dev/null in the layout target Bug: https://bugs.gentoo.org/909664 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Makefile | 4 ++++ 1 file changed, 4 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d148943deee0e9d74622cff112e680069b324dc6 commit d148943deee0e9d74622cff112e680069b324dc6 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-07-09 01:29:52 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-07-09 01:29:52 +0000 sys-apps/baselayout: add 2.14 Bug: https://bugs.gentoo.org/909664 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/baselayout/Manifest | 1 + sys-apps/baselayout/baselayout-2.14.ebuild | 367 +++++++++++++++++++++++++++++ 2 files changed, 368 insertions(+) It looks like baselayout-2.14 is now stable, so I think we can proceed with removing sys-apps/makedev from packages.build. Any objections? The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afb52ace885d8e24bfd1408f61c895be908547b3 commit afb52ace885d8e24bfd1408f61c895be908547b3 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-10-31 20:01:10 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-10-31 20:01:10 +0000 profiles/default/linux: drop sys-apps/makedev from packages.build Closes: https://bugs.gentoo.org/909664 Signed-off-by: Mike Gilbert <floppym@gentoo.org> profiles/default/linux/packages.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) |