LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't mount partitions on the same drive as linux (https://www.linuxquestions.org/questions/linux-newbie-8/cant-mount-partitions-on-the-same-drive-as-linux-349004/)

pdeman2 08-01-2005 06:35 PM

Can't mount partitions on the same drive as linux
 
I've searched all over this site and google, I can not figure out how to mount partitions on the local hard drive. I'm using FC4 on a Toshiba Satellite.
Thanks.

samel_tvom 08-01-2005 06:42 PM

what do you want to mount?

if you have lets say an mp3player and its /dev/sda1
you should make a directory in /mnt called something like mp3player.
#mkdir /mnt/mp3player
and then you mount the device to that dir like so:
#mount -t vfat /dev/sda1 /mnt/mp3player
if the filesystem is vfat that is....

if you would like to do that often you should edit your /etc/fstab,
you add an entry something like
/dev/sda1 /mnt/mp3player vfat defaults 0 0

did it help? please explain how you did it (if my help wasn't enough) so that others like you can see.

pdeman2 08-01-2005 07:15 PM

Yeah, I know about that stuff. It all works with external devices, but not for partitions on my local hard drive (such as hda2). Also, the partitions I want to mount are vfat.

Elomis 08-01-2005 07:33 PM

Exact same thing.

mount /dev/hda2 /mnt/nameofafolderyoucreate

pdeman2 08-01-2005 09:51 PM

Well, this didn't change anything that I have been doing in the past, however, I tried it again and it worked for one of my partitions, but I still don't know how to mount extended partitions.

volvogga 08-01-2005 11:12 PM

I think it should be the same kind of process (as was said earlier). I haven't messed with partitions in a while.

Try this:

fdisk -l /dev/hda (if it is hard disk a, if not make it what it should be)

That should identify the all of your partitions for you (I think).

If that doesn't help, please post the output of that command.

volvogga 08-01-2005 11:29 PM

I don't think that this is the problem, but if you already know the partition number, then it could be that you need to identify the file system in the mount command. That would look similar to this:

mount -t vfat /dev/hda /mnt/theDIRofChoosing

Might want to look this up as I'm not sure if there needs to be the -t swich before the vfat.

samel_tvom 08-02-2005 06:40 PM

maybe the process of making a filesystem went wrong. if you use cfdisk (probably the same with fdisk) to make a filesystem that isn't sufficient (at least not for me). you have to download the dosfstools package and use the mkfs.vfat command. or maybe the disk is okay, have you perhaps used it in windows? then it should be okay.

pdeman2 08-02-2005 10:00 PM

Well, I think I figured out the extended partition thing. When I do fdisk -l, one of the partitions it gives me is an extended partition, this partition has the same starting value as one of my other partitions and an ending value of another. So, I think that this partition is actually just showing that those two other partitions are extended, and this is why I can not mount that listed partition.

Thanks for the help ya'll.

volvogga 08-02-2005 10:18 PM

Having an extended partition should not stop you from mounting it. All an extended partition does is reserve space for logical drives (partitions within a partition). This is due to a limit of 4 primary partitions to a single hard disk. I only suggested fdisk -l so that you could see the numbers and know which one to call out for in your mount command.

Post the results of fdisk -l if you don't mind working on this a little bit more.

pdeman2 08-03-2005 11:13 AM

Here's what I get with fdisk -l:

[root@localhost ~]# /sbin/fdisk -l

Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 132 1522 11173176 7 HPFS/NTFS
/dev/hda2 4710 4864 1245037+ f W95 Ext'd (LBA)
/dev/hda3 1 131 1052226 82 Linux swap / Solaris
/dev/hda4 1523 4709 25599577+ 83 Linux
/dev/hda5 4710 4857 1188778+ 6 FAT16
/dev/hda6 4858 4864 56196 b W95 FAT32

Partition table entries are not in disk order

volvogga 08-03-2005 07:46 PM

Ok, that looks good.

I would say that the command that you need would be

mount -t vfat /dev/hda6 /WhatEverYouWant

also, if you want

mount -t vfat /dev/hda5 /WhatEverYouWant

just remember that the subdirectory that you want to mount to has to already exist.

One last thing, if neither of these work, what partition(s) are you having the problem with?

pdeman2 08-03-2005 08:03 PM

Thanks, both of those work, it's just hda2 that doesn't. I assume that's because it is just identifying the extended partitions.

volvogga 08-03-2005 08:14 PM

Sure. No problem.

hda2 (extended partition) is just a place holder. More or less anyway. So you're all set now, right?


All times are GMT -5. The time now is 10:26 PM.