Linux (II) (laruence's Private food notes)

Source: Internet
Author: User
Tags ide hard drive
Linux running time (2) (laruence's Private food note)-Linux general technology-Linux technology and application information. The following is a detailed description. Linux's recognition capabilities for computer components/devices are completely different from those for Windows systems, because each component or device is a file in LINUX.
Understand the structure of the motherboard:

In linux, almost all hardware device number files are in the/dev directory.
Device number in Linux
IDE Hard Drive/dev/hd [a-d]
SCSI hard disk/dev/sd [a-p]
U Disk/dev/sd [a-p] (same as the SCSI hard disk)
CDROM/dev/cdrom
Soft drive/dev/fd [0-1]
Printer/dev/lp [0-2]
Mouse/dev/mouse
Tape drive/dev/ht0 (IDE) or/dev/st0 (SCSI interface)
If the partition of each disk drive is not the same, its disk number will change. All files start with/dev, which is the directory where the device files are stored.
Hard Disk partitioning method:
The simplest Partitioning Method: during LINUX installation, there must be at least two partitions: "/" and "swap ". it is suitable for hard disks smaller than 1 GB and is not safe.
Troublesome method: by default, because the LINUX operating system is in/usr/, this part can be divided into larger ones. The user information is either in/home or larger. The logon files of all default servers are recorded under/var, and the default email and WWW paths are also under/var. This space can be larger. The required directory is as follows:
Bytes/
Region/usr
Development/home
Callback/var
 Swap
Recommended Partitioning Method: A 20 GB hard disk. We recommend that you divide it into 15 GB for the root directory/to install LINUX, MB for swap, and 4 GB for continuous exercise. Install all the kits.
If the hard disk capacity is relatively large, the LINUX boot program may not find the hard disk information provided by the BIOS. This is not a LINUX problem, but because the BIOS itself cannot support such a large hard disk. Although the LINUX kernel will replace the BIOS and successfully detect a large hard disk, if the boot partition is installed after more than 1024 cylinders, it is likely that the LINUX system will "can be installed, but it cannot be started smoothly ". The simplest way is to "keep the guiding partition specification less than 1024. Specific Method: During installation, three zones are planned:
/Boot
/
Swap
/Boot should be within MB and placed at the top of the entire hard disk.
Generally, LINUX Hosts partition Hard Disks Based on the directory and host features to achieve better management. LINUX hard disk partitioning is flexible. At the same time, the fdisk function of the LINUX hard disk partitioning program is very powerful. to partition, you must understand the hard disk structure.
Generally, the motherboard has two interfaces connected to a cable (the cable is used to connect the hard disk to the motherboard). We call this interface an IDE interface. To differentiate the sequence of Hard Disk reading, these two interfaces on the motherboard are called the primary and secondary IDE interfaces respectively. Or IDE1 and IDE2.
There are two plug-ins on each cable, that is, one cable can be connected to two IDE interfaces (hard disk or optical drive). If there are two cables, one motherboard is by default, it should be able to connect four devices with IDE interfaces.
If there is an optical drive, you can only install three hard disks with IDE interfaces.
IDE \ jumper Master/Slave
IDE1 (Primary, Master)/dev/hda/dev/hdb
IDE2 (secondary, slave)/dev/hdc/dev/hdd
How to identify hard disk partitions:
The hard disk is divided into two areas. One is the information area for storing the hard disk, which is called the Master Boot Recorder (MBR) and the other is the place where the actual file data is stored. MBR records the boot program and the disk partition table. Once the MBR physical entity is damaged, the hard disk is almost decommissioned. If the system cannot find the partition table, the hard disk cannot be used.
To put it simply, a hard disk partition is modifying the partition table.
Generally, due to the limited capacity of this MBR block, only four partition records are involved at the beginning, and these partition records are called primary partitions and extended partitions ). That is to say, a hard disk can have up to four (primary + extended) partitions, of which only one can be extended partition. Therefore, if you want to partition four disks, you can divide them into the following two forms: P + E
Note: 3 P + E has only three available disks. If 4 disks are available, they must be divided into four primary partitions (because the extended partitions cannot be used directly, you also need to divide it into logical partitions ).
Assuming that the hard disk partition is divided into 3 p + e, e actually tells the system that the disk partition table is in another partition table, that is, the extended partition is actually "pointing to (point) "correct extra partition table. You cannot use extended partitions on any system. You also need to divide the extended partitions into logical partitions. Therefore, you can divide the extended partitions into more than five available partitions.
That is to say, if there are more than four partitions, there must be extended partitions, and all the remaining space must be allocated to the extended partitions, and then the space of the extended partitions can be planned using logical partitions. In addition, considering the continuity of the disk, it is generally recommended to put the extended partition in the last cylindrical area. Basically, the number of the logical partition can reach 63.

My installation process:
Drive/dev/sda (76317 MB)
Free
To avoid the possibility that LINUX boot programs cannot find the hard disk information provided by BIOS, first add a/boot partition with a size of 100 MB.
/
Device mount point (RAID/Volume) formatted size (MB) starts to end
/Dev/sda
/Dev/sda1/reboot ext3 Y 102113
/Dev/sda2/Ext3Y20003142563
/Dev/sda3swapY200025642818
/Dev/sda4: extended partition 5421228199729
/Dev/sda5/varExt3Y1000128194093
/Dev/sda6/homeExt3Y1000140945368
/Dev/sda7/usrext3y1000151096643
/Dev/sda8/backup Ext3Y499766447280

The Bootstrap program is installed in/dev/sda2.
Set the network manually: localhost. localdomain
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.