Page 1 of 1

[SOLVED] Custom Kernel Setup

PostPosted: Dec 1st, '13, 21:04
by lewisforlife
Hello all. I run Mageia 3. Because of a video issue when booting up, that I believe to be a kernel issue, I decided to install a custom kernel. I am having an issue when booting up, here is what I did.

-I downloaded the 3.12.2 kernel from kernel.org and unpacked it and changed to the kernel directory.

Code: Select all
make menuconfig #I set all of my options
make #compiled the kernel
su
make modules_install #installed kernel modules to /lib/modules/3.12.2


Next I copied all the needed stuff to /boot and created an initrd:

Code: Select all
cp arch/x86/boot/bzImage /boot/vmlinuz-3.12.2
cp .config /boot/config-3.12.2
cp System.map /boot/System.map-3.12.2
mkinitrd /boot/initrd-3.12.2.img 3.12.2


Next I updated /boot/grub/menu.lst adding:

Code: Select all
title Mageia Custom Kernel 3.12.2
kernel (hd0,4)/boot/vmlinuz-3.12.2
initrd (hd0,4)/boot/initrd-3.12.2.img


Next I reboot and select my new entry from grub, and get a bunch of errors that I can't remember (I can reboot, and take a photo of some of the errors if it will help), and a message saying the errors are saved in /run/initrd/sosreport.txt, which doesn't exist when I boot into mageia with my working kernel. Most of the errors have to do with the initramfs, so maybe I didn't create the initrd correctly?

Is there any other logs that I can look in to try to troubleshoot was is wrong? Do you have any suggestions?

Re: Custom Kernel Setup

PostPosted: Dec 1st, '13, 21:21
by jiml8
You forgot to do a make install. You installed the modules but not the kernel itself.

Re: Custom Kernel Setup

PostPosted: Dec 1st, '13, 21:44
by lewisforlife
jiml8 wrote:You forgot to do a make install. You installed the modules but not the kernel itself.


I manually moved the kernel "bzImage" to /boot/vmlinuz-3.12.2 rather than doing "make install". I did this because I didn't know if the "make install" would overwrite my current kernel. Is there something else that "make install" does besides move the kernel to /boot? Let me know if I am wrong. Thanks.

Re: Custom Kernel Setup

PostPosted: Dec 1st, '13, 23:02
by martinw
I don't know the answer to your question, but you should be able to find out using
Code: Select all
make --dry-run install

Re: Custom Kernel Setup

PostPosted: Dec 1st, '13, 23:26
by jiml8
Kernels are known by their revision number; your custom kernel won't overwrite the one that is there so long as you have named it differently - you always should do this. Make install also builds your initrd.

Re: Custom Kernel Setup

PostPosted: Dec 2nd, '13, 00:51
by lewisforlife
jiml8 wrote:...your custom kernel won't overwrite the one that is there so long as you have named it differently - you always should do this. Make install also builds your initrd.


What do you mean "as long as you have named it differently." If you do "make install", then you haven't named it yet, it creates the name. And why should you "always do this"? Are you sure "make install builds your initrd"? I have never heard this. I will try shortly though and will report back if my problem is solved.

Re: Custom Kernel Setup

PostPosted: Dec 2nd, '13, 01:05
by lewisforlife
jiml8 wrote:Kernels are known by their revision number; your custom kernel won't overwrite the one that is there so long as you have named it differently - you always should do this. Make install also builds your initrd.


This fixed the issue. I have always done everything manually when installing a kernel, and have not had an issue, this worked though, and it did build an initrd. Thanks for the help.

I have run Mageia 2 and 3, and with both had a glitch where the Mageia splash screen when booting, would be off center. This is fixed with my custom kernel, I think some of my hardware drivers were missing from the default Mageia kernel. Before I could not set my screen resolution to 1280x1024, and now I can. So I am happy. Thanks everyone for your help.

Re: Custom Kernel Setup

PostPosted: Dec 2nd, '13, 01:11
by doktor5000
For custom kernels you should always set something like EXTRAVERSION, that's for the naming. And yes, one should always use an additional identifier.
When you do make install, the name has already been set, as that's done during configure.

And from what I remember, I've always did the following:
Code: Select all
make oldconfig; make all, make modules_install; make install


Totally apart from that, do you mind giving more details about the video issue on boot that you're trying to fix, and which graphics chip you're using.

Re: Custom Kernel Setup

PostPosted: Dec 2nd, '13, 02:02
by lewisforlife
doktor5000 wrote:
Totally apart from that, do you mind giving more details about the video issue on boot that you're trying to fix, and which graphics chip you're using.


Here is the output of lspci:

Code: Select all
[root@localhost david]# lspci
00:00.0 Host bridge: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller (rev 02)
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01)
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 01)
00:1c.3 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 4 (rev 01)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 01)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)


I have attached a picture of the screen glitch with the default Mageia kernel. You can see the bar at the top of the splash screen, instead of it being centered and taking up the entire screen. I had this issue with Mageia 2 and 3. I hope this helps.