Can I safely copy one partition to another and delete the first?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can I safely copy one partition to another and delete the first?
I'm screwing around with my partitioning scheme in order to make room to try some other distros and I'm wondering how to copy my / partition to elsewhere on the disk. I'm thinking just make two partitions the same size (and format, which is ext3), and then use the "dd" command, right? Or will that destroy my file system? Like, "dd if=/dev/sda5 of=/dev/sda3"? gparted will allow the user to move a partition but I've heard that it's buggy and not reliable.
I've used gparted several times to resize and copy partitions and never had an issue. (I always backup any first, but have never had to restore because of anything gparted has done). If you are creating a new partition on the same disk so another OS or distro can be installed, it may not be necessary to copy your existing partition, just shrink it to make room for another. A mounted partition cannot be moved or resized, and you can't umount the partition your OS is running on, so the easiest way is to boot from a live CD or rescue CD that has gparted on it.
gparted will allow the user to move a partition but I've heard that it's buggy and not reliable.
I think there is an inherent risk of data corruption whenever you move or copy data, but I've used gparted several times and never had an error. I moved all of the partitions on my laptop the other day, including 2 windows partitions. Although I anticipated problems (I was prepared to restore everything, if necessary), it did it without problem. If you have a backup, I think gparted is worth using.
I've used gparted several times to resize and copy partitions and never had an issue. (I always backup any first, but have never had to restore because of anything gparted has done). If you are creating a new partition on the same disk so another OS or distro can be installed, it may not be necessary to copy your existing partition, just shrink it to make room for another. A mounted partition cannot be moved or resized, and you can't umount the partition your OS is running on, so the easiest way is to boot from a live CD or rescue CD that has gparted on it.
Yeah, I would just resize if that were an option but it's really not; the partition is in a bad spot because I created it last week as a stopgap for various reasons but if I want my partition table to be at all reasonable I have to move and resize my / partition.
If it's safe to use gparted's move tool, though, I'll do that instead. I'm guessing from the responses here that it's not as risky as I was led to believe.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.