LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   what is the command prompt for showing device? (https://www.linuxquestions.org/questions/linux-general-1/what-is-the-command-prompt-for-showing-device-46416/)

yenonn 02-20-2003 09:02 PM

what is the command prompt for showing device?
 
Dear all,

i am just a installed RH8.0 yesterday and considered as totally a newbie to linux..

i have two hdisks, one is for winxp (master) and one is rh8.0 (slave). so, now, i want to mount to winxp drive from rh.

my quest is that, what is the my device label for winxp drive? my winxp os is a seperated hdisk, which is a primary master, it has, one primary partition, and two logical partitions. if i want to refer to the primary partition it should be hda1, then how about the other two partitions?

i tried this "mount -t vfat /dev/hda1 /mnt/winxp1. This is ok, i can get a mounted winxp first primary partition.
but, if i tried "mount -t vfat /dev/hda2 /mnt/winxp2" This is not ok..(i want to mount to the logical drive in winxp)
the error prompts that i have a error label which is /dev/hda2. actually, i don't know what should be the correct label device..
are there any ways to get to know what are my pc device labels?

Thanks in advance!

Cheers,
yenonn

loke137 02-20-2003 09:10 PM

WInXP partitions use NTFS filesystems. THe support for mounting such is still experimental from what I have heard, but it has worked( although writting to the partition is considered dangerous). If your XP partition is the master it should be /dev/hda1 (hdb would be all linux`s partitions). Ok, the logical drive should be /dev/hda2.
Also vfat is for older windows, not sure what is the command for NTFS but read the man page, it should be there.

esm 02-20-2003 09:15 PM

the command is
# fdisk -l /dev/hda

this should show you the partitions and their types.

The first logical part would be, I bet, /dev/hda5 but that is just a wild guess..

Hope this helps

Texicle 02-20-2003 09:15 PM

Do the following in a terminal:

cat /etc/fstab

It will show you what all you have mounted. The list below should help you figure out which drives/partitions you have mounted.

/dev/hda = primary master drive
/dev/hda1 = primary master 1st partition
/dev/hda2 = primary master 2nd partition
/dev/hda3 = primary master 3rd partition
/dev/hda4 = primary master 4th partition
/dev/hda5 = primary master 1st extended (or logical-not sure) partition
/dev/hda6 = primary master 2nd extended (or logical-not sure) partition

/dev/hdb = primary slave
/dev/hdb1 = primary slave 1st partition
.
.
.
same as above

/dev/hdc = secondary master drive
/dev/hdc1 = secondary master 1st partition
.
.
.
same as above

/dev/hdd = secondary slave drive
/dev/hdd1 = secondary slave 1st partition
.
.
.
same as above.

I could very well be wrong about the extended (or logical-not sure) partitions as I've never used them. Someone please correct me if I'm wrong. Thanks.

Hope this helps.:D

yenonn 02-20-2003 09:36 PM

what if i have a handydrive, then, how can i mount to the device?
what should be the shell prompt to mount to the device

yenonn 02-20-2003 09:41 PM

texicle,

i want to know those hdrive label that i haven't mounted...and i want to get the label and mount it from rh. then, how can i do this?

thanks for ur concern...

Cheers,
yenonn

Texicle 02-20-2003 10:38 PM

Open a terminal window if already in X, if you're not in X, then you're already in command line.

Once you have a command line prompt, type:

cat /etc/fstab

And then post the results here. Your /etc/fstab will tell you what you already have mounted.

I don't know what you haven't mounted yet and I don't know what hardware you have and where. How many hard drives do you have? How are they set up--primary master, primary slave, secondary master, secondary slave?

If you know how your drives are set up you can use the fdisk utility to determine what your partitions are. Let's say you've got 2 hard drives: one as primary master and one as secondary master. Use the fdisk utility to determine what your partitions are set up as:

fdisk -l /dev/hda

This will list all your partitions for your primary master drive and their types (Linux, NTFS, and whatever else including swap).

fdisk -l /dev/hdc

This will list all your partitions for your secondary master drive and their types (Linux, NTFS, and whatever else including swap).

Once you determine how your partitions are set up, you can compare this with your /etc/fstab and find out what you don't have mounted yet. Hope this helps. :D

yenonn 02-20-2003 10:46 PM

thanks!

Texicle 02-21-2003 01:46 AM

Did you find what you were looking for?

yenonn 02-21-2003 02:01 AM

i haven't tried. but, anyway, i will let u know the result by tomorrow... thanks a lot. i really appreciate.

Smiles, :)
yenonn


All times are GMT -5. The time now is 07:58 PM.