LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   How can I found the drive number XP is on.. (https://www.linuxquestions.org/questions/linux-enterprise-47/how-can-i-found-the-drive-number-xp-is-on-596327/)

fukas 11-01-2007 09:21 AM

How can I found the drive number XP is on..
 
Alright hey everyone.. forgive me if this has been posted but I dont think it has been before.. Anyway.

I have installed CentOS as a normal desktop configuration, works wonders.
When I installed it, I put it on my 2nd harddrive so I can dual boot with XP.

Later I realized that I had to add XP into grubs configuration so I can choose to boot from it. Thats all find a dandy I suppose, however, I can not find the right drive number? I guess I can call it that.

An example from a post I found on here (centos-4.0-windows-xp-dual-boot-314195)

Quote:

# 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/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=2
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS 4.0 (2.6.9-5.0.3.ELsmp)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-5.0.3.ELsmp ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.9-5.0.3.ELsmp.img
title CentOS 4.0-up (2.6.9-5.0.3.EL)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-5.0.3.EL ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.9-5.0.3.EL.img
title Windows XP
rootnoverify (hd1,0)
chainloader +1
map (hd1) (hd0)
map (hd0) (hd1)
That's what mine looks like, however, hd1,0 isnt my drive with xp..

So is there any command I havent learned yet to see what disk my computer has installed so I can fix this and be blessed with dual booting xp successfully?


thanks for any help..
~chris

MS3FGX 11-01-2007 08:44 PM

To list all of your drives (and the partitions on them) you can use the command:

Code:

fdisk -l

Mountain 11-07-2007 06:20 PM

I want to list all my drives and all partitions.

When I type "fdisk -l" the output is empty - nothing is listed.

What am I doing wrong?

farslayer 11-07-2007 08:59 PM

that is "dash lowercase L" not the pipe symbol

Code:

fdisk -l

MS3FGX 11-08-2007 07:21 AM

Also make sure you are running it as root, otherwise you will get nothing back.

Mountain 11-09-2007 12:10 AM

Quote:

Originally Posted by MS3FGX (Post 2952041)
Also make sure you are running it as root, otherwise you will get nothing back.

That must be the issue. I find that strange. I tried sudo and I still got nothing back. But when I logged in as root, it worked.

jschiwal 11-09-2007 12:18 AM

You can also use tab completion in the grub shell when booting to locate the partition that contains your xp installation.


All times are GMT -5. The time now is 12:01 AM.