
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Sbackup Question
On Sunday January 4 2009 23:10, CL wrote:
>What I would like to do is install the basic OS and then do a restore
> of the current installation on the smaller HDD so that, when the
> machine is turned back on, it will be as if nothing had changed.
If you are happy with the current installation, why not just move the
whole installation to the new drive rather than installing and trying
to restore important files from a backup?
I've done this several times with Linux, OpenBSD, Mac OS (both Classic
and X), and even Windows. With Linux the basic steps are:
1) Install both drives into a machine.
2) Boot from a live CD, preferably for the same distribution you are
running.
3) Create 2 directories somewhere, i'll say /mnt/src and /mnt/dest.
4) Mount the source drive on /mnt/src. Look in etc/fstab on the drive
and make sure you mount all partitions in the appropriate places.
5) Partition and format the destination drive the way you want it, and
mount it as /mnt/dest. Run mkswap on a swap partition (if any). If you
are using multiple data partitions, create the mount points and mount
those partitions.
6) Run this to copy the files. There are many other commands that will
do this; this is just the one i use since tar seems to handle device
and other weird files acceptably:
(cd /mnt/src ; tar -cf - .) | (cd /mnt/dest ; tar -xvpf -)
7) If the drives are different enough to use different device names (say
when migrating from ATA to SCSI), edit etc/fstab and possibly whatever
config file your boot loader uses.
8) Install a boot loader on the new drive. How to do this will differ
depending on which one you use (most likely either Lilo or Grub).
Usually you'd do something like chroot to /mnt/dest, and then run
whatever command installs the loader, possibly with an argument telling
it what device to put it on (if different from what it will be after
install).
That might sound like a lot of stuff to do, but it really doesn't take
long. Just be careful when partitioning and formatting the destination
drive that you are working on the correct one. In my experience the
easiest place to experience problems is with installing the bootloader.
Sometimes i remove the source drive and put the destination in its
final place and then boot from the live CD again to install the
bootloader. That way device names are usually the same as they will be
when booting from the drive and the process is often smoother.
------------------------------------------------------------------------
Dan Ramaley Dial Center 118, Drake University
Network Programmer/Analyst 2407 Carpenter Ave
+1 515 271-4540 Des Moines IA 50311 USA
Home |
Main Index |
Thread Index