LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 07-18-2007, 06:01 AM   #1
jman82s
Member
 
Registered: Jul 2007
Location: Central Coast, California
Distribution: "distro-hopper"
Posts: 66

Rep: Reputation: 15
Trouble w/ fstab after creating new partition


Hey folks,

I recently wiped my hard drive and installed everything from scratch. My disk includes, and previously included, partitions for:

a)XP (ntfs)
b)swap
c)Ubuntu 7.04
d)documents to be shared between OSes (fat32)

Now, my problem is that this time I created the FAT32 partition after installing Ubuntu, so there was no fstab entry for it. Before, I had the fat32 partition before I installed Ubuntu, so fstab created an entry automatically. I can still manually mount it, but it's a pain. Anyway, I added an entry to fstab to mount it to a folder called "osshare" in my home directory, which worked, but now it has root ownership (so I can't write to it), and it doesn't want to let me change it. I've tried to change ownership by "sudo nautilus" and using the GUI, as well as "sudo chown jman /home/jman/osshare" via bash. No dice. It unceremoniously gives me the message, "Sorry, couldn't change the ownership." Here is what my fstab reads after editing. The line I added is the very bottom "/dev/sda4" one. Any ideas? Bad mount options?

-Thanks!



# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda3
UUID=205d1259-69a7-4f88-bb48-a9dec6fbee5e / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=2A1009BB10098ECF /media/sda1 ntfs defaults,noauto,nls=utf8,umask=007,gid=46 0 1
# /dev/sda2
UUID=674b1fef-7e21-440c-8c62-c9e177434cb6 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
#/dev/sda4
UUID=469C-DFE7 /home/jman/osshare vfat defaults 0 1
 
Old 07-18-2007, 06:50 AM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,873

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
Quote:
#/dev/sda4
UUID=469C-DFE7 /home/jman/osshare vfat defaults 0 1
If this is the line(s) the '#' character makes the line a comment.

When you are copying lines to the forum, use the quote or code buttons to make the formatting look like it does on your system.

I'm a little confused because of the formatting. Have you got two line, one reading
Quote:
#/dev/sda4
and one reading
Quote:
UUID=469C-DFE7 /home/jman/osshare vfat defaults 0 1
or id this one long line reading
Quote:
#/dev/sda4 UUID=469C-DFE7 /home/jman/osshare vfat defaults 0 1
Here is what a working line from my fstab looks like for a fat32 partition.

Code:
/dev/hda1 /mnt/win_c vfat umask=0,iocharset=utf8 0 0
Here is what I think yours should look like...

Code:
/dev/sda4 /home/jamn/osshare vfat defaults 0 0


As stated below you can not apply linux permissions to fat32 partitions.

Last edited by camorri; 07-18-2007 at 02:53 PM.
 
Old 07-18-2007, 07:39 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
You can't use chmod or chown with fat32 partitions.
Because the drive isn't a removable drive, it's OK to simply use a device name like /dev/sda4.
Use "sudo /sbin/fdisk -l" to list the partitions.


If you want to use the same form, you can use udevinfo to find out the UUID number.
Code:
udevinfo -q env -n /dev/sdc1
ID_VENDOR=SanDisk
ID_MODEL=Cruzer_Mini
ID_REVISION=0.2
ID_SERIAL=SanDisk_Cruzer_Mini_20051535630A02E2F57B
ID_TYPE=disk
ID_BUS=usb
ID_PATH=pci-0000:00:02.2-usb-0:2:1.0-scsi-0:0:0:0
ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT16
ID_FS_UUID=3B69-1AFD
ID_FS_LABEL=CRUZER128
ID_FS_LABEL_SAFE=CRUZER128
The umask=000 gives everyone full access to the filesystem. You can instead use "uid=<yourusername>,"gid="yourgroupname",fmask=117,dmask=007.

Here is one possible /etc/fstab entry:
Code:
UUID=3B69-1AFD /media/fatshare vfat rw,nosuid,nodev,noatime,uid=1000,gid=1000,fmask=117,umask=007,utf8,shortname=lower 0 0
Also, some distro's have a partitioner program that can mount existing partitions and update the /etc/fstab file.

Also read the manpages for mount and fstab.
 
Old 07-18-2007, 07:08 PM   #4
jman82s
Member
 
Registered: Jul 2007
Location: Central Coast, California
Distribution: "distro-hopper"
Posts: 66

Original Poster
Rep: Reputation: 15
Hi again,

Problem solved.

To answer camorri, I was not aware of the code posting feature, but the formatting here appears the same as it does locally. I guess Ubuntu's fstab uses only UUIDs, and the comment simply makes identification easier.

I went ahead and added

uid=1000,gid=1000,fmask=117,dmask=007

to the mount options column, and all is well.

Thanks^1000, guys!
 
Old 07-18-2007, 07:13 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Just so that you know, the UUID number is for the filesystem. I wasn't certain whether what you posted used the number for the current filesystem or your previous one. If you were to reformat the partition, you would need to change the UUID= number before you can mount it. I'm glad you got it working.
 
Old 07-18-2007, 07:40 PM   #6
jman82s
Member
 
Registered: Jul 2007
Location: Central Coast, California
Distribution: "distro-hopper"
Posts: 66

Original Poster
Rep: Reputation: 15
Ah. Yeah I did some poking around in /dev/disk/by-uuid to determine the current ID. Wasn't too hard to single the fat volume out by looking at fstab at the same time.

Thanks again.
 
  


Reply

Tags
fstab, mount, partition


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
Creating fstab entry for Linux (Red Hat 9 & Slackware 11) p2pfire Linux - Hardware 3 01-06-2007 04:38 AM
Gentoo - creating /etc/fstab satimis Linux - Distributions 4 08-21-2006 11:33 AM
Partition mounting/KDE errors after creating Fat32 Partition BertBert Linux - General 1 07-07-2004 11:59 AM
Formating a FAT32 partition, putting the partition correctly into FSTAB, and more. squall14716 Linux - General 14 10-27-2003 11:16 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 09:45 AM


All times are GMT -5. The time now is 03:05 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration