recompile and reinstall of 2.6.x

By Spike
May 26, 2004
Topic Status:
Not open for further replies.
  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 Newcomer, in training Posts: 6,504

    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 www.kernel.org

    uncompress it with this command:

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

    then,

    make mrproper
    make clean
    make xconfig

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

    then save, close tool.

    now,

    make

    then

    make modules

    then

    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 Newcomer, in training Posts: 6,504

    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 Newcomer, in training Topic Starter Posts: 2,371

    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...

    [​IMG]

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



    [​IMG]

    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: 5,899

    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 Newcomer, in training Topic Starter Posts: 2,371

    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...

    [​IMG]

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

    Didou Bowtie extraordinair! Posts: 5,899

    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 Newcomer, in training Topic Starter Posts: 2,371

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

    Phantasm66 Newcomer, in training Posts: 6,504

    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 Newcomer, in training Topic Starter Posts: 2,371

    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 Newcomer, in training Posts: 6,504

    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.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.