PDA

View Full Version : Dual boot Problem



muks
19th February 2008, 07:18 AM
Hi All,

I've dual-boot system with Windows XP and Fedora7. After installing Fedora7 my both OS were booting. Then Fedora got updated because automatic updates was enable. After updating my Windows XP i not booting. If i select it in the grub and the system restarts.
On giving fdisk -l the output is as follows:

[root@localhost ~]# fdisk -l

Disk /dev/sda: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 1913 9729 62790052+ f W95 Ext'd (LBA)
/dev/sda5 1913 7011 40957686 7 HPFS/NTFS
/dev/sda6 7012 7024 104391 83 Linux
/dev/sda7 7025 9729 21727881 8e Linux LVM

Disk /dev/dm-0: 21.1 GB, 21172846592 bytes
255 heads, 63 sectors/track, 2574 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 1040 MB, 1040187392 bytes
255 heads, 63 sectors/track, 126 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table
[root@localhost ~]#


If i try to mount my NTFS partitions then i get the following error.

[root@localhost ~]# /mnt/Windows/C ntfs-3g defaults 0 0
bash: /mnt/Windows/C: Permission denied
[root@localhost ~]#


Please help to recover my Windows XP too.

Thanks
-Muks

JohnVV
19th February 2008, 09:00 AM
i am assuming that sda1 is your windows bootloader and not grub
and that grub is in sda6. How is grub set up ? to bootstrap to windows , OR are you using the windows bootloader to start grub
seeing as sda2 is an extended for both win and fedora ,where is sda3 and sda4

try editing /ect/fstab ( as root) add in this line
/dev/sda5 /mnt/Windows ntfs-3g defaults 0 0

also for the cmd line it's ( as root)


mount -t ntfs-3g /dev/sda5 /mnt/windows

and the folder /mnt/windows needs be made if it is not already

muks
19th February 2008, 09:15 AM
i am assuming that sda1 is your windows bootloader and not grub
and that grub is in sda6. How is grub set up ? to bootstrap to windows , OR are you using the windows bootloader to start grub
seeing as sda2 is an extended for both win and fedora ,where is sda3 and sda4

try editing /ect/fstab ( as root) add in this line
/dev/sda5 /mnt/Windows ntfs-3g defaults 0 0

also for the cmd line it's ( as root)


mount -t ntfs-3g /dev/sda5 /mnt/windows

and the folder /mnt/windows needs be made if it is not already

Sorry but i dont know such details wrt bootloader. What i did was:
I formatted my hdd. Then i installed my Windows in Partition C (sda1). Then i made another partion in my hdd.
In the rem free space, i've installed Fedora 7. I guess now you can figure out about grub setup.

Here's the output for the mounting command:

[root@localhost ~]# mount -t ntfs-3g /dev/sda1 /mnt/Windows/C
fusermount: failed to access mountpoint /mnt/Windows/C: Transport endpoint is not connected
[root@localhost ~]#

LordMorgul
19th February 2008, 09:21 AM
Ok, first your mount command is not appropriate. You have two NTFS partitions, I assume one of them is windows XP and the other is a data partition? Lets just mount them and find out.



mkdir /media/sda1
mkdir /media/sda5
mount -t ntfs /dev/sda1 /media/sda1
mount -t ntfs /dev/sda5 /media/sda5


You can find your files in /media/sda1 and /media/sda5. If you get any errors while trying this please post them (those commands must be done as root). You will not be able to write to the partitions yet.

Find out which of those two partitions is your windows XP install. It is most likely /dev/sda1 since that is marked as bootable, but you need to verify it.

Next thing you need to do is post the contents of /boot/grub/grub.conf.

* lol I guess I left that window open to edit for 20mins. Good posts ahead of me though. You do need to post grub.conf to get the bootloader fixed.

muks
19th February 2008, 10:46 AM
Hey LordMorgul,
After entering the correct command for mounting, as told by you, following is the output:

[root@localhost ~]# mount -t ntfs /dev/sda1 /mnt/Windows/C
fusermount: failed to access mountpoint /mnt/Windows/C: Transport endpoint is not connected
[root@localhost ~]#
The content of grub.conf is as follows:


[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,5)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=15
splashimage=(hd0,5)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.15-80.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.23.15-80.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.23.15-80.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
[root@localhost ~]#

LordMorgul
19th February 2008, 11:08 AM
muks, remove 'hiddenmenu' from your grub.conf and you'll see the list of kernels to choose from and your Windows XP listing. Select it and you should boot fine.

The mount command is probably failing because /mnt/Windows/C does not exist. Try:
mkdir /mnt/Windows
mkdir /mnt/Windows/C

muks
19th February 2008, 11:22 AM
muks, remove 'hiddenmenu' from your grub.conf and you'll see the list of kernels to choose from and your Windows XP listing. Select it and you should boot fine.

The mount command is probably failing because /mnt/Windows/C does not exist. Try:
mkdir /mnt/Windows
mkdir /mnt/Windows/C

I dont think that "hiddenmenu" is creating any prob coz when i reboot i am able to c both linux kernels as well as my Windows XP. Its just that everytime when i select Windows XP then the systems reboots.

N the folder that i am mentioning in mount command exists. I even tried to mount it some other location but still i am not able to see the contents.

LordMorgul
19th February 2008, 12:11 PM
muks, get your XP cd, boot from the cd until it asks whether you want to go to recovery console, say yes (I think you push 'c').

Run chkdisk from there to see if your disk has errors. Your setup is correct in grub.conf.

muks
19th February 2008, 12:16 PM
muks, get your XP cd, boot from the cd until it asks whether you want to go to recovery console, say yes (I think you push 'c').

Run chkdisk from there to see if your disk has errors. Your setup is correct in grub.conf.

man, the prob is that my system is not booting from CD-ROM also.

I've checked the setting from BIOS and its correct. The CD boots and i get the message :
"Set up is inspecting your system's hardware.."
after that the screen goes black and nothing comes up.
Now wat to do??

glennzo
19th February 2008, 12:19 PM
Well, you haven't tried booting Windows off of /dev/sda5 yet. What have you got to lose? Change

title Windows XP
rootnoverify (hd0,0)
chainloader +1
to

title Windows XP
rootnoverify (hd0,4)
chainloader +1
and see what you get.

LordMorgul and JohnVV, since my memory is shortlived, was NTFS support a native part of Fedora 7 or did we have to install fuse and / or kmod-ntfs? With a kernel update did we also have to update kmod-ntfs?

Anniedog
19th February 2008, 12:20 PM
sorry I missed the link so will enter this thread. You had everything working until the update of a new Kernel is that correct?

muks
19th February 2008, 12:43 PM
Well, you haven't tried booting Windows off of /dev/sda5 yet. What have you got to lose? Change

title Windows XP
rootnoverify (hd0,0)
chainloader +1
to

title Windows XP
rootnoverify (hd0,4)
chainloader +1
and see what you get.

Thats not the solution b'coz i know that my windows boot from (hd0,0) . Earleir also it used to boot from there only.

muks
19th February 2008, 12:50 PM
sorry I missed the link so will enter this thread. You had everything working until the update of a new Kernel is that correct?
yeah, i think this problem creeped up only after updating the kernel. But even if i boot into my old kernel, still i m facing the same problem.

glennzo
19th February 2008, 12:52 PM
Thats not the solution b'coz i know that my windows boot from (hd0,0) . Earleir also it used to boot from there only.That's OK then. The possibility of booting from the other partition has been eliminated. I didn't really think that was the solution either, but it was worth a shot as this thread is slowly exhausting all options.

szaka
19th February 2008, 09:01 PM
[root@localhost ~]# mount -t ntfs /dev/sda1 /mnt/Windows/C
fusermount: failed to access mountpoint /mnt/Windows/C: Transport endpoint is not connected
[root@localhost ~]#

Type the below


umount /mnt/Windows/C
mount -t ntfs-3g /dev/sda1 /mnt/Windows/C

JohnVV
19th February 2008, 09:05 PM
hi glennzo
"LordMorgul and JohnVV, since my memory is shortlived, was NTFS support a native part of Fedora 7"
you know i am not sure . I think it was but in 6 i had to add fuse and the kmod

but at this point if this was me i would just reformat the drive and reinstall ,after making sure i have backups using the install disk- fedora- to burn dvd's and the win disk to run repair . The saying " practice makes perfect" helps

muks you might want to do this also search the forum for old posts of mine and duel booting
i have posted many short " how two's" in posts
here is one
http://www.fedoraforum.org/forum/showthread.php?t=179609&highlight=boot
for a 2 hard drive system but will work for 1 drive

LordMorgul
19th February 2008, 11:15 PM
Hmm, glenzzo I think we did have ntfs-3g native as part of the everything spin in F7.

muks can you check if you have the ntfs-3g packages installed? rpm -q ntfs-3g
Also check if you have installed some of the kmod-ntfs packages (would be from livna or freshrpms, not from the official repo)

muks
20th February 2008, 05:48 AM
Type the below

umount /mnt/Windows/C
mount -t ntfs-3g /dev/sda1 /mnt/Windows/C


I've tried this. The command works fine but still it doesnt display the contents of my ntfs drive.

muks
20th February 2008, 05:51 AM
muks can you check if you have the ntfs-3g packages installed? rpm -q ntfs-3g
Also check if you have installed some of the kmod-ntfs packages (would be from livna or freshrpms, not from the official repo)

I've ntfs-3g package installed.

muks
20th February 2008, 05:54 AM
Guys,

