Bootchart on Ubuntu (slow boot)

Does anybody know how to get bootchart working under Ubuntu? I’m running 12.04 precise off an SD card. I have the bootchart deb installed, but nothing shows up in /var/log/bootchart after reboot. It sounds like I may need to add something to my u-boot commandline, but I’m not sure what or how. Some docs for bootchart refer to /sbin/bootchartd, but I think that’s outdated and there’s no such thing installed. The Ubuntu package has some stuff for updating the initrd that looks like it might be supposed to take care of things automatically, but it doesn’t.

The reason I ask is that it takes about two minutes for a login prompt to show up over my ftdi serial line. The console logging from the kernel stops after about ten seconds, then nothing for a long time, then finally the prompt comes up.

Thanks,
Dan

Does anybody know how to get bootchart working under Ubuntu? I'm running
12.04 precise off an SD card. I have the bootchart deb installed, but
nothing shows up in /var/log/bootchart after reboot. It sounds like I may
need to add something to my u-boot commandline, but I'm not sure what or
how. Some docs for bootchart refer to /sbin/bootchartd, but I think that's
outdated and there's no such thing installed. The Ubuntu package has some
stuff for updating the initrd that looks like it might be supposed to take
care of things automatically, but it doesn't.

did update your boot arguments in uEnv.txt to include:

optargs=initcall_debug printk.time=y quiet init=/sbin/bootchartd

The reason I ask is that it takes about two minutes for a login prompt to
show up over my ftdi serial line. The console logging from the kernel stops
after about ten seconds, then nothing for a long time, then finally the
prompt comes up.

"2 minutes" do you have the ethernet port connected to anything? If
not, nuke the eth0 line in /etc/network/interfaces ... (the delay is
a 'fix' for another bug..)

Regards,

Alternately, edit the file /etc/init/failsafe.conf and place a comment symbol(#) in front of each of the “sleep” lines.
http://tech.pedersen-live.com/2012/05/disable-waiting-for-network-configuration-messages-on-ubuntu-boot/

I do this on all my systems at home[running Linux Mint]…when I forget to my kids are sure to remind me the next time they boot one up and it takes too long to start.

did update your boot arguments in uEnv.txt to include:

optargs=initcall_debug printk.time=y quiet init=/sbin/bootchartd

As I said, there’s no bootchartd on my system. There is something called “/lib/bootchart/collector”. Is bootchartd supposed to be in my initrd or something?

“2 minutes” do you have the ethernet port connected to anything? If
not, nuke the eth0 line in /etc/network/interfaces … (the delay is
a ‘fix’ for another bug…)

I have tried with eth0 set to allow-hotplug and also entirely commented out, but I still have the two-minute delay. I don’t see any “Waiting for network configuration…” messages coming from failsafe either.

did update your boot arguments in uEnv.txt to include:

optargs=initcall_debug printk.time=y quiet init=/sbin/bootchartd

As I said, there's no bootchartd on my system. There is something called
"/lib/bootchart/collector". Is bootchartd supposed to be in my initrd or
something?

haha that's funny... Something in Debian, but not in Ubuntu..

http://packages.ubuntu.com/search?searchon=contents&keywords=bootchartd&mode=&suite=precise&arch=any
http://packages.debian.org/search?searchon=contents&keywords=bootchartd&mode=exactfilename&suite=stable&arch=any

"2 minutes" do you have the ethernet port connected to anything? If
not, nuke the eth0 line in /etc/network/interfaces ... (the delay is
a 'fix' for another bug..)

I have tried with eth0 set to allow-hotplug and also entirely commented
out, but I still have the two-minute delay. I don't see any "Waiting for
network configuration..." messages coming from failsafe either.

It's still ubuntu, that isn't going to help.. Once your up and running
just comment them out..

sudo sed -i -e 's:sleep 20:#sleep 20:g' /etc/init/failsafe.conf
sudo sed -i -e 's:sleep 40:#sleep 40:g' /etc/init/failsafe.conf
sudo sed -i -e 's:sleep 59:#sleep 59:g' /etc/init/failsafe.conf

Regards,

did update your boot arguments in uEnv.txt to include:

optargs=initcall_debug printk.time=y quiet init=/sbin/bootchartd

As I said, there’s no bootchartd on my system. There is something called “/lib/bootchart/collector”. Is bootchartd supposed to be in my initrd or something?

Check to see if /var/log/upstart/bootchart.log exists and what is in it.
Also try running “sudo /etc/init.d/bootchart restart” to make sure bootstart is runnable.

I suspect Robert meant to say to add “init=/sbin/bootlogd” in order to get some of the earlier boot messages into the logfile.

“2 minutes” do you have the ethernet port connected to anything? If
not, nuke the eth0 line in /etc/network/interfaces … (the delay is
a ‘fix’ for another bug…)

I have tried with eth0 set to allow-hotplug and also entirely commented out, but I still have the two-minute delay. I don’t see any “Waiting for network configuration…” messages coming from failsafe either.

If the message is occurring before the serial console has been activated, you won’t see any. Disable those sleep calls and see if your boot becomes faster - it’s extremely quick to check.

Stuff started showing up in /var/log/bootchart after I ran service bootchart restart. I didn’t have to change my uEnv.txt.

Removing the sleep commands from /etc/init/failsafe.conf did indeed speed up the boot. I wish I understood better what the failsafe was meant to fix. I’m trying to create a system that can work over wired or wireless ethernet. Am I in for bootup problems later on when I add eth0 back in?

Thanks to both of you!
Dan

It's meant to "fix" a bug where the user wants the network to be setup
"before" the login screen appears. (thank god it at-least time's
out..)

I disable it by default in all my images...

Regards,

I have no idea, but it is a real pain. I’m using Linux Mint 14 and 15[which are based on Ubuntu] on 2 older desktops, 1 new desktop, and one recent laptop. All of them work perfectly fine on both my wired network and the wireless network without the failsafe function - so I don’t think it will cause any major issues.

Don’t forget to disable bootchart after you have finished using it for troubleshooting! Under certain conditions, it will continue running and logging even after bootup. My recollection is that bootchart will only stop logging when gdm starts running - so if your not running x-windows on bootup, it will run forever[or in my case, if your running a downstream distribution based on ubuntu which uses it’s own logon manager in place of gdm!]. After a few days of running, it filled up /var/log with useless data and caused weird issues. A better “solution” would of course be to modify the control scripts to modify the “finished booting” checks to match your system configuration - but I was too lazy to do that when I could simply disable it and not worry.