Message-ID: <3A2300A4.F8AF44EA@dove.net.au>
Date: Tue, 28 Nov 2000 11:17:32 +1030
From: Brian Marr
Subject: Re: [SLE] Using <tar> to transfer all directories to a New Hard Disk
This is the basic format that I used recently to move my working system
across to a new hard drive and boot it.
Important: Have a boot disk so you can get into you current working Hard
Drive if your new one does not boot.
Create Partitions on new Hard Drive. A boot partition is advisable. (for
this example say 2 partitions)
Format Partitions. mke2fs and mkswap
On your existing Hard Drive ...............mkdir /Newlinux and mkdir
/Newboot
Mount your newly formated hard drive here. mount /dev/hdxx /Newlinux
and mount /dev/hdxx /Newboot
<p>Then cp -a /root /boot /etc /usr /home....(and all your directories
except /proc) /Newlinux
and cp -a /boot /Newboot
Some directories I did not copy -mainly old mount points.
Make sure all files are copied successfully to your new disk.
On your existing Hard Drive make a copy of lilo and put it somewhere
safe.
edit /etc/lilo.conf and tell it where the new bootable drive is and run
/sbin/lilo
Then cd to /Newlinux
Chroot . bash
You are now root on your new Hard Drive.
Edit /etc/fstab and put in your new partitions and mount points.
These were mine
/dev/hdc1 /boot ext2 defaults 1 1
/dev/hdc2 / ext2 defaults 1 1
Comment out the partition that you do not want to boot
mkdir /proc (needed when you reboot)
Do control-d to get back out to /Newlinux
(I found that I could not run lilo after chroot (...thus ran it from
existing.)
Reboot
<p>This is an outline only and naturally some problem solving will be
needed.
Once you are sure that your data has been copied ok and you can boot to
your new drive -Delete old partitions.
See man swapoff and man swapon
Create swap partition in newly found space,
Then .....mkswap /dev/hcxx
Tell /etc/fstab on your new drive where swap is to be mounted.
This worked well for me. Use care. Brian
<p>tabanna wrote:
Hi, SuSErs :)
I wish to transfer root / and all other directories on the root partition,
to a New Hard Disk
tar syntax
___________
Does someone know the correct syntax, please ?
(cd / ;tar -cf -.) | (cd /dev/new_HD/ ;tar -xpf - --same-owner)
_______________________________________________________________________
Please, need help getting syntax correct ?
thanks
best wishes
--
____________
sent on Linux
____________
100% Virus Free!
AMD Inside
--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com
For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the FAQ at http://www.suse.com/support/faq