LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mounting a partition (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-a-partition-208420/)

0perat0r 07-22-2004 03:18 PM

mounting a partition
 
I've mounted my Windows C: partition like so:

mount -t vfat /dev/hda1 /mnt

and now I'm trying to mount the second partition on the Windows disk (which is D: to Windows---no, it is not the CD drive), which I assume could be accomplished this way:

mount -t vfat /dev/hda2 /mnt

except it's not working. The error I get is:

mount: wrong fs type, bad option, bad superblock on /dev/hda2, or too many mounted file systems (aren't you trying to mount an extended partition, instead of some logical partition inside?)

Would someone please shed some light on what I'm doing wrong here?

thanks

michaelk 07-22-2004 03:31 PM

First, each partition needs a unique mount point. Redhat uses /mnt as a place for removable , non OS mount points. You will find subdirectories in mount for your floppy, cdrom drive and other stuff like USB drives etc. So when you mounted the hda1 to /mnt you have lost access to your cdrom and floppy.

You will need to create a directory for your windows c: and d: drive. The console command is called mkdir. So:

mkdir /mnt/win_c (as an example)

Next, it is typical for windows to create a logical partition for the d: drive. In order to create a logical partition you need to create an extended partition. In a nutshell an extended partition is a container for logical partitions. The reason for all of this was to overcome the original limitation of 4 primary partitions. Primary partitions are 1-4, logicals are anything >4.

So I would guess that /dev/hda2 is the extended and your actual d: drive is /dev/hda5. To see how the drive is actually partitioned use the console command fdisk:

fdisk -l /dev/hda (That is a small L and you must be logged in as root)

misterflibble 07-22-2004 03:31 PM

You're trying to mount both filesystems at the same time to the directory /mnt . You should create two separate directories under this (like say DriveC, DriveD) and replace /mnt with the respective paths. If it still doesn't work, the message about the extended partition means that /dev/hda2 is not the name of the second partitition but an extended partition that contains the D: partition. Extended partitions were created to overcome the limit of 4 primary partitions on one disk because they can be further divided. I don't know why your disk would be set up this way but it would probably make the D: drive /dev/hda3.

Boby 07-22-2004 03:36 PM

hi!

use "fdisk -l" to see all partitions.
then "mkdir /mnt/windowsC"
"mount -t vfat /dev/hda1 /mnt/windowsC"

"mkdir /mnt/windowsD"
mount -t vfat /dev/hda2 /mnt/windowsD"


you have to make a directory in wich to mount a partition. you tried to mount the second partition in the one where you mounted the first. usally the dir /mnt contains tha directories where are other dirs that are mounted.

to have them mounted on every system boot, edit the file /etc/fstab

good luck!
boby

0perat0r 07-22-2004 03:59 PM

Thanks all, this is a big help. Here's another quesiton. I'm using RH 8 here at work, and I have RH WS3 at home. At one point, I noted a message from the system (at work) that it could not mount ntfs, as that file system is unsupported by RH 8. After what kernel version is ntfs supported for disk mounts?

michaelk 07-22-2004 04:31 PM

RH / Fedora does not provide NTFS support out of the box. You can google for "linux ntfs" and find the sourceforge webpage for downloading the package so you do not have to recompile the kernel. BTW this is read only support.


All times are GMT -5. The time now is 04:12 PM.