Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Disk partition MBR     - Ubuntu 15.10 How to install TeamViewer 11 (Linux)

- C ++ CBitmap, HBitmap, Bitmap difference and contact (Programming)

- CentOS7 Minimal minimize installation and then install the GNOME graphical interface (Linux)

- Nginx supports user multi-threaded downloads and resume broken (Server)

- Linux GCC 5.1.0 compiler installation (Linux)

- Oracle inline view updates problems encountered (Database)

- Ubuntu 14.04 installation and configuration environment variable JDK1.8.0_25 (Linux)

- On Android running ClojureScript (Linux)

- Using DOS command to change UNIX administrator password (Linux)

- Linux processes in memory and memory cgroup statistics (Linux)

- Quickly build and install Linux KVM system (Linux)

- using the ssh command to check the socket / Network Connections (Linux)

- OGG-01496 OGG-01031 Error Resolution (Database)

- Ubuntu install Wireshark (Linux)

- Linux System Getting Started Learning: The Linux logrotate (Linux)

- LMMS 1.03 install on Ubuntu 14.04 (Linux)

- Hadoop 2.7.1 installation configuration based on availability QJM (Server)

- ORA-12545: Connection failed because the target host or object does not exist (Database)

- Ceph Source Analysis: Network Module (Server)

- File compression and packaging commands under Linux (Linux)

 
         
  Disk partition MBR
     
  Add Date : 2017-04-13      
         
         
         
  Relations connected with the way the disk device file name
Mainstream disk interface SATA interface.
SATA / USB / SCSI disk interface and so on are driven to use SCSI modules, so these interface disk device file names are / dev / sd [a-p] format. Order needs to be determined according to the order of disk Linux kernel testing.

For example, the above PC has two SATA disks as well as a USB disk, and above board has six SATA slot. These two SATA disks are placed on a turn SATA1 SATA5 interfaces. What is the three disks in Linux device file name?
Filename 1.SATA1 slot on / dev / sda
Filename 2.SATA2 slot on / dev / sdb
3.USB disk (boot after completion recognized by the system) / dev / sdc

Review the composition of the disk
Data written to disk is actually above the disk. The above can be broken out of the disk sector (Sector) and the cylinder (Cylinder) two kinds of units, where each sector is 512bytes so much.

The first sector of each disk is particularly important because it records two important piece of information disks:
1. The primary boot partition (Master Boot Record MBR): You can install the boot loader places, there are 446 bytes
2. Partition Table (partition table): record the entire hard drive partition state, 64bytes

MBR is very important, because the system at boot time will take the initiative to read the contents of this block, so the system will know where to put your program and how to boot up. If you want to install multi-boot system MBR management of this block it is very important.
Partitioning a disk partition table records, in the following presentation.

Partition table (partition table)
Cylinder is the smallest unit of the file system, which is the smallest unit of partition. We are using the reference cylinder number of ways to deal with, in the partition table is located 64bytes capacity, the total recording area divided into four groups, each group recording area for recording the start and end cylinder numbers of the zone.

Suppose the above hard disk device file name Yes / dev / hda, then the four partitions on a Linux system device file name as follows:
P1: / dev / hda1
P2: / dev / hda2
P3: / dev / hda3
P4: / dev / hda4

Due to limited capacity of the partition table, can hold up to four partitions. The four partitions are called primary (Primary) or extended (Extended) partitions.
Please note the following information:
1. In fact, the so-called "partition" is set for the partition table 64bytes only.
2. The default hard disk partition table is written only four partition information.
3. The four groups partition information we called the main (Primary) and extended (Extended) partitions.
4. The smallest unit is a cylindrical partition (cylinder).

When the system is to be written to disk, disk partition table will refer to processing data for a partition.

Why "partition"?
Reason 1: data security
Consider the performance of the system: Cause 2

Although the partition table can only record four partitions, but does not mean we can do four partitions. Since the first sector of the partition table is located only four recorded data, you can take advantage of additional sectors to record more partition information.
Purpose is to use the extended partition sector to record additional information about the partition, extended partition does not in itself be used to format. But we can continue to do the extended partition by partition record points to the block.

Continue to cut out the extended partition partitions called logical partitions (logical partition). Since the logical partition is an extended partition out of the partition to continue, so it can be used cylinder range is extended partition the set range.
Note needs, regardless of the four partition table records with no finish, 1-4 file always reserved yet. Even if only one primary partition, extended partition also start from May.

Please note the following information:
1. Primary and Extended partitions can have up to four (hard limit).
2. The extended partition can only have a (operating system limitation).
3. The logical partition is an extended partition continued cutting out the partition.
4. can be formatted as a data access after the partition is primary and logical partitions. Extended partition can not be formatted.
5. The number of logical partitions depending on your operating system. In the Linux system, SATA hard drives with up to 11 logical partitions (5 to 15)

Note: If the extended partition is damaged, all logical partitions will be deleted. Because the logical partition in the extended partition information is recorded inside.

So, if the first sector of a hard disk (MBR sector and partition table is located) physically broken, then this probably would not use a hard disk.

for example
For chestnuts
If you have two hard drives on the PC, in the second hard drive (sdb) separated six available partition, then how each partition in Linux device file name?

A points system: P + P + P + E environment (fourth made extended partition, extended partition and then separate the three logical partitions)
Available partition has: / dev / sdb (1,2,3,5,6,7)

Dichotomy: P + E environment
Available partition has: / dev / sdb (1,5,6,7,8,9)

Boot process and the primary boot partition (MBR)
Boot process
CMOS: recording all the hardware parameters and cut in above board storage
BIOS: a write to the firmware on the system board.

BIOS is the first program the computer will automatically boot time execution.
Then there are the computer BIOS will analyze what storage devices, and hard to go inside to read the MBR position of the first sector. The only 446bytes MBR hard disk capacity will be placed inside the basic boot loader. Then the file system format of the hard disk MBR identification, the boot loader kernel file, enter the operating system.

Simply boot the steps of:
1.BIOS: active boot firmware executed, will recognize the first bootable device.
2.MBR: The first sector of the first primary bootable device in the boot partition block, and contains the boot loader.
3. The boot loader (Boot loader): one can read the kernel file to execute software.
4. Kernel file: start the operating system functions.

Primary boot partition (MBR)
Boot loader operating system is installed in the MBR above set of software, the program is small and perfect. The main task of boot loader has the following items:
1. Provide Menu: Users can choose different boot options, which is also an important feature multi-boot.
2. Loading kernel file: directly to the program section to start the bootable operating system.
3. transferred to other loader: The boot loader to load functions transferred to other responsible. (Multi-system)

In addition to the boot loader can be installed in addition to MBR, also can be installed in each partition boot sector (boot sector)

Please note that the following information:
1. Each partition has its own boot sector (boot sector)
2. The actual boot kernel file is placed in the sub-region
3.loader only understand their own system partition bootable kernel file, and the only other loader
4.loader can point directly or indirectly, the management has been transferred to another manager.

windows installer will automatically overwrite the MBR and its own partition boot sector, so if the two systems, it is best to install windows then install linux.
(Otherwise, you can also use Linux rescue mode to save MBR)

Under Linux installation mode, select the disk partition (very important)
Directory tree structure
Entire Linux is the most important place in the directory tree structure. The so-called tree structure refers to the root directory (/) based, and then rendered down A document directory structure branched structure. All files and directories related to the tree.

How to combine the directory tree structure and data within the disk, it is necessary to involve "mount" the.

Relationship between the file system and directory tree
Use the directory as a point of entry, the disk partition data is placed in the directory. In other words, enter the directory can read the partition means.
This operation is known to mount, directory entry point that is called the mount point.

The root necessarily mount a partition

for example
For chestnuts
partition1 mounted to the root directory, partition2 mount the / home directory. In other words, my data on each secondary directory / home inside, the data is placed in the partition2. If it is not on the / home directory below, the data will be placed partition1.

When you install distributions, mount point and disk partition plan
Select Custom Installation (Expert installation) When installing Linux.

Custom installation "Custom"
Initial contact with linux: as long as the partition "/" and "swap" can
We recommend partitioning method: Reserve a spare disk capacity remaining.

Select the default hard disk partitioning Linux installation program
Try not to select the default installation of Linux Server installation options.
     
         
         
         
  More:      
 
- Linux operating system security management skills notes (Linux)
- CentOS 6.4 OpenNebula installation (Linux)
- Linux environment variable configuration (Linux)
- To install Jetty server configuration in detail (Server)
- How to Set Free SSH password on CentOS / RHEL (Linux)
- Linux monitoring tools introduced series --smem (Server)
- Linux keyboard recording script (Linux)
- Can not remember how to solve the problem under Ubuntu brightness setting (Linux)
- How to install Kernel 4.0.2 on CentOS 7 (Linux)
- C ++ Supplements - Smart Pointers (Programming)
- Production Environment MongoDB Fragmentation and Cluster Solution (Database)
- CentOS7 minimized installation can not find the 'ifconfig' command - Repair Tips (Linux)
- Redhat 5 prohibit IPv6 (Linux)
- Linux install deploy Ansible (Linux)
- Win8 mount disk partitions under Ubuntu (Linux)
- Configuring Haproxy log support (syslog logging support) (Server)
- Repair after installing Ubuntu no boot device error (Linux)
- GAMIT 10.50 installed in Ubuntu 12.04 system (Linux)
- Boot automatically remove Linux operating history records (Linux)
- After SSH change the default port, how to use Git (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.