On Mon, 2005-01-31 at 01:13 -0700, der.hans wrote: > Am 31. Jan, 2005 schwätzte Michael so: > > > Is it possible under Linux to copy, mirror, .iso a hard drive to a hard > > drive and do so to a bootable state? I have a friend who would like to > > copy (Norton Ghost) a drive to another under Linux, but I am unsure > > how to do this as I have always installed to a drive. > > For GNU/Linux ( and probably most *NIXen ) this works quite well. > > Make a partition on the new drive big enough to hold the old drive and use > dd. Not the best way, but it works if neither partition is mounted. > > dd if=/dev/$oldpartition of=/dev/$newpartition > > Hmm, there are some projects for this, but I can't figure out what they > are. > > Here are notes I'm using for a similar process for copying to many similar > boxen. I'm using tar to make the copies. --atime-preserve is an important > option for the process. They weren't meant for someone else to read, but > if you wait for me to fix them up it'll be several days if not several > weeks, so you get the raw notes now :). > > ### > partitioned new drive: > linux partition first, making it a primary partition and giving it > most of the drive and leaving about 128MB for swap > swap as a primary partition as well, giving it the rest of the > drive > change type for swap partition to be swap > marked linux partition as bootable > mkfs.ext3 on linux partition > mkfs.ext3 /dev/sda1 > mkswap on swap partition > mkswap /dev/sda2 > mount linux partition > mount /dev/sda1 /media/usb0 > if copying to multiple partitions have them all mounted up prior to the > copy > if copying from multiple partitions reuse the below and adjust for the > secondary partitions > cd /; tar -cf - --exclude="./home/*" --exclude="./tmp/*" > --exclude="./var/tmp/*"--exclude="./var/run/*" --atime-preserve -l . | tar > -xf - -C /media/usb0/ 2>&1 | tee /tmp/tar.out > there might be a couple of warnings about not copying sockets, but they > can be ignored > use '.' rather than '*' in conjunction with '-l' for tar to avoid picking > up secondary partitions > space used on old and new partitions should be about the same > need to copy /.dev to the new dev dir > cp -pr /media/usb0/.dev/* /media/usb0/dev/ > fsck the new partition? Haven't been doing this. > e2fsck -y /dev/sda1 > fix new fstab if necessary > install grub in boot partition > grub-install --recheck --root-directory=/media/usb0 /dev/sda > ### > > I've done this type of thing many times in the past with GNU/Linux > systems. Up until the udev issue I mentioned on the last week this has > always worked quite well. > > Another trick is necessary if he's copying the boot drive and using lilo. ---- dd is very cool and an effective tool most of the time - does have a slight learning curve though I would suggest looking at ghost 4 linux trying to be like the norton version only it's free... Craig --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss