Bug 81469
Summary: | init=/bin/bash and init=/bin/ash don't work | ||
---|---|---|---|
Product: | [Retired] Red Hat Public Beta | Reporter: | Miloslav Trmac <mitr> |
Component: | kernel | Assignee: | Arjan van de Ven <arjanv> |
Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | phoebe | CC: | laroche, mingo, twaugh |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-03-26 00:03:10 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 79578 |
Description
Miloslav Trmac
2003-01-09 19:39:40 UTC
Yeah, I've seen this with up to 2.4.20-2.9 (have *not* tested 2.10 yet.) Still happens with 2.4.20-2.18, FWIW. 2.4.18-19.8.0 works ok on top of Phoebe. init=/usr/bin/gdb fails init=/bin/ash.static fails They seem to be exiting prematurely. Of note when running init=specially-hacked-strace-that-just-runs-bash: open of /dev/tty fails with ENXIO ioctl()s on stdin fail with ENOTTY Later, *read* of fd 0 fails with EISDIR (?????) Followup to last comments: If you look at init: [root@nostromo 1]# ls -l fd/ total 0 lrwx------ 1 root root 64 Feb 12 15:22 10 -> /dev/initctl lr-x------ 1 root root 64 Feb 12 15:22 3 -> / lr-x------ 1 root root 64 Feb 12 15:22 4 -> / 3 & 4 are the initrd root. 7.2, 7.3, and 8.0 kernels don't have these fds. These fds certainly sound related to the ENOTTY, EISDIR errors above. The following patch fixes this for me and looks like the right patch. greetings, Florian La Roche --- linux-2.4.20/init/do_mounts.c.lr Wed Feb 12 22:54:02 2003 +++ linux-2.4.20/init/do_mounts.c Wed Feb 12 22:55:57 2003 @@ -837,6 +837,9 @@ sys_chroot("."); sys_umount("/old/dev", 0); + close (root_fd); + close (old_fd); + if (real_root_dev == ram0) { sys_chdir("/old"); return; Fix verified in most recent kernel. Resolving as fixed in rawhide. |