Installing DTB (the Disk Trace Buffer)

  • Kernel Modifications

    • For Redhat 6.2:

      1. Download Kernel 2.4.0-test9 from kernel.org (other versions will not work with this patch).
      2. Remove the linux symbolic link from /usr/src with the command 'rm /usr/src/linux'.
      3. Move to the /usr/src directory ('cd /usr/src').
      4. Unpack kernel 2.4.0-test9. For example, 'tar xvzf /tmp/linux-2.4.0-test9.tar.gz'.
      5. Rename linux to linux-2.4.0-test9-dtb ('mv linux linux-2.4.0-test9-dtb').
      6. Make a symbolic link name 'linux' to the new kernel ('ln -s linux-2.4.0-test9-dtb linux').
      7. Download the disk tracing patch to the /usr/src/ directory.
      8. Apply the patch with 'patch -p0 < dtb-2.4test9.patch'.
      9. Make a symbolic link from /usr/src/linux/include/linux to /usr/include/linux.
      10. Make a symbolic link from /usr/src/linux/include/asm to /usr/include/asm.
      11. Make the kernel: 'make dep; make bzImage; make modules; make modules_install'. (note: if you need to make customizations with make xconfig, make sure to add a line to .config after you save your configuration which says, CONFIG_DTB=y)
      12. Copy the kernel image to /boot: cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.0-t9dtb. If you have SCSI drives, you may also need to make an initial ramdisk with mkinitrd -- see your documentation for details.
      13. Edit /etc/lilo.conf by adding the following:
        image=/boot/vmlinuz-2.4.0-t9dtb
        	label="DTB Linux"
        	read-only
        	root=/dev/
        
        Change the default, if desired, from default=linux to default="DTB Linux". If you have SCSI devices, you may also need to add an initrd= parameter.
      14. Run lilo: /sbin/lilo
      15. Reboot it.
      16. You may need to run depmod ('depmod -a'), and/or recompile dtb.c. You can recompile dtb by touching dtb.c, then re-issuing make modules and make modules_install.

    • For Redhat 7.0:

      1. Download Kernel 2.4.0-test9 from kernel.org (other versions will not work with this patch).
      2. Install the kernel-headers-2.4.0-0.26 package from your RedHat 7.0 distribution.
      3. Remove the linux symbolic link from /usr/src with the command 'rm /usr/src/linux'.
      4. Move to the /usr/src directory ('cd /usr/src').
      5. Unpack kernel 2.4.0-test9. For example, 'tar xvzf /tmp/linux-2.4.0-test9.tar.gz'.
      6. Rename linux to linux-2.4.0-test9-dtb ('mv linux linux-2.4.0-test9-dtb').
      7. Make a symbolic link name 'linux' to the new kernel ('ln -s linux-2.4.0-test9-dtb linux').
      8. Download the disk tracing patch to the /usr/src/ directory.
      9. Apply the patch with 'patch -p0 < dtb-2.4test9.patch'.
      10. You may wish to change the default compiler as suggested by Redhat, by modifying the Makefile line which says CC = $(CROSS_COMPILE)gcc to CC = $(CROSS_COMPILE)kgcc.
      11. Rename the /usr/include/linux directory to /usr/include/linux-2.4.0-0.26.
      12. Make a symbolic link from /usr/src/linux/include/linux to /usr/include/linux.
      13. Rename the /usr/include/asm directory to /usr/include/asm-2.4.0-0.26.
      14. Make a symbolic link from /usr/src/linux/include/asm to /usr/include/asm.
      15. Make the kernel: 'make dep; make bzImage; make modules; make modules_install'. (note: if you need to make customizations with make xconfig, make sure to add a line to .config after you save your configuration which says, CONFIG_DTB=y)
      16. Copy the kernel image to /boot: cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.0-t9dtb. If you have SCSI drives, you may also need to make an initial ramdisk with mkinitrd -- see your documentation for details.
      17. Edit /etc/lilo.conf by adding the following:
        image=/boot/vmlinuz-2.4.0-t9dtb
        	label="DTB Linux"
        	read-only
        	root=/dev/
        
        Change the default, if desired, from default=linux to default="DTB Linux". If you have SCSI devices, you may also need to add an initrd= parameter.
      18. Run lilo: /sbin/lilo
      19. Reboot it.
      20. You may need to run depmod ('depmod -a'), and/or recompile dtb.c. You can recompile dtb by touching dtb.c, then re-issuing make modules and make modules_install.

  • Loading the DTB module

    1. To load the module: insmod /lib/modules/2.4.0-test9/kernel/drivers/dtb/dtb.o
    2. To unload the module: rmmod dtb

  • Using the DTB module

    1. A collection of DTB programs is available here.
    2. toggleTracing is used to start and stop tracing on a device.
    3. dtbd can be used to continuously read and save a trace to disk. If used, the trace should be saved to a different physical disk than the one being traced, so as not to bias the results.