4 Posts

February 3rd, 2011 09:00

Thanks, but he post does not solve the problem. Every time I restart windows7, I have to reinstall grub.

 

Any Help!

4 Operator

 • 

11.1K Posts

February 3rd, 2011 09:00

4 Operator

 • 

11.1K Posts

February 3rd, 2011 16:00

All I think of is that you installed grub in such a way as to cause this to happen.

 

 

3 Apprentice

 • 

904 Posts

February 4th, 2011 23:00

Thanks, but he post does not solve the problem. Every time I restart windows7, I have to reinstall grub.

 

Any Help!

Grub hasnt been installed properly.

Boot to live cd of ubuntu, open terminal and follow these steps. (assuming you have grub2)

 

1) Mount Ubuntu partition

2) In terminal make sure it is the correct partition

 

mount | tail -1
You should see output similar to this:
/dev/sda2 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)
 

 

3) To make sure this is indeed the Ubuntu boot partition, run the following command

ls /media/0d104aff-ec8c-44c8-b811-92b993823444/boot, substituting0d104aff-ec8c-44c8-b811-92b993823444


which should output something like this:

 

config-2.6.18-3-686 initrd.img-2.6.18-3-686.bak System.map-2.6.18-3-686 grub lost+found vmlinuz-2.6.18-3-686 initrd.img-2.6.18-3-686 memtest86+.bin

 

 

4) Now that everything is mounted, we just need to reinstall GRUB by specifying the correct directory and the correct drive name:

 

sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda
Just make sure that the media directory is the same, the '/dev/sda'  would remain the same
 if the ubuntu partition is somewhere between /dev/sda2-8

 
If you get BIOS warnings try:
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck

If everything goes fine then you should see something like this:

Installation finished. No error reported. This is the contents of the device map /boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'. (hd0) /dev/sda

Reboot, making sure to boot to your hard drive and not to the live CD.

Grub should be installed and both Ubuntu and Windows should have been automatically detected 

and listed in the menu. The Master Boot Record will execute Grub as the initial bootloader.

The Windows bootloader is contained within the Windows partition and will then be chainloaded 

by the Grub bootloader.

 

 

4 Posts

March 7th, 2011 13:00

Something happens when I install grub, and I forgot to say, is that when i execute sudo grub-install..... i get the message:

/usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it. 

This software may cause boot or other problems in future.  Please ask its authors not to store data in the boot track.

Installation finished. No error reported.

4 Posts

March 7th, 2011 13:00

Thanks for answering. But that solution do not solve the problem. It works when you need recover/repair grub, but the problem persists.

While using ubuntu, everything is fine. But when windows starts, there is "something" that erase grub. So, i need to repair the bootloader again.

Any suggestions?

Thanks again.

2 Posts

June 24th, 2011 03:00

Had that problem once. Dell DataSafe program is to blame. check here ubuntuforums.org/showpost.php

No Events found!

Top