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.

Here the deal: I have Ubuntu 12.04 and Windows 7 both install in separate partitions in the following partition configuration:

  • Windows
  • Ubuntu
  • Swap

I decided that I wanted to move 50gbs from Linux to Windows, so I shrunk the Ubuntu partition with GParted. Now it's like this:

  • Windows
  • Ubuntu
  • 50gbs unallocated space
  • Swap

Now, I tried moving the Ubuntu partition to the right so that I could expand the Windows one, but GParted warned me that moving it could make Linux unbootable. Is there any way to do this without breaking my OS? Thanks a lot.

share|improve this question
    
Please remember to accept/upvote the best answer(s) to your question when possible (tick/check mark on the left). This way, the question is marked as "answered" and future readers can refer to it knowing the solution works. Thank you...:) –  izx Aug 30 '12 at 23:43
add comment

1 Answer 1

This depends on whether you installed Ubuntu to an extended partition, or if it's on a primary partition.

  • If primary, Ubuntu shouldn't break inspite of the warning.
  • If extended, Ubuntu will break (or more accurately, its bootloader GRUB will)
    • To fix this, you will need to boot from a LiveCD/LiveUSB and run sudo update-grub (you could possibly do this after GParted finishes, if you're already booted from a LiveCD)
share|improve this answer
    
this is curious ... Why does this happen ? (i.e. why would there be such problems, and just for extended partitions ?) –  josinalvo Jul 22 '12 at 21:45
    
@josinalvo: my explanation is limited because I'm typing on my phone, but here it is: GRUB2 needs to chain-load most of itself, called core.img before it can function. If your /boot is on an extended partition, Grub2 hard-codes the location of core.img based on the disk offset. If you move such a partition, core.img is no longer present at that offset and Grub2 will fail unless you run update-grub to update the offset to the new (moved) location of core.img. –  izx Jul 22 '12 at 21:50
    
Interesting. So grub understands primary partitions and, inside them, offsets. That is still curious =P Is it much harder to interpret the extended partitions ? –  josinalvo Jul 22 '12 at 22:00
    
en.wikipedia.org/wiki/Extended_Boot_Record explains why extended partitions are a bit more complicated to interpret –  josinalvo Jul 22 '12 at 22:44
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.