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

Re: your mail



Ira Abramov writes:
 > On Thu, 9 May 1996, Meir Litmanovich wrote:
 > 
 > > Today evening I'm going to install Linux for one of my friends .I
 > > think I'll do it by hand (i.e plug his disk as second into my comp  ,
 > > format ,mkfs ,addswap , ....  ,copy all my files ... ,change /etc/fstab ,
 > BAD idea. you have to be really carefull with this, or you end up with no 
 > rw permitions on /dev/null and all kinds of wierd stuff. why not install 
 > by mounting his under yours, running the Slackware install, set the root 
 > of the installation on /mnt (or wherever it is mounted) and do it normaly?

I disagree.  I've installed linux via disk copy on several machines,
and find it much easier than dealing with slackware & tracking down &
fixing all the slackware bugs.  Here's my list of things which I do
when I do a disk copy installation.  Note that it's more complicated
than it'd need to be for you (because I copy from a machine (blinky)
which is a socks server & edit socks configs to make it a socks
client, have /<machine>/{dos,etc,usr,bin,home} mountpoints for nfs,
etc).  Note also that it's *very* terse - I just might mention a file
name when something inside needs to be modified.  It's also probably
buggy and just glancing at it just now, I realized that I sometimes
refer to the new disk as hdb & sometimes as hdc.

Note also, that if you have 2 IDE interfaces, and stick the disk on
the 2nd IDE interface, then you're going to have a little trouble with
the partitioning.  The problem is that Linux gets both the BIOS disk
geometry + the ACTUAL disk geometry for IDE interface 1, but *only*
gets the ACTUAL geometry for IDE interface 2.  It uses the ACTUAL for
the BIOS geometry on the 2nd interface.  This means that if your hard
disk is past the 500mb some odd limit (and thus one uses the hacked
BIOS geometry fix), then you'll have trouble partitioning, because
Linux won't get the hacked bios geometry, and thus will think the
partitioning data is all screwed up.

Anyway, with all those caveats, here's my list.  And, really, it is
easier, but you have to know what you're doing :)!  


1. fdisk 2 (or more) partitions - one for linux, one for swap.  If
   disk is >1024 *and* bios doesn't support the translation kludge,
   then make an extra Linux partition wholly contained within the 1024
   limit to store the LILO files (/boot/* and vmlinuz), say hdb1, only
   with only 1 or 2 cylinders.

2. cd ~/new-machines/newxxx/
   /sbin/mke2fs -c -m 3 -v /dev/hdc2 >mke2fs-log-dat 2>&1 &

3. /sbin/mkswap -c /dev/hdc3 >mkswap-log-dat 2>&1 &

4. mount -t ext2 /dev/hdc2 /mnt (or whatever the new linux partition is)

5. cd / 
   UMOUNTALL
   cp -av `ls | grep -v 'blinky\|lost+found\|mnt\|proc\|home\|cdrom\|dos'` /mnt >~/new-machines/newcasp/cp-log 2>&1 &


   Probably better to use tar, or cpio.

6. Make a boot disk (from /usr/src/linux):
      fdformat /dev/fd0h1440
      make zdisk
      rdev ...
      /sbin/rdev /dev/fd0 /dev/hda1
      /sbin/rdev -R /dev/fd0 1

7. Cleanup:

   a. /mnt/etc/
      resolv.conf (lose blinky)
      HOSTNAME
      rm sendmail.cf ; ln -s sendmail.cf-new-std sendmail.cf
      fstab
      XF86Config (mouse, screen, video card)
      inetd.conf (lose socks)
      Adjust inetd.conf and services (maybe time server?)
      inittab (lose mgetty)
      lilo.conf (config for proper disks, lose cdrom)
      socks.conf (make sure it's blinky, not sebastian...)
      host*.allow
      host*.deny
      hosts
      rc.d/rc.inet1 (inet address)
      httpd, named, do-modem-watch out of rc.local
      Mouse settings (in X config and in rc.local for gpm)
      rc.M - yank cdrom crap.
      rc.S - lose ppp, isofs, slhc (MODULES="")

   b. /mnt/var/adm
      rm -rf disk_contents/ mount/ packages/ removed_scripts/ scripts/ setup/
      for x in * ; do if [ -f $x ] ; then cat /dev/null >$x ; fi ; done
      chmod 600 *
      chmod 644 utmp wtmp lastlog

   c. Make xtra dirs:
      cd /mnt
      for x in proc blinky home dos ; do mkdir $x ; done
      cd blinky ; mkdir dos cdrom bin etc home usr
      cd /home ; for x in * ; do mkdir /mnt/home/$x ; chown ${x}.users /mnt/home/$x ; done
      
   d. Create /newmachine simlink

   e. Copy home directories from another machine (if this one is
      replacing another).

      cd /mnt
      cp -av /casper/home/ . >~/new-machines/newcasp/home-copy 2>&1 &

   f. Other machines:
      copy around:
         /etc/host
         /etc/host*allow, host*deny
         Create /newmachine/*

8. Boot off of boot disk, do /sbin/lilo, and try booting...


References: