Fedora Linux Support Community & Resources Center
  #1  
Old 21st February 2012, 01:27 AM
spacin Offline
Registered User
 
Join Date: Dec 2011
Location: Worcester MA
Posts: 109
Grub, dual win7 & f16

So I reinstalled f16 on my dual boot machine, and grub no longer shows the windows 7 choice.

Only thing I messed up with the first time I did it I grabbed the 64 bit live f16 dvd by mistake but corrected that.

Is there away to edit grub to work again or is the Mbr messed up?
Reply With Quote
  #2  
Old 21st February 2012, 02:24 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxopera
Re: Grub, dual win7 & f16

Quote:
Originally Posted by spacin

Is there away to edit grub to work again or is the Mbr messed up?
If Fedora 16 is booting, then the master boot record is okay. Forget about that. To me, what you described is a boot menu issue. And GRUB 2 uses the grub.cfg file to create the menu.

I would start by booting Fedora, opening a terminal, and running the command to regenerate the grub.cfg file. Anyway, it should be a harmless thing to do even if it doesn't help the current situation. It usually goes like this...
Code:
su
grub2-mkconfig -o /boot/grub2/grub.cfg
No promises.
Reply With Quote
  #3  
Old 21st February 2012, 09:33 PM
safulop Offline
Registered User
 
Join Date: Jun 2008
Posts: 42
windows_7firefox
Re: Grub, dual win7 & f16

You can manually edit the grub configuration; normally to boot Windows all you need are two lines, a root command that sets the disk partition where the Windows system resides, and then a chainloader command. So on my system it looks like this in grub.conf or menu.lst:

title Windows 7
root(hd0, 0)
chainloader +1

My Windows is on first partition of first HD.
Reply With Quote
  #4  
Old 21st February 2012, 09:56 PM
Palooka Offline
Registered User
 
Join Date: May 2009
Posts: 170
linuxfirefox
Re: Grub, dual win7 & f16

Quote:
Originally Posted by spacin View Post
So I reinstalled f16 on my dual boot machine, and grub no longer shows the windows 7 choice.

Only thing I messed up with the first time I did it I grabbed the 64 bit live f16 dvd by mistake but corrected that.

Is there away to edit grub to work again or is the Mbr messed up?
Please post the output of:

sudo fdisk -l
Reply With Quote
  #5  
Old 22nd February 2012, 02:09 PM
spacin Offline
Registered User
 
Join Date: Dec 2011
Location: Worcester MA
Posts: 109
linuxchrome
Re: Grub, dual win7 & f16

it looks like this one worked i havent rebooted yet....

Code:
su
grub2-mkconfig -o /boot/grub2/grub.cfg

output of that was....


Code:
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.6-3.fc16.i686
Found initrd image: /boot/initramfs-3.2.6-3.fc16.i686.img
Found linux image: /boot/vmlinuz-3.1.0-7.fc16.i686
Found initrd image: /boot/initramfs-3.1.0-7.fc16.i686.img
Found Windows 7 (loader) on /dev/sda1
done
out put of sudo fdisk -l

Code:
Disk /dev/sda: 360.1 GB, 360080695296 bytes
255 heads, 63 sectors/track, 43777 cylinders, total 703282608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bac3b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   309250047   154624000    7  HPFS/NTFS/exFAT
/dev/sda2       309250048   310274047      512000   83  Linux
/dev/sda3       310274048   703281151   196503552   8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd0a6334e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001   42  SFS

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x465232c5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63  1465144064   732572001    7  HPFS/NTFS/exFAT

Disk /dev/sdg: 2045 MB, 2045771776 bytes
128 heads, 32 sectors/track, 975 cylinders, total 3995648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1   *         375     3995647     1997636+   6  FAT16

Disk /dev/mapper/vg_fedora16-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders, total 8257536 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_fedora16-lv_swap doesn't contain a valid partition table

Disk /dev/mapper/vg_fedora16-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_fedora16-lv_root doesn't contain a valid partition table

Disk /dev/mapper/pdc_fbdicaff: 500.1 GB, 500107771904 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976772992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd0a6334e

                   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/pdc_fbdicaff1              63   976768064   488384001   42  SFS

Disk /dev/mapper/pdc_fbdicaffp1: 500.1 GB, 500105217024 bytes
255 heads, 63 sectors/track, 60800 cylinders, total 976768002 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x69205244

This doesn't look like a partition table
Probably you selected the wrong device.

                      Device Boot      Start         End      Blocks   Id  System
/dev/mapper/pdc_fbdicaffp1p1   ?   218129509  1920119918   850995205   72  Unknown
/dev/mapper/pdc_fbdicaffp1p2   ?   729050177  1273024900   271987362   74  Unknown
/dev/mapper/pdc_fbdicaffp1p3   ?   168653938   168653938           0   65  Novell Netware 386
/dev/mapper/pdc_fbdicaffp1p4      2692939776  2692991410       25817+   0  Empty

