Click to See Complete Forum and Search --> : Copying a whole filesystem


Tulluin
05-16-2003, 03:02 PM
Here's the story: I want to copy all of /dev/hdb1 to a new partition, edit fstab so that it points there, and reboot. /dev/hdb1 has my system on it, and it's a slow, old hard drive that I want to get rid of.
Things I'd like to know:
1. Can I resize an ext2 partition? If so, with what tools?
2. Can I backup all of /dev/hdb1 and copy it to a new partition? If so, with what tools?
Thanks in advance.

Brocket99
05-16-2003, 04:02 PM
1. Can I resize an ext2 partition? If so, with what tools?
2. Can I backup all of /dev/hdb1 and copy it to a new partition? If so, with what tools?
Thanks in advance.


there's tools to resize partitions. try gnu parted. this tool works only with ext2, fat, and linux-swap though i think.

if you want to dump all of the contents of hdb1 to another partition try disk dump.
quote en verbatim from rute:
If you have two IDE drives that are of identical size, and provided that your are sure they contain no bad sectors and provided neither are mounted, you can run:
dd if=/dev/hdc of=/dev/hdd
to copy the entire disk and avoid having to install an operating system from scratch. /quote.

this would probably apply to any same sized non-mounted partition across or on the same hard drive.
dd if=/dev/hdb1 of=/dev/????