LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Reading of a FAT32 disk in Linux (https://www.linuxquestions.org/questions/debian-26/reading-of-a-fat32-disk-in-linux-327992/)

linuxcalvin 05-28-2005 11:29 AM

Reading of a FAT32 disk in Linux
 
Hi

On my harddisk there are a FAT32 partion - can i read this in Linux and how ?

ToastedToad 05-28-2005 12:51 PM

Yes, you can.

# mkdir /mnt/fat32
# mount /dev/hdx /mnt/fat32 (where x is partition number of FAT32)
# exit
$ cd /mnt/fat32
$ ls

Dead Parrot 05-28-2005 01:17 PM

ToastedToad outlines the general mounting procedure but here's a more detailed account for newbies:

(1) Open a terminal window, "su" to root, and do "fdisk -l" to find out how Debian sees your vfat partition.

(2) Open /etc/fstab with the nano text editor ("nano /etc/fstab") and add a line for the vfat partition, something like this:
Code:

/dev/hda1  /mnt/win  vfat  user,noauto,quiet,umask=0  0  0
(You can use the above line if "fdisk -l" shows that your vfat partition is /dev/hda1.) Exit nano saving changes (Ctrl-x, y, Enter).

(3) Create a mount point for the vfat partition ("mkdir /mnt/win").

(4) Become a normal user by hitting Ctrl-d. Mount the vfat partition with "mount /mnt/win". Now you should be able to use your vfat partition from Debian, and you can unmount it as normal user with "umount /mnt/win". (Dropping the "noauto" switch from fstab should make the vfat partition to be automatically mounted at boot time.)

linuxcalvin 05-31-2005 12:48 PM

Thanks but ...
 
Hi

When I write fdisk -l I got:

fdisk -l

Disk /dev/hda: 16 heads, 63 sectors, 4096 cylinders
Units = cylinders of 1008 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 4097 39770 17979696 c Win95 FAT32 (LBA)
/dev/hda2 1421 4096 1348704 f Win95 Ext'd (LBA)
/dev/hda5 1421 1639 110344+ 82 Linux swap
/dev/hda6 1640 4096 1238296+ 83 Linux

and when i then write:

mount /dev/hda1 /mnt/fat32

i got the message:

mount: mount point /mnt/fat32 does not exist

why ?

linuxcalvin 05-31-2005 01:24 PM

I was wrong
 
I have to write /mnt/win insted of /mnt/fat32 - so one problem soulved.

BUT i have done what Dead Parrot said but when reboot
I got the following message:

mount: wrong fs type, bad option, bad superblock on /dev/hda1,
or too many mounted file systems
Please check that the disk is entered correctly.

What have I done wrong ?

linuxcalvin 06-01-2005 03:20 PM

Thanks to Dead Parrot

I have figured out the problem. So now it works.

Thanks again.


All times are GMT -5. The time now is 12:25 AM.