1

I need to resize root as there is not enough space left in the partition. At present I am not able to install new package nor update ubuntu. I tried sudo apt-get clean and emptying trash but it does not make significant space.

I have dual boot system (windows-7 and Ubuntu 14.04 LTS) with two Internal hard drive. Where Windows is installed in /dev/sda and Ubuntu is installed in /dev/sdb. I tried to resize root using Gparted but it does not allow. Please let me know the steps of using Gparted for resizing root. I want to transfer space from "/home" to "/".

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb5        14G   13G  271M  98% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            3.8G  8.0K  3.8G   1% /dev
tmpfs           779M  1.3M  777M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.8G  160K  3.8G   1% /run/shm
none            100M   56K  100M   1% /run/user
/dev/sdb1       3.7G  555M  2.9G  16% /boot
/dev/sdb7       896G   75G  776G   9% /home

--

sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x38696756
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   976771071   488282112    7  HPFS/NTFS/exFAT
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000a1848
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048     7852031     3924992   83  Linux
/dev/sdb2         7854078  1953523711   972834817    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb5         7854080    37148671    14647296   83  Linux
/dev/sdb6        37150720    45043711     3946496   82  Linux swap / Solaris
/dev/sdb7        45045760  1953523711   954238976   83  Linux

Thank you

  • Is it /root, or /? – Pilot6 May 30 '15 at 10:46
  • 3
    possible duplicate of How to resize partitions? – karel May 30 '15 at 10:59
  • I updated my answer. You can't just extend / if there is no empty space. – Pilot6 May 30 '15 at 12:25
  • Thanks for your patience and support. I will try the steps as you suggested. – rajshri May 30 '15 at 12:30
  • And also see "duplicate" link. It has good answers. – Pilot6 May 30 '15 at 12:39
1

You do not have /root partition. You probably want to increase size of your / partition.

You will have to boot from liveCD to resize these partitions.

It must be safe, because you have a separate /boot partition, otherwise /etc/fstab may need to be updated with new UUID and/or grub reinstalled.

In your case you need to shrink your /home, which is /dev/sdb7, then move your swap partition right, then extend your / (/dev/sdb5) right.

You can do it with a mouse. Just drag partition's sides left or right.

This may take a lot of time.

  • Thank you for your suggestion. I am new using Gparted, So I want to know that what are the steps I should follow when I boot from liveCD. Does opening Gparted and then right click on "/dev/sdb5" and then resizing it will work ?? – rajshri May 30 '15 at 10:56
  • Yes it should work., if you do not mount anything by clicking on "disks". But if you mount them, you can unmount in gparted. – Pilot6 May 30 '15 at 10:58
  • Which steps? And what is the result? – Pilot6 May 30 '15 at 11:52
  • I tried resizing "/" Partition using Gparted. I followed these steps. (1) Used liveUSB to boot. (2) Open Gparted. (3) Selected "/dev/sdb" from top right corner. (4) Right click on "/dev/sdb5" and then clicked "Resize/Move" (5) Entered the Size in "New Size" column. But these steps can't be completed as the final resize/move button is not highlighted at the end . Please let me know how should I do it – rajshri May 30 '15 at 11:59
  • Can you add a screenshot of gparted to your question? It is probably logical within extended. I will give you directions then. – Pilot6 May 30 '15 at 12:01
0

You can't resize or delete mounted partitions. In your case, I'd start a live session of Ubuntu and then use GParted to resize the partitions.

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.