# mount problem

## Leocifre

I am a newbie and I have a problem and hopefully someone here can help me.

I have installed both GentooLinux and WindowsXP on my machine and would like to access my Windows partition under linux. I can do so only as root. I would like to be able to do that as normal user.

I have entered the partition in my /etc/fstab with the option "user", but it always says I can only access it as root. How can I change that?

I have the same problem when trying to mount data-cds/dvds. It says only root can mount them. I can watch DVD's or listen to Audio-CD's however.

thanks for help

----------

## MOL_PL

Hello

I can't even mount it by root.

```
Command (m for help): p

Disk /dev/hda: 60.0 GB, 60011642880 bytes

255 heads, 63 sectors/track, 7296 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1               1         383     3076416   12  Compaq diagnostics

/dev/hda2   *         384        2423    16386300    c  W95 FAT32 (LBA)

/dev/hda3            2424        7296    39142372+   5  Extended

/dev/hda5            2424        3060     5116671   83  Linux

/dev/hda6            3061        3125      522081   82  Linux swap / Solaris

/dev/hda7            3126        7296    33503526   83  Linux

```

How to do that ?

Please help me.

----------

## SinoTech

When mounting a NTfS partition, the files and directories are owned by root per default. Append the appropriate "gid" and "uid" options in the "/etc/fstab" should solve the problem. BTW for mounting a CDRom, the option "user" in your ftsab shall be enough.

e.g. for me it looks as this:

```

...

/dev/sda2             /mnt/winxp              ntfs            noauto,user,uid=1009,gid=10     0 0

...

/dev/hdc                /mnt/cdrom0             auto            noauto,user,ro                  0 0

```

Regards,

Sino

----------

## TheRAt

you need something like:

```
/dev/sdb6     /win     vfat     noatime,user,uid=1000     0 0
```

this makes the mounted partition owned by user with id 1000, in my case, my username..

----------

## SinoTech

 *MOL_PL wrote:*   

> Hello
> 
> I can't even mount it by root.
> 
> ```
> ...

 

You don't have a NTFS partition, so you can't mount any  :Wink: .  No kidding, you should tell us what you are trying to do and what happens (e.g. showing the command you are using and the resulting error message).

Regards,

Sino

----------

## Leocifre

it worked. I can access the partition now.

Also seems I just forgot to change the first item in the line about the cd-drive from /dev/cdrom to /dev/hdc

thanks very much

----------

## MOL_PL

lilo.conf

```
other = /dev/hda2

        #other = /devices/discs/disc0/part1

        label = Windows

        table = /dev/hda

```

and the windows partition works, but i' cant mount it. Editing fstab - doesnt work too.

 The file system is fat32. I do:

```

/dev/hda2               /mnt/windows    vfat            noatime,user,uid=1000     0 0

mount /dev/hda2 /mnt/windows/

mount: wrong fs type, bad option, bad superblock on /dev/hda2,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mount -t vfat -o noatime -o user -o uid=1000 /dev/hda2 /mnt/windows/

mount: wrong fs type, bad option, bad superblock on /dev/hda2,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

```

and it doesnt work.

 :Sad: 

----------

## Leocifre

maybe i can tell you what the problem is if you post your /etc/fstab here

----------

## MOL_PL

/etc/fstab

```
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

/dev/hda5               /               ext3            noatime         0 1

/dev/hda6               none            swap            sw              0 0

/dev/hda7               /home           ext3            noatime         0 2

/dev/cdroms/cdrom0      /mnt/cdrom      auto            noauto,ro,user  0 0

/dev/hda2               /mnt/windows    vfat            noatime,user,uid=1000     0 0

proc                    /proc           proc            defaults        0 0

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

```

maybe i didnt compile something in the kernel ?

----------

## MOL_PL

PLEASE HELP ME !

anyone...

----------

## elgato319

well...

do you have vfat support enabled in your kernel?

Have you tried to mount some other fat32 devices e.g. usb drives?

Did your try 'mount -t auto /dev/hda2 /mnt/windows'?

did you look into your syslog files after an failed mount command?

(should be /var/log/messages | /var/log/syslog, or try the dmesg command)

----------

## MOL_PL

THX

I looked into syslog (why  didnt  I do that before ?? ) and there was a problem with codepage.

```
 

