Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a MacBook Pro with Mac OSX installed and Ubuntu 12.04. I wanted to resize my Ubuntu partition, so I booted to a 10.04 liveCD and used GParted to "move/resize" my Ubuntu partition.

Unfortunately, I think GParted defaults to moving it 1000MiB to the right (i.e., adds 1000MiB of unallocated space to the left, and moves the partition right), something I didn't realize until after I had started the process.

In addition to doing this, I reduced its sized by ~10GiB (9.77GiB in the screenshot) from the right, and added an ext3 partition in that unallocated space (I'm trying to do Linux From Scratch)

How can I repair my system so that I can boot my Ubuntu 12.04 system? Perhaps it is something to do with Grub? I use the rEFIt Boot Manager, so everytime at boot, I have the option to load either OSX or Linux. I have already gone through the option to sync/update the MBR in rEFIt.

Here is a screenshot of GParted from my livecd booted up after the move:

enter image description here

Something very fortunate, though, is that in File Browser, in the left-hand panel, I can mount the "132 GB Filesystem", which is my 12.04 Filesystem which I moved and can no longer boot. I can browse it, and read files from it. Here is a screenshot:

enter image description here

share|improve this question
up vote 3 down vote accepted

It would appear that Grub is looking for Ubuntu in the wrong place. As the files are still there, nothing should be wiped. You will just need to fix Grub.

Fixing Grub with Boot Repair

The easiest way to do that is with "Boot Repair"

First boot into the live CD. Then install "Boot Repair" itself.

Enter these commands if you run Ubuntu 12.04

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

For Ubuntu 14.04

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

And for Ubuntu 14.10

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/utopic/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-utopic.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

This will also start the program after it has been installed.

Once the GUI opens up, click on the Recommended repair. This will reinstall the Grub2 boot-loader and find your Linux partition in its new location.

The guide uses steps from this source. Read it if you want more information.

Alternatively here is how to with the terminal only.

share|improve this answer
I installed and ran boot-repair, but gee, it's taking its time. It's been "Scanning systems. This may require several minutes..." for hours now. Is this normal? I do have a relatively large drive. – kalaracey Jul 25 '12 at 16:59
It may take some time, but hours seems a bit odd. I've not heard of it taking that much time...not sure why it would take that long unless it's having problems finding the Linux kernel Images, not sure why it would not be able to find them though. – TrailRider Jul 25 '12 at 20:55
Do you think I should do ... && sudo boot-repair? – kalaracey Jul 26 '12 at 1:22
boot repair should already run with sudo privileges. Have you tried to shut down boot repair and run it again? (you can find it in the dash) if so did it still freeze? I assume that the window to select the repair never came up, it just froze at the first window with the bar running back and forth? – TrailRider Jul 26 '12 at 1:28
@ignis Thanks for pointing that out. I corrected it and also did some rearranging of the whole answer... I hope I didn't overdo it. :P – MadMike Oct 17 '14 at 22:07

Your Answer


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.