Ray Olszewski wrote:
>
> Not to quibble, Marc, but your suggestion copies a filesystem, not a drive.
> It's still a good suggestion ... if the old drive has bad blocks, Jimmy
> probably doesn't really want to do a drive copy, and what you suggest will
> do most of what he needs ... at least for ext2 partitions.
>
<snip>
It works for any filesystem that Linux can read and write, but I saw
this problem as soon as I hit the send button and prepared an add-on
mail, so to speak to point out the need of re-installing lilo, the need
to do the above for every partition and how to copy hd's ono-to-one with
dd. Unfortunately, it got lost when netscape got stuck. (really :-) Then
I lost interest in writing it again :-(
What would probably be good to repeat her is the way to dd one disk onto
another one, when the sizes of the old and the new disks are not the
same. I pointed out that, e.g. in the case of sizeof(old)<sizeof(new),
one could do
root# dd if=/dev/hda of=/dev/hdb
xxxxxx records in
xxxxxx records out
root# fdisk
<some tricks to enlarge the last partition to cover>
<also the unused part of hdb>
root# ext2resize /dev/hdb<last> <new size in blocks>
But all this is really messy. Creating new-sized partitions on hdb,
copying each filesystem with tar (if you use the 'p' option, it will not
mess up permissions, important for /dev/*), and changing the blocksize
of all ext2 filesystems to 4KB (faster in handling large dirs and files
on 2.2; very much faster when used with 2.4, IIRC, because of
fs_blocksize==mm_pagesize) along the way is much cleaner (and faster
than re-installing your distribution, because you keep all configuration
files, not only those in /etc).
Sorry for that uncomplete mail...
Marc
--
Marc Mutz <[EMAIL PROTECTED]> http://marc.mutz.com/Encryption-HOWTO/
University of Bielefeld, Dep. of Mathematics / Dep. of Physics
PGP-keyID's: 0xd46ce9ab (RSA), 0x7ae55b9e (DSS/DH)