Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a 2.0 kernel



>>>>> "Jim" == Jim Schweizer <schweiz@example.com> writes:

    Jim> Hi all, Thanks for the advice, Steve - I know what I'm doing
    Jim> until the wee hours tonight;-)

He he.

    Jim> I decided to take your advice and try to build a more recent
    Jim> kernel so I fetched linux-2.0.tar.gz off the July Mo' Linux
    Jim> CD-ROM and untarred it in /usr/src figuring it would unpack

Yep.  That's an oops.  I *always* do "tar tzf nantoka.tar.gz | head"
before unpacking anything.

    Jim> into something like /usr/src/linuxelf-2.0.  It didn't. It

That's logical and safe.  Unfortunately, that's not the way Linus does
it.  Unfortunately, lots of other people don't do it that way either.
"tar tzf" is your buddy.

    Jim> unpacked into /usr/src/linux which, as you'll recall, was a
    Jim> symlink to linuxelf-1.2.13. Is this a problem? (I'm *sure*
    Jim> that's a Newbie question <grin>)

Since you've got the relevant CD-ROMs, your best bet is to "rm -r
/usr/src/linux*"---or a more cautious equivalent ;-) and re-untar.
The linuxelf-1.2.13 should be in a tar file by that name somewhere on
the slackware distribution; or you could reinstall from the Slackware
setup program.  It also probably untars into ./linux, though; be
careful when you do that (if you do---if you have any luck with 2.0,
you probably won't go back).

    Jim> Wish me luck.....

Good luck!  And a few words of advice:

Don't do build any modules; it's not hard, but you need the new
modules distribution for 2.0.  That requires untarring the kernel
sources, building the module support programs, and only then building
the kernel.  Or maybe you have to build the kernel first, and then
rebuild it after building the module programs.  Just avoid that
headache---if you want it in your kernel, put it in the kernel, not as
a loadable module.  You can deal with the module issue later.

Keep your old kernel around; you are going to have to upgrade a number 
of utilities for v2.0.0 (eg, the old series of ps tools don't work
right with new kernels; file locking changed so Smail gets downright
buggy).  I forget the list; here are a couple of things from my
Bookmarks file that should help:

    <H3>Linux</H3>
    <DL><p>
        <DT><A HREF="http://www.singnet.com.sg/~sunsurf/linux11.html">
               http://www.singnet.com.sg/~sunsurf/linux11.html</A>
        <DT><A HREF="http://puck.nether.net/~jared/victim.html">
               Software Uvatims of the 1.3 Kernel Development</A>
        <DT><A HREF="http://netrom.com/~soul/">
               Mikes's Linux WeB Page</A>
    </DL>

(you might be able to just suck this message into Netscape and go from
there...).  "Software Uvatims" is especially relevant.

However, you should be able to boot and play with the 2.0.0 kernel
even if not all the system software works perfectly.  So just copy the
new kernel (it should be in

		 /usr/src/linux/arch/i386/boot/zImage

if you did "make zImage") to something like

	      /boot/vmlinuz-2.0.0-JS-24Aug1996-firstTry

(long names are allowed, and useful if you are moving stuff into and
out of modules, or trying different author's drivers for the same
device, or whatever), make sure you've got a delay in your lilo.conf
so you can use <LEFT SHIFT> to bring up the boot menu, and add a copy
of your current Slackware boot stanza, then edit it to reflect the new
kernel (here's the relevant parts of mine):

# LILO configuration file
# by SJT 96/04/09
#
# LILO global stanza
delay = 50	# This gives you some time to call up the kernel menu
# leave the rest of the global stanza alone
vga = normal    # force sane state
ramdisk = 0     # paranoia setting
# 1st Linux stanza (untouched)
image = /boot/linux-1.2.13-95Sep14
  root = /dev/sda6
  label = linux1213
# 2nd Linux stanza (added by coping and editing first stanza)
image = /boot/vmlinuz-2.0.0	# edited to change kernel name
  root = /dev/sda6		# not edited
  label = linux200		# edited to give unique label
# DOS stanza (untouched)
other = /dev/sda1
  label = dos
  table = /dev/sda
# end of lilo.conf

and then run /sbin/lilo (as root, of course) when you've finished
editing it.  No big deal, but
(0) of course you have a boot disk, don't you, and you know how to
    boot to your normal system using it (you can use your Slackware
    boot disk with the "kernel root=/dev/sda1" option, substitute the
    correct kernel label and root device as in the lilo.conf)
(1) do a "cp /etc/lilo.conf /etc/lilo.conf.old" first; then you
    can recover from any lilo errors by copying back and running
    /sbin/lilo.
(2) leave the old kernel where it is and don't touch the related
    lilo.conf stanza
(3) leave the old kernel first, so that you can reboot to a stable
    environment without having to remember to select the old kernel
(4) if lilo exits with errors you should fix them (either fix the typo 
    if you understand the problem, or copy the old working lilo.conf
    back and run /sbin/lilo before doing anything else.

You can also do this operation from the Slackware setup menu if that
makes you more comfortable.

-- 
                           Stephen John Turnbull
University of Tsukuba                                        Yaseppochi-Gumi
Institute of Policy and Planning Sciences  http://turnbull.sk.tsukuba.ac.jp/
Tennodai 1-1-1, Tsukuba, 305 JAPAN                 turnbull@example.com
-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links