Partition table entries are not in disk order

Disk /dev/mapper/vg_fedora16-lv_home: 143.3 GB, 143277424640 bytes
255 heads, 63 sectors/track, 17419 cylinders, total 279838720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_fedora16-lv_home doesn't contain a valid partition table

Disk /dev/sdh: 1500.3 GB, 1500301908992 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277166 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xae6d8257

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1              63  2930272064  1465136001    7  HPFS/NTFS/exFAT

Disk /dev/sdi: 2000.4 GB, 2000396746752 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907024896 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003990f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1            2048  3907024895  1953511424    7  HPFS/NTFS/exFAT
Reply With Quote
  #6  
Old 22nd February 2012, 02:39 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfirefox
Re: Grub, dual win7 & f16

Quote:
Originally Posted by spacin

it looks like this one worked i havent rebooted yet....
Code:
su
grub2-mkconfig -o /boot/grub2/grub.cfg
output of that was....
Code:
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.6-3.fc16.i686
Found initrd image: /boot/initramfs-3.2.6-3.fc16.i686.img
Found linux image: /boot/vmlinuz-3.1.0-7.fc16.i686
Found initrd image: /boot/initramfs-3.1.0-7.fc16.i686.img
Found Windows 7 (loader) on /dev/sda1
done
Well, it at least found the Windows system.
Quote:
Originally Posted by spacin

i havent rebooted yet....
If Windows still is not in the boot menu when you reboot (not exactly unheard of), then I would proceed to write a simple custom entry for it in /etc/grub.d/40_custom and run the grub2-mkconfig command again.

To try that idea , open /etc/grub.d/40_custom and add the following lines below the text already there (see the GRUB Manual)...
Code:
menuentry "Windows" {
	insmod chain
	insmod ntfs
	set root=(hd0,1)
	chainloader +1
}
After that, regenerate the grub.cfg file again...
Code:
su
grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot. Try to boot Windows.
Reply With Quote
  #7  
Old 22nd February 2012, 02:59 PM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,054
linuxchrome
Re: Grub, dual win7 & f16

You should have the following entry in your /boot/grub2/grub.cfg file after running the grub2-mkconfig -o /boot/grub2/grub.cfg command. But if not, this is the entry that should be there and you can add it manually if need be.
Code:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 2D42AD5A2CE55342
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###
The blue highlighted lines should be pre-exisiting. You add the menu entry between those two lines.
The red highlighted number needs to be the UUID of your /dev/sda1 partition (mine is shown). To get the correct UUID for your /dev/sda1 partition, use the blkid command.

---------- Post added at 09:59 AM ---------- Previous post was at 09:54 AM ----------

The method suggested by stoat should work also.

Last edited by PabloTwo; 22nd February 2012 at 02:56 PM.
Reply With Quote
  #8  
Old 22nd February 2012, 04:00 PM
spacin Offline
Registered User
 
Join Date: Dec 2011
Location: Worcester MA
Posts: 109
windows_7chrome
Re: Grub, dual win7 & f16

Quote:
Originally Posted by PabloTwo View Post
You should have the following entry in your /boot/grub2/grub.cfg file after running the grub2-mkconfig -o /boot/grub2/grub.cfg command. But if not, this is the entry that should be there and you can add it manually if need be.
Code:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 2D42AD5A2CE55342
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###
The blue highlighted lines should be pre-exisiting. You add the menu entry between those two lines.
The red highlighted number needs to be the UUID of your /dev/sda1 partition (mine is shown). To get the correct UUID for your /dev/sda1 partition, use the blkid command.

---------- Post added at 09:59 AM ---------- Previous post was at 09:54 AM ----------

The method suggested by stoat should work also.

and it did... using winders now.... every time i boot into winders i wonder why its still here, i have a laptop thats dual boot also. ugh oh well...

Thanks for the help
Reply With Quote
Reply

Tags
dual, f16, grub, win7

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Grub Error 17 - FC15 and Win7 dual boot aristotelix Installation, Upgrades and Live Media 5 6th July 2011 11:06 AM
[SOLVED] Dual boot win7 and F15 Hewjr100 Installation, Upgrades and Live Media 2 12th June 2011 06:06 PM
[SOLVED] grub issue in F13 x86_64 with dual boot from two hard drive (Win7 in control) longsi Installation, Upgrades and Live Media 15 27th September 2010 05:27 PM
HELP! WIn7 and Fedora 12 dual-boot OceanRain Installation, Upgrades and Live Media 24 3rd March 2010 01:53 PM
grub/win7 pk28831 Installation, Upgrades and Live Media 2 14th August 2009 04:04 PM


Current GMT-time: 17:13 (Saturday, 26-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat