Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I built a custom linux image using buildroot and busybox. To speed up the boot process I'd like to use bootchartd (built-in version of busybox) to profile the process. However bootchartd is not running, therefore no output file (/var/log/bootchart.tgz) is generated.

I appended each of these two lines to the kernel command line. Unfortunately, neither of them is working:

init=/sbin/bootchartd

Second version:

real_init=/sbin/bootchartd

Does anybody know why bootchartd isn't launched?

Note: initramfs as a root filesystem

share|improve this question
    
But it is there, right? I.e. bootchartd in a console returns something? –  sr_ May 30 '12 at 12:39
    
Yes, it does what it is supposed to do (showing the usage). As soon as it's started with PID=1, it should start logging. –  SecStone May 31 '12 at 17:31
    
Can you verify that the initramfs stuff gets passed the parameter properly? (cmp. this) –  sr_ Jun 1 '12 at 9:43
    
The first line of dmesg shows the passed arguments. However, I'm not quite sure if that is enough to proof that the parameters are passed properly. Do you know whether that suffices? –  SecStone Jun 1 '12 at 21:12
    
Probably not as it would work otherwise, wouldn't it? Can you include more information, e.g. what distribution you use (if any, otherwise describing your setup, how you create your initramfs...) –  sr_ Jun 2 '12 at 9:09
add comment

1 Answer

According to the Linux kernel source (namely, the file init/main.c), the ramdisk execute command is executed before init= and real_init=. This command is default to /init and can be configured via the rdinit= kernel command line parameter

But to collect logs properly bootchartd need to be started without any parameters, so it looks like patching of init/main.c is needed anyway, as its default parameter is start.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.