From: rcopg@minyos.xx.rmit.OZ.AU (Paul Gortmaker)
Newsgroups: comp.os.linux
Subject: Re: [Q] Upgrading Linux?
Date: 24 Jan 93 12:35:51 GMT
Organization: RMIT Computer Centre
NNTP-Posting-Host: minyos.xx.rmit.oz.au

kfisher3@mach1.wlu.ca (kevin fisher U) writes:

>Hello World!

>	From someone's recent post I have deduced that upgrading my version
>of linux (.98pl5) to .99p3 or greater is going to be a 'big problem.'

>	Can anyone give me any advice on how I can make it as painless as
>possible?  I don't have any kind of tape backup unit or anything, but can
>anyone suggest a (CHEAP!) one that will work with linux?

==============================================================================

	I am running 0.99p3 on top of a basically stock 98p5 SLS, and upgrading
is no big deal ...well, maybe ;-)

	If there is sufficient interest, I can double check the bits I'm not
sure of and repost this as a pseudo FAQ. Mail me if you think it would help.

	I am typing this from memory, so let's hope I don't forget anything!
	
				8-)

---------------------------------------------------------------------------

	If you can arrange it, and are worried about losing stuff, try and copy
the whole lot to another partition (if you have more than 1 Linux partition)
(I didn't bother, but then again I never back up my DOS partition either!!!)


Get the source code from your nearest ftp site. This will be in a directory 
like ~/sources.

You will need 1) linux-0.99.tar.Z
	      2) linux-0.99.patch.1 thru to patch.3 (..patch 4 out yet ???)
	      3) ps-0.98 plus patches
	      4) gcc 2.3.3 release from ~/GCC directory (optional)

The reason I say to get the source code for ps is because you usually have to
recompile it for it to work after a kernel upgrage (...see the FAQ)

cd /usr/src
mv ./linux ./linux-0.98p5		(save old sources... could delete them)
tar -xvvozf /tmp/linux-0.99.tar.Z	(assuming you FTP'd into /tmp)
cd /
patch < /tmp/linux-0.99.patch.1		(apply patch 1)
patch < /tmp/linux-0.99.patch.2		(apply patch 2)
patch < /tmp/linux-0.99.patch.3		(apply patch 3)
	
	Check to see that the file kmsg.c (and the pre-patch kmsg.c~) are
	NOT in the root dir (ie /). If they are, see note # 3 below.


cd /usr/src/linux
vi Makefile 	(choose rootdev, keyboard etc)

	While editing the Makefile, there is a couple of minor fixes that
	need to be done to it. First, where it says "rm ./tools/version.h"
	change it to "rm -f ./tools/version.h". And also, where it has the
	line "all: Version Image" insert "tools/version.h" between "Version"
	and "Image" (Similar changes to these were posted to c.o.l)

make config	(answer the questions it asks you)
make clean	(delete any old core and object files etc.)
make dep	(make dependencies)
make all	(compile the lot -- go for a coffee, it'll be a while)

	...I ususally use "make all" and then move the image to disk by hand
	via "dd bs=8192 if=Image of=/dev/fd0" --this line is also in the 
	Makefile, and executed via "make disk"

Possible problems. 
	1) symlinks to include files. The kernel wants to use the files in
	/usr/src/linux/include/linux, but looks in /usr/include/linux
	Soln: 
		cd /usr/include
		rm -f ./linux
		ln -s /usr/src/linux/include/linux ./linux

	2) as above, only for the asm files. (...both this and (1) are 
	discussed in the FAQ)
	Soln:
		cd /usr/include
		rm -f ./asm
		ln -s /usr/src/linux/include/asm ./asm

	3) The file kmsg.c from the 99p0 sources got untarred into / instead
	of where it was supposed to be. The proper place for it is listed
	in the file itself, at the top ("less /kmsg.c") Move it to where it
	belongs (ie "mv /kmsg.* /usr/src/linux/proc/fs" or whatever)

	4) DO NOT OVERWRITE YOUR 98p5 BOOT DISK. If the 99p3 hangs, and you
	dont have the 98p5 disk you are f*cked!!


Then untar the ps sources (into /usr/src/linux/ps ???), apply the patches,
(I think there were 3), edit the makefile, and then recompile it. Make use
of  the README files and RTFM wherever possible. (I had to !!!!!!!!!!!) Do 
a "ps -U" to update the system info, and ps and top should work now.

You will also want to upgrage to GCC v2.3.3 at some point too. This will also
have to be pulled out of the GCC directory at your local ftp site.
I actually upgraded to 2.3.3 before upgrading to 0.99p3, but you are supposed
to be able to use v2.2.2d

There are some tips to the GCC inst that have been posted too. Do a grep for
gcc on your system's Linux news directory.

	Hope this helps. Let me know (via. e-mail) if you found this at all
helpful.


						Paul.


---------------------------------------------------------------------------

Paul Gortmaker

c/o Microelectronics and Materials	Ph  (61) 3 660 2601.
    Technology Centre.			FAX (61) 3 662 1921.
    Royal Melbourne Institute		e-mail: rcopg@minyos.xx.rmit.oz.au
    of Technology.				paulg@bunyip.ph.rmit.oz.au
    GPO Box 2476V, Melbourne 3001,		
    Victoria, Australia.