Table of Contents
Can linux recognize fat32

Can linux recognize fat32?

Jul 26, 2022 pm 04:27 PM
linux

Linux system can recognize the fat32 format by default; some versions of Red Hat Linux also provide limited support for FAT32, and most Linux distribution kernels support the FAT32 file system. FAT32 refers to the file allocation table using 32-bit Disk file management method of binary number record management.

Can linux recognize fat32?

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

Can linux recognize fat32

Linux system can recognize fat32 u disk by default, but cannot recognize ntfs format u disk

Most linux distributions The kernel supports the FAT32 file system.

Some versions of Red Hat Linux also provide limited support for FAT32, but please note that if Linux is installed in a FAT32 partition, a floppy disk must be used for booting.

If you want to mount a FAT32 format disk partition, you only need to use the mount command to load it.

What is fat32

FAT is the abbreviation of File Allocation table. FAT32 means that the file allocation table is managed using 32-bit binary number records. Disk file management method

Because the core of the FAT file system is the file allocation table, the name comes from this. FAT32 is developed from FAT and FAT16. It has the advantages of good stability and compatibility, is fully compatible with Win 9X and previous versions, and is easy to maintain. The disadvantage is that it has poor security and can only support a maximum partition of 32GB, and a single file can only support a maximum of 4GB.

Disk structure

When using the FAT32 file system to manage the hard disk, the maximum capacity of each partition that can be supported can reach 128TB. [6] The internal space of each logical disk using the FAT32 file system can be divided into three parts, namely the boot area (BOOT area), the file allocation table area (FAT area), and the data area (DATA area). The boot area and file allocation table area are collectively called the system area, which occupies a small space at the front of the entire logical disk and stores relevant management information. The data area is the area used by the logical disk to store file contents. This area is allocated in clusters.

Boot Sector

The first sector of the FAT32 file system is the boot sector, which stores a lot of specific information about a file system, such as the FAT table Number, size of each FAT table (number of sectors), number of bytes in each sector, number of sectors contained in each cluster, number of reserved sectors, file system size (number of sectors), root The starting cluster number of the directory and some other additional information. The boot area (BOOT area) uses three sectors starting from the first sector (logical sector number 0), and saves the number of bytes per sector of the logical disk, the number of sectors corresponding to each cluster, and other important parameters and boot Record. There are still a number of reserved sectors left, including backups of one to three sectors.

File allocation table area

The file allocation table area (FAT area) is FAT The file system manages the most important area of ​​disk space and files. It saves the usage information of each cluster in the logical disk data area and uses the bitmap method to represent it. The storage space occupied by files and the management of free space are all implemented through FAT. The FAT area saves two identical file allocation tables, so that when the first one is damaged, the second one is available. The size of the FAT table is determined by how many clusters there are in the data area of ​​the logical disk, and is an integer number of sectors. The usage of each cluster in the data area can be known by looking up its filling value at the corresponding position in the FAT table. Each cluster in the FAT32 table occupies four bytes (32 bits), indicating that the first 8 bytes (0H-07H bytes) are used to store the disk media type number, so the effective cluster number starts from 02H. The usage of cluster 02H is indicated by a 32-bit binary number consisting of 08H-0BH bytes, the usage of cluster 03H is indicated by a 32-bit binary number consisting of 0CH-0FH bytes, and so on. Write zero in the corresponding position of the cluster that has not been allocated and recycled, fill in the corresponding position of the bad cluster with the specific value 0FFFFFF7H, and fill in the corresponding position of the allocated cluster with a non-zero value, specifically: if the cluster is the last cluster of the file, The value filled in is 0FFFFFFH. If the cluster is not the last cluster of the file, the value filled in is the cluster number of the next cluster occupied by the file. In this way, each cluster occupied by the file forms a cluster chain and is saved in FAT32 table.

Data area

The data area is used to store user data. It is located behind FAT2 and is also divided into clusters. Numbering starts from 2, which is cluster 2. The starting position is the real starting position of the data area.

(1) Root directory

Usually the root directory is located in cluster 2, but in principle the root directory in the FAT32 file system can be located anywhere in the data area. The root directory area saves the directory entries of each file in the root directory, and each directory entry occupies 32 bytes. In the FAT32 file system, the root directory is part of the data area and is managed in a similar way to subdirectories. This is obviously different from FAT12 and FAT16. For example, the root directory area (ROOT area) of the FAT16 file system is a fixed area and fixed size. , occupying the 32 sectors immediately following the FAT area, and can store up to 512 directory entries (this is why the number of files saved in the root directory is limited), as part of the system area.

(2) Subdirectory

In the FAT32 file system, except for the root directory, all subdirectories are created according to specific needs during use. If a new subdirectory is created under the root directory, the subdirectory is said to be a subdirectory of the root directory, and the root directory is said to be the parent directory of the subdirectory. When a subdirectory is created, a directory entry is created in the cluster assigned to its parent directory. The directory entry describes the starting cluster number of the directory, and a cluster is allocated for it in the free space and cleared. The cluster number is recorded in its directory entry. When a directory entry is created for a subdirectory, the first two directory entries are used in the cluster allocated for the subdirectory to record its relationship with the corresponding parent directory.

(3) Directory items

Due to different structures, the FAT32 file system generally divides directory entries into four types: volume label directory entries, "." directory entries and ".." directory entries , short file name directory entry, long file name directory entry. The short file name directory entry stores basic information such as the short file name, attributes, starting cluster number, time value, and content size of the subdirectory or file.

Extended knowledge

If you want to mount a FAT32 formatted disk partition, you only need to use the mount command to load it.

1. Use the fdisk command to check partition and USB device information.

[root@wgods ~]# fdisk -l
Copy after login

Can linux recognize fat32?

2. From the above information, you can see that the USB device is in FAT32 format and is identified as /dev/sdb1

[root@wgods ~]# fdisk -l | grep FAT32
/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)
Copy after login

3. In the mnt directory First create a USB directory

[root@wgods ~]# cd /mnt/
[root@wgods mnt]# mkdir usb
Copy after login

4. Mount the U disk

[root@wgods mnt]# mount -t vfat /dev/sdb1 /mnt/usb
Copy after login

After the mounting is successful, you can see the relevant content under /mount/usb.

Recommended learning: Linux video tutorial

The above is the detailed content of Can linux recognize fat32?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1653
14
PHP Tutorial
1251
29
C# Tutorial
1224
24
What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

vscode terminal usage tutorial vscode terminal usage tutorial Apr 15, 2025 pm 10:09 PM

vscode built-in terminal is a development tool that allows running commands and scripts within the editor to simplify the development process. How to use vscode terminal: Open the terminal with the shortcut key (Ctrl/Cmd). Enter a command or run the script. Use hotkeys (such as Ctrl L to clear the terminal). Change the working directory (such as the cd command). Advanced features include debug mode, automatic code snippet completion, and interactive command history.

Where to write code in vscode Where to write code in vscode Apr 15, 2025 pm 09:54 PM

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

How to run java code in notepad How to run java code in notepad Apr 16, 2025 pm 07:39 PM

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

What is the main purpose of Linux? What is the main purpose of Linux? Apr 16, 2025 am 12:19 AM

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

vscode terminal command cannot be used vscode terminal command cannot be used Apr 15, 2025 pm 10:03 PM

Causes and solutions for the VS Code terminal commands not available: The necessary tools are not installed (Windows: WSL; macOS: Xcode command line tools) Path configuration is wrong (add executable files to PATH environment variables) Permission issues (run VS Code as administrator) Firewall or proxy restrictions (check settings, unrestrictions) Terminal settings are incorrect (enable use of external terminals) VS Code installation is corrupt (reinstall or update) Terminal configuration is incompatible (try different terminal types or commands) Specific environment variables are missing (set necessary environment variables)

See all articles