At Sat, 5 Oct 2002 14:40:33 +1000, Jeff Waugh wrote:
> <quote who="Voytek Eymont">
> > and, how do I image & un-image the entire /dev/hda ?
>
> Imaging is a bit different, and I didn't explain it above because you
> mentioned that you had two disks of differing size. If you end up creating a
> partition on your new disk that is exactly the same size as one on your old
> disk, you can do this:
> dd if=/dev/hda2 of=/dev/hdc2 bs=8M
you might also want to consider "parted" which can copy+resize the
common linux filesystems. if possible though, i'd go for a normal
file copy (using tar, cp, etc) rather than copying the filesystem
directly.
> > any reason why I shouldn't do it ('xcopy' and image) on a in-use system ?
>
> Yeah (explained above), but if you boot into single user mode, it's
> generally okay. You could boot with a recovery CD like LNX-BBC, but I
> wouldn't bother.
you could also (re)mount your filesystem read-only, then you *know* it
isn't going to get modified during the copy:
mount / -o remount,ro
probably essential if you're going to do a filesystem-level copy (dd,
parted, etc), since it will make sure the filesystem is in a
consistent state (it counts as "cleanly unmounted").
--
- Gus
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug