Dual boot problem: GRUB to MBR doesn't seem to work
Fedora - InstallationThis forum is for the discussion of installation issues with Fedora.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dual boot problem: GRUB to MBR doesn't seem to work
Hello,
I have a PC with Windows 7 (OEM) installed. I would like to install Fedora 14 on a different partition of the same HDD (I have only one hard disk installed). I installed Fedora, but it still boots to Windows.
Prior to Fedora installation I shrank the last available partition by 64 GB to make space for Fedora. I downloaded the ISO image of the installation DVD, checked the SHA-256 checksum and proceeded to install the system. The installation went fine; it used the unallocated space to create additional Linux partitions (one for /boot and the other for LVM that, in turn, contains partitions for swap, / and /home).
I did make sure that GRUB is written to the MBR of the hard disk (and not to the /boot partition) during the installation.
The installation process completed successfully, the computer ejected the DVD and asked me to reboot. I rebooted the system and... nothing happened! It still boots Windows. No GRUB activity whatsoever. No menu, no reaction to pressing the SHIFT key.
I booted from the installation DVD again and selected the "Rescue..." option and then chroot'ed to /mnt/sysimage as suggested. Here is what I saw (I am omitting some bits for simplicity):
fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * ... ... 100 MB 7 HPFS/NTFS
/dev/sda2 ... ... 100 GB 7 HPFS/NTFS
/dev/sda3 ... ... 1,2 TB 7 HPFS/NTFS
/dev/sda4 ... ... 5 Extended
/dev/sda5 ... ... 8e Linux LVM
/dev/sda6 ... ... 83 Linux
100 MB is the active partition which is reported System Reserved in Windows. The 100 GB is the partition where Windows is installed. The remaining 1,2 TB partition is the third Windows partition.
cat /boot/grub/grub.conf (or menu.lst - the contents are basically the same):
default=0
timeout=0
splashimage=...
hiddenmenu
title Fedora (2.6.35...)
root (hd0,5)
kernel /vmlinuz-2.6.35...
initrc /initramfs-2.6.35...
title Other
rootnoverify (hd0, 0)
chainloader+1
AFAIK, the above indicates that GRUB should not display the menu, but it should start booting the default system which is 0, i.e. Fedora. None of this happens and SHIFT doesn't bring up the menu either.
The installation DVD does detect my Fedora installation, but the bootloader does not. I doubt that the MBR has been updated at all, even though Fedora installation did not report any problems.
Could anyone help me with this problem? I am new to GRUB (I have used other distros and LILO until now).
That all looks sane - maybe the MBR isn't being updated (check the BIOS settings), or you have some OEM software that "restores" it. Like Dell "data safe" or whatever it's called. That should only restore it once Win7 is booted though - if you go straight to Fedora you should be o.k.
Try SGD - make sure you get the legacy grub one, not the grub2 one.
I tried to install GRUB manually by while in rescue mode (from the installation DVD). I wanted to point grub to look for it's 1_5/2 stages in my /boot partition ("root (hd0, 5)" and then update the MBR on the disk with "setup (hd0)". But I ran into problems with the first command.
"root (hd0, 5)" returns the following error:
Error 18: Selected cylinder exceeds maximum supported by BIOS
Is it because I am exceeding the LBA limit? My /boot partition is indeed at the very end of a big disk (1,5 TB)? I don't suspect BIOS; it is a brand new computer and BIOS software seems to be fairly recent.
Would it help to move the /boot partition below the first 137 MB of the disk space? Or maybe it is a better idea to put GRUB in the first sector of my /boot partition and make that partition active?
I thought the LBA problem was closer to 2 Gig, but I don't have any big disks to test on. One assumes legacy grub will fade from the scene soon.
I always put the boot partition near (at preferably) the beginning of the disk if possible. Shrinking a NTFS data partition works as well - depends how you want to construct things. I might make sda3 as small as sensibly usable (say 600 Gig) and allocate the /boot as first logical (sda5). Then add your F14 root, and another NTFS (logical) in need.
Grub ignores the boot/active flag, and it is invalid for a logical partition even in the M$oft world.
The reason I wrote about the active partition is that I had an idea of putting GRUB to the first sector of the /boot partition. I know that GRUB doesn't need the /boot partition to be active, but that is only the case when GRUB is in charge (i.e. is located in the MBR)... am I right?
By the way, it turned out that my SATA HDD's mode had been set to IDE in BIOS. Switched it to AHCI in BIOS, tried the same steps again... to no avail. I am considering moving the /boot partition closer to the beginning of the drive (ideally, after the first two Windows partitions which take only 100 GB).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.