LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem in booting windows 7 after installing fedora 11 while try to make dual boot (https://www.linuxquestions.org/questions/linux-newbie-8/problem-in-booting-windows-7-after-installing-fedora-11-while-try-to-make-dual-boot-790537/)

crayxmp 02-21-2010 06:48 AM

problem in booting windows 7 after installing fedora 11 while try to make dual boot
 
Hi,

Box: Intel pentium 2.66 ghz
2 gb ram

I have 3 separate hard disk (hd) as below-

1. PATA hd 40 gb - unallocated
2. SATA hd 500 gb 2 Partitions- Part1 240 gb OS -Windows 7 ultimate, Part2 unallocated
3. SATA hd 160 gb 2 partitions - part1 120 gb OS -root of fedora 11, part2 rest in swap

-I first installed win7 on disk 2(500 gb) partition 1(240 gb) and it worked ok, (to prevent win7 to create 100 mb "system reserved" partition i partitioned all my hard disk before installing win7)
-then i install fedora 11 on disk 3(160 gb) allocating 120 gb for root and rest 4 gb for swap.

during fedora installation when asked for putting bootloader Grub i choose "First sector of boot partition". it created menu with "Fedora" and "Other" which i change label to "Windows 7"

my problem is when i choose "Fedora" from boot menu it work and fedora get booted but when i try to boot with windows 7 it shows blank screen for some moment and return to boot menu again. it did not show any error message, just blank screen.

"Windows 7" points to sdb1, i.e. Sata b disk(500 gb) with partition 1(240 gb) where windows 7 actually resides

fdisk -l result is -
=====================
[root@vinod_pc vinod]# fdisk -l

Disk /dev/sda: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x09630963

Device Boot Start End Blocks Id System

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb9654789

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30596 245760000 7 HPFS/NTFS
/dev/sdb2 30596 60802 242624512 6 FAT16

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x05460545

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 15666 125829120 83 Linux
/dev/sdc2 15666 19457 30459201 83 Linux

my gurb.conf file content is-
==============================
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sdc1
# initrd /boot/initrd-version.img
#boot=/dev/sdc1
default=1
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.29.4-167.fc11.i686.PAE)
root (hd0,0)
kernel /boot/vmlinuz-2.6.29.4-167.fc11.i686.PAE ro root=UUID=be5a8e19-cbb1-4fac-b827-519c0b9b2bc3 rhgb quiet
initrd /boot/initrd-2.6.29.4-167.fc11.i686.PAE.img
title Windows 7
rootnoverify (hd2,0)
savedefault
makeactive
chainloader +1

I have also tried to add Grub in MBR with same result. I can get back my windows 7 working using "diskpart" but then i will lose fedora.

I am used to windows 7 OS but Fedora 11 is new for me i reach thus far only after googling the linux commands. I spend about 3 days to find the reason but no success.

Help is eagerly awaited

Thanks in advance

Best,
Vinod

smoker 02-21-2010 07:29 AM

A couple of odd things I notice.

First you say the 40GB disk is PATA, but it shows up in fdisk -l as /dev/sda
That is a SATA designation. If it were PATA it would be /dev/hda

Secondly, you say that Fedora is on the third disk in the system, but it is referenced in grub as the first partition of the first disk.
Also Windows is referenced as the first partition of the third drive, when according to fdisk it's on the second drive, first partition.

If you say Fedora starts ok, then I would try modifying grub so that the windows section :
rootnoverify (hd2,0)
is changed to
rootnoverify (hd1,0)

It's worth a try ... (but don't change anything else yet)


Explanation.
Grub counts drives starting from 0. Grub counts partitions starting from 0.
So the first disk, second partition would be (hd0,1)

crayxmp 02-21-2010 08:12 AM

thank you for your prompt reply,

but as i say first disk is PATA it is true, why fdisk (or during installation partitioning menu) is showing it sda i don't know. it is plug on IDE slot.

