Mount Fat32 and NTFS partition!

Kernels & Hardware, configuring network, installing services

Mount Fat32 and NTFS partition!

Postby Rick1993 » 2008-11-16 09:33

Hello!


I've got a Problem! I've installed on my System the New Debian5 (lenny)! Everything is good! But i cant mount my other Partitions!

How can I mount my partitions by booting?

I hope, you understand me, and you can Help me!

Thanks a lot!
Rick1993
 
Posts: 5
Joined: 2008-11-01 12:26

Postby julian67 » 2008-11-16 11:15

To have full and easy access to ntfs filesystems you can install NTFS-3g from the Debian repositories. NTFS-3g uses FUSE (Filesystem in USErspace) and you need to be a member of the fuse group. After you install NTFS-3g you need to add yourself to the fuse group:

Code: Select all
# usermod -a -G fuse rick


(if your username is rick). Now you need to log out and log in again and you have read and write permission for ntfs. If you want the drive automatically mounted when you boot you can add an entry to fstab. My NTFS drive is /dev/sda2 and it contains a Windows OS which I have mounted at /windows, here is my /etc/fstab

Code: Select all
proc            /proc           proc    defaults        0       0
/dev/sda1       /               ext3    noatime,errors=remount-ro 0       1
/dev/sda4       /home           ext3    noatime         0       2
/dev/sda3       none            swap    sw              0       0
/dev/sda2   /windows   ntfs-3g   defaults   0   0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0


If the Windows partition was a fat32 filesystem I would change the entry to look like this:

Code: Select all
/dev/sda2 /windows vfat user,rw,exec 0 0


You don't need fuse/ntfs-3g for fat16/fat32.

If you prefer you can mount the windows filesystem somewhere other than /windows, i.e. you might prefer it mounted in your home. If you choose to mount it in /home/windows or similar make sure the fstab entry comes after /home as the entries in fstab are mounted sequentially (which is why / must always be mounted before all the other physical filesystems).
Wisdom from my inbox: "do not mock at your pottenocy"
User avatar
julian67
 
Posts: 4648
Joined: 2007-04-06 14:39
Location: Just hanging around

Postby Ook » 2008-11-16 11:27

# fdisk -l

will give you a list of partitions.

As root, edit /etc/fstab .

The syntax is,

<partition_device_name> <mount point> <file system> <some options> <some numeric values for dumps and file system checks>

For fat32 I have,

/dev/fat32_partition_name (hda1,sda7) /media/shared (Full path of directory to mount to.) vfat rw,user,uid=your_login,gid=your_group 0 0

The above will need some aligning with existing fstab as a model.

For ntfs the file system will be ntfs. But drivers need installed. ntfs-3g package? I am no a lenny user.

You can read more at "man mount" and "man fstab".
Last edited by Ook on 2008-11-16 11:37, edited 3 times in total.
Inspiron Cel-1.4GHz, 120G, 1G, ATI RV250, BCM4318; XP-Pro, Knoppix LXDE
Inspiron Pent M-1.6GHz, 120G, 1G, ATI RV250, IPW2200; XP-Pro, 2.6.37-trunk mixed-CLI/OB
Inspiron Turion 64x2, 500G x2, 2G, ATI X1200, BCM4321; Vista, 2.6.37-5-AMD64 mixed-CLI/OB/Gnome
User avatar
Ook
 
Posts: 919
Joined: 2006-11-28 05:49

Postby julian67 » 2008-11-16 11:36

Ook wrote:
For ntfs the file system will be ntfs. But drivers need installed. ntfs-3g package? I am no a lenny user.


This shows :D

For ntfs use ntfs-3g as in my post, it offers stable read and write to ntfs filesystems and is much better than the old ntfs driver.
Wisdom from my inbox: "do not mock at your pottenocy"
User avatar
julian67
 
Posts: 4648
Joined: 2007-04-06 14:39
Location: Just hanging around

Postby Ook » 2008-11-16 13:45

Inspiron Cel-1.4GHz, 120G, 1G, ATI RV250, BCM4318; XP-Pro, Knoppix LXDE
Inspiron Pent M-1.6GHz, 120G, 1G, ATI RV250, IPW2200; XP-Pro, 2.6.37-trunk mixed-CLI/OB
Inspiron Turion 64x2, 500G x2, 2G, ATI X1200, BCM4321; Vista, 2.6.37-5-AMD64 mixed-CLI/OB/Gnome
User avatar
Ook
 
Posts: 919
Joined: 2006-11-28 05:49

Postby Rick1993 » 2008-11-16 14:58

Oh Thanks!

I've done it like Julian67 says! Know it Works!

Thanks a lot!
Rick1993
 
Posts: 5
Joined: 2008-11-01 12:26

Postby julian67 » 2008-11-16 16:15

Rick1993 wrote:Oh Thanks!

I've done it like Julian67 says! Know it Works!

Thanks a lot!


you're welcome
Wisdom from my inbox: "do not mock at your pottenocy"
User avatar
julian67
 
Posts: 4648
Joined: 2007-04-06 14:39
Location: Just hanging around

Postby littlegreenman » 2009-02-05 22:38

