Bug 104984 - /sbin/init takes no command line parameters
Summary: /sbin/init takes no command line parameters
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Beta 2
Hardware: Other All
: P5 - None : Normal
Target Milestone: ---
Assignee: Hannes Reinecke
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-16 17:00 UTC by Andreas Gruenbacher
Modified: 2005-09-07 11:05 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
mkinitrd (72.59 KB, text/plain)
2005-08-17 06:38 UTC, Hannes Reinecke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Gruenbacher 2005-08-16 17:00:10 UTC
This line in mkinitrd:  
  
  |exec /bin/run-init -c ./dev/console /root $init "$@"   
  
passes the $kernel_cmdline parameters to the init process. IMO this is wrong;   
the init process does not take parameters. This doesn't matter for the "real"   
init, but an option like "init=/bin/sh" causes the shell to try executing a   
script which then fails, for example.
Comment 1 Hannes Reinecke 2005-08-17 06:37:37 UTC
Well, not quite. init does take a parameter (the selected runlevel).

But for others it seems you are correct.
Comment 2 Hannes Reinecke 2005-08-17 06:38:17 UTC
Created attachment 46229 [details]
mkinitrd

Fixed /sbin/mkinitrd
Comment 3 Hannes Reinecke 2005-08-17 06:39:03 UTC
This is the version I've checked in into CVS. Please test with it; if I don't
hear anything by the end of the week I'll submit it to autobuild.
Comment 4 Ruediger Oertel 2005-08-18 16:44:08 UTC
wait a second: will this break the possibility to set 
variable names on the boot-prompt that affect hooks in the boot-process ? 
 
Comment 5 Andreas Gruenbacher 2005-08-18 16:47:29 UTC
No, all parameters are all still available in /proc/cmdline. This was only 
about how the init process itself is invoked. 
Comment 6 Olaf Hering 2005-08-18 18:56:10 UTC
I'm almost sure this breaks init=/bin/bash --login 
Comment 7 Hannes Reinecke 2005-08-19 06:17:06 UTC
Ad comment #4: Yes.
Ad comment #6: Probably.

Andreas, I'm beginning to wonder whether we should revert that change.
Comment 8 Stephan Kulow 2005-08-19 07:17:12 UTC
then indeed everything comes down to the bug in gfxboot to not allow 
parameters anymore - which forces you into the text grub, that doesn't remove 
the showopts we have in our default menu.lst. Because init=/bin/bash showopts 
_is_ a problem. 
Comment 9 Hannes Reinecke 2005-09-07 11:05:55 UTC
So, we fixed mkinitrd to only pass the runlevel to run_init.
Everything else is pointless anyway.

And no, init=/bin/bash --login is not broken.