Re: I need to clone my working nslu2
- I would use these instructions with a grain of salt. One needs to be careful that TAR does not exactly duplicate file systems. Older versions of TAR had the limit of 255 characters for the path length so it wasn't uncommon to see whole directory trees missing... GNU tar solves that problem, but there are still other problems to be concerned about. First off, tar does not preserve either file system holes, file attributes, nor ACL's. There is a --sparse flag you can add to the tar command which will sort of preserve file system holes. I say sort of, because what it really does is create new holes that hopefully match the old ones.
If you do not use the correct tags with tar you can also lose other information such as last access time, permissions, and owners. In general if I see any document where the person recommends this method of copying file systems without at least mentioning the caveats, I ignore everything and look something written by someone who knows what they are doing.
Now you might ask, if you shouldn't use tar, what should you use? Well if you don't mind the caveats above go head and use tar. Many people prefer CPIO, however that also has some limitations to be wary of. As does 'cp -a', ... My personal favourite is rsync. Once you figure out the correct flags not only will it copy everything but it will verify the copy. If your copy gets interrupted, it will figure out where to resume the next time you use it. However, this comes at a cost. rsync takes ruffly twice as long.
If I am copying a whole filesystem, I usually use 'dd bs=4096' on the raw devices. This works wonderfully, if and only if your old hard drive have ruffly the same mapping. However, this seems to be true nearly 100% of the time now days. After you copy the raw file system, you can resize it to the new partition size with resize2fs. You'll want to run e2fsck after you are done to verify you have a good copy.
--- In email@example.com, "Robert D" <robert.dammers@...> wrote:
> I was sure someone else would answer this. I was looking in the Wiki for the procedure I used a couple of times as I upgraded from a 250GB to a 500Gb and then a 1Tb system volume. Unfortunately, I can't seem to find that any more. However, this procedure seems to be exactly what you are looking for:
> Good luck!