2

I'm building the kernel (3.5) from /media/src_prog/linux-3.5/ to /media/sda5_k/. I've gone through the following steps:

make O=/media/sda5_k/ menuconfig
make -j2 O=/media/sda5_k/
make O=/media/sda5_k/ modules_install

And when it comes to make O=/media/sda5_k/ install all I get is:

[root@localhost linux-3.5]# make O=/media/sda5_k/ install
sh /media/src_prog/linux-3.5/arch/x86/boot/install.sh 3.5.0 arch/x86/boot/bzImage \
    System.map "/boot"
Cannot find LILO.
[root@localhost linux-3.5]#

I also tried this manually:

cp /media/sda5_k/arch/x86/bzImage /media/sda5_k/boot/
cp /media/sda5_k/arch/x86/System.map /media/sda5_k/boot/

and repeated the make O=/media/sda5_k/ install but it doesn't work.

I'm using Arch for compilation and boot process is done with Ubuntu's GRUB2.

What do I do at this step?


Edit:

fdisk:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    65538047    32768000   83  Linux
/dev/sda2        65538048    98306047    16384000   83  Linux
/dev/sda3        98306048   122882047    12288000   83  Linux
/dev/sda4       122882048  1953523711   915320832    5  Extended
/dev/sda5       122884096   139268095     8192000   83  Linux
/dev/sda6       139270144   204806143    32768000   83  Linux
/dev/sda7       204808192   229384191    12288000   83  Linux
/dev/sda8       229386240   245770239     8192000   83  Linux
/dev/sda9       245772288   270348287    12288000   83  Linux
/dev/sda10      270350336   319502335    24576000   83  Linux
/dev/sda11      450578432   929523711   239472640   83  Linux
/dev/sda12      929525760  1953523711   511998976   83  Linux
/dev/sda13      319504384   450576383    65536000   83  Linux

df:

Filesystem     1K-blocks     Used Available Use% Mounted on
rootfs          12245648  9913616   1717632  86% /
dev              1024756        0   1024756   0% /dev
run              1027708      328   1027380   1% /run
/dev/sda3       12245648  9913616   1717632  86% /
shm              1027708      112   1027596   1% /dev/shm
tmpfs            1027708       68   1027640   1% /tmp
/dev/sda7       12245648  1100504  10530744  10% /media/src_prog
/dev/sda5        8165804   436548   7319656   6% /media/sda5_k

/media/src_prog/ -> Where I keep the source files

/media/sda5_k/ -> Where I want Linux Kernel to be put

/dev/sda1 -> Ubuntu

/dev/sda2 -> Old unused Ubuntu

/dev/sda3 -> Arch (here :-D)

/dev/sda1/boot -> Boot (Ubuntu's) the one bound to MBR.

2 Answers 2

2

I haven't checked whether this still applies to 3.5, but I think the kernel makefiles only support Lilo, not Grub. Once you've manually copied the bzImage file, and the initrd or initramfs if you're using one, you need to inform Grub of the new kernel. With simple setups, it's just a matter of running update-grub. Since you're booting one distibution's kernel with another distribution's bootloader, this may not work, so you may need to edit the Grub configuration file manually. That's /boot/grub/menu.lst for Grub legacy (Grub 0.9x) and /boot/grub.grub.cfg for Grub2 (Grub 1.9x).

For Grub2, you need an entry like

menuentry "Homemade 3.5 kernel" {
    insmod ext2
    set root='(hd0,msdos5)'
    linux /boot/bzImage root=/dev/sda3 ro
}
10
  • update-grub doesn't detect it. My last Kernel experience was 3.1.8, and I had compiled it right into the source dir, without O=.... Then, grub detected it, but this it doesn't. Also mounting the volume in Ubuntu and retrying the update-grub didn't work. What I wanna know specifically is that "Has my compilation succeeded at all?"
    – Haix64
    Aug 13, 2012 at 6:43
  • I examined maually changing grub.cfg. I get file not found. press any key to continue... which returns to OS selection menu.
    – Haix64
    Aug 13, 2012 at 7:43
  • BTW the most important thing for me to know is that whether my compilation has succeeded or not? Why this kind of behavior is exhibited? And oh, I don't know about initrd, or initramfs. What should I do to them?
    – Haix64
    Aug 13, 2012 at 7:44
  • @ai64 Since make succeeded, your compilation succeeded. What isn't working here is telling your bootloader where to find the new kernel. Please edit your question to add the output of fdisk -l and df, and tell us which partition is your Arch root, which partition is your Ubuntu root, and where /boot is if different. Also post the contents of your Grub configuration file. Aug 13, 2012 at 8:32
  • there, the edit ;-)
    – Haix64
    Aug 13, 2012 at 9:57
0

I don't think you need to launch make install here, just copy the bzImage generated, System.map, and do make modules_install will just work for you.

You seems to be on Arch Linux, why wouldn't you go for abs ? e.g latest 3.5 kernel is in testing catelog, so if you doabs testings/linux, it should download PKGBUILD files for you, and you do makepkg to build a package

1
  • I'm not gonna upgrade my Arch's Kernel. I want a fresh, clean raw instance of kernel running for myself. thank you.
    – Haix64
    Aug 13, 2012 at 12:38

You must log in to answer this question.

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