julian67 wrote:To have full and easy access to ntfs filesystems you can install NTFS-3g from the Debian repositories. NTFS-3g uses FUSE (Filesystem in USErspace) and you need to be a member of the fuse group. After you install NTFS-3g you need to add yourself to the fuse group:

Code: Select all
# usermod -a -G fuse rick


Hello Julian,

I've installed NTFS-3g, as you can see:

Code: Select all
diogo@diogo-asus:~$ sudo apt-get install ntfs-3g
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ntfs-3g is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


and when I try to add myself to fuse, it says the group does not exist:

Code: Select all
diogo@diogo-asus:~$ sudo usermod -a -G fuse diogo
usermod: unknown group fuse


Help?! hehe Thanks again! :D

I'm running Lenny on this computer.
littlegreenman
 
Posts: 12
Joined: 2009-02-05 11:43
Location: Lisbon, PT

Postby littlegreenman » 2009-02-05 23:05

ok, so I installed this package called ntfsprogs, or something, and at the same time came some fuse packages, so I was able to add myself to the fuse group. But I still cannot mount the ntfs partition.

Code: Select all
diogo@diogo-asus:~$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5a2c8284

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       38914   312568832    7  HPFS/NTFS
littlegreenman
 
Posts: 12
Joined: 2009-02-05 11:43
Location: Lisbon, PT

Postby julian67 » 2009-02-05 23:11

I don't know. I've never installed a fuse based tool for the first time on a system and not seen it create the group fuse. I'm not sure which package installation actually triggers the creation of the group, libfuse2 or fuseutils I suppose. You could try running as root
Code: Select all
dpkg-reconfigure libfuse2
and
Code: Select all
dpkg-reconfigure fuse-utils

and accepting all defaults but I am completely guessing here. If that fails maybe manually create the group fuse and add yourself to it.

I notice you use sudo instead of using su to become root. Maybe there is a configuration issue with sudo...total guess! I know from using Ubuntu that some commands and scripts fail when sudo is used but real root is required but I settled on using Debian and regular user and root accounts quite a while ago and don't remember or know enough about the subject to be specific.
Wisdom from my inbox: "do not mock at your pottenocy"
User avatar
julian67
 
Posts: 4648
Joined: 2007-04-06 14:39
Location: Just hanging around

Postby julian67 » 2009-02-05 23:19

littlegreenman wrote:ok, so I installed this package called ntfsprogs, or something, and at the same time came some fuse packages, so I was able to add myself to the fuse group. But I still cannot mount the ntfs partition.

Code: Select all
diogo@diogo-asus:~$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5a2c8284

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       38914   312568832    7  HPFS/NTFS


After adding a user to a group you need to log the user out and log in again for the new configuration to work.
Wisdom from my inbox: "do not mock at your pottenocy"
User avatar
julian67
 
Posts: 4648
Joined: 2007-04-06 14:39
Location: Just hanging around

Postby littlegreenman » 2009-02-05 23:19

I've managed to add myself to group fuse.

I can mount the drive in command line, i can list the files, but i cannot write, nor can i mount the drive using GUI:

(and now I su first :D )

diogo-asus:/media# mount /dev/sdb1 /media/Disco_K/
diogo-asus:/media# cd /media/Disco_K/
diogo-asus:/media/Disco_K# ls
backup ubuntu gnu cash backup Movies recorded tv tralha
Documentos Imagens Música Torrent
diogo-asus:/media/Disco_K# mkdir diogo
mkdir: cannot create directory `diogo': Operation not permitted
littlegreenman
 
Posts: 12
Joined: 2009-02-05 11:43
Location: Lisbon, PT

Postby julian67 » 2009-02-05 23:34

ntfs-3g should allow you to write to ntfs. I only have one ntfs partition on an external USB drive and that works so I don't have enough experience of fixing ones that don't. I would search these forums because the subject comes up regularly and has surely been solved many times. Also ntfs-3g have their own board which should be helpful.

edit: just remembered I actually have an ntfs partition on this PC because it's dual boot :oops: ...has been a while since I booted to Windows :lol:

anyway if your ntfs is a fixed drive you can add it to /etc/fstab. I use uuid but you can use traditional device names like /dev/sda* if you prefer

Code: Select all
UUID=9EAC3366AC33385B   /windows        ntfs-3g defaults        0       0


Modify as needed. Make sure the mount point exists. Then as root run
Code: Select all
mount -a


which mounts everything in fstab that is unmounted and you should have read and write access.
Wisdom from my inbox: "do not mock at your pottenocy"
User avatar
julian67
 
Posts: 4648
Joined: 2007-04-06 14:39
Location: Just hanging around

Postby littlegreenman » 2009-02-06 19:34

Ok, so I did this:

Code: Select all
diogo@diogo-asus:~$ sudo chmod 777 -R /media/Disco_K


now everything seems to be ok.

I did this also to my /etc/fstab:

Code: Select all
/dev/sdb1       /media/Disco_K  ntfs-3g auto,defaults,users     0       0


which I read in a different post. Going for reboot and will let you know.

Thanks.

Edit:

Great! It works! And even creates a link to the desktop :-) am I happy, or what? Thanks. :D
littlegreenman
 
Posts: 12
Joined: 2009-02-05 11:43
Location: Lisbon, PT


Return to System configuration

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable