LinuxQuestions.org
Review your favorite Linux distribution.
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 03-30-2004, 12:38 AM   #1
Boggit
Member
 
Registered: Jun 2003
Posts: 54

Rep: Reputation: 15
I know there are lots of threads on this but I REALLY cant work it out


I have looked through all the threads posted on how to mount a FAT32 drive, but I still cant do it!

I would like to have it automounted and have a fat32 icon each time I boot.

Firstly I don't know how to find the name of the partition (I've picked up that it could be vfat, but im not 100% sure as there are 3 partitions on this drive, 1 NTFS, 1 linux and 1 Fat32)

Secondly what is the command I type to make a launcher on my desktop to this drive? I don't know how to automount it.

I'm assuming this is all done in the terminal? I am running Red Hat 9.

Once again I apologise for another post on this topic, but I have read the others and am a complete

Many thanks in advance.

Boggit
 
Old 03-30-2004, 02:12 AM   #2
petkov
LQ Newbie
 
Registered: Mar 2004
Posts: 26

Rep: Reputation: 15
I'm kinda newbie myself, so I won't be able to gve you 100% answers but I can point you in the right direction.
There is a file called fstab in /etc/. The fstab file lists all your partitions. To have the Windoze partitions mounted on boot time, they have to be included in the fstab file.
You can mount and unmonth with the mount command. Do "man mount" in the shell or "mount -help".
Your partitions names depend on how your drive is partitioned.
Most likely the WIndows partitions are /mnt/hda1 or /mnt/hda2 or /mnt/hda5
 
Old 03-30-2004, 02:17 AM   #3
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
To find out what partitions are on the drive go into a consol and do su ->enter password ->cfdisk /devhdx (x being the disk a =1 master b=1 slave c=2 master d= 2 slave) and you'll see a list of the partitions. Note the partition you want mount and go to quit.
You now need to create a mount point so decide what you want to call it. (eg C now you can do the following in one of 2 ways using a gui open home (the house icon) go down to /mnt and open it then right click and create a new directory and give it the name (C or from a consol su again do cd /mnt then mkdir C: . Now open your /etc/fstab with an editor and add the following line to it;
/dev/hdxy /mnt/C: vfat defaults,umask=000 0 0
xy being the partition you found with cfdisk.
Go to your desktop and right click and select hard drive and select the drive from the drop down.
 
Old 03-30-2004, 02:54 AM   #4
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
Quote:
Firstly I don't know how to find the name of the partition (I've picked up that it could be vfat, but im not 100% sure as there are 3 partitions on this drive, 1 NTFS, 1 linux and 1 Fat32)
Use this command..

fdisk -l

Disk /dev/hda: 15.3 GB, 15382241280 bytes
255 heads, 63 sectors/track, 1870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1045 8393931 c Win95 FAT32 (LBA)
/dev/hda2 1046 1807 6120765 83 Linux
/dev/hda3 1808 1870 506047+ 82 Linux swap

Disk /dev/hdb: 15.3 GB, 15393079296 bytes
240 heads, 63 sectors/track, 1988 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 2 1988 15021720 c Win95 FAT32 (LBA)
/dev/hdb3 1 1 7528+ 12 Compaq diagnostics

Partition table entries are not in disk order


Look for the device name


You may need to add the drive to the command like this..

fdisk -l /dev/hda

You can filter the output through grep if you want..

fdisk -l |grep FAT32
/dev/hda1 * 1 1045 8393931 c Win95 FAT32 (LBA)
/dev/hdb1 * 2 1988 15021720 c Win95 FAT32 (LBA)


Quote:
Secondly what is the command I type to make a launcher on my desktop to this drive?
That really depends on the window manager, but you can try right clicking on the desktop and see if a menu is there that says create launcher or something like that. The launcher is only a link to the folder where it is mounted since it's always mounted.


The link file Win.desktop
[Desktop Entry]
Type=Link
URL=/mnt/win
Name[en_US]=Win



Quote:
I don't know how to automount it
Many ways to set permissions and such on the filesystem, here is one example that will only allow the users you want to have access.

Added this to /etc/fstab
Code:
/dev/hda1      /mnt/win      vfat    auto,vfatusers,uid=99,gid=503,umask=007 0 0


It will be mounted on boot (auto). only users in the group (vfatusers) will be able to access it.


some commands to set it up..

groupadd vfatusers
gpasswd -a david vfatusers

grep vfatusers /etc/group
vfatusers:x:503:david

NOTE:
The user will need to log out and back in to be added to the group or use the command..

newgrp vfatusers

However your X session will need to be logged out to use the link as you do not have the permissions with the current login, unless you use an already existing group that the user was a member of.


The 503 is the group to be used as (gid=503) in the fstab file


The user id (uid=99) is nobody, you can check your passwd file like this

grep 99 /etc/passwd
nobody:x:99:99:Nobody:/:/sbin/nologin


The permissions are set by umask (umask=007), this will allow vfatusers full access.


ls -l /mnt |grep win
drwxrwx--- 18 nobody vfatusers 8192 Mar 30 01:34 win

Files created will have the same permissions

touch /mnt/win/test

ls -l test
-rwxrwx--- 1 nobody vfatusers 0 Mar 30 01:34 test

Last edited by DavidPhillips; 03-30-2004 at 03:02 AM.
 
Old 03-30-2004, 03:27 AM   #5
Boggit
Member
 
Registered: Jun 2003
Posts: 54

Original Poster
Rep: Reputation: 15
Thank you all for your help. Trying your suggestions

I'd just like to say that I have noticed the Linux community as far friendlier and much more helpful than any other forum's I have frequented.

Thank you once again.
 
Old 03-30-2004, 04:09 AM   #6
Boggit
Member
 
Registered: Jun 2003
Posts: 54

Original Poster
Rep: Reputation: 15
I did as you guys instructed. But when I'm booting up linux, i see it says - special device /dev/hda5 not found [FAILED]

But when I type fdisk -l that is the name of the FAT32 partition. I dont understand why it doesn't work?
 
Old 03-30-2004, 09:21 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Here is a line from my /etc/fstab for a fat32 partition:
Code:
/dev/hda11 /mnt/windows vfat umask=0007,iocharset=iso8859-1,codepage=850,gid=jimschiwal 0 0
I left the user as root, and made the gid, my own group id. You can use the name of the group in the gid=xxx option. This eliminates possible errors in looking up the group number. Nobody is a root user on a remote computer logging in to the local computer. So I don't know if selecting the uid=nobody is the right idea. Since root can access the disk anyway, It's ok to leave root as the user.
If this partition will only contain data files, you might want to add the options noexec,nodev. A normal user will not be able to execute a binary file in this directory then, although he will be able to run scripts: sh ./script
 
Old 03-30-2004, 09:34 AM   #8
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Boggit, could you post the contents of /etc/fstab, please? And the output of fdisk -i ? Thanks.
 
Old 03-30-2004, 02:53 PM   #9
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
Make sure it's not an extended partition you are looking at, and that your kernel supports vfat

try this as root

mkdir /mnt/win
mount -t vfat /dev/hda5 /mnt/win

Last edited by DavidPhillips; 03-30-2004 at 02:55 PM.
 
  


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
Java threads listed using kill -3 does not contain all threads found using ps -auxww coneheed Programming 2 11-14-2005 09:57 AM
USB logitech mouse freezes randomly (previous threads' solutions do not work) aixarat Linux - Hardware 16 11-16-2004 06:47 PM
Website needs lots of work Shade Linare 22 09-10-2004 05:53 AM
Java Threads vs Native Threads rjmendez Programming 0 08-16-2004 06:58 AM
help installing ANYTHING... configure doesn't work bc I am missing lots of packages Avatar Linux - Software 30 12-08-2003 10:43 PM


All times are GMT -5. The time now is 08:59 AM.

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