[Bug 696272] New: init writes /var/run/utmp before fs mount
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c0 Summary: init writes /var/run/utmp before fs mount Classification: openSUSE Product: openSUSE 12.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: werner@novell.com ReportedBy: lnussel@novell.com QAContact: qa@suse.de CC: ro@novell.com Found By: --- Blocker: --- init writes /var/run/utmp before the fs is actually mounted. That must have been broken before if /var was on a separate partition or / read only. Now with tmpfs on /var/run it's visible always. who -b therefore doesn't work (see also bug 302036). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c1 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |lnussel@novell.com --- Comment #1 from Dr. Werner Fink <werner@novell.com> 2011-05-26 12:10:20 UTC --- Why the hell now /var/run is a tmpfs and read write? If /var/run/ is writeable init use it since it exist! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c2 Ludwig Nussel <lnussel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|lnussel@novell.com | --- Comment #2 from Ludwig Nussel <lnussel@novell.com> 2011-05-26 14:28:20 CEST --- I would assume that the problem is not related to tmpfs at all. That feature must haven been broken before. 1 kernel starts initrd 2 initrd mounts root fs 3 initrd mounts /run tmpfs 4 initrd launches init 5 init launches boot 6 boot bind mounts /run to /var/run at 4) init writes the utmp record. so the record would either get lost (if / is ro which it apparently isn't) or be written the to / partition. So either the bug is that init tries to write a record at all at startup (no partitions mounted there in theory) or the fact that / is rw after initrd. Or maybe both are bugs. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c3 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |lnussel@novell.com --- Comment #3 from Dr. Werner Fink <werner@novell.com> 2011-05-27 08:22:35 UTC --- And the bind mount of /run over /var/run does override the already existing /var/run/ which already includes the utmp file written out by init as /var or / was already mounted writable. IMHO the bind mount should happen *before* init will started by initrd. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c4 Ludwig Nussel <lnussel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|lnussel@novell.com | --- Comment #4 from Ludwig Nussel <lnussel@novell.com> 2011-05-27 10:32:17 CEST --- That doesn't work in general either as /var could be a separate partition in which case the mount point /var/run wouldn't exist in the first place. [yes, the current way to mount --bind in /etc/init.d/boot is broken too, need to move that to boot.localfs]. Actually the fix is simple, init just needs to write to /run as that was introduced exactly for that reason. I wonder why I didn't think of that in the first place :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c5 --- Comment #5 from Ruediger Oertel <ro@novell.com> 2011-05-27 08:46:30 UTC --- from c#3: the bind mount should happen *before* init will started by initrd cool for the initrd case, but that will not solve the non-initrd case. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c6 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |mmarek@novell.com InfoProvider| |mmarek@novell.com --- Comment #6 from Dr. Werner Fink <werner@novell.com> 2011-05-31 12:51:34 UTC --- In non initrd case there is no such tmpfs biest /run beside this init does not know about /run, since 1998 this can be found in the manual page: Each time a child terminates, init records the fact and the reason it died in /var/run/utmp and /var/log/wtmp, provided that these files exist. Beside this: How difficult it is to run a bind mount from initrd? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c7 Michal Marek <mmarek@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|mmarek@novell.com | --- Comment #7 from Michal Marek <mmarek@novell.com> 2011-05-31 13:01:20 UTC --- bindmounting /run to /var/run from the initrd is not an option, since the initrd does not (want to) know about the mount layout below /. IMO just patch init to try /run/utmp if it exists. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c8 Ludwig Nussel <lnussel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@novell.com AssignedTo|werner@novell.com |lnussel@novell.com --- Comment #8 from Ludwig Nussel <lnussel@novell.com> 2011-05-31 16:15:15 CEST --- As discussed offline, I'll try to change init to use /run -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=696272 https://bugzilla.novell.com/show_bug.cgi?id=696272#c9 Ludwig Nussel <lnussel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #9 from Ludwig Nussel <lnussel@novell.com> 2011-06-17 13:55:50 CEST --- fixed in sr#72446 already -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com