From: geep on
On Fri, 25 Jul 2008 18:05:39 +0200, Kees Theunissen wrote:

> geep wrote:
>> I tried 4 combinations of huge and generic+initrd kernel with and
>> without bootchart using Lilo with Slack 12.1 running in Virtualbox.
>> Again I find that bootchart only gives results with the huge kernel,
>> and not with the generic+initrd.
>> Comparing dmesg's doesn't show anything relevant, apart from confirming
>> the kernel options.
>> But /var/log/syslog contains this helpful entry: Jul 24 21:43:07
>> vboxslack12_1 kernel: Failed to execute /sbin/ bootchartd. Attempting
>> defaults...
>
> Did you include this bootchartd stuff in your initrd image? *That* is
> the the filesystem that is mounted as / during boot and where
> /sbin/bootchartd will be looked for.
>
>
> Regards,
>
> Kees.

Hi Kees and group,

I have now figured out how to get bootchart running on Slackware
12.0/12.1 with the generic kernel and an initrd.

0/ Install bootchart according to bootchart's instructions.
This installs: /sbin/bootchartd /etc/bootchartd.conf

1/ Run mkinitrd a first time with suitable options.
I use Reiserfs and so for Slack 12.1 I used the README.initrd recommended:
cd /boot
mkinitrd -c -k 2.6.24.5-smp -m reiserfs

2/ Edit the newly created /boot/initrd-tree/init
Change all instances of /sbin/init to /sbin/bootchartd

(Slack 12.0: 3 instances, Slack 12.1: 4 instances)

3/ cd /boot
mv initrd.gz initrd.original.gz

Rerun mkinitrd without no options. A new initrd.gz is created.
mv initrd.gz initrd.bootchart.gz

4/ Edit lilo.conf or grub's menu.lst. Example below shows menu.lst.

The bootchart documentation is NOT correct if you follow the above
procedure. This menu.lst is from http://www.bootchart.org/docs.html:
THIS DOESN'T WORK ON SLACKWARE 12.0 or 12.1
/boot/grub/menu.lst
[...]
title Fedora Core (2.6.10) - bootchart
root (hd0,1)
kernel /vmlinuz-2.6.10 ro root=/dev/hda1 init=/sbin/bootchartd
initrd /initrd-2.6.10.img

For Slackware use entries like this:
THIS WORKS ON SLACKWARE 12.0 and 12.1
# (4) sda9 (hd0,8)
title Slackware 12.1--2.6.24.5-smp Generic /dev/sda9 Bootchart in initrd
root (hd0,8)
kernel /boot/vmlinuz-generic-smp-2.6.24.5-smp root=/dev/sda9 ro vga=791
initrd /boot/initrd.bootchart.gz

(You don't need the init=/sbin/bootchartd kernel option, as this option
has effectively been added within the script /sbin/init inside the initrd)

If you use the huge kernel without an initrd then you still need the
kernel option:
# (2) sda9 (hd0,8)
title Slackware 12.1--2.6.24.5-smp Huge /dev/sda9 Bootchart
root (hd0,8)
kernel /boot/vmlinuz root=/dev/sda9 ro vga=791 init=/sbin/bootchartd

5/ I have tested this on a real PC and Slack guesting on VirtualBox and
VMWarePlayer. The only problem I have noticed is with VMWarePlayer, the
bootchartd daemon is shown running twice. Haven't figured that out yet.

Slack is shown to boot faster on the Virtual Machines than on the real PC.
About 30 secs vs 50 secs. Haven't figured out if this is correct yet.
init starts after 6 secs on Virtual Machines, vs 15 secs on real PC.

Cheers,

Peter