Partition and format in Linux

Source: Internet
Author: User
Article Title: partition and format in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Partition principle

MBR 446 byte primary Partition Table 64 byte (up to four partitions in Linux, each 16 byte)

Primary partition extended partition table logical Partition

Formatting principles

Common Linux partition tool Fdisk sfdisk diskdruid

Fdisk usage

Fdisk/dev/hdX (run with root)

1. Run Command 2. Add/delete/modify partition 3. Restart

Linux formatting Tool

Mkfs supports ext2 ext3 vfat msdos jfs reiserfs, etc.

Usage 1: mkfs? T

Ex. Mkfs? T ext3/dev/hdb2

Usage 2: mkfs.

Ex. Msfs. vfat/dev/sdb3

Mke2fs supports ext2/ext3 file systems

Use mke2fs [-j]

Mse2fs? J/dev/sdb2

Initialize the swap partition mkswap/dev/sdb4

Mount command mount/dev/sdb2/mnt/sd2

Uninstall command umount/dev/sdb2

Write/etc/fstab/dev/sdb2/mnt/sd2 ext3 defaults 0 0 0 the first 0 indicates that the second backup is not required and do not perform self-check

Use volume label mounting

Add a volume label? E2label

Ex. E2label/dev/sdb2 test

Mount according to the volume label

Mount LABEL = test/mnt/sd2

Write/etc/fstab

LABEL = test/mnt/sd2 ext3 defaults 0 0

Ext2/ext3 mounting options

Ro/rw read-only/read/write

Exec/noexec allow/disallow execution

Dev/nodev allow/disallow Device Files

Suid, sgid/nosuid, nosgid allow/disallow suid, sgid File

Atime/noatime update/do not update the node access time

Async/sync asynchronous/Synchronous disk I/O

User/nouser allows/does not allow normal users to mount, used for options in the/etc/fstab file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.