Access FAT32 partitions in linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AmberJain
    Recognized Expert Contributor
    • Jan 2008
    • 922

    Access FAT32 partitions in linux

    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
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #2
    Originally posted by ambrnewlearner
    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...

    Comment

    • AmberJain
      Recognized Expert Contributor
      • Jan 2008
      • 922

      #3
      Originally posted by ashitpro
      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
      ============

      Comment

      • ashitpro
        Recognized Expert Contributor
        • Aug 2007
        • 542

        #4
        Originally posted by ambrnewlearner
        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

        Comment

        • Nepomuk
          Recognized Expert Specialist
          • Aug 2007
          • 3111

          #5
          OK, you can check, what partitions you have with
          Code:
          fdisk -l
          as root (or with sudo, if that's installed). It should look something like this:
          Code:
          Disk /dev/hda: 40.0 GB, 40060403712 bytes
          255 heads, 63 sectors/track, 4870 cylinders
          Units = cylinders of 16065 * 512 = 8225280 bytes
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/hda1               1          64      514048+  82  Linux swap / Solaris
          /dev/hda2   *          65        1402    10747485   83  Linux
          /dev/hda3            1403        3978    20691720   83  Linux
          /dev/hda4            3979        4870     7164990   83  Linux
          or
          Code:
          Disk /dev/sda: 40.0 GB, 40060403712 bytes
          255 heads, 63 sectors/track, 4870 cylinders
          Units = cylinders of 16065 * 512 = 8225280 bytes
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/sda1               1          64      514048+  82  Linux swap / Solaris
          /dev/sda2   *          65        1402    10747485   83  Linux
          /dev/sda3            1403        3978    20691720   83  Linux
          /dev/sda4            3979        4870     7164990   83  Linux
          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
          Code:
          mount
          This could look something like this:
          Code:
          /dev/hda4 on / type ext3 (rw,errors=remount-ro)
          proc on /proc type proc (rw,noexec,nosuid,nodev)
          /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
          varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
          varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
          procbususb on /proc/bus/usb type usbfs (rw)
          udev on /dev type tmpfs (rw,mode=0755)
          devshm on /dev/shm type tmpfs (rw)
          devpts on /dev/pts type devpts (rw,gid=5,mode=620)
          lrm on /lib/modules/2.6.17-12-generic/volatile type tmpfs (rw)
          /dev/hda2 on /media/hda2 type reiserfs (rw)
          /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
          Code:
          cd /media
          mkdir hdb3
          (or appropriate).

          With this information, you should be able to choose the right partition and use
          Code:
          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:
          Code:
          # added manually
          /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
          Code:
          mount /dev/hdb3
          or
          Code:
          mount /media/hdb3
          Greetings,
          Nepomuk

          Comment

          • AmberJain
            Recognized Expert Contributor
            • Jan 2008
            • 922

            #6
            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
            ============

            Comment

            • Nepomuk
              Recognized Expert Specialist
              • Aug 2007
              • 3111

              #7
              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

              Comment

              Working...