Or download the System Rescue CD, boot it, launch the GUI (how to do that is on the screen, just type startx then hit enter) and use the GUI version of GPartEd (GNU Partition Editor). The drive you clone to still has to be exactly the same size or larger because it can't simultaneously clone and resize on the fly like most Windows partition tools can. To clone to a smaller drive in Linux you first have to resize the origin drive's partition down so it'll fit the destination drive. That can be an iffy thing if the origin drive is failing or must be preserved for forensic/evidence purposes.
On Wednesday, April 22, 2020, 9:33:59 PM MDT, Jon Elson <el...@pico-systems.com> wrote: On 04/22/2020 09:22 PM, andrew beck wrote: > Hey guys. > > Just a quick question here > > I recently heard some funny clanking noises in my old 2nd hand hard drive > on my VMC and thought I better change it out and get a SSD in there. > > I have a bunch of stuff loaded onto the hardrive for probe basic gui and > other stuff and would like to clone the drive and keep everything. > > I can manage a windows cloning I am just not sure if the process will work > on a linux system. I am using a crucial brand SSD and can download the > drive cloning software (it is rebadged acronis cloning software) > > Well, there are two basic procedures. As long as the new drive is at least as large or larger than the old drive, then you can make an absolute clone in a few hours with the dd command. Best to boot off a live dvd, figure out the names of the two drives and then |dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync if= is the input disk, of= is the output disk. Replace X and Y with the appropriate letters.Make REALLY sure you get these right, or you will end up wiping the old disk. To make sure, you can use fdisk /dev/sdX and then type p to see the partition tables and makes of the drives. That should tell you for sure which one has the linux file system, and which one probably has no partitions set up. The above procedure may not be real fast. If the new drive is larger, you can then expand the Linux file system to fill the disk. If the new disk is smaller, then this won't work. *** ONLY do the following if the new disk is smaller than the old one *** You have to create partitions with fdisk, make the file systems with mkfs and then copy all the files with : # mkdir /mnt/original # mkdir /mnt/copy # mount /dev/sdX# /mnt/original # mount /dev/sdY# /mnt/copy where X is for the original disk, Y is the copy, and # is the partition number # cp -rfa /mnt/original /mnt/copy and repeat this for all partitions (you don't need to copy the swapfile partition. You create that with mkswap. Now, the big issue here is that since files have been moved around on the disk, the grub loader will not know where to find them. So, you have to use the live DVD system to run grub to update the loader to know where things are. The procedure is a bit involved, so I won't detail it unless you need to go that route. Jon _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users