[SOLVED] Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

General support questions
dbhost3006
Posts: 49
Joined: 2011/04/11 14:12:50
Location: Houston, Texas

[SOLVED] Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by dbhost3006 » 2012/03/21 02:32:35

I can see the partition for my Windows 7, and using ntfs-3g tools from EPEL, and the C:\ drive seems to be intact. However I am unfamiliar enough with Win 7 to not be sure if all the bootloader stuff is there, I had initially had Scientific Linux 6.1 on the box, and wanted to get back to CentOS (long story, but simply put, less hassles, except...) When I brought my CentOS load up, I no longer see the option to boot into Windows 7, just one CentOS stanza, and one "Other"...

How do I get Windows 7 to boot again, or better yet, how do I perform a physical to virtual migration on this rig and virtualize Windows 7 entirely. The biggest problem is LOML threw out my Windows media and license keys when cleaning my office... Oops...

r_hartman
Posts: 706
Joined: 2009/03/23 15:08:11
Location: Netherlands
Contact:

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by r_hartman » 2012/03/21 10:47:55

What does 'Other' do?
Please list the contents of /etc/grub.conf

driftwood
Posts: 119
Joined: 2012/01/26 14:40:16

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by driftwood » 2012/03/21 11:56:36

Have you tried selecting 'Other'?
I vaguely recall booting to Windows using 'Other' on some machine or other. It's maybe just a label which is gone.

dbhost3006
Posts: 49
Joined: 2011/04/11 14:12:50
Location: Houston, Texas

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by dbhost3006 » 2012/03/21 14:59:05

Other points to hd[2,0] which is an external, USB connected NTFS formatted drive. Wrong target. I changed it to point to [0,1] which is where Windows 7 is, but I get BOOTMGR missing errors...

I suspect I need to get my hands back on Windows 7 install media to recover this. Will take a ghost of the NTFS partitions before I try this though...

I really ought to just backup the partition so I have the data in the user directories and start over as a VM. Best way to keep my wife out of having me reload it every time she gets a virus from coupon this or that .com...

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

[SOLVED] Dual boot Windows 7 grub option gone after upgrade

Post by pschaff » 2012/03/21 15:44:36

Please [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=28723&forum=54]provide more information about your system[/url] by running "./getinfo.sh disk" and showing us the output file.

dbhost3006
Posts: 49
Joined: 2011/04/11 14:12:50
Location: Houston, Texas

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by dbhost3006 » 2012/03/24 04:23:12

Information for disk problems.
[code]
== BEGIN uname -rmi ==
2.6.32-220.7.1.el6.x86_64 x86_64 x86_64
== END uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
rpmforge-release-0.5.2-2.el6.rf.x86_64
epel-release-6-5.noarch
centos-release-6-2.el6.centos.7.x86_64
== END rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS release 6.2 (Final)
== END cat /etc/redhat-release ==

== BEGIN getenforce ==
Enforcing
== END getenforce ==

== BEGIN free -m ==
total used free shared buffers cached
Mem: 7619 1553 6066 0 26 686
-/+ buffers/cache: 840 6779
Swap: 9807 0 9807
== END free -m ==

== BEGIN cat /etc/fstab ==

#
# /etc/fstab
# Created by anaconda on Tue Mar 20 18:38:42 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_grizzly-lv_root / ext4 defaults 1 1
UUID=9817ffb1-7d31-4662-b0c1-be8c367e75eb /boot ext4 defaults 1 2
/dev/mapper/vg_grizzly-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_grizzly-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
== END cat /etc/fstab ==

== BEGIN df -h ==
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_grizzly-lv_root
50G 22G 25G 47% /
tmpfs 3.8G 500K 3.8G 1% /dev/shm
/dev/sda3 485M 63M 397M 14% /boot
/dev/mapper/vg_grizzly-lv_home
1.1T 31G 966G 4% /home
/dev/sdb1 280G 185G 96G 66% /media/90A8AB96A8AB797C
/dev/sdc1 56G 44G 13G 78% /media/4344-41AA
== END df -h ==

== BEGIN fdisk -l ==
Disk /dev/mapper/vg_grizzly-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_grizzly-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_grizzly-lv_home doesn't contain a valid partition table

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00072387

Device Boot Start End Blocks Id System
/dev/sdd1 1 121602 976760832 8e Linux LVM

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd2000054

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 96105 771857408 7 HPFS/NTFS
/dev/sda3 96105 96169 512000 83 Linux
/dev/sda4 96169 121602 204289752 5 Extended
/dev/sda5 96169 121602 204288000 8e Linux LVM

Disk /dev/sdb: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6bfb6bfb

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 36482 293041633+ 7 HPFS/NTFS

Disk /dev/sdc: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb4ad2087

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 7296 58605088+ b W95 FAT32

Disk /dev/mapper/vg_grizzly-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 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_grizzly-lv_swap: 10.3 GB, 10284433408 bytes
255 heads, 63 sectors/track, 1250 cylinders
Units = cylinders of 16065 * 512 = 8225280 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_grizzly-lv_home: 1145.4 GB, 1145414090752 bytes
255 heads, 63 sectors/track, 139255 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

== END fdisk -l ==

== BEGIN parted -l ==
Model: ATA ST1000DL002-9TT1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs boot
2 106MB 790GB 790GB primary ntfs
3 790GB 791GB 524MB primary ext4
4 791GB 1000GB 209GB extended
5 791GB 1000GB 209GB logical lvm


Model: Maxtor 6 L300S0 (scsi)
Disk /dev/sdb: 300GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 300GB 300GB primary ntfs boot


Model: WDC WD60 0VE-00HDT0 (scsi)
Disk /dev/sdc: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 60.0GB 60.0GB primary fat32 boot


