LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem installing fedora 17 in dual booting with windows 7 (https://www.linuxquestions.org/questions/linux-newbie-8/problem-installing-fedora-17-in-dual-booting-with-windows-7-a-4175412439/)

dnskdas 06-20-2012 06:17 AM

Problem installing fedora 17 in dual booting with windows 7
 
I have been using fedora 16 in my laptop which has a dual booting option with windows 7. Now when I wanted to switch over to fedora 17 I am having the following problems:
I was installing fresh copy of fedora 17, not upgrading of fedora 16. I used /dev/sda, where the windows 7 exists, as bootloader drive. At the end of the installation of packages, a window is coming which says "
Quote:

There was an error installing the bootloader. The system may not be bootable
"
When I pressed OK, the last screen comes saying that the installation is done successfully and asking to reboot the system. When I reboot the computer, the grub screen is not coming. The screen says:
Code:

GRUB loading
Welcome to Grub
error: file not found
Entering rescue mode..
grub rescue>

I tried different things but could not solve the problem. In fact, I was not even getting my windows partition. So I took the pain to reinstall Fedora 16 again. There the grub is loading nicely and got my windows back.
I guess that this is because of Grub2, but could not get the way out.
I have three partitions in my Linux installation. 15 GB /, 8GB swap and around 27 GB /home.
Please help to get around this problem

PTrenholme 06-21-2012 12:26 AM

How did you install F17? If it was from a DVD iso image, you should have an option to "rescue" an existing installation (IIRC, it in the menu displayed when you select "Troubleshoot" from the first menu.)

So, re-install F17 (after verifying that your DVD image was correctly burned - i.e., select "Verify and install, not just "Install.") Then, if you still have the problem, go to the "rescue" mode, do the suggested "chroot," and run grub2-mkconfig -o /boot/grub2/grub.cfg (You'll be running as "root" in rescue mode, so do be careful.)

Note that the problem you have appears to be that the grub.cfg file is not in its expected location. grub2 can be installed in either /boot/grub or /boot/grub2.

From the grub rescue> prompt, you could do a set command to see what parameters grub had defined when it entered "rescue" mode. (Of special interest is the value of the prefix parameter, which tells you where grub is looking for its files.) You could then do a ls $prefix to see what's actually there.

There are detailed discussions of grub2 and its rescue mode on the Web. Just "google" for them.

:)

dnskdas 06-21-2012 01:13 PM

* I ran grub2-mkconfig -o /boot/grub2/grub.cfg from rescue mode of the DVD as root like you have mentioned. But the problem still persisted.

* How I would choose the option "verify & install" while installing F17 (I have installed by burning iso image from DVD)

* I found grub.cfg in /boot/grub2

I will try the set commands from grub rescue as you have suggested. But the problem is if it does not work then it becomes difficult to get back even my windows installation. I had to reinstall f16 and only then I got my window 7 back.

- SKD

whysoserious 06-21-2012 06:32 PM

Are you replacing the old fedora you have on there? If so why do you choose the windows partition as bootloader?

dnskdas 06-22-2012 07:08 AM

I was installing fresh copy of f17 after deleting f16 since earlier I faced few problems while updating to a newer version of fedora. Since so far I had no problem at all by keeping bootloader in /dev/sda, this time also i opted for that. Later, when I was facing this problem I tried to first install f16(minimal for just a trial) and then update to f17. It asks whether I should be going to change bootloader or skip it. If I skip it, then normal grub menu is coming with only one entry that of Windows 7 and if I go for change the same remark "There was an error installing the bootloader. The system may not be bootable" coming before saying that it has successfully updated to f17 and asking to rebbot. And after rebooting same problem is coming.

Another reason of installing bootloader in windows partition is that I have never used softwares like EasyBCD to write the windows bootloader although when I had windows Xp as my window partition, once or twice I installed bootloader in the / partion and then copied a patch of it in windows drive and then edited boot.ini and the system worked nicely. But I am not much familar in editing windows 7 bootloader. Also perhaps I have to download EasyBCD.

arifur 06-22-2012 07:20 AM

I had this same problem installing Fedora 17
Quote:


# grub2-install
/sbin/grub2-setup: warn: Your embedding area is unusually small. core.img won't fit in it..
/sbin/grub2-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/sbin/grub2-setup: error: will not proceed with blocklists.

Even if I force intalled grub I got a blank screen.

What I did was create 100 mb of unallocated space on /dev/sda (First Harddisk), before any partation.
My configuration:
/dev/sda
100MB - Unalocated
54 GB - Win 7
Then all the linux partitaions and some NTFS partations.


You can give it a try. Just create atleast 10 MB of unalocated space on your boot hard drive. Then boot fedora rescue

Quote:


chroot /mnt/sysimage
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg

Then just reboot and grub should boot. Hope this helps

Arifur Rahman

whysoserious 06-22-2012 08:34 AM

Maybe you can boot into fedora, then install grub. So skip it at the fedora stage but install afterwards. After that run update-grub. I had a problem with grub. Mine was opposite though, it showed debain but didn't show windows.

arifur 06-22-2012 11:12 AM

Quote:

Originally Posted by whysoserious (Post 4709307)
Maybe you can boot into fedora, then install grub. So skip it at the fedora stage but install afterwards. After that run update-grub. I had a problem with grub. Mine was opposite though, it showed debain but didn't show windows.

Install windows boot loader using Win7/XP dvd/cd

Boot from linux cd/dvd in rescue mode
Code:

grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg

Now you should have windows and linux both added on grub.

Or you can also add linux to win7 boot loader by using EasyBCD.

Hope this helps.

Arifur Rahman

dnskdas 06-23-2012 03:01 AM

Thank you Mr. Arifur. I will give it a try. But only thing is that is it possible to create unallocated space in /dev/sda keeping my existing windows intact ? If it is disturbed then perhaps I have to reinstall windows again. Also what I found is that message coming in your case is different from mine. In my case it is saying that the files are not found which is because the bootloader could not be installed as shown by the previous window during installation of f17.

Also I found in some post that the option of installing bootloader in 1st sector of linux / partition and then editing windows 7 bootloader by EasyBCD is not working in case of f17.

arifur 06-23-2012 07:16 AM

Quote:

Originally Posted by dnskdas (Post 4709866)
Thank you Mr. Arifur. I will give it a try. But only thing is that is it possible to create unallocated space in /dev/sda keeping my existing windows intact ? If it is disturbed then perhaps I have to reinstall windows again. Also what I found is that message coming in your case is different from mine. In my case it is saying that the files are not found which is because the bootloader could not be installed as shown by the previous window during installation of f17.

Also I found in some post that the option of installing bootloader in 1st sector of linux / partition and then editing windows 7 bootloader by EasyBCD is not working in case of f17.


Ya thats right. It can messup your windows partition. But if you have a second hard disk you install grub on that hard disk. If you only have one hard disk then you can install grub on the 1st sector of fedora partition and add it to win bootloader using easy bcd.

PTrenholme 06-23-2012 10:29 AM

Quote:

Originally Posted by dnskdas (Post 4709866)
. . .But only thing is that is it possible to create unallocated space in /dev/sda keeping my existing windows intact ? . . .

If you have any bootable CD that contains grarted (and almost any LiveCD distribution will) you can move the Windows partition further down the drive, although you may need to to run the "recovery" procedure to adjust the Windows boot file for the changed position.

But you shouldn't need to do any of that since GRUB (Fedora 17's latest is grub2.0-0.25-beta4) doesn't need more than the standard 256Kb boot sector. (It does need a lot of memory since the boot sector just loads a kernel image info memory, which then loads additional modules as needed into memory to do the actual boot.)

The grub2-install /dev/sda and grub2-mkconfig -o /etc/grub.cfg suggested above should fix everything. But you need to be running your F17 installation for that to work. To get there, consider downloading and burning the Super Grub Disk (which will bit in a small USB stick) and using that to boot your system.

I suspect that your problem is that you didn't want to replace the old Windows boot loader with GRUB for fear that you wouldn't be able to boot your Windows, but that fear is, I think, unfounded.

dnskdas 06-23-2012 01:35 PM

Quote:

I suspect that your problem is that you didn't want to replace the old Windows boot loader with GRUB for fear that you wouldn't be able to boot your Windows, but that fear is, I think, unfounded.
Not exactly. While installing I tried to write bootloader in /dev/sda which would have replaced the old bootloader had it worked normally. But unfortunately it didn't. I tried grub2-install and grub2-mkconfig after booting into f17 by rescue mode of the installation DVD, but somehow it didn't work. Anyway I will give it a try again. Actually I am still not very sure why the bootloader of f17 could not be installed in /dev/sda when that of f16 is still installing fine at the same drive.

About the suggestion of editing windows 7 bootloader with EasyBCD, I already have mentioned that some people have had difficulty in adding f17 in that method. So I am a bit skeptic for that and also am not very confident.

Thanks for your suggestions.

