I'm trying to compile linux kernel 3.14 on ubuntu 14.04. Before anyone points out, I know newer stable versions of the kernel are available but I have been asked to install 3.14 itself. So, I wrote a script which unpacks the source tar and starts building the kernel. But it stops mid way without generating any errors. I've tried to fiddle with the code and it still gives the same error every-time.

Snippet of the script:

# Prepare for compilation
make -j1 mrproper
# Set default configuration
make -j1 defconfig
# Compile the kernel image and modules
make -j1
# Install the modules
make -j1 modules_install
# Install the firmware
make -j1 firmware_install

# Install the kernel
cp -v arch/x86_64/boot/bzImage /boot/vm_linuz-3-14-systemd
# Install the map file
cp -v System.map /boot/system-map-3-14-systemd
# Backup kernel configuration file
cp -v .config /boot/config-backup-3-14

Last few lines of the log:

 LD [M]  net/ipv4/netfilter/iptable_nat.ko
 LD [M]  net/ipv4/netfilter/nf_nat_ipv4.ko
 LD [M]  net/netfilter/nf_nat.ko
 LD [M]  net/netfilter/nf_nat_ftp.ko
 LD [M]  net/netfilter/nf_nat_irc.ko
 LD [M]  net/netfilter/nf_nat_sip.ko
 LD [M]  net/netfilter/xt_LOG.ko
 LD [M]  net/netfilter/xt_mark.ko
 LD [M]  net/netfilter/xt_nat.ko
 HOSTCC  arch/x86/boot/tools/build
 CPUSTR  arch/x86/boot/cpustr.h
 CC      arch/x86/boot/cpu.o
 MKPIGGY arch/x86/boot/compressed/piggy.S
 AS      arch/x86/boot/compressed/piggy.o
 LD      arch/x86/boot/compressed/vmlinux
 ZOFFSET arch/x86/boot/zoffset.h
 OBJCOPY arch/x86/boot/vmlinux.bin
 AS      arch/x86/boot/header.o
 LD      arch/x86/boot/setup.elf
 OBJCOPY arch/x86/boot/setup.bin
 BUILD   arch/x86/boot/bzImage
 Setup is 15232 bytes (padded to 15360 bytes).
 System is 5433 kB
 CRC 62b609cb
 Kernel: arch/x86/boot/bzImage is ready  (#1)

 Building modules, stage 2.
   MODPOST 11 modules
   CC      drivers/thermal/x86_pkg_temp_thermal.mod.o
   LD [M]  drivers/thermal/x86_pkg_temp_thermal.ko
   CC      net/ipv4/netfilter/ipt_MASQUERADE.mod.o
   LD [M]  net/ipv4/netfilter/ipt_MASQUERADE.ko
   CC      net/ipv4/netfilter/iptable_nat.mod.o
   LD [M]  net/ipv4/netfilter/iptable_nat.ko
   CC      net/ipv4/netfilter/nf_nat_ipv4.mod.o
   LD [M]  net/ipv4/netfilter/nf_nat_ipv4.ko
   CC      net/netfilter/nf_nat.mod.o
   LD [M]  net/netfilter/nf_nat.ko
   CC      net/netfilter/nf_nat_ftp.mod.o
   LD [M]  net/netfilter/nf_nat_ftp.ko
   CC      net/netfilter/nf_nat_irc.mod.o
   LD [M]  net/netfilter/nf_nat_irc.ko
   CC      net/netfilter/nf_nat_sip.mod.o
   LD [M]  net/netfilter/nf_nat_sip.ko
   CC      net/netfilter/xt_LOG.mod.o
   LD [M]  net/netfilter/xt_LOG.ko
   CC      net/netfilter/xt_mark.mod.o
   LD [M]  net/netfilter/xt_mark.ko
   CC      net/netfilter/xt_nat.mod.o
   LD [M]  net/netfilter/xt_nat.ko
 sh /finalize-system/linux-kernel/linux-3.14/arch/x86/boot/install.sh      3.14.21 arch/x86/boot/bzImage \
    System.map "/boot"
 Cannot find LILO.

It is showing an error Cannot find LILO. But I have installed Grub 2 on my system. Then why is it asking for LILO?

  • why not make install too? Have you left /etc/lilo.conf behind? Commented May 26, 2016 at 10:47
  • I already have Grub 2 on my system. Is there a way that make command skips checking for lilo and instead accepts grub that is already there on the system. Commented May 27, 2016 at 7:36
  • Have you or not the file /etc/lilo.conf present on your system? Commented May 27, 2016 at 7:38

1 Answer 1


After adding the ARCH=x86_64 flag to all the make commands the Linux kernel was successfully compiled.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .