Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Windows partition sda2 and then, next to it, extended partition with Ubuntu sda6. Can I reallocate some of Ubuntu's free space to sda2? I know I can boot from liveCD GParted and cut some GB from sda6, but then the unallocated space will be after sda6 and not before, am I right?

Is it possible to add the unallocated space to sda2 or merge it, if not possible due to partitions position? From the screenshot, it looks like that space can be stuck in the middle of the extended partition:

enter image description here

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Yeah GParted should be able to handle that. You'll obviously need to do that from an offline state though (By that I mean from a LiveCD/USB session).

  1. Shrink sda6 (ext4).
  2. Move sda6 (ext4) right.
  3. Shrink sd4 (extended).
  4. Grow sda2 (ntfs).

Gparted should work out most of that for you but that's what I'd expect it to do. Only the move operations will take any significant time.

Oh and you'll need to make sure you've shut Windows down properly or it won't be able to edit the NTFS partition.

It's possible (though a small possibility in this case) that moving the disk partitions will alter their sdax assignment. This shouldn't be an issue these days (with grub and fstab using uuids) but you should be aware that this can be a problem. It's easily fixable from a LiveCD so don't panic if doing this stops Ubuntu from booting.

share|improve this answer
    
Moving the start of /dev/sda6 will also break GRUB which will need to be reinstalled while booted from a LiveCD/USB. The easiest way to do that is using BootRepair program –  Sergey Aug 23 '12 at 10:03
    
@Sergey Doesn't that depend on where grub is installed? If it's installed in the MBR (as I thought it is in most dual-boot setups), it shouldn't be affected. –  Oli Aug 23 '12 at 10:10
    
I wanted to expand sda2 eventually, not sda6. Sorry if I didn't made this clear, English is not my native language. –  Melody Nelson Aug 23 '12 at 10:12
    
@MelodyNelson Completely my fault but similar applies. I'll just rewrite to account for that. –  Oli Aug 23 '12 at 10:15
    
@Oli: It seems that GRUB's Stage 1 can load Stage 2 only by sector number. Stage2 in this case is located on /dev/sda6, so moving the start of the partition will break the bootloader. There also may be Stage 1.5 which, if installed, can load Stage 2 using normal filesystem access. Whether Stage 1.5 was installed depends on the presence of free space after MBR. gparted.sourceforge.net/faq.php#faq-13 en.wikipedia.org/wiki/GNU_GRUB#GRUB_version_2 –  Sergey Aug 23 '12 at 10:29

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.