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 currently have 3 partitions: Windows, Ubuntu, and swap.

I want to move my windows partition by about 20GB. When I try to do this in GParted, it tells me that this will mess up GRUB, and that there is a page that can resolve these issues.

However, this page does not actually mention my issue. I am not moving my boot partition (Ubuntu).

How can I force GRUB to look for operating systems that are on the drive? I know that this is possible, because when Ubuntu was installed it found Windows without any issues.

Additionally, if I create a copy of a partition, how can I add that to GRUB (I assume it will be the same command as above, but if not, what would it be)?

Note: OS prober is mentioned here but it doest not list how to use it, or where to find it.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You can always use sudo update-grub command to automatically probe for Operating systems in the Drive. Yes, It will do it automagically.

Procedure:

  • Open a terminal, by pressing Super key, which is also called as Windows key, type terminal, hit Enter

  • Type sudo update-grub and wait to see what it says.

  • If you see messages like "Microsoft Windows XP is found in /dev/sda1" or like it is done.

An example run returned this output in my system. Your output may vary.

student@student-ThinkCentre-A70:~$ sudo update-grub
[sudo] password for student: 
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda1
done

Hope this will help.

share|improve this answer

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.