Kernel updates

From BCCD 3.0

Jump to: navigation, search

The BCCD now uses kernel-package to build custom kernels. Here's a howto that's based on running this on a BCCD system, based on a Debian admin article and the AUFS README.

  1. If building on a diskless node, remove all grub packages: apt-get remove 'grub*'
  2. Set PATH to include update-initramfs: export PATH=${PATH}:/sbin:/usr/sbin
  3. Fetch base kernel using git: git clone git://
  4. Cd into linux-3.0.git, and checkout linux 3.10: git checkout -b v3.10
  5. Cd one up, then clone in aufs repo: git clone --reference /usr/src/linux-git git:// /usr/src/aufs3-linux.git
  6. cd into aufs3-linux.git, and then checkout the latest aufs: git checkout -b origin/aufs3.10
  7. Install kernel-package and fakeroot: apt-get update && apt-get --force-yes -y install lzma kernel-package git. Make sure you're running at least kernel-package 12.0. Note: The current BCCD deb repository doesn't have this, so you might need to download it manually.
  8. Clone Linux HEAD to the local directory linux-2.6: git clone git://
  9. Copy the current configuration into the source tree: cp /boot/config-$(uname -r) .config
  10. Run make menuconfig.
    1. Set the processor type in Processor type and features->Processor family. Do not use Atom as the processor type as this uses Atom-specific MOVBE instructions as of v3.10. Use early P4 for i386, and Generic x86_64 for x86_64.
    2. Make sure General Setup->Local version is not set.
    3. Make sure the following AUFS options are enabled:
    1. Set devtmpfs options:
    1. Save and exit.
  1. Run make-kpkg --initrd -j$(awk '$1 ~ /^processor$/ {i++} END {print i+1}' /proc/cpuinfo) --append-to-version bccd --revision bccd-revision kernel_{image,headers,manual,doc,source}, where bccd-revision might be 3.4.0
    1. NB: Building pre-v340 might require prefixing this command with sudo fakeroot
  2. Follow the FAQ if you want to add this to the BCCD apt repository.
  3. Make sure to follow the NVidia and/or CUDA instructions.
  4. Update the $KERNREV variable in
  5. NB: If this kernel module is required for a boot device (i.e. SATA or USB controller, or host network adapter), make sure to add both the i386 and amd64 modules to trees/etc/initramfs-tools.diskless/modules. This file controls the addition of modules for both diskless and live CD modes.
  6. NB: If an AMD64 built kernel does not work, make sure IA32 emulation is enabled (CONFIG_IA32_EMULATION=y). This often gets disabled somehow.
  7. NB: If you are adding a module required for the boot process, make sure it gets loaded in trees/KNOPPIX/boot/isolinux/minirt/linuxrc.


Follow for both i386 and amd64:

Personal tools