secondly i have installed fedora on 160 gb hd with 120 gb allocated to root and rest to swap on sdc, here again i don't know why grub is showing it hd0,0, while hd0,0 means my 40 gb PATA disk

both above are strange things.

btw, i changed the grub to

rootnoverify (hd1,0) as you suggested
it generated error 22: No such Partition

smoker 02-21-2010 08:32 AM

Have a look in your bios settings for the boot order of the disks, then report back .
Also see if the PATA disk shows up as PATA (ide) in the bios.

yancek 02-21-2010 09:44 AM

Boot Fedora, log in as root, enter grub command to get grub prompt (grub>)
and enter the following at grub prompt:

geometry (hd0) hit the enter key for output
geometry (hd1) hit the enter key for output
geometry (hd2) hit the enter key for output

This should tell you how grub sees the drives. You have three drives, all of different sizes. One is empty, one has only ntfs partitions and the other only Linux.

I would suggest you change your grub.conf entry to:

title win 7
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1

save file and re-boot to windows. If that fails, change the entry above by replacing the number 2 with the number one in each instance. It would have to be one of these as it can't be (hd0) as that is the drive grub sees Fedora on and windows is not on that drive.

crayxmp 02-21-2010 10:29 AM

hi smoker,

thanks for reply, my bios details are

SATA Port -0 : ST3500418AS (i thinks it is 500 gb hd)
SATA Port -2 : Not detected
SATA Port -1 : SAMSUNG HD160JJ (probably it is 160 gb hd)
SATA Port -3 : SONY DVD RW
PATA MASTER : SAMGUNG SV0612H (40 gb hd)
PATA Slave : Not detected

Boot Device Priority
=====================
1st boot : DVD RW
2nd boot : SM-SAMSUNG HD160JJ
3rd boot : Floppy drive

Hard disk drive
===============
1st drive : SM SAMSUNG HD 160JJ
2nd drive : 3M-SAMSUNG SV0412H
3rd drive : PM ST3500418AS

crayxmp 02-21-2010 10:36 AM

hi yancek,

thanks for reply, i have edited the grub as you suggested

title Windows 7
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1

it didn't work, so i change it to

