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

Unidentified subject!



I like the idea of copying the package selections and
letting apt reinstall.  But there will still be a lot of 
questions from the install scripts and stuff.

If Perrin is perfectly happy with his old machine,
and it's on the same LAN as the new one with the fresh
hard drive, why not just tar+ssh the whole thing over?

Boot Knoppix on the new box, get a shell and go "sudo su -"
to get root.  Give root a password.
Partition the new drive.
Make file systems and swap areas.
Mount what will be the new root at /target and mount any other
new partitions whereever they are going to go under /target/.
Make any storage management symlinks.  Eg,
  cd /target
  mkdir usr/home
  ln -s usr/home home
if you keep /home and /usr on the same partition.

Make the directories you're *not* going to copy across,
  mkdir /target/{tmp,proc}
  mkdir -p /target/var/log/{apache,exim,gdm,ksymoops,news}

ifconfig and route as needed, then /usr/sbin/startssh

Then on the old box, telinit 1 to stop any pesky daemons, then
  ssh -l root new.box.IP.address uname -a

to see if the new box is listening, and then something like

  cat > /tmp/leavem <<Yowza
./proc
./tmp
./var/log
Yowza
  cd /
  tar cjf - -X /tmp/leavem . | ssh -l root 192.168.new.box tar xjf - -C /target 

to copy the entire system except the logs and proc.

Back on the new box, if the partitioning is different, edit /target/etc/fstab.
If other hardware is different, edit /target/etc/modules as needed.
Then shutdown the new box and reboot with some rescue disk,
 bf24 root=/dev/hda1
or whatever.
Log in, and run /sbin/lilo.  What did I miss?  The new system is
a faithful clone, isn't it?  Nicely defragmented, too.
That should be a lot faster than reinstalling.


Cameron






Reply to: