November 25, 2015

New HOWTO: The Linux Kernel HOWTO - page 12

Table of Contents

  • April 2, 2001
  11.  Tips and tricks

  11.1.  Redirecting output of the make or patch commands

  If you would like logs of what those `make' or `patch' commands did,
  you can redirect output to a file. First, find out what shell you're
  running: `grep root /etc/passwd' and look for something like

  If you use sh or bash,

      (command) 2>&1 | tee (output file)

  will place a copy of (command)'s output in the file `(output file)'.

  For csh or tcsh, use

      (command) |& tee (output file)

  For rc (Note: you probably do not use rc) it's

      (command) >[2=1] | tee (output file)

  11.2.  Conditional kernel install

  Other than using floppy disks, there are several methods of testing
  out a new kernel without touching the old one. Unlike many other Unix
  flavors, LILO has the ability to boot a kernel from anywhere on the
  disk (if you have a large (500 MB or above) disk, please read over the
  LILO documentation on how this may cause problems). So, if you add
  something similar to

      image = /usr/src/linux/arch/i386/boot/bzImage
          label = new_kernel

  to the end of your LILO configuration file, you can choose to run a
  newly compiled kernel without touching your old /vmlinuz (after run�
  ning lilo, of course). The easiest way to tell LILO to boot a new ker�
  nel is to press the shift key at bootup time (when it says LILO on the
  screen, and nothing else), which gives you a prompt.  At this point,
  you can enter `new_kernel' to boot the new kernel.

  If you wish to keep several different kernel source trees on your
  system at the same time (this can take up a lot of disk space; be
  careful), the most common way is to name them /usr/src/linux-x.y.z,
  where x.y.z is the kernel version. You can then ``select'' a source
  tree with a symbolic link; for example, `ln -sf linux-1.2.2
  /usr/src/linux' would make the 1.2.2 tree current. Before creating a
  symbolic link like this, make certain that the last argument to ln is
  not a real directory (old symbolic links are fine); the result will
  not be what you expect.

  11.3.  Kernel updates

  Russell Nelson ( summarizes the changes in new
  kernel releases. These are short, and you might like to look at them
  before an upgrade. They are available with anonymous ftp from in pub/kchanges or through the URL

Sitemap | Contact Us