title Windows 7
rootnoverify (hd2,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

but it also didn't work
but both changes did not generate any error msg. screen remain blank for some moment and return back to boot menu

as for geometry command, sorry i could not able to execute it, i open terminal and login as su like below-

[vinod@vinod_pc ~]$ su -
Password:
[root@vinod_pc ~]# geometry (hd0)
-bash: syntax error near unexpected token `hd0'

smoker 02-21-2010 11:11 AM

Grub can be a pain when it's not installed on the first disk.

If it were me ....

I would remove the PATA drive
I would use the windows rescue disk to get windows booting again.
I would re-install linux using the free (unpartitioned) space on the windows drive AND the whole of the second drive

Make sure that /boot gets put on the windows drive

Windows likes to be on (hd0,0) as grub sees it.

My xp pro is on (hd0,0) and fedora /boot is on (hd0,1)

But it's your machine and your time.

I've had issues like this before when my dad installed linux on the 3rd partion of the 4th drive and windows stopped booting.

It's a nightmare.

smoker 02-21-2010 11:46 AM

Hi again.

If you can boot into linux, have a look a the file device.map in the same place as grub.conf

Check to see if the devices match the drives you expect.

for example, my system (with windows and linux both on the first drive)

(hd0) /dev/sda

it may not list all the drives only the one where grub is to be found.

Also, when you try to run the geometry command as yancek said, you have to su - and enter your password.
Then type grub to get a grub prompt. (Ctrl + c to exit or type quit)
Then issue the geometry command.
Just noticed that.

yancek 02-21-2010 03:03 PM

crayxmp:

Quote:

as for geometry command, sorry i could not able to execute it, i open terminal and login as su like below-
You missed a step. After you type "su", hit the enter key, enter your password, hit the enter key - here's the step you missed: TYPE the word grub at the prompt, the prompt will change from the root prompt to look like this: grub>

That would be where you type the geometry command I suggested, not at a root prompt. Also, I noticed the second entry you tried isn't right. You need to change all the reference to two (2) to one (1) like this:

title Windows 7
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

smoker 02-21-2010 03:15 PM

Is there an echo in here ?

crayxmp 02-22-2010 06:08 AM

smoker:

my device.map contains following content

# this device map was generated by anaconda
(hd2) /dev/sdb (here win 7 installed)
(hd0) /dev/sdc (here fedora 11 installed)

it is not showing sda drive (40 gb PATA drive)

as for your earlier suggestion -- do i unplug PATA drive temporarily then install windows 7 and re-plug it?

crayxmp 02-22-2010 06:22 AM

yancek:

sorry for missing grub command. my geometry command results are as follow-

grub> geometry (hd0)
geometry (hd0)
drive 0x80: C/H/S = 4870/255/63, The number of sectors = 78242976, /dev/sda
grub> geometry (hd1)
geometry (hd1)
drive 0x81: C/H/S = 60801/255/63, The number of sectors = 976773168, /dev/sdb
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 1, Filesystem type unknown, partition type 0x6
grub> geometry (hd2)
geometry (hd2)
drive 0x82: C/H/S = 19457/255/63, The number of sectors = 312581808, /dev/sdc
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 1, Filesystem type unknown, partition type 0x83

as for you following sequence
title Windows 7
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

and it says Error 22: No such Partition

smoker 02-22-2010 06:22 AM

Quote:

Originally Posted by crayxmp (Post 3872439)
smoker:

my device.map contains following content

# this device map was generated by anaconda
(hd2) /dev/sdb (here win 7 installed)
(hd0) /dev/sdc (here fedora 11 installed)

it is not showing sda drive (40 gb PATA drive)

as for your earlier suggestion -- do i unplug PATA drive temporarily then install windows 7 and re-plug it?

I just read your geometry post.
So grub doesn't have the correct drives mapped.

Maybe edit device map to read the same as the geometry output :
i.e.
# this device map was generated by anaconda
(hd1) /dev/sdb (here win 7 installed)
(hd2) /dev/sdc (here fedora 11 installed)

And edit your grub.conf so that it reads :

default=1
timeout=5
splashimage=(hd2,0)/boot/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.29.4-167.fc11.i686.PAE)
root (hd2,0)
kernel /boot/vmlinuz-2.6.29.4-167.fc11.i686.PAE ro root=UUID=be5a8e19-cbb1-4fac-b827-519c0b9b2bc3 rhgb quiet
initrd /boot/initrd-2.6.29.4-167.fc11.i686.PAE.img
title Windows 7
rootnoverify (hd1,0)
savedefault
makeactive
chainloader +1

Forget the rest of this post until you have tested the above.

########################################################################

I would suggest removing the PATA drive completely until you have both OSs working properly.

I don't suggest re-installing win7, just use your install cd to rescue it so that it boots.
Once you have it booting correctly, then reinstall linux on to the spare unpartitioned space on the win7 drive.

You don't have to worry about the other drive (/dev/sdc).

Once you have both systems running, you can format sdc and use the space for either OS or both. You can create a linux partition on it and mount that partition on a directory in your /home partition on sdb.

Any remaining space can be formatted in windows style if you want more space for windows.

I also suggest changing your boot order in the bios so that the windows drive is booted before sdc.

Don't worry, you'll get there !

regards

Alan

crayxmp 02-22-2010 07:04 AM

smoker,

i am little bit apprehensive for doing changes you suggested, because my windows 7 is not working, currently only fedora is working if i made changes from root (hd0,0) to root (hd2,0) will fedora boots or not, if not then i will left stranded. unable to access any thing, and have to install every thing from beginning?

Vinod


All times are GMT -5. The time now is 04:59 AM.