Skip to content

Instantly share code, notes, and snippets.

@pjf
Created September 24, 2016 14:24
Show Gist options
  • Save pjf/12df96690073a555f776368a16d4113e to your computer and use it in GitHub Desktop.
Save pjf/12df96690073a555f776368a16d4113e to your computer and use it in GitHub Desktop.
Build your own working Ubuntu 4.7.x kernel

Booting with a mainline kernel on Ubuntu with 4.7.5 or above.

Some machines die with "cannot find root" unless CONFIG_UEVENT_HELPER is set. This is the case with Ubuntu kernels 4.6.x and earlier, but not in 4.7.5. I have no idea why.

Here's how I built my own.

  • git clone --branch v4.7.5 --depth 1 git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack
  • Apply all the patches from mainline with -p1 ( http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.5/ )
  • Copy your config from your already installed mainline kernel /boot/whatever to .config
  • Edit to enable CONFIG_UEVENT_HELPER=y, and CONFIG_UEVENT_HELPER_PATH=""
  • fakeroot make-kpkg --initrd --revision=4.7.5.pjf kernel_image kernel_headers -j8
  • *.deb files are created in directory above this one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment