Charlie Bullen wrote:
> Hello,
>
> I need to copy the entire contents of /dev/hda4 which is mounted as
> /home to a second disk. The second disk is much larger than the first. I
> have a formated partition on the second disk, /dev/hdb4.
>
> What I think I need to do is |dd if=/dev/hda4 of=/dev/hdb4 . Then I
> need to modify /etc/fstab on the second disk to mount /dev/hdb4 as /home.
>
> Will the above dd command do what I want, namley copy all the contents
> to the larger partiton on the second disk?
>
> Also when all this is done, I am only going to be using the second
> disk, currently the /etc/fstab file on the second disk refers to the
> devices as /dev/hda1 , dev/hda2 etc. When I modify this file, should I
> refer to what in the copying process, I refered to as /dev/hdb4 as
> /dev/hda4 as that will then be the only disk that exists.
>
I think you may be better off using rsync for this, so that you can just copy
the files and not the filesystem, since you are moving to a larger filesystem.
Lets say you have /dev/hda4 mounted to /home.
Go to run-level 1 ( # init 1 ) and then mount /dev/hgb4 to someplace like
/mnt/new_home. then you can copying the files to the new place using:
# rsync -av /home/ /mnt/new_home/
You will need to fix the lines in /etc/fstab to get things to make sense when
you are done. I would be a good idea to have a knoppix or rescue disk on hand
to boot with in cause you get one or more lines wrong, and/or to allow you to
work with a static system.
- --
KevinO
"Wha...what does that mean?"
"It doesn't mean anything."
"Everybody falls the first time. Right, Trin?"
-- Mouse, Switch and Cypher, "The Matrix"
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss