22

I am trying to resize my /dev/sda1 as shown in the diagram using the gparted Live cd.However although I have unallocated space I am unable to expand it.I have tried expanding /dev/sda2(which works) and then decreasing its size from the beginning(which doesnt). But that doesnt work either. Could someone please tell ,me how to resize my /dev/sda1 partition.

enter image description here

4 Answers 4

26

The extended sda2 partition is in the way. Do one of two things:

  • If Gparted allows, move sda2 to the very right, and then you'll be able to expand sda1.
  • Alternatively, delete sda2, expand sda1 by 2GB and then recreated your swap partition (an extended partition isn't required if you have 4 or less primary partitions).
3
  • The first is not possible since it does not allow me not do that. Does the swap partition have any specific data in it or is it simply empty space to use when the ram is overloaded with the swap flag turned on? Aug 13, 2012 at 5:38
  • Your understanding of swap is correct - there is no data in it.
    – ish
    Aug 13, 2012 at 5:40
  • The alternate option worked for me well. I've done this twice without memory loss or errors. Apr 8, 2019 at 1:53
8

Simplified answer from the previous post article:

In gparted:

  1. Open sda2and resize it to fit all the unallocated space.
  2. Open sda5 and move linux-swap all the way to the right, at the end of the disk.
  3. Open sda2 again and resize it with the left handle to fit only sda5 size on right corner, leaving unnalocated space to the left.

sda2 moved to the end of the disk

  1. gparted will then allow you to resize sda1 and increase its size, and apply changes.

sda1 free to be resized

1
  • Worked for me - Deleted sda2 then resized sda1 - Thanks Apr 8, 2019 at 1:53
0

To expand sda1 I booted into a gparted live disc and then I deleted the sda2 and extended the sda1. Gparted left 1mb over. When I booted it was alright. (Tip: when you close gparted you have to double click on exit)(Tip: do a backup - at one stage I did lose everything! luckily I had a backup)

0

I had this trouble and the blog post by: JOCHEN HEBBRECHT worked really well for me! It describes how to delete the annoying partitions and resize the repartition you want to.

The essential solution: using gParted

  1. Right-click on the partitions you dont want and select swapoff
  2. Right-click on it again and select delete
  3. Ignore the warnings
  4. Resize and apply
  5. Restart VM/machine

This worked for me and didnt corrupt what I already had installed. The virtualbox vm is still working great!

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .