Bug 327037

Summary: kiwi: boot parameters entered in GUI are not passed to init
Product: [openSUSE] openSUSE.org Reporter: Jan-Christoph Bornschlegel <jcborn>
Component: System ImagingAssignee: Marcus Schaefer <ms>
Status: RESOLVED FIXED QA Contact: Adrian Schröter <adrian.schroeter>
Severity: Normal    
Priority: P5 - None CC: coolo, snakedriver, sndirsch, snwint
Version: unspecified   
Target Milestone: ---   
Hardware: i386   
OS: All   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jan-Christoph Bornschlegel 2007-09-21 08:11:18 UTC
If you want to use boot options on a KIWI USB (or LiveCD) Image they get lost.
Background is that KIWI's own initrd provides an init script which finally calls the system's init but doesn't pass parameters to it.

This became visible when trying to boot to runlevel 3 using "3" as an option.
Comment 1 Marcus Schaefer 2007-09-21 08:18:40 UTC
Steffen could you help me with the following questions:

1) all parameters entered at the boot screen can be seen in
   /proc/cmdline correct ?

2) what of these parameters beside the runlevel number could
   be passed to init or make sense to be passed ?

3) the "old" style system boot which we do not use for some time
   but still support I think does the following:

   /mnt/sbin/pivot_root . mnt
   exec umount -n -l /mnt

   init is called automatically and I don't know how to pass
   options in that case ?

Thanks
Comment 2 Marcus Schaefer 2007-09-21 08:56:53 UTC
*** Bug 327044 has been marked as a duplicate of this bug. ***
Comment 3 Steffen Winterfeldt 2007-09-21 09:43:45 UTC
1) yes

2) Strictly speaking you don't have to worry about this. The kernel
parses the commandline and puts everything it does not care about and
looks like 'foo=bar' into the environment and things like 'bar' into
argv for init. So, basically you'd have to pass argv along.

3) I believe you're using the 'mount --move' method. But anyway, at some point
there is an exec("init") and there the arguments could be passed.
Comment 4 Marcus Schaefer 2007-09-21 12:20:22 UTC
ok, I understand. If I type for example 

   lala bla 3

the contents of $@ is

   lala;bla;3

I think I shouldn't pass this without splitting to init or is this wrong ?

Thanks
Comment 5 Steffen Winterfeldt 2007-09-21 12:42:38 UTC
Do ';' signify spaces?
Comment 6 Steffen Winterfeldt 2007-09-21 12:44:00 UTC
What I wanted to say in comment 3 is that the kernel passes args to init
and they should just be passed on the to 'real' init later.
Comment 9 Marcus Schaefer 2007-09-21 13:27:22 UTC
fixed, parameters added to init call