arifur 06-23-2012 01:45 PM

Quote:

Actually I am still not very sure why the bootloader of f17 could not be installed in /dev/sda
I am using F17 bootloader on /dev/sda. And yes I did face some problem adding f17 on win 7 boot loader using easy bcd.

Can you post the error message that you received while uisng fedora rescue, i mean when you tried to install grub.

dnskdas 06-26-2012 04:36 AM

Quote:

Can you post the error message that you received while uisng fedora rescue, i mean when you tried to install grub
I can't properly recall them now. But perhaps the "grub-install" command itself was not working that time. I was giving the commands from shell prompt after getting root authority by "chroot /mnt/sysimage". Shall I have to give it from "grub>" prompt. But then how to get it since grub command itself was not working. I have gone through few articles about grub2, but little confused about reinstalling f17 in my system. This is because I still could not fathom out why grub2 of f16 is installed witthout any hazzle, but f17 could not.

dnskdas 06-27-2012 01:14 AM

I tried to install f17 again and this time, since earlier there was problem in installing bootloader in /dev/sda (i.e., MBR), I installed the bootloader in / partition and everything was installed fine without any error message. But still after rebooting I didn't get my windows 7 and the same initial dialogue came, i.e.,
Quote:

GRUB loading
Welcome to Grub
error: file not found
Entering rescue mode..
grub rescue>
Then with the installation disk I entered the linux partition in shell prompt and tried to install grub2 in /dev/sda
I first ran
Code:

# chroot /mnt/sysimage
Then,
Code:

# grub2-mkconfig -o /boot/grub2/grub.cfg
It worked fine and also found Windows 7 (loader) on /dev/sda1. Then I ran
Code:

# grub2-install /dev/sda
But the following message came:
Quote:

/usr/sbin/grub2-bios-setup: warning: this LDM has no Embedding partition; embedding won't be possible
/usr/sbin/grub2-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub2-bios-setup: error: will not proceed with blocklists.
which is almost similar to what Mr. Arifur had encountered. Mr. Arifur, you have suggested me to create unallocated space in /dev/sda, but I don't exactly know how to do that. Please write me about this how to.
Also I am requesting other experts to suggest explanation and also way out to this problem.
Thanks.
-SKD

PTrenholme 06-28-2012 11:37 AM

O.K., I just looked at some GRUB 2 references, and it seems like GRUB needs a 512Kb (or maybe just 512 bytes?) of free space after the MBR. So you'll need to move your partitions a bit, which is fairly easy to do. The easiest way is to boot from a Live CD that supports gparted (e.g., System Rescue, but almost any LiveCD distribution should have it available.)

