Kernel-Compile-mini-HowTo (FINAL)

Kernel-Compile-mini-HowTo (FINAL)

Post by Kent Robot » Fri, 05 Apr 1996 04:00:00

Kernel-Compile-mini-HowTo "Trust this, and live, with a new kernel." (Kent)
ncftp> open                                                        
ncftp> cd /pub/Linux/kernel/src/v1.3       </v1.3 ? As of this writing.>
ncftp> ls      <-It,s a big dir. it scrolls by quickly, try ls -r to see
<LATEST-IS-1.3.83>                         it in reverse, or, ls | more
ncftp> bin     <Set to binnary mode.>      (might work ?) one screenfull
ncftp> get linux-1.3.83.tar.gz              at a time, press q to quit.>
ncftp> quit

?/# mv linux-1.3.83.tar.gz /usr/src
?/# cd /usr/src
/usr/src# rm -rf linux                   <Remove old kernel.>
        # tar xzvf linux-1.3.83.tar.gz   <Unpack new kernel.>
        # cd /usr/include
/usr/include# rm linux                   <Remove old links.>
            # rm asm
            # ln -s /usr/src/linux/include/linux linux   <Create new links.>
            # ln -s /usr/src/linux/include/asm-i386 asm
            # cd /usr/src/linux

Try and read /usr/src/linux/Documentation/, this will
explain, the various options you have, in configuring the kernel.
/usr/src/linux# make config      <Configure and compile, new kernel.>
              # make dep
              # make clean
              # make zlilo
              # make modules         <To install any modules.>
              # make modules_install

If the kernel compiled, you'll have, /vmlinuz /vmlinuz.old.
If your useing lilo to boot linux, everything is fine as is,
but if your booting from a floppy, do this.
/# rdev vmlinuz /dev/hda1      <Tell the new kernel, where the linux
                                partition is mounted, (hda2, hda3, ?.)
/# fdformat /dev/fd0H1440      <Format a floppy.>
/# cp vmlinuz /dev/fd0H1440    <Copy kernel to floppy.>

Boot the new kernel, then /# rm vmlinuz.old
You don't need all of the kernel source, after it's compiled,
you just need /usr/src/linux/include, you'll need the include files,
to compile anything.                        
~/# mv /usr/src/linux/include /usr/src        <Steps, to removing
~/# rm -rf /usr/src/linux                      kernel source, minus
~/# mkdir /usr/src/linux                       the include files.>
~/# mv /usr/src/include /usr/src/linux
I would keep the kernel source, unless I was short on space.