I installed ubuntu with dual boot alongside Windows 8. While partitioning I allocated 9.8 GB to the root directory of linux.Now i am short on space with only 700MB space remaining in this root directory. I cannot delete this OS because i have important application and files which run only on the Linux environment. Is there any way i can shift the root directory to another partition(I have an empty 17GB partition /dev/sda12 ) or increase the partition size?

This is how my partitions look like-

enter image description here

The error messgae when i boot into Windows is:

File : \Boot\BCD
Status : 0xc000000e
Info : The boot configuration Data on your PC is missing or contains errors

Let's follow these steps:



Overall Process

  1. Backup you Ubuntu system
  2. Identify UUID of new partition
  3. Modify /etc/fstab to mount new partition
  4. Copy old root (/) to new location /media/new_root
  5. Confirm copy worked
  6. Switch root mount point in /etc/fstab
  7. Remount all entries in the /etc/fstab
  8. Delete the /media/new_root


  1. Identify the UUID of the new partition to use with the command

    sudo blkid
  2. Setup /etc/fstab

    1. sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
    2. cmp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)

      Compares the two version

    3. Edit the old /etc/fstab, sudo nano /etc/fstab

      # (identifier)  (location, eg sda5)   (format, eg ext3 or ext4)      (some settings) 
      UUID=????????   /media/new_root    ext          defaults       0       2 

      Replace UUID with the value for /dev/sda12 seen in step1 above

  3. Create that mount point

    sudo mkdir /media/new_root
  4. Mount /dev/sda12on /media/new_root

    sudo mount -a
    1. Copy over /

      sudo rsync -aXS --progress --exclude='/*/.gvfs' /. /media/new_root/.
    2. Check the copying worked

      sudo diff -r / /media/new_root -x ".gvfs/*"
  5. Perform final switch

    1. sudo nano /etc/fstab

      # (identifier)  (location, eg sda5)   (format, eg ext3 or ext4)      (some settings) 
      UUID=????????   /    ext4          defaults       0       2
      • IMPORTANT: Add a # in front of the former entry in the /etc/fstab that was for the root mount i.e. /dev/sda10, please check and make sure you identify it using the UUID value.
  6. Now remount to see if all went well

    1. sudo mount -a
    2. Troubleshoot:

      1. The volume may already be mounted:

        sudo umount /media/new_root
        sudo mount -a
  7. Delete /media/new_root if all goes well.

    sudo rm -rI /media/new_root




  • Ok sorry for being late.First of all thanks.But i have some questions 1.I am mounting the /media/new_root at partition but when i am copying / to /media/new_root wont it go in a end less loop.Like it copies all the contents until it reaches /media, there when it tries to copy /new_root to the partition it is essentially recopying it self. Sorry if i am wrong im not very sound in linux filesystems, I just switched from windows so it is kind of new. – Nobody Jan 1 at 7:00
  • So i ran out of space in that partition, and can I format that again, since i changed fstab to mount sda10 as /. – Nobody Jan 1 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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