LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   copying to a larger disk (https://www.linuxquestions.org/questions/linux-newbie-8/copying-to-a-larger-disk-4175441223/)

wcboyd 12-12-2012 07:32 PM

copying to a larger disk
 
Hello All,

I am swapping out hard drives on my desktop. They are both pretty close to being the same size and they are both by the same manufacturer. What I plan to do is put the new one in boot up with a live CD and copy over EVERYTHING to the new one. Then take out the old one and just carry on like normal.

My question is: What copy command is most appropriate to copy EVERYTHING and/or what cp options will do what I need to do? I know I don't want to use dd as that will copy over the partition table as well.

lucmove 12-12-2012 07:42 PM

# mount /dev/sda1 /mnt/newdisk

# mount /dev/sdb1 /mnt/olddisk

# cd /mnt/oldisk

# find ./ -xdev -print0 | cpio -pa0V /mnt/newdisk

Go have lunch or something.

That is all assuming you only have one partition on each disk. If you have many, just repeat the procedure accordingly.

wcboyd 12-12-2012 07:52 PM

That is WONDERFUL!!!!

Thanks lucmove!

I will give that a shot!


All times are GMT -5. The time now is 09:45 AM.