LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How To Add Windows 7 To GRUB Boot Entry. ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-windows-7-to-grub-boot-entry-892791/)

R_AD 07-20-2011 02:56 PM

How To Add Windows 7 To GRUB Boot Entry. ?
 
Hello All!, I have Recently downloaded Fedora 15.|64bit| & I Think its a very good distro. However I Realised Once My Pc Restarted My Windows 7 Was Removed from my boot entry. I am Not At All familar with Linux, Ive Read millions of forums trying to fix my problem but all has failed.Could someone show me how to add The OS Back or How To Burn A Bootable OS (Win7) Using This Distro Of Linux. I Would really be very appreciative of this help. :(



Thanks In Advance.

T3RM1NVT0R 07-20-2011 04:19 PM

@ Reply
 
Hi there,

Welcome to LQ!!!

If Windows 7 was the first operating system that you installed on the system and over it you have installed Fedora 15 the you can try the following steps to get your Windows 7 entry back:

1. Boot into Fedora 15.
2. Login.
3. Open up terminal.
4. Type: su - root and enter the root password.
5. Backup /boot/grub/grub.conf file using the following command: cp /boot/grub/grub.conf /boot/grub/grub.bak
6. vi /boot/grub/grub.conf and then hit insert key. Scroll to bottom of the page and then put the following entries at the end of the file:

Code:

title Windows 7

          rootnoverify (hd0,1)
          chainloader +1

7. Hit escape key and then press : and type wq to write the changes.
8. Reboot your system and see if you are able to get Windows 7.

R_AD 07-20-2011 04:34 PM

Great Thanks Alot!. However I Now experience a new problem, when i try to boot windows 7
i get this error: Filename must be an absolute pathname or blocklist. Any Knowlege of what happened?

T3RM1NVT0R 07-20-2011 04:39 PM

@ Reply
 
From the output I can see (hd0,1) is in use by Fedora so it appears that your Windows should be on (hd0,0). Make the changes as follows:

Code:

# kernel /boot/vmlinuz-version ro root=/dev/sda2
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=0
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.38.8-35.fc15.x86_64)
root (hd0,1)
kernel /boot/vmlinuz-2.6.38.8-35.fc15.x86_64 ro root=UUID=05f9d427-1f75-4011-9557-e9f24fc98845 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /boot/initramfs-2.6.38.8-35.fc15.x86_64.img
title Fedora (2.6.38.6-26.rc1.fc15.x86_64)
root (hd0,1)
kernel /boot/vmlinuz-2.6.38.6-26.rc1.fc15.x86_64 ro root=UUID=05f9d427-1f75-4011-9557-e9f24fc98845 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /boot/initramfs-2.6.38.6-26.rc1.fc15.x86_64.img

title Windows 7

rootnoverify (hd0,0)
chainloader +1

When you will hit the escape key then you can type : (semicolon) this will give you a : prompt at the bottom of the vi screen (vi is an editor using which you are editing the file as I mentioned in the my previous post). At : prompt you have to type wq and then hit enter. Once done reboot your system.

yancek 07-20-2011 04:49 PM

Quote:

Ive Read millions of forums trying to fix my problem
Millions??

Are you trying to use the Fedora bootloader?
Did you install the Fedora bootloader to the master boot record?
Did you install the Fedora bootloader to its partition?
Did you install Fedora to a separate partition from windows?

Fedora is very good at detecting windows partitions and adding an entry to its boot menu. I would guess based on the limited information you provided that you either did not install the Fedora bootloader to the master boot record or you installed Fedora to the same partition as windows.

If you could post drive/partition information it would help someone to help you. Boot Fedora, click the Applications tab on the Desktop and find the terminal, open it and enter: su -, you will be prompted for your root password. Enter it and the type the command: fdisk -l, (loweer case letter L in the command) this will give your partition information to post here so someone can give you more specific instructions on how to solve your problem.

The solution suggested above will work if:

your windows boot files are on the second partition of the first drive,
you install Fedora bootloader to the mbr,
you didn't overwrite your windows partition.

T3RM1NVT0R 07-20-2011 04:52 PM

@ Reply
 
Did you try edited steps that I have mentioned in my previous post? If yes, then boot into Fedora 15 and let me know the output of your /boot/grub/grub.conf file. You can get this using the following commands:

1. Login.
2. Open up terminal.
3. In the terminal type: su - root
4. Then type: cat /boot/grub/grub.conf , this command will display the output of the grub.conf file. Paste the output here.

And yes, Yancek is right. I hope you have not formatted the the hard disk and installed Fedora 15 on it. I also hope that you selected custom partition layout during Fedora 15 installation.

R_AD 07-20-2011 05:13 PM

Thank You ALL. T3RM1NVT0R!! It Is A Success!!. How Much Times Do I Need To Thank You?
I Swear You're A Genius Or Something. & Yes I Selected Custom Installation, A Forum Told Me To Remove Windows 7 Entry, as they said i shouldnt Use GRUB 2. Which Was Stupid Of Me To Do.

T3RM1NVT0R 07-20-2011 06:04 PM

@ Reply
 
Great!!! Glad to hear that you got it working. You're welcome. Please mark this thread as solved.

R_AD 07-20-2011 07:37 PM

Quick question... Just ran into a prob.. I just formatted the partition that contains fedora 15 using windows.. Now when I attempt to boot my PC the grub bootloader comes up and I cannot boot anything.... The error that I get|| i feel i need a boot command to boot boot win7 from grub... grub propmts me " minimal bash-like line editing is supported. for the first word tab possible list a possible commands completion anywhere else tab list

yancek 07-20-2011 11:44 PM

Almost all of the Grub bootloader files are on the Fedora partition with 512 bytes in the master boot record. By formatting the Fedora partition you have removed almost all the Grub files so you can't use it to boot. Windows can't boot Linux systems without third party software.

Why did you delete Fedora partition? I thought you had it working?
What exactly is it that you want to do? Windows only? If so, you can repair the windows bootloader with your windows 7 installation disk. If you don't have one, you can download one at this site:

http://neosmart.net/blog/2009/window...-repair-discs/

If you can't boot anything, you'll need to use another computer.

T3RM1NVT0R 07-21-2011 08:01 AM

@ Reply
 
Yes it will come to grub> prompt because you have formatted the Fedora 15 partition which contains the bootloader. If you want your Windows 7 back then you have to use Windows 7 DVD to get into recovery console and then from recovery console you have to run the following command:

Code:

bootrec.exe /fixmbr
This will fix the booting issue as after running this command your Windows 7 will boot using its own bootloader.

R_AD 08-24-2011 11:11 PM

Thank You All, For Your Help. Big Learning Process For Me. =].XD. Everythings Okay Now,Ive Repaired Fedora However Grub Still Controls Booting. Ive Tried BCD Manager, And It says error and request for a registry file,That should be manually located. This Is Not Much Of A Problem, Also My Fedora Stops Working, when i attempt to log on, It Says an error has occured, please try again later. o.0.

salemeni 09-08-2011 06:38 AM

You can look here
https://help.ubuntu.com/community/Re...tallingWindows

java socket


All times are GMT -5. The time now is 03:54 AM.