Model: ATA ST1000DL002-9TT1 (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vg_grizzly-lv_home: 1145GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 1145GB 1145GB ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vg_grizzly-lv_swap: 10.3GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 10.3GB 10.3GB linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vg_grizzly-lv_root: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 53.7GB 53.7GB ext4


== END parted -l ==

== BEGIN blkid ==
/dev/sdd1: UUID="0P0tSB-12mC-7MBC-PyKO-3Xar-4wdv-2JrJSd" TYPE="LVM2_member"
/dev/sda1: LABEL="System Reserved" UUID="C8FC3E5CFC3E454A" TYPE="ntfs"
/dev/sda2: UUID="FE78413A7840F2C7" TYPE="ntfs"
/dev/sda3: UUID="9817ffb1-7d31-4662-b0c1-be8c367e75eb" TYPE="ext4"
/dev/sda5: UUID="9ivBtR-qmgo-hyLj-dmwl-11Z2-zd3h-992mM6" TYPE="LVM2_member"
/dev/sdb1: UUID="90A8AB96A8AB797C" TYPE="ntfs"
/dev/sdc1: UUID="4344-41AA" TYPE="vfat"
/dev/mapper/vg_grizzly-lv_root: UUID="8e87883d-076b-46ca-9409-99ebbe177f87" TYPE="ext4"
/dev/mapper/vg_grizzly-lv_swap: UUID="0bc03f13-57fd-4aaa-ab08-8c31c7b31221" TYPE="swap"
/dev/mapper/vg_grizzly-lv_home: UUID="b114b561-b152-4304-8cea-16f3e7bc7665" TYPE="ext4"
== END blkid ==

== BEGIN cat /proc/mdstat ==
Personalities :
unused devices: <none>
== END cat /proc/mdstat ==

== BEGIN pvs ==
PV VG Fmt Attr PSize PFree
/dev/sda5 vg_grizzly lvm2 a-- 194.82g 0
/dev/sdd1 vg_grizzly lvm2 a-- 931.51g 0
== END pvs ==

== BEGIN vgs ==
VG #PV #LV #SN Attr VSize VFree
vg_grizzly 2 3 0 wz--n- 1.10t 0
== END vgs ==

== BEGIN lvs ==
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_home vg_grizzly -wi-ao 1.04t
lv_root vg_grizzly -wi-ao 50.00g
lv_swap vg_grizzly -wi-ao 9.58g
== END lvs ==

[/code]

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by pschaff » 2012/03/24 14:42:24

Your Windows-related partitions are
[code] Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
/dev/sda2 00 00000 000000000 7 HPFS/NTFS
/dev/sdb1 * 0 00000 000000000+ 7 HPFS/NTFS
/dev/sdc1 * 1 7296 58605088+ b W95 FAT32[/code]

The most likely candidate is /dev/sda1 for the Windows boot partition. There is some ambiguity about GRUB device ordering as /dev/sdd shows up before /dev/sda in the fdisk output.

My best guess is that the following stanza should be added to /boot/grub/grub.conf:
[code]title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1[/code]
If that fails then try (hd1,0) (hd0,1) (hd1,1).

If still having trouble show us the grub.conf, describe what you have tried and the results, and read:
[url=http://wiki.centos.org/TipsAndTricks/TroubleshootGRUB]Troubleshooting GRUB Issues[/url]
[url=http://wiki.centos.org/HowTos/GrubInstallation]GRUB Installation[/url]

YBellefeuille
Posts: 319
Joined: 2012/03/06 22:30:17
Location: Ottawa

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by YBellefeuille » 2012/03/24 20:07:35

You have more than one hard disk. I don't quite understand the problem, but it [i]seems[/i] that you must add two lines with "map" in the Windows stanza in this case, and it also [i]seems[/i] that the precise change you have to make depends on the number of hard drives.

If [b]pschaff[/b]'s suggestion doesn't work, try this:

[code]title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1[/code]

If that doesn't work, then try this:

[code]title Windows
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,0)
makeactive
chainloader +1[/code]

Or this:

[code]title Windows
map (hd0) (hd3)
map (hd3) (hd0)
rootnoverify (hd3,0)
makeactive
chainloader +1[/code]

Remember that you don't have to edit [b]grub.conf[/b] each time. You can type [b]e[/b] at the Grub menu and edit the commands.

Please let us know the results, since I'm still trying to understand this problem.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by pschaff » 2012/03/24 23:13:32

Good point about map, I should have thought of that, but it should only be needed if GRUB does not see the Windows boot disk as the first device. In my scenarios that would be when it is (hd1,0) or (hd1,1), but I was assuming that /dev/sdb1 and /dev/sdc1 (the FAT32 disk) are not the Windows system disk. That may not be the case, but I'm betting on /dev/sda with the question being whether or not GRUB sees that as the first disk. We'll have to see what the OP's tests demonstrate.

I did mean to mention that the GRUB config could be edited interactively, but I see I forgot.

YBellefeuille
Posts: 319
Joined: 2012/03/06 22:30:17
Location: Ottawa

Re: Dual boot Windows 7 grub option gone after upgrade to CentOS 6.2

Post by YBellefeuille » 2012/03/24 23:50:51

Grub's behaviour when booting Windows on a multi-disk system is strange. I have three disks; Windows is on the first disk, as are the Grub files and the Grub boot loader:

[code]/dev/sda1 * 1 123 987966 6 FAT16 -- DOS partition
/dev/sda3 1341 5655 34660066 7 HPFS/NTFS -- Windows 2000
/dev/sda11 29726 34947 41943040 83 Linux -- CentOS 6, Grub files
/dev/sda12 34948 38864 31463302+ 7 HPFS/NTFS -- Windows 7[/code]

To boot Windows 7, I need to have the following stanza:

[code]title Windows 7
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,0)
makeactive
chainloader +1[/code]

So, I have to point to the DOS partition, and I have to pretend that my first disk is my third disk. Apparently, Windows 7's boot loader is installed in the boot sector (or "volume boot record") of the DOS partition.

As I said, I suspect that the [b]map[/b] command you have to use depends on the number of hard disks installed, and that's why I suggested the original poster, who has four disks, try [b]map (hd0) (hd1)[/b] to [b]map (hd0) (hd3)[/b]. I'll be interested in seeing his report.

Post Reply

Return to “CentOS 6 - General Support”