LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2006, 10:03 PM   #1
joshknape
Member
 
Registered: Jul 2005
Posts: 216

Rep: Reputation: 30
Linux won't write to FAT32 partition


Having learned here that Linux can write to a Windows partition or a shared parition if it is FAT32, I made one. However, Linux (Knoppix here) won't write to that, either. Is there something else I need to do to prepare the partition?
 
Old 02-04-2006, 10:25 PM   #2
mebrelith
Member
 
Registered: Nov 2004
Location: Torreón, Coahuila, México
Distribution: Gentoo
Posts: 342
Blog Entries: 1

Rep: Reputation: 30
Well exactly how did you mounted this FAT32 partition? Show us your fstab line please.
 
Old 02-04-2006, 10:38 PM   #3
joshknape
Member
 
Registered: Jul 2005
Posts: 216

Original Poster
Rep: Reputation: 30
I'm still a newbie, so I don't know what the fstab line is. All I can say is that I made the partition in Windows.
 
Old 02-04-2006, 10:59 PM   #4
mebrelith
Member
 
Registered: Nov 2004
Location: Torreón, Coahuila, México
Distribution: Gentoo
Posts: 342
Blog Entries: 1

Rep: Reputation: 30
The fstab is the file in your system configuration (found usually under /etc/) which is used to work the different drives and partitions. You should RTM on fstab.

When I work with FAT32 partitions I use the following fstab line:

Code:
/dev/hdb1               /media/storage          vfat    user,owner,rw,utf8,umask=000 0 0
Where /dev/hdb1 is my FAT32 partition and /media/storage is where I want to mount it. notice that you'll have to create the dir where you want your partition to be mounted. Also notice that all this can only be done with root powers.
 
Old 02-04-2006, 11:01 PM   #5
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,091

Rep: Reputation: 45
can you copy and paste your /etc/fstab file here? that will help us to help you

chances are although you created the partition in windows, it may or may not have been picked up by knoppix...so you'd have to edit your /etc/fstab file to include it...
 
Old 02-05-2006, 12:57 AM   #6
joshknape
Member
 
Registered: Jul 2005
Posts: 216

Original Poster
Rep: Reputation: 30
I'llm work on that. But if you say Knoppix may not detect the new partition because Windows made it, then would it solve the problem to delete the new partition and remake it in Knoppix? Or would that just invert the problem by giving me a partition Windows might not read.
 
Old 02-05-2006, 08:48 AM   #7
mebrelith
Member
 
Registered: Nov 2004
Location: Torreón, Coahuila, México
Distribution: Gentoo
Posts: 342
Blog Entries: 1

Rep: Reputation: 30
Wow! Hold your horses my friend. Before you go on deleting partitions or anything, give us a look at your fstab and also the output of fdisk -l.
 
Old 02-05-2006, 09:51 AM   #8
mangku
LQ Newbie
 
Registered: Dec 2005
Location: England
Distribution: Debian
Posts: 12

Rep: Reputation: 0
Linux won't write to FAT32 partition

If you can't find fstab click on your home icon, click on the up arrow twice, open folder marked etc,scroll down and find fstab.
 
Old 02-05-2006, 10:08 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by joshknape
I'llm work on that. But if you say Knoppix may not detect the new partition because Windows made it, then would it solve the problem to delete the new partition and remake it in Knoppix? Or would that just invert the problem by giving me a partition Windows might not read.
No...
To read ANY partition in Linux it must be mounted. If it is listed in fstab, then it gets mounted automatically at bootup.
man mount
man fstab
 
Old 02-05-2006, 10:15 AM   #10
Netizen
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Slackware and Ubuntu
Posts: 355

Rep: Reputation: 30
Quote:
Originally Posted by joshknape
I'm still a newbie, so I don't know what the fstab line is. All I can say is that I made the partition in Windows.
May I suggest that when you get a chance you read "Introduction to Linux" from www.tldp.org?

http://www.tldp.org/LDP/intro-linux/html/index.html

Last edited by Netizen; 02-05-2006 at 10:16 AM.
 
Old 02-06-2006, 02:20 AM   #11
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
I checked the given links and could not see the answer to the question, so here a small howto for the TS. Note that everything below is done from the commandline.
As pixellany said, the partition needs to be mounted. To do so, first find the partition in linux by running fdisk -l.
Code:
fdisk -l
/dev/hda1 ....................... HPFS/NTFS
/dev/hda2 ....................... Win95 ext (LBA)
/dev/hda5 ....................... HPFS/NTFS
/dev/hda6 ....................... HPFS/NTFS
/dev/hda7 ....................... HPFS/NTFS
/dev/hda8 ....................... Win95 FAT32

// more info here but not relevant
I had to run this command as root. In my case it's /dev/hda8.
Next you can mount it. First create a mountpoint. This is a directory where the partition will be mounted. Check your system if there's a directory /mnt or /media. Those directories are (at least /mnt is ) owned by root, so you now have to be the root user to continue. Go to the directory e.g.
Code:
cd /mnt
and create the mountpoint.
Code:
mkdir a_name
Replace a_name with a name that makes sense to you.
Now you can mount (as root).
Code:
mount -t vfat /dev/hda8 /mnt/a_name
You should now be able to go to this directory and read and write to the FAT32 partition.
Code:
cd /mnt/a_name
ls
touch abc
ls -l abc
This changed your working directory to the FAT32 partition, showed the directory contents, created a file abc (or changed the timestamp of it) and showed that the file was created / timestamp changed.

Having an entry in /etc/fstab makes live easier. You don't have to type the full command, but simply can mount the mount point. I also allows have the partition mounted at boottime.
Mine is
Code:
/dev/hda8  /mnt/a_name auto,uid=500,gid=502,umask=007 0 0
auto indicates that it will be mounted at boot-time, the other options (uid,gid,umask) make the that user with id 500 is the owner and users who are member of group 502 have access. The umask defines the rights.
Check your uid with the id command if you want to use it this way.
If auto is omitted, the partition can be mounted with
Code:
mount /mnt/a_name
I'm not really familiar with live-CDs for normal use, so I don't know if it's possible to make permanent changes to /etc/fstab (doubt it).

Last edited by Wim Sturkenboom; 02-06-2006 at 02:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No permission to write to FAT32 partition smiley_lauf Linux - Newbie 5 02-04-2006 02:53 PM
can't write to fat32 partition after using nautilus stevanbt Linux - Newbie 6 02-01-2006 07:42 AM
Unable to write to my FAT32 Partition dominoid Linux - Newbie 4 02-12-2005 07:18 AM
Write to FAT32 Partition ok? ziphem Linux - Newbie 8 01-25-2005 07:39 PM
Can't write to second FAT32 partition stewe151 Linux - Hardware 13 07-22-2002 11:28 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration