recompile and reinstall of 2.6.x

By Spike ยท 10 replies
May 26, 2004
  1. I've just got hold of Mandrake 10.0

    you may remember that I gav up with MD 9.x after a series of problems, in the hope that when I got 10.0, the problems would be solved.

    The trouble is, in order to install the required drivr for my DSL modem, I need to run a patch (which I have instructions for), but then I need to recompile and install my kernel.

    Is this process the same as in the kernel installation thread (at which I failed miserably many times!), or is there an easier way of doing it. Is there anything I should miss out? Each time I tried to upgrade from 2.4.x to 2.6.x under MD 9.2, it left my linux unbootable.
  2. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    Its not hard to compile your own kernel if you know a few things.

    First of all, try downloading the 2.6.6 kernel from

    uncompress it with this command:

    tar -zxvf linux-2.6.6.tar.gz (filename may differ)


    make mrproper
    make clean
    make xconfig

    when the xconfig tool appears, load the attached myconfig file in.

    then save, close tool.




    make modules


    make modules_install

    then go into ./arch/i386/boot

    copy bzImage file to /boot

    rename to mykernel or something like that.

    make an initrd file

    mkinitrd /boot/initrd-2.6.6.img 2.6.6

    then edit your /etc/grub.conf file, so that you add lines for your new kernel like this:

    title My New 2.6.6 kernel
    root (hd0,0)
    kernel /boot/kernel-2.6.6 ro root=/dev/hda
    initrd /boot/initrd-2.6.6.img

    There's probably something already in /etc/grub.conf so just copy that. You don't need to reinstall grub when you make changes to /etc/grub.conf

    I think there is everything you need.
  3. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    kernel config file

    here's the file you should use to config your kernel, basically its just a hack of mine of the default i686 kernel config you get with fedora core. It should work fine. I think I did it for an Athlon though so if you have anything else you should change it under processor type section.

    Leave anything old still in /etc/grub.conf and don't remove your old kernel.

    Attached Files:

  4. Spike

    Spike TS Evangelist Topic Starter Posts: 2,168

    Screenshots of problem below

    Thankyou for that. I've extracted the source to /usr/src, but I can't seem to go any further with your instructions, see screenshot below...


    I also can't patch the source anyway, from the instructions, see image (again, below)...


    I really would like to get this sorted now. I've waited a while to try Linux again, and maybe learn something about using it, but if it won't work for me, there's not much hope really. I guess I'm missing something?
  5. Didou

    Didou Bowtie extraordinair! Posts: 4,274

    This should work ->

    [root@armilia david]# cd /usr/src/
    [root@armilia src]# tar xvfj linux-2.6.6.tar.bz2
    [root@armilia src]# ln -s linux-2.6.6 linux-2.6
    [root@armiliasrc ]# ln -s linux-2.6.6 linux
    [root@armilia src]# patch -p1 </mnt/windows/2.6.x-usb.patch
    [root@armilia linux]# cd linux
    [root@armilia linux]# make mrproper
    [root@armilia linux]# make menuconfig
    [root@armilia linux]# make && make modules && make modules_install && make install

    PS. the parameter for patch is -p1, you seem to put -pl.
  6. Spike

    Spike TS Evangelist Topic Starter Posts: 2,168

    Thanks for that Didou. Certainly a step in the right direction. I can patch the source now. A classic case of Error Between Chair and Keyboard I think :D

    However, I've encountered the following error...


    Is it important, and any idea what I should do if it is?
  7. Didou

    Didou Bowtie extraordinair! Posts: 4,274

    It will be quite hard to re-compile anything ( let alone the Linux kernel ) without GCC.;)

    Try ->

    [root@armilia root]# urpmi gcc

    Then proceed back to the make mrproper part.:)
  8. Spike

    Spike TS Evangelist Topic Starter Posts: 2,168

    Many thanks. 2.6.6 now patched, compiled, and installed :D
  9. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    If you are following what I said from above, make sure that you actually perform the make operations inside the directory you extracted and not its parent directory (i.e. you were trying to do this in /usr/src, not /usr/src/linux-2.6/)

    When you install Linux, try to do a full install and certainly take all of the development stuff - you need gcc and the other bits and pops to do things in Linux. Linux is open source so you need to be able to build applications, kernels, drivers and other things from source code.
  10. Spike

    Spike TS Evangelist Topic Starter Posts: 2,168

    thanks for the advice/explanation P66. I will bear that in mind. Thankyou very much for your help both. I've now installed the development stuff. If I can just sort my modem out, I'll be a happy bunny. lol :D
  11. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    Keep plugging away, that's how you'll learn. If you've already built and installed your own kernel then you are well on your way.
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...