Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to move my root filesystem to an another(bigger) partition on my hard drive. What is the most convenient way of doing that? Is the following a feasible scenario?

1- Boot via a live CD
2- Format target partition
3- cp -a all the files
4- update /boot/grub/menu.lst
5- grub-install
6- Profit?

I do not have a separate /boot partition.

share|improve this question
1  
Are you using LVM? –  Cristian Ciupitu Feb 22 '11 at 23:38
    
No, just plain partitions on a single SATA hard disk. –  Atilla Filiz Feb 23 '11 at 13:27
add comment

2 Answers

up vote 2 down vote accepted

Most of the time, you don't need to move the installation. Just resize the partition. http://gparted.sourceforge.net/livecd.php - this livecd is able to resize partitions.

If you really need to move to another partition, then rsync is your friend. Read its manual if you need to, but my hints are to use the -a switch ('archive' like in cp command). Rsync is better than cp, because sometimes cp will fail, or you will need to stop it etc. No need to start from scratch afterwards

  rsync -rvva /source/dir/  /dest/dir/

be sure to use slashes after the paths.

You have generally figured out most of the things you need to do. Other than these things, you will need to edit your /etc/fstab file, so that the new installation is able to mount the filesystems on the updated partition schema.

share|improve this answer
add comment

Last time I did that type of thing (a long time ago), I setup a minimal Linux install from scratch on the new disk and made sure it booted OK and then I copied of all the important areas.

I need to move another system onto a new disk soon and I was wondering whether Clonezilla, with dynamic partition resizing, would be the way to go.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.