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 have ubuntu and i want to enlarge the disk space of /dev/sda1 from 10GB to 90GB.

gparted Ubuntu 9.04 live cd show:

 Partition    File System   Size
 /dev/sda1    ext4          10GB
 /dev/sda2    linux-swap    4GB
 unallocated  unallocated   146000

I click on /dev/sda1 and option resize only give option to reduce and not enlarge disk.

Please help me.


Update:failing boot - unable to enter to my ubuntu OS, infinite loop in begining:

What I done:

  1. delete /dev/sda2
  2. resize /dev/sda1 to 160GB
  3. create /dev/sda2 with size 4GB primary partition and make it linux-swap
  4. restart PC and remove ubuntu live cd - result: unable to access to my installed before ubuntu OS.

my current map according gparted ubuntu live cd:

 Partition    File System   Size
 /dev/sda1    ext4          156GB
 /dev/sda2    linux-swap    4GB

Solution for the problem(get idea from Mat): https://help.ubuntu.com/community/Grub2#Reinstalling_GRUB2 Thanks,

share|improve this question
    
Ubuntu 9.04 reached end of life in October of 2010. You should get a supported release. –  psusi Feb 26 '12 at 21:53
add comment

1 Answer

up vote 1 down vote accepted

Partitions (to my knowledge) have to be contiguous, so you'd have to move sda2 to the "right" so that there's unallocated space between sda1 and sda2. Then you could expand sda1 to fill this newly created space.

share|improve this answer
    
thanks, how can i do it with commands? –  Yosef Feb 26 '12 at 12:09
    
@Yosef If by "commands" you meant the GUI: Click on the sda2 partition, hit "Resize/Move", and drag it to the right. Then click on sda1, click "Resize/Move", and drag the triangle on the right to expand it. If you meant a command-line partition editor like parted, it's a little more complicated. –  Dr Kitty Feb 26 '12 at 15:56
    
hi, i made it but know when i restart computer he doing infinite loop and not enter to the screen with ubuntu option –  Yosef Feb 26 '12 at 19:28
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.