473,805 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access FAT32 partitions in linux

AmberJain
884 Recognized Expert Contributor
I have installed Red Hat linux a few days ago and then I accessed ext3/ext2 partitions (on which linux is installed) from windows using some third party software.

Now I wanna access FAT32 partitions from Red Hat Linux. Someone told me that I will have to mount those FAT32 drives. But I don't know how to mount the drives in linux.

Please help me in this matter
May 20 '08 #1
6 2796
ashitpro
542 Recognized Expert Contributor
LINUX newbie here.......PLZ HELP!

I have installed Red Hat linux a few days ago and then I accessed ext3/ext2 partitions (on which linux is installed) from windows using some third party software.

Now I wanna access FAT32 partitions from Red Hat Linux. Someone told me that I will have to mount those FAT32 drives. But I don't know how to mount the drives in linux.

Please help me in this matter

THANKS TO EVERYONE IN ADVANCE....


============
AmbrNewlearner
============

mount -t vfat /dev/sda1 /mnt/c

This should work....
just make sure to change the source and destination partition paths..
i.e. /dev/sda1 and /mnt/c respectively...
May 21 '08 #2
AmberJain
884 Recognized Expert Contributor
mount -t vfat /dev/sda1 /mnt/c

This should work....
just make sure to change the source and destination partition paths..
i.e. /dev/sda1 and /mnt/c respectively...
I tried as you told me to. i.e.

I logged in to root account and then I typed folowing at the terminal---->

mount -t vfat /dev/sda1/mnt/c

Note there is no space between /sda1 and /mnt/c.

When I press enter after typing above command, nothing happens.

So I still cannot access my FAT32 partitions.
Now, Please tell me where I'm wrong.......... .......

THANKS IN ADVANCE........ .....

============
AmbrNewlearner
============
May 27 '08 #3
ashitpro
542 Recognized Expert Contributor
I tried as you told me to. i.e.

I logged in to root account and then I typed folowing at the terminal---->

mount -t vfat /dev/sda1/mnt/c

Note there is no space between /sda1 and /mnt/c.

When I press enter after typing above command, nothing happens.

So I still cannot access my FAT32 partitions.
Now, Please tell me where I'm wrong.......... .......

THANKS IN ADVANCE........ .....

============
AmbrNewlearner
============

There is space between /dev/sda1 and /mnt/c
Are you sure that sda1 is your first FAT32 partition i.e. C drive...?
Post your hard disk partitions structures..
Also post the content of file "/etc/fstab"
I'll give you the exact command
May 27 '08 #4
Nepomuk
3,112 Recognized Expert Specialist
OK, you can check, what partitions you have with
Expand|Select|Wrap|Line Numbers
  1. fdisk -l
