[H-GEN] I'm stumped.......

Byron Ellacott rodent at route-qn.uqnga.org.au
Thu May 21 21:09:18 EDT 1998


On Thu, May 21, 1998 at 01:04:47PM +1000, Michael Anthon wrote:
> 1. Reboot from a floppy, create the partitions on the new HDD (swap and
> linux native), mount both drives and then use the following  (cd /d1 &&
> tar cf - . ) | ( cd /d2 && tar xfvp - )
I can see two potential problems with this; the first is
symlinks/hardlinks, as you mentioned, and the second is permissions -
not sure how tar maintains them.  you can use cp with several
arguments to do a copy without touching anything important .. -a, or
-dpR, is a good start .. -d copies symlinks as symlinks, -p preserves
owner, perm and timestamps, -R recurses :)

I still don't think that'll help with the hard links though, I don't
know how you could handle that .. except perhaps using a find command
on the original to find all the hard linked files, and fixing it up
with some simple script

> links being copied twice (or more) ??  I don't really know.  A more
> serious problem is that when I then run e2fsck on the new disk, I get
> HEAPS of errors.  Errr.. well, I did last night, just tried again and
> only got a few that didn't seem too serious, but it's still a lot bigger
> than it should be.
erp .. what errors?

> 2. Create a Linux Native partition on the new disk of a size just
> slightly larger than the old disk (can't get it exact due to the number
> of sectors on each disk) the use "dd if=/dev/sda1 of=/dev/sdb1".  This
> doesn't work.  The data is copied over, but it also seems to overwrite
> the partition table.  I would have thought copying sda1 would not copy
> the partition table, but I think there are also extra copies of the
> table repeated through the disk isn't there ?
no, the partition table is not repeated, however, the first block in
an inode system is the superblock, and this contains basic geometry
information .. you can't fudge it by having a partition that's ``close
enough''



----------------------- HUMBUG General List --------------------------------
echo "unsubscribe general" | mail majordomo at humbug.org.au # To Unsubscribe



More information about the General mailing list