Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linux/windows dual boot issue

Status
Not open for further replies.

handle789

Technical User
Feb 21, 2007
41
0
0
US
Hi, I have a Gateway pc with a single sata hard drive. It has three partitions, c:, d: and e:.

Partition c: has windows xp media center edition installed on it and uses NTFS.

Partitions d: and e: are not used.

I then installed enterprise linux CentOS version 5 onto the E partition.

I would like to be able to boot into linux or windows. Booting into linux is OK, but booting into windows has a problem.

When I pressed a key during boot up, grub allowed me to select the "Other" option (for windows?)

title Other
rootnoverify (hd0,1)
chainloader +1

which is the last entry in grub.conf.

When I selected the "Other" option, the error msg says:

Insert Recovery DVD 1 into the CD drive.

I do not have the Recovery DVD 1 (this is a used PC, running on windows xp media center edition), so I tried the windows xp professional cd, but it was rejected.

So,

1) How do I make the pc boot into windows or linux as needed?

2) If (1) is not possible, how do I retrieve the lost data from partition c:, as my pc only has cable connection for only one sata drive and linux does not see the c: partition at all when I boot into linux.

3) If I use partition magic to wipe out partition e: where linux is installed, will I be able to boot into windows xp then?

Thank you for your input.
cat grub.conf:

#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.el5xen)
root (hd0,5)
kernel /xen.gz-2.6.18-164.el5
module
/vmlinuz-2.6.18-164.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module
/initrd-2.6.18-164.el5xen.img title CentOS-base
(2.6.18-164.el5)
root (hd0,5)
kernel /vmlinuz-2.6.18-164.el5 ro
root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd
/initrd-2.6.18-164.el5.img
title Other
rootnoverify (hd0,1)
chainloader +1
 
From the root account in Linux, can you post the output of
Code:
fdisk -l

This should give a better picture of the partition layout.

 
Does the PC have a hidden recovery partition?
 
Thank you. Yes, you're right, there was a small partition that looked like some kind of recovery partition. I can't remember whether it was 5 GB or 7 GB. This partition was visible in Windows Explorer when Windows was still running.

Here is the output of fdisk -l:
[root@localhost ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 700 12173 92164905 7 HPFS/NTFS
/dev/sda2 1 699 5614686 b W95 FAT32
/dev/sda3 12174 30401 146416410 f W95 Ext'd (LBA)
/dev/sda5 12174 22114 79851051 b W95 FAT32
/dev/sda6 22115 22127 104391 83 Linux
/dev/sda7 22128 30401 66460873+ 8e Linux LVM

Partition table entries are not in disk order
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 63.38 GB
PE Size 32.00 MB
Total PE 2028
Alloc PE / Size 2028 / 63.38 GB
Free PE / Size 0 / 0
VG UUID OiVVky-8G3G-fUKO-M4Ny-7PqV-Usck-v9VtHm

 
I may be wrong, but it looks to me like /dev/sda2 is a recovery partition and /dev/sda1 is your boot-able Windows partition. However, grub starts labeling disks and partitions at 0, not one. However, your grub is configured to boot to the second partition (hd0,1).

If you change it to (hd0,0) does it work?
 
From the output of fdisk above, I think /sev/sda2 is probably the Windows recovery partition.

/dev/sda3 is the combination of sda5, sda6 and sda7

/dev/sda5 is a free unused partition

sda6 and sda7 were created by CentOS when I installed it on partition E:

Btw, the partition numbering in sequential order C: D: and E: is just for your convenience of reading. Sincere there are a CD drive, a flash drive, a card reader, the three big partitions before installation of linux were actually C:, J: and K:

Wonder why sda4 isn't there.
 
Your suggestion performed precisely the needed MIRACLE. I am now out of dire straight, thanks to you! Changing the entry to (hd0,0) fixed the bad headache. You must know a lot of linux and windows. Where can I learn some more technical knowledge from you? Thank you once again!
 
I am glad that it worked for you.

How does one become more skilled at Linux? Experiences like you just had. I have been using Linux for several years now and still consider myself to be mostly a novice. Undoubtedly you learned quite a bit. You knew enough to pull up grub.conf. Now you know about fdisk and its listing feature. Typically, google is your best friend when it comes to dealing with problems. In this case, I looked up the configuration of grub and the partition types. The key was confirming that grub starts with 0 instead of 1, so the first drive, which was marked as having the boot sector should have been hd0, not hd1.



 
BTW, thanks also to IRudebwoy for suggesting fdisk -l. It helps to arrive at a solution.
 
To thank people on this site ou can use the star system, i.e. click on the "Thank Noway2 for this valuable post!" link under their posts.

There is no shortcut for experience - like the experience you just had, you learnt from it. Next time you have a multi-boot problem you'll know where to start looking!

Annihilannic.
 
Yeah, simple, just change

this:

title Other
rootnoverify (hd0,1)
chainloader +1

to this:

title Other
rootnoverify (hd0,0)
chainloader +1

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top