Lesson 10: Managing with Fdisk
- Fdisk is an MBR-based partitioning tool
- Super User privileges to run
- FDISK-L list all installed disks and their partition information
- FDISK/DEV/SDA can partition the target disk (m for help)
- After partitioning, you need to use the Partprobe command to let the kernel update the partition information, otherwise the kernel will need to reboot to identify the new partition.
- /proc/partitions file to view partition information
Lesson 11:linux File System
- The operating system manages files and data through the file system, the disk or partition needs to create a file system before it can be used by the operating system, the process of creating a file system is called formatting
- Devices without a file system are called bare devices (raw)
- Common file systems are FAT32,NTFS,EXT2,EXT3,EXT4,XFS,HFS
- The difference between file systems: Log, support partition size, supported single file size, performance. The main file system under Windows is: The main file system under Ntfs;linux is: EXT3,EXT4
- Mke2fs–t Ex4/dev/sda3. –b blocksize file system block size;-c check bad block;-l label specify volume label;-j Create file System log
- Mkfs.ext3/dev/sda3; Mkfs.ext4/dev/sda3; Mkfs.msdos/dev/sda3 cannot specify additional parameters and cannot fine-tune control
- Dumpe2fs/dev/sda3 View file system Information, may be used when fine-tuning the system
- Journal log, ext3,ext4 with a log file system, with strong stability, in the event of an error can be restored.
- E2LABEL/DEV/SDB1 Display partition label, add name to set label, General Convention label All uppercase
- FSCK/DEV/SDA2 Check and repair the damaged file system, the repair is the file system must be uninstalled;-T is not prompted to fix it directly; the type of file system can be automatically detected if the damage is serious. Each formatted disk will have a lost+found that holds the files that fsck repaired but could not find the master. The disk is fsck when the system starts.
Lesson 12: Mounting and using the file system
- After a disk or partition has created a file system, it needs to be mounted to a directory before it can be used. Windows or Mac systems are automatically mounted, and once the file system is created, it is automatically mounted on the system, called C, D, etc. on Windows, and Linux needs to be mounted manually or configured to automatically mount the system.
- The mount/dev/sdb1/mnt/;mount displays all mounted file systems without parameters. -t specifies the file system type;-o specifies Mount selection, RO,RW read-only, read-write, default rw;sync does not use cache, all operations are written directly to disk, Async uses cache, default is async;noatime,atime each access update access time; remount Re-mount the file system
- Umount unmount mounted File system, equivalent to Windows popup, Umount file System/mount point; Umount/dev/sda3 = = Umount/mnt. If the device is busy error, indicating that the file system is being used, cannot be uninstalled, you can use FUSER–M/MNT to view the use of the file system, or use Lsof/mnt to view the files being used
- Auto Mount, config file/etc/fstab
- Mount–a lists the automatic mounts defined in all Fstab
Linux Primer Learning (v)