as root (or with sudo, if that's installed). It should look something like this:
Expand|Select|Wrap|Line Numbers
  1. Disk /dev/hda: 40.0 GB, 40060403712 bytes
  2. 255 heads, 63 sectors/track, 4870 cylinders
  3. Units = cylinders of 16065 * 512 = 8225280 bytes
  4.  
  5.    Device Boot      Start         End      Blocks   Id  System
  6. /dev/hda1               1          64      514048+  82  Linux swap / Solaris
  7. /dev/hda2   *          65        1402    10747485   83  Linux
  8. /dev/hda3            1403        3978    20691720   83  Linux
  9. /dev/hda4            3979        4870     7164990   83  Linux
  10.  
or
Expand|Select|Wrap|Line Numbers
  1. Disk /dev/sda: 40.0 GB, 40060403712 bytes
  2. 255 heads, 63 sectors/track, 4870 cylinders
  3. Units = cylinders of 16065 * 512 = 8225280 bytes
  4.  
  5.    Device Boot      Start         End      Blocks   Id  System
  6. /dev/sda1               1          64      514048+  82  Linux swap / Solaris
  7. /dev/sda2   *          65        1402    10747485   83  Linux
  8. /dev/sda3            1403        3978    20691720   83  Linux
  9. /dev/sda4            3979        4870     7164990   83  Linux
  10.  
The devices called hdx (or sdx, [i]x[i] being something or the other) are your harddrives, the devices called hdx1, hdx2, etc (or sdx1, sdx2, etc) are your partitions.

Then, check which partitions are mounted with
Expand|Select|Wrap|Line Numbers
  1. mount
This could look something like this:
Expand|Select|Wrap|Line Numbers
  1. /dev/hda4 on / type ext3 (rw,errors=remount-ro)
  2. proc on /proc type proc (rw,noexec,nosuid,nodev)
  3. /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
  4. varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
  5. varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
  6. procbususb on /proc/bus/usb type usbfs (rw)
  7. udev on /dev type tmpfs (rw,mode=0755)
  8. devshm on /dev/shm type tmpfs (rw)
  9. devpts on /dev/pts type devpts (rw,gid=5,mode=620)
  10. lrm on /lib/modules/2.6.17-12-generic/volatile type tmpfs (rw)
  11. /dev/hda2 on /media/hda2 type reiserfs (rw)
  12. /dev/hda3 on /home type ext2 (rw)
In this case, hda4, hda2 and hda3 are mounted.

Now, choose where the device is going to be mounted to. Normally, it's in a subdirectory of either mnt or media. Check, that the subdirectory exists (e.g. /mnt/c or /media/hdb3). If it doesn't, create it (as a superuser, run
Expand|Select|Wrap|Line Numbers
  1. cd /media
  2. mkdir hdb3
(or appropriate).

With this information, you should be able to choose the right partition and use
Expand|Select|Wrap|Line Numbers
  1. mount /dev/hdb3 -t vfat /media/hdb3
To make things easier, if you want to mount that drive more often, you can put it into /etc/fstab. Just open it in an editor as root (or with sudo) and add the following lines at the bottom:
Expand|Select|Wrap|Line Numbers
  1. # added manually
  2. /dev/hdb3 /media/hdb3 vfat defaults,users,noauto 0 0
(Of course, you'll have to change the device and mount directory to what you need.)
If you want the drive to be mounted on startup, change noauto to auto.

Then save the file and in future you'll just have to do
Expand|Select|Wrap|Line Numbers
  1. mount /dev/hdb3
or
Expand|Select|Wrap|Line Numbers
  1. mount /media/hdb3
Greetings,
Nepomuk
May 27 '08 #5
AmberJain
884 Recognized Expert Contributor
HELLO,

SUCCESS........ ...Problem solved.
THANKS ashitpro, nepomuk.

BTW, sorry for the late reply. I had to format my Red hat linux as I had to backup some data on my linux partitions (my HardDisk is only 40 GB) and today I reinstalled linux and tried as you suggested and ended up with success.

Also, don't you think Nepomuk that your REPLY #5 must be contributed in articles section of bytes.com as there is not much information on internet about this kind of problem.

THANKS AGAIN ashitpro, nepomuk........

============
AmbrNewlearner
============
Jun 18 '08 #6
Nepomuk
3,112 Recognized Expert Specialist
Your very welcome for the help.

By the way, I've followed your tip AmbrNewlearner and I've written an article, which is still in the "Editors Corner" right now. I'd be glad, if some of you would check it to make sure, there are no errors in it. The link is: http://bytes.com/forum/showthread.ph...97#post3182497

Greetings,
Nepomuk
Jun 18 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2224
by: Steve | last post by:
This post has two parts. First is my feedback on sets. (Hello? Last summer called, they want their discussion thread back...) Second is some questions about my implementation of a partition function for sets. Part 1. --- >From: Raymond Hettinger (vze4rx4y@verizon.net) >Subject: Py2.3: Feedback on Sets >Newsgroups: comp.lang.python >Date: 2003-08-11 23:02:18 PST
3
2961
by: Tim Gahnstrom | last post by:
rdiff-backup is aperently written in Python and when I run it in a special way I get some funy Python errors. Does anyone know if linux python have some issues with working with fat32 or usb drives? To tracebacks are provided below for more information. This is the version information I get when I start Python ojn my Fedora Core 2 computer. -bash-2.05b$ python Python 2.3.3 (#1, May 7 2004, 10:31:40)
3
5426
by: RunLevelZero | last post by:
I need a way to detect hard drives and their partitions... labels would be nice too... I did some googling but did not find anything all too useful. This will strictly be on Linux / Unix so any help would be greatly appreciated. TIA
6
13223
by: cantabile | last post by:
Hi, I'd like to get drives and partitions (and their size too) with python under Linux. So far, I thought of reading /proc/partitions but maybe i could use fdsik also ? How would I do that in python ? Thanks for your help (newbie here :) )
2
8470
by: Erich Keane | last post by:
Ok, first a quick background: I, along with a small group of diehards came up with a way to disable the EU volume cap protection on the european ipods. Unfortunately, this way never caught on, as it is a VERY difficult process for people used to apple products to handle. Now, to solve the problem, and possibly make it more mainstream, i would like to create a C++ (or java, altho i hate the language, i also know a little about it)...
1
2782
by: Rob | last post by:
Hi, Does anyone have any idea of any API that exists, or functions that others have created to find out the start cluster address of any particular file on a FAT32 formatted disc. I dont mind using linux to do this, as i presume windows would never allow low level access to the disc like this. Thanks RR
3
813
by: bhushan | last post by:
i want to develope the c source code to access the linux partitions from the windows. i have accessed the MBR and promary partition table. But i am not able to access the extended partition tables through c code. please kindly help me in this scenario.
2
2776
by: Rob | last post by:
Does anyone have any idea of any API that exists, or functions that others have created to find out the start cluster address of any particular file on a FAT32 formatted disc. I dont mind using linux to do this, as i presume windows would never allow low level access to the disc like this.
2
2754
by: systemresized | last post by:
Hello all good forum related to c++/c Me developing Cross Platform File Explorer. This application can displays all the drives whether it is of FAT32 or ext2 or ext3 or NTFS file sys. drive. Use of this application is that when ur working on windows u can access the data from Linux without switching to Linux and then mount the drive. Can anyone tell me how to access the information how many drives our hard disk have and are of what type....
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10604
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10356
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9179
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7644
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3839
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.