Once you have gparted running, select your hard drive and resize the first partition to start a sector farther from the place where it currently starts. (That will make the first partition one sector smaller, which should not be a significant reduction in that partition's space.) Then go back and try the grub-install again.

dnskdas 06-30-2012 07:25 AM

Thank you. I will download the rescue CD and foloow what you have suggested and let you know. For the time being I am working in F17 by booting into it through Super Grub Disc.

dnskdas 07-02-2012 07:11 AM

I created 100 MB unallocated space before partition 1 with GParted and then tried to install Grub2 on /dev/sda, but the same warning, I have mentioned before, came again and it stopped installing. Then finally I tried to install it forcibly with
Code:

grub2-install --force --recheck /dev/sda
and this time although the same first two lines of warning came, but finally it said that it had finished installing grub2 without any error being reported. Now I am getting grub menu at the start and can enter f17 as well as windows 7 and so my immediate problem has been solved. Only thing I still could not understand what was the actual problem and whether thing has been stable or not ?
Thanks to you all for your support and help.
- SKD

tigger908 07-13-2012 03:44 AM

I had the same problem after a fresh install of Fedora 17 over an existing CentOS distribution. It seems the first stage of the boot loader failed to install (MBR). I already had a boot partition (512MB) at the start of the drive so my issues may not be the same as SKD. However using the --force and --recheck seem to allow the grub2-install command to proceed and succeed. This may work irrispective of the partition layout? Might be worth a try for anyone following this with similar issues.

T.

rahulbarai 08-27-2012 05:09 AM

Hello Everybody, I completely novice to Linux and also new to this forum. I tried to install Fedora 17 from DVD,in dual booting mode with Windows XP SP3. Firstly I created 22 GB Primary partition for installing Windows XP. Then I created two 15 GB partitions respectively,leaving 23 GB free space for installing Fedora 17.I had Installed the Windows XP first. Then I installed Fedora 17 with DVD in that free space following the instructions during the installation process,choosing GNOME. Installation was successful but at the very end it got stuck and error message was displayed
Quote:

There was an error installing the bootloader. The system may not be bootable
After that I tried everything as instructed in this thread above and all the same error message were showing that " dnkskdas " have mentioned in this thread step by step respectively. I tried running
Quote:

grub2-mkconfig -o /boot/grub2/grub.cfg
in recovery console as chroot following error message was given
Quote:

/usr/sbin/grub2-bios-setup: warning: this LDM has no Embedding partition; embedding won't be possible
/usr/sbin/grub2-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub2-bios-setup: error: will not proceed with blocklists.
,even I tried the following
Quote:

grub2-install --force --recheck /dev/sda
but this also went in vain,following error message was given
Quote:

grub cannot be installed in dev/sda,""force --recheck /dev/sda" command not recognized, contact bug-grub2@gnu.org
. Still my system is booting to Windows XP only and GRUB is nor showing. I tried to boot Fedora via Supper Grub disc ,but only Windows Xp is showing during that process. Please tell me what went wrong and how to fix the problem.
My Configuration is :
lenovo 3000 J series with
intel chipset Motherboard,
intel pentium 4 processor,
80 Gb Hard Disk,
1.25 Gb Ram,
512 MB NVIDIA Gforce 7600 graphics card.

Thanking you in advance.

tigger908 08-28-2012 03:00 AM

I'm guessing this may have something to do with the way you've partitioned your disk. Can you provide more informaiton on your partions?

T.

rahulbarai 08-28-2012 05:01 AM

Quote:

Originally Posted by tigger908 (Post 4766200)
I'm guessing this may have something to do with the way you've partitioned your disk. Can you provide more informaiton on your partions?

T.

Disk Partition order as follows respectively :
1. 500 MB boot partition
2. 22.35 GB NTFS (system windows)
3. 15.72 GB basic NTFS
4. 15.67 GB Basic NTFS
5. 20.03 GB Linux.

I have created a 100 MB unallocated space just after the 2nd partition.


All times are GMT -5. The time now is 11:12 AM.