LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Problem with GRUB (https://www.linuxquestions.org/questions/ubuntu-63/problem-with-grub-696672/)

svt11 01-12-2009 03:42 AM

Problem with GRUB
 
Hi, I have the following problem. I have 2 HDD - 1st (250GB) with with two NTFS partitions - C - Windows Vista and D - NTFS again; 2nd (500GB) - with 4 partitions - 25GB ext3 with Ubuntu, 2GB swap, 25GB with Windows 7 beta, and the last is NTFS. Before I installed Windows 7 the first disk have its own Vista loader, I have installed Ubuntu in /dev/sdb1 with GRUB bootloader being on /dev/sdb1 - 2nd HDD. I decided then to install Fedora 10 on the /dev/sdb3 - 25GB and it overwrited my GRUB loader, so any fix to GRUB I must have do through Fedora's /boot directory where the new GRUB bootloader was located. Yesterday I have installed Windows 7 in the Fedora's partition and the GRUB loader was gone. And not only this but when I boot from 1st HDD I see Windows menu loader and Windows 7 in it. Is it possible that Windows 7 have overwrited my MBR in the 1st HDD and the bootloader is located in the 2nd HDD weher is Windows 7 located and how can I restore GRUB bootloader to recover Ubuntu without breking the Linux bootloader?
Thank you

pixellany 01-12-2009 06:56 AM

I'm afraid I cannot follow this.

Please summarize the partitions and what is installed in each one (preferably use Linux nomenclature)
e.g.:
sda1 Vista
sdb1 Ubuntu
sdb2 Fedora
etc.

Can you boot into any Linux?

Can you boot into both Vista and Windows 7?

If you can get into Linux, post the output of "fdisk -l" (run as root, using sudo if in Ubuntu)

If necessary, you can boot from a Linux "Live CD" to re-install GRUB.

svt11 01-12-2009 08:22 AM

/dev/sda
250GB SATA
/dev/sda1 35GB Windows Vista
/dev/sda5 200+GB NTFS
/dev/sdb
500GB SATA
/dev/sdb1 25GB Ubuntu
/dev/sdb2 2GB swap
/dev/sdb3 25GB Windows 7
/dev/sdb4 400+GB NTFS

I had GRUB in /dev/sdb3 where was Fedora 10, I removed it and installed Windows 7 on here place. And GRUB is now gone because of deleting Fedora.
I have tried with livecd Ubuntu, I had Internet in Ubntu livecd,mounted /dev/sdb1 and chrooted in mount dir and removed grub with sudo aptget remove grub. When I tried to download it again it says it can't find such package, can't resolve se.archive.ubuntu.com... I don't know what was the address...
huh, there is GUI way to recover it...
https://help.ubuntu.com/community/LiveCdRecovery

pixellany 01-12-2009 03:17 PM

Several comments:

1. Removing the grub package with apt-get will not remove grub from the MBR or partition boot record---it will (if anything) just remove the GRUB package, including the various utilities.

2. You say that GRUB was in sda3. You can only have GRUB in a partition if there is something the MBR to point to it. If you did not consciously set up such a thing, then Fedora would not have booted from grub in sda3.

3. Installing Windows typically takes the MBR for the Windows loader.

4. When you installed Windows, Did you have the 500GB drive set as #1 (in the BIOS)

Regardless of the above, you can re-install GRUB using the Ubuntu Live CD (The instructions are in the link you supplied.)

cloud9repo 02-11-2009 06:12 AM

Quote:

Originally Posted by svt11 (Post 3405430)
Hi, I have the following problem. I have 2 HDD - 1st (250GB) with with two NTFS partitions - C - Windows Vista and D - NTFS again; 2nd (500GB) - with 4 partitions - 25GB ext3 with Ubuntu, 2GB swap, 25GB with Windows 7 beta, and the last is NTFS. Before I installed Windows 7 the first disk have its own Vista loader,
...

Download a repair disk. There are many, and I think the Ultimate Boot Disk will handle this, as it includes Windows Utils.

With that many concurrent OS's you might want to consider a different scheme. Perhaps one drive MS based, and the other linux.

GRUB is a very complex device loader, and can be easily over-managed. With especially the Microsoft folks wanting to dominate the market. They are corrupt, enough said...

CJS 02-11-2009 09:41 AM

In order for us to get a clearer picture of your booting setup, how about booting your Ubuntu Live CD (the Ubuntu install CD), download the Boot Info Script to the Live CD desktop, open a terminal (Applications > Accessories > Terminal) and do:
Code:

sudo bash ~/Desktop/boot_info_script*.sh
That will create a "RESULTS.txt" file in the same directory from where the script is run, namely your desktop; please copy/paste the contents of the RESULTS.txt file to your next post, highlight the copied text, and click the pound/hash sign # graphic in the forum message box so that the text will get "code" tags put around it. The results of that script will help clarify your setup and hopefully what the solution to your booting problem might be.


All times are GMT -5. The time now is 09:21 AM.