| Summary: | poky-tiny is failing to login to serial console | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Jon Mason <jon.mason> | ||||
| Component: | oe-core other | Assignee: | Ross Burton <ross.burton> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium+ | CC: | alex.kiernan, randy.macleod | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 4.3 M4 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | Don't know | |||||
| Attachments: |
|
||||||
|
Description
Jon Mason
2023-07-24 14:53:09 UTC
Created attachment 4962 [details]
Boot log
I'm no closer to understanding what the underlying failure is, but the cause appears to be any package which does a groupadd causes login to fail with: qemuarm64 login: root setgid: Function not implemented process '/sbin/getty 115200 ttyAMA0' (pid 65) exited. Scheduling for restart. Reverting this commit and adding cronie to the image, causes the exact same error. I could've been clearer - cronie has a groupadd in its build. I tried it on qemux86 and it occurs there as well Still trying to prove it, but I suspect this is because tiny uses allnoconfig, so CONFIG_MULTIUSER is unset and setgid() returns ENOSYS. Bringing in changes via useradd.bbclass adds a dependency on shadow, which causes login to change from: build/tmp/work/qemuarm64-poky-linux-musl/core-image-minimal/1.0-r0/rootfs/bin/login -> /bin/busybox.suid to: build/tmp/work/qemuarm64-poky-linux-musl/core-image-minimal/1.0-r0/rootfs/bin/login -> /bin/login.shadow busybox login has these heuristics: https://git.busybox.net/busybox/commit/?id=a818777d4249e934ef7c9e6e7df8475d6692f315 so its login works with CONFIG_MULTIUSER unset, which the one from shadow doesn't. Not at all sure what the right fix here is... Using a VIRTUAL-RUNTIME for useradd doesn't seem feasible here as busybox doesn't have useradd/groupadd applets. Adding the sgx user into base-passwd seems like the most sensible fix, but that still leaves the beartrap in useradd.bbclass for anyone using poky-tiny. ross is this fixed your current patchset? No, but should be fixed with d443fad3687c4dd2d7b4107079e0d297d03e94d6. Closing, this should be fixed now. |