Skip to content

Instantly share code, notes, and snippets.

@shazow
Created March 4, 2012 20:45
Show Gist options
  • Save shazow/1974716 to your computer and use it in GitHub Desktop.
Save shazow/1974716 to your computer and use it in GitHub Desktop.
Build my latest symlinked kernel and inject it into my bootloader.
#!/bin/sh
mount /boot
cd /usr/src/linux
make clean; make; make modules_install
NEW_KERNEL=$(readlink /usr/src/linux)
echo "Copying kernel: ${NEW_KERNEL}"
cp arch/x86/boot/bzImage /boot/$NEW_KERNEL
cp .config /boot/$NEW_KERNEL.config
rm /boot/latest
ln -s /boot/$NEW_KERNEL /boot/latest
echo "Don't forget to run \`module-rebuild\`"
default 0
timeout 3
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux (Latest)
root (hd0,0)
kernel /boot/latest root=/dev/sda5
title Gentoo Linux (Latest, no-multilib)
root (hd0,0)
kernel /boot/latest root=/dev/sda3
title Gentoo Linux (Stable)
root (hd0,0)
kernel /boot/stable root=/dev/sda3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment