On 19-Dec-98 Hal MacArgle wrote: >> >> Well I am a bit embarrassed having to ask what is really a newbie question >> and it is way off subject for this list. I need to move a Linux systems >> from a small drive to a large drive. I have it all set up in mount have no >> problem with lilo and all the other info in the howto but need a bit of >> info on how to use cpio to move the whole mess. The old drive has only two >> partitions I have broken the new drive up to several. I think that cpio >> would be the best bet but heck I haven't figured out the syntax to do it. >> Could someone on the list give me the proper syntax to make this move that >> would perserve all the links, permissions and directory structure in on >> command. >> Mel >> > With the original drive mounted, e2fs, and the new drive > partitioned larger than the old partition, and not mounted, and in > the '/' directory - I use: > > dd if=/dev/hda2 of=/dev/hdc2 bs 2048 > It does mirror it but that isn't what you want and won't help you very much except by accident. The official (but old fashioned) way is as follows:- mkfs -t ext2 /dev/hdb<n> or whatever your partition is. mount /dev/hdb<n> /mnt find /bin /usr /home etc -print | cpio -pduvm /mnt DON'T say find / as you will probably recursively copy that which you have already copied onto /mnt when find gets there (it may be intelligent nowadays but certainly wasn't). In anycase if you have loads of partitions you will want to split the / tree up anyway. I have to say (and I have my heart in my mouth as I do so) that I don't necessarily agree with having lots of partitions, I make do with two on my redhat system - / and /home. I copy (using the above method) and then symlink /usr/src and /usr/local to /home/src and /home/local respectively. I also take periodic copies (using cron) of /etc and put it in /home/etc but this is really only a backup. There are cases for putting /usr and/or /var on separate volumes (and I am assuming you aren't into heavy database work in which case other considerations apply), but unless your volumes are high and predictable I wouldn't bother. The difficulty is that having loads of smallish volumes will mean that you almost certainly will run of space in one or more of them. Also most modern filesystems go to a lot of trouble to pack the data together - by partioning the disc you defeat all of this and artificially block all the good work that has been done by deliberately adding extra head movement! Regards Dirk G1TLH --- Dirk-Jan Koopman, Tobit Computer Co Ltd At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer.