Someone told me that if i uninstall grub, then i can boot from CD-ROM. Do u think this gonna work??
If yes, then plz ans these questions:
1. How can i uninstall grub.
2. If after uninstalling grub, i m able to fix my Windows then how will i reinstall grub and make Linux works again.

kevmif
20th February 2008, 06:00 AM
Is your Windows partition more important to you? If so....

Boot XP CD and load recovery console.
Run the fixmbr command
Reboot - windows should load. If not - your partition is may be damaged.

To reinstall grub - boot to a linux recovery CD
I think you just run grub-install - but i'm not 100% sure on this. Plenty of info around on how to reinstall it though.

muks
20th February 2008, 06:07 AM
Is your Windows partition more important to you? If so....

Boot XP CD and load recovery console.
Run the fixmbr command
Reboot - windows should load. If not - your partition is may be damaged.

To reinstall grub - boot to a linux recovery CD
I think you just run grub-install - but i'm not 100% sure on this. Plenty of info around on how to reinstall it though.
dude, u shd chk out out the previous posts. I am not able to boot from CD-ROM. So how can i run the XP CD and the mbr command.

kevmif
20th February 2008, 06:13 AM
Sorry - I see that its booting, but bailing out upon scanning your hardware.
That suggests to me that there is something terribly wrong with one of your partitions, or even worse, your partition table.

I would try putting the hard drive in another system and seeing if you can run a chkdsk on the partition that way.

muks
20th February 2008, 06:28 AM
Sorry - I see that its booting, but bailing out upon scanning your hardware.
That suggests to me that there is something terribly wrong with one of your partitions, or even worse, your partition table.

I would try putting the hard drive in another system and seeing if you can run a chkdsk on the partition that way.
ya, i guess that there's something wrong with the partition table coz when i inserted grub boot disk then i got one such message that said there's some prob with partition table.
How can i get it back to normal state??

kevmif
20th February 2008, 06:34 AM
gparted liveCD

http://gparted.sourceforge.net/index.php

Hopefully that may be able to assist you in some way.

JohnVV
20th February 2008, 07:12 AM
i take it that you have tried mounting sda5 also as the win partition

seeing as boot from cd/dvd dose not work i would say that it is the hd it's self has the problem
see if it runs in a friends computer . pull it out and plug it in to a working win box see if your windows files can be accessed .If they can be run chkdisk on your drive if it's fine then check booting from your drive

restart in SAFE MODE edit C:\\boot.ini ( on your friends hard drive) add

multi(0)disk(1)rdisk(1)partition(1)\WINDOWS="mine testing " /noexecute=optin /fastdetect

to the end of the file so it looks like this


[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP"/noexecute=optin /fastdetect

multi(0)disk(1)rdisk(1)partition(1)\WINDOWS="mine testing " /noexecute=optin /fastdetect


restart and you should see a choice of 2 OS's" win xp" and "mine testing "use the down arrow select your hard drive and see if it will boot
if yours dose not boot then change rdisk(1) to rdisk(0) to use your friends mbr to boot
--
use the install disk ( windows)
if it wont boot using your mbr but dose using your friends run fixboot e: or d: or f:
the d: , c: , f: ,is your drive ( fixboot e: will fix the bootloder on drive e )
if none of this works then some one else with more knowledge will have to help

muks
20th February 2008, 07:39 AM
--
use the install disk ( windows)
if it wont boot using your mbr but dose using your friends run fixboot e: or d: or f:
the d: , c: , f: ,is your drive ( fixboot e: will fix the bootloder on drive e )
if none of this works then some one else with more knowledge will have to help

Thanks for suggesting. I'll surely try this. But i would like to clarify about the drive letters in your post.
I guess you've mixed c & .
Plz check them n post that section again.

Thanks.

JohnVV
20th February 2008, 08:36 AM
"the d: , c: , f: ," should be" the d: , e: , f: ,"
drive c would be your friends hard drive e or f should be yours . you would be turning your buddy's box in to a duel boot win box
also have a look as gpart http://www.stud.uni-hannover.de/user/76201/gpart/
for fixing the primary partition table

muks
20th February 2008, 08:40 AM
i take it that you have tried mounting sda5 also as the win partition

seeing as boot from cd/dvd dose not work i would say that it is the hd it's self has the problem
see if it runs in a friends computer . pull it out and plug it in to a working win box see if your windows files can be accessed .If they can be run chkdisk on your drive if it's fine then check booting from your drive

i should connect my hard drive as primary or slave (in my frenz system)??

muks
20th February 2008, 08:55 AM
Hey John,

If u go through the capture of fdisk in my 1st post, u'll find 2 entries with

Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1 doesn't contain a valid partition table

I guess my partition table is corrupted. I checked the link tht u've mentiond in your last post but didnt get to know its working.