1

So I am following this guide to compile my custom kernel - http://library.linode.com/linode-platform/custom-instances/pv-grub-custom-compiled-kernel#sph_compile-and-install-the-kernel

So far so good, but I hit a little road block with make install.

  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 15328 bytes (padded to 15360 bytes).
System is 5097 kB
CRC c20c9369
Kernel: arch/x86/boot/bzImage is ready  (#2)
[root@li280-195 linux-3.3.3]# make -j3 modules
make[1]: Nothing to be done for `all'.
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CC [M]  drivers/scsi/scsi_wait_scan.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      drivers/scsi/scsi_wait_scan.mod.o
  LD [M]  drivers/scsi/scsi_wait_scan.ko
[root@li280-195 linux-3.3.3]# make
make[1]: Nothing to be done for `all'.
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
Kernel: arch/x86/boot/bzImage is ready  (#2)
  Building modules, stage 2.
  MODPOST 1 modules
[root@li280-195 linux-3.3.3]# make install
sh /root/build/linux-3.3.3/arch/x86/boot/install.sh 3.3.3 arch/x86/boot/bzImage \
    System.map "/boot"
Cannot find LILO.

I understand that make install by defaults looks for LILO and I know LILO is a bootloader. But I don't want to use LILO but instead I only care about using grub.

What do I do now to have make install run correctly?

UPDATE

In my /root/build/linux-3.3.3/arch/x86/install.sh file, the last 10 lines are:

if [ -x /sbin/lilo ]; then
       /sbin/lilo
elif [ -x /etc/lilo/install ]; then
       /etc/lilo/install
else
       sync
       echo "Cannot find LILO."
fi

So somehow, I need to edit my install.sh to use grub instead. Any suggestions?

2
  • What distro are you using? Many have tools in place to make building and installing customer kernel packages easy.
    – Zoredache
    Apr 26, 2012 at 7:28
  • distro - arch linux Apr 26, 2012 at 7:33

3 Answers 3

3

For Linode with pv-grub, you can ignore the message about LILO because LILO is not (and cannot be) used on Linode. The kernel image has been copied into /boot/vmlinuz at this point.

By default, make install updates LILO data if it is installed. It does this as a convenience, because LILO does not know about file systems and has to rely on block numbers to locate the kernel image.

0

Evidently, your install script has LILO as a requirement. Why not simply make and then copy the output over to /boot and fiddle with grub by hand?

0

The message occurs because you don't have an installkernel script at /sbin/installkernel:

if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi

You can write your own script and put it at /sbin/installkernel, or use one written by someone else

1
  • What if one has this error in a Red Hat-based distribution (OpenSUSE)?
    – Andyc
    Mar 16 at 11:45

You must log in to answer this question.

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