Return to LinuxDig.Com HowTo's

3. Introduction


3.2. Why would anyone want to do that?

Good question! If it can possibly be avoided, don't do it! (That's the single most important recommendation in this whole guide!!!) When this guide was first written, not many people had hard disks big enough to accomodate two whole Linux installations; these days, that's by no means uncommon. If you possibly can, build your new system in a separate partition (or group of partitions), keeping the old one intact till you're satisfied that the new one is just the way you want it. If you can avoid destroying the old system to make room for the new, by all means avoid it! But there are times when you may have no choice.

(These examples are a bit dated, but they serve to illustrate my point:)

For example, I installed a 4Gb hard disk and then found out that Slackware 2.0 vintage linux didn't know a hard disk could have more than 2Gb, and it got horribly confused. So I had to upgrade to the then-current Slackware 2.3. That upgrade was a gruelling experience, and it's part of the reason I'm writing these notes. I did just about everything wrong, and only good luck and the fact that I had another running linux box beside me saved me from disaster.

As another example, I found that I just couldn't succeed in building a working a.out linux kernel in the 1.3 series, using an out-of-the-box Slackware 2.3 installation (another machine, not the one I botched before). I took the plunge, bought Slackware 3.0 on CDROM and converted to ELF. This time the reinstallation went better, thanks in part to the previous bitter experience, and it served as the source of most of the ideas I'm offering you here.


7. Make separate backups of each group of files you want to preserve.

This is the most variable part of the job, and all I can really do to help is to describe what I did in my system, in the hope that it will serve as a rough guide. Basically, you want to look at every directory that contains any

and separate out only those files that you want to carry over.

(Another possible strategy is to back up all files with mtime or ctime more recent than the day of the previous linux installation, as mentioned above, and then restore from that. If you do that, you have to take into account that the new linux distribution may contain versions of some files that are newer still than the ones you saved.)

In my case, I ended up making a .tgz file on the backup medium for each of

  • /usr/lib/rn

  • /usr/lib/smail

  • /usr/lib/trn (the rest of /usr/lib would be reinstalled)

  • /usr/local/src

  • /usr/local/bin

  • /usr/local/lib

  • /usr/local/lpfont

  • /usr/local/man

  • /usr/local/sbin

  • /usr/local/thot (there were other /usr/local files I didn't need)

  • /usr/openwin

  • /usr/src/lilo-17 (because my new Slackware still had version 16)

  • /usr/src/linux-1.2.13 (because I'd done some customizing)

  • /usr/X11R6/lib/X11/app-defaults

  • /usr/X11R6/lib/X11/initrc (the rest of Xfree86 was to be reinstalled)

  • /var/named

  • /var/openwin

  • /var/texfonts

My machine was relatively easy in that there were no spool files to worry about. I don't run a news spool on this box, and since there are only two users, it was easiest just to get all the mail read before shutting down. Otherwise, /var/spool directories would have had to be backed up at the last minute. (And, of course, the news library and site directories!)