was:

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

should be:

CONFIG_FAT_DEFAULT_CODEPAGE=852

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-2"

```

Now everything works.

Thank you !

----------

## TheWhiteKnight

I seem to be having a similar error.  I emerged FUSE and ntfsprogs.  I compiled ntfs support in the kernel as well.  

Here is my fstab if this will help.

/dev/hdd1                    /boot                    ext3       noauto,noatime                              1 2 

/dev/hdd3                    /                           ext3       noatime                                          0 1

/dev/hdd4                    /var                      ext3       noatime                                          0 1

/dev/hdd2                    none                    swap      sw                                                  0 0

/dev/cdroms/cdrom0    /mnt/cdrom          iso9660  noauto,ro                                       0 0

/dev/cdroms/cdrom1    /mnt/cdrom1        iso9660  noauto,ro                                       0 0

/dev/hde                      /mnt/MP3a          ntfs-fuse noauto,ro,umask=0000,uid=1000    0 0

/dev/hdf                      /mnt/MP3b          ntfs-fuse noauto,ro,umask=0000,uid=1000    0 0

/proc                           /proc                    proc        defaults                                          0 0

shm                             /dev/shm              tmpfs      nodev,nosuid,noexec                     0 0[/b]

Ok, also I need to mount my LS-120 drive in the fstab yet (I haven't gotten that far as of right now)  I know I mounted the NTFS drives as ro for the time being.  One is filled and one needs finished filling with files.  I cannot get the drives to mount.  So when I get into the computer I run the follopwing command:

```

mount /dev/hde /mnt/MP3a

```

I get 

```
/dev/hde is not a valid block device
```

  yet when I boot the livecd I can fdisk /dev/hde & fdisk /dev/hdf and it gives me the disk size / partition info.  Am I missing something?

EDIT:  I also dmesg and I didn't get any errors, however, I DID notice something when I went through the current bootlog.

It has hda and hdb as my 2 DVD-Rw's, hdc as my LS120 drive, and hdd as my gentoo boot drive (these are all plugged into the mobo's ide ports).  Now I have another IDE controller card in my PCI bus and I have the (hde + hdf) into those, but they are not showing up.  They show up on the live cd, but not the regular boot.  I never added anything in my kernel for another controller card, would this be the reason that I cannot see them?  What gets me is the card boots at my BIOS's POST so I figured that it would "just work".

----------

## elgato319

In my server i have an additional IDE Controller (hpt366), i needed to compile support for this controller into the kernel to get it working.

Try to recompile your kernel with the support enabled, reboot and look into dmesg. hde/hdf should show up

If there is more than one partition on the hde drive you should mount with /dev/hde1

----------

## TheWhiteKnight

 *elgato319 wrote:*   

> In my server i have an additional IDE Controller (hpt366), i needed to compile support for this controller into the kernel to get it working.
> 
> Try to recompile your kernel with the support enabled, reboot and look into dmesg. hde/hdf should show up
> 
> If there is more than one partition on the hde drive you should mount with /dev/hde1

 

Well each of my 120's have only one partition and I had to mount them as hdxY.  If you are having trouble with mounting your NTFS partitions, try this:

```

$Node1 /# USE="fuse" emerge ntfsprogs.

```

Then after it is all finished do a:

```

ntfsmount /dev/hdxY /mnt/mountpoint -ro udev=1000

```

I made darn sure my fstab was squared away as well.  It took me a bit (a lot of trial and error) but I did end up getting everything running.  The NTFS drives do not mount themselves, but do show up when I run KDE.  I literally just right click and choose "mount" and I have zero problems.  I am not sure about just mounting them in a bash environment though.  I don't want that, so I didn't configure my setup for that.  If you want to take a look at my fstab, I can post it this evening when I get home from work.

Also read the ntfsprogs.wiki.org section.  It is very informative and will help you get a good base for what you are doing.

And one more suggestion, since linux's ntfs is still not very stable (as compared to Win32) mount the drive as ro and not rw at first.  when you get everything up and running properly, THEN mount the drive as rw.  Just my $.02.

----------

