1

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.

1
  • 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...:)
    – ish
    Aug 30, 2012 at 23:43

3 Answers 3

0

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)
4
  • this is curious ... Why does this happen ? (i.e. why would there be such problems, and just for extended partitions ?)
    – josinalvo
    Jul 22, 2012 at 21:45
  • 1
    @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.
    – ish
    Jul 22, 2012 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, 2012 at 22:00
  • en.wikipedia.org/wiki/Extended_Boot_Record explains why extended partitions are a bit more complicated to interpret
    – josinalvo
    Jul 22, 2012 at 22:44
0
  • In your case, first you have to shrink 50gb from the left from your Ubuntu partition. This would probably break the bootloader, but no worries.

  • Then extend the Windows partition with that unallocated 50gb space.

  • Boot into a Ubuntu LiveCD/LiveUSB and reinstall the bootloader. It's just a matter of slapping few commands on the terminal.

0

Like GParted said moving it could make Linux unbootable, mostly what Gparted said is going to happen if you move your linux to right and you will have hard time repairing it. It will take same amount of time as a fresh install.

You should better go with fresh install (remember to backup the data).

You must log in to answer this question.

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