LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 10-04-2004, 01:39 PM   #1
Malice132
Member
 
Registered: Sep 2004
Location: U.S.
Distribution: Mandrake 10.1
Posts: 41

Rep: Reputation: 15
Compiling New Kernel in Mandrake


I have Mandrake 10.0, and I decided that I wanted the latest kernel now instead of when 10.1 is released (sorry, I'm not a community member, perhaps in the future). Besides that, I wanted the experience of making my own kernel from scratch and getting it going, so I downloaded the latest kernel, 2.6.8.1, ran "make xconfig" to get it setup how I wanted, updated my lilo, copied the modules to /lib/modules, and then started it up.

It started up OK, but there are some error messages that I got. I don't specifically remember the error message because they were during the "graphical" part of the startup, when Mandrake says it is doing stuff and says whether the stuff is OK or FAILED. I tried looking through the output of dmesg to see if I could find anything, but this information was not found there. Does anyone know where I can see this particular info besides looking closely during boot? I can't even begin to address it until I know what the problem is.

I am keeping the new kernel because it fixed other issues that I was having, such as not being able to setup my USB printer, and I just want to have my own, customized, up to date kernel. However, I would like to better integrate the kernel into the Mandrake system, if I can.

Here is what I added to my lilo.conf:

image=/boot/vmlinuz-2.6.8.1
label="linux-2.6.8.1"
root=/dev/hdf1

I left out this stuff from the original entry that I was copying from:

initrd=/boot/initrd.img
append="devfs=mount acpi=ht splash=silent"
vga=788

because as I recall I had some problems initally with thee initrd line, and that made me decide to put the minimal entry in place. I still have the mandrake as the default because I'm not done fixing everything I want in the setup of this kernel. I would appreciate any advice about this.
 
Old 10-04-2004, 02:05 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
if u r kernel requires initrd image then u should build one and use that in ur bootup
u can make a initrd image by this
mkinitrd /boot/initrd-.2.6.... 2.6.....

here use the name which u have kept in ur /usr/src/linux-2.6.3../Makefile
also in ur root=/dev/hdf1
why are u using hdf1???

regards
 
Old 10-05-2004, 07:11 AM   #3
rhb327
Member
 
Registered: May 2004
Distribution: Slackware Current
Posts: 161

Rep: Reputation: 30
I did something similar with MDK 10.0...upgrading to kernel 2.6.7. The thing to keep in mind is that AFAIK, MDK patches the kernel they distribute. So my errors came from no longer having supermount support.

HTH
 
Old 10-05-2004, 12:43 PM   #4
nafan
Member
 
Registered: May 2004
Location: /dev/bed
Distribution: Mandriva 2009.0 Powerpack
Posts: 172

Rep: Reputation: 30
If you use the installkernel script it will copy your kernel to /boot, make lilo/grub entries, and generate an initrd specifically for that kernel.

Regarding the boot sequence and your OK/FAILED items...... During startup you should have the iption to press 'i' for an interactive boot, where you get to choose which of the services you want started. Mandrake will not stop immediately after you press i, as it needs to do essential system routines before starting the services. Say 'y' to each of the services to start them as normal. This way you will be able to watch the system start slowly so you can find which services are failing. It may be things like the NFS service being started, without NFS support being comiled into the kernel, or compiled as a module, or the virtual server admin service starting, without the virutal server being compiled in, or as a module.

Building a new kernel from scratch can be tricky, and you might have to use trial and error to make yourself a kernel that suits you, and has all your needed services/capabilities. Once you have it done though, the configuration can be transferred to a new kernel version using 'make oldconfig'

 
Old 10-08-2004, 12:05 AM   #5
Malice132
Member
 
Registered: Sep 2004
Location: U.S.
Distribution: Mandrake 10.1
Posts: 41

Original Poster
Rep: Reputation: 15
Thanks for the info everyone. I haven't replied in a few days as I managed to break Linux, again, and I have just now had time to reinstall. I'll wait until I have a little more free time before I try playing with the kernel again.

The reason my hd is hdf1 is because I have 4 hd's. 2 of them are an NTFS RAID, which occupy hda and hdc, as Linux doesn't recognize them as a RAID, and it doesn't matter because I only read them in Linux and it is a mirror RAID (don't ask me why they don't use hdb) and hde is my windows xp system drive (again, don't ask me what's wrong with hdd).

Yes, I know that some of my errors had to do with supermount. Is there no way to build supermount into your own kernel?

And you talk about using the installkernel script. My only concern with automatically installing the kernel is that the old kernel wouldn't be properly backed up and I could wind up with a broken new kernel and no way to use the old kernel. Does the script automatically keep the old kernel's files and add it to the lilo, or do I need to that manually myself?

Last edited by Malice132; 10-08-2004 at 12:06 AM.
 
Old 10-08-2004, 07:24 AM   #6
nafan
Member
 
Registered: May 2004
Location: /dev/bed
Distribution: Mandriva 2009.0 Powerpack
Posts: 172

Rep: Reputation: 30
Quote:
Originally posted by Malice132
And you talk about using the installkernel script. My only concern with automatically installing the kernel is that the old kernel wouldn't be properly backed up and I could wind up with a broken new kernel and no way to use the old kernel. Does the script automatically keep the old kernel's files and add it to the lilo, or do I need to that manually myself?
The only time that you may lose your ability to boot through your existing kernel(s) is when you tell the installkernel script to link to the default /boot/vmlinuz and /boot/System.map files. The boot options in lilo and grub after a mandrake install point to these symlinks, instead of the real kernel/map files and supply different command line options. If you have used installkernel in the past to install the 2.6.7 kernel, and you re-compile it and install it with installkernel exactly as you did before, then only that kernel will get replaced.

If you're concerned, open your lilo.conf and copy the entry that starts your preferred working mandrake kernel. Edit the 'kernel' entry so that it points to the actual kernel image, instead of the symlink. (i.e. change it to point to the file that the symlink /boot/vmlinuz refers to) That way you will always have one entry in your bootloader that starts your system. You will also want to give it a different name, like 'Malice123-failsafe-kernel'
 
Old 10-09-2004, 11:21 AM   #7
Malice132
Member
 
Registered: Sep 2004
Location: U.S.
Distribution: Mandrake 10.1
Posts: 41

Original Poster
Rep: Reputation: 15
I went ahead and downloaded 2.6.8.1 again and got it all setup. I decided to not use initrd.img, as I read some posts from the gurus here and they said you only need it if you're using scsi drivers and they're not compiled into the kernel. Well, I'm not using scsi drivers, so i got rid of the ramdisk that I don't need. I boot fine into the new kernel, with only errors on the lines where it tries to use supermount and supermount isn't supported, and I get the eth0 error that I have always gotten anyway.

However, when I boot into KDE, my mouse doesn't work. I have a mouse cursor in the middle of the screen, but the mouse doesn't control it. Does anyone know what I need to do to get my mouse working in the new kernel? I made sure to include all USB items when I made the kernel, as one of my main reasons for making my own kernel is so that I can get all of my USB devices working.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with kernel compiling under Mandrake Linux 8.1 RJARRRPCGP Linux - Newbie 5 08-27-2004 02:32 PM
Compiling kernel on Mandrake 9.2 vincebs Mandriva 2 04-04-2004 04:56 PM
compiling the kernel with mandrake 9.2 Zvi Linux - Software 1 12-03-2003 07:10 AM
Mandrake kernel 2.4.21 compiling phaestos Linux - Newbie 1 07-15-2003 08:41 AM
Problems compiling 2.4.19 Kernel using Mandrake 8.2 Doalwa Linux - Newbie 9 09-01-2002 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration