Coding Road-Mastering the Basics of Linux (1): How Linux uses Hosts and disks

Source: Internet
Author: User
Tags ide hard drive

1. Disk Planning and Host Division

(1) Hardware in Linux Chinese file name:

--ide hard drive:/dev/hd[a-d]

--scsi/sata/usb hard drive:/dev/sd[a-p]

--USB Flash:/dev/sd[a-p]

--Floppy drive:/dev/fd[0-1]

--Printer:/dev/lp[0-2] (25-pin),/dev/usb/lp[0-15] (USB)

--Mouse:/dev/usb/mouse[0-15] (USB),/dev/psaux (PS2)

--Current Cdrom/dvdrom:/dev/cdrom

--Current Mouse:/dev/mouse

--Tape drive:/dev/ht0 (IDE),/dev/st0 (SCSI)

(2) disk partitioning mechanism

The first sector of the disk mainly records two important information: the main boot record area (MBR), you can install the boot management program, 446bytes; the other is the disk partition table (partition table), recording the disk segmentation status. Here is a split diagram of the disk:

We make the following provisions for major segmentation, extended segmentation, and logical partitioning:

--The main segmentation and extension can only have up to four (hard disk limit)

---logical segmentation is a split-slot continuously segmented by extended segmentation

--The partition slots of the main partition and the logical division can be formatted for data storage, and the extended segmentation cannot be formatted.

--In a Linux system, the IDE hard disk has a maximum of 59 logical partitions (5-63), and the SATA HDD has 11 logical partitions (5-15)

--extended split up to only one (OS limit)

(3) main start record area (MBR) and boot process

The boot program, in addition to the MBR, can also be installed in each partition slot in the boot sector (boot sector), so that the multi-boot mechanism. The execution process for the Boot manager (multiboot) is as follows:

--each split slot has its own boot sector (boot sector)

--The system slots in the figure are the first and second split slots

--The actual bootable kernel files are placed in each split slot

--loader will only know the bootable core files and other loader in the partition slot of your system.

--loader can direct or indirectly give management authority to another management program

(3) How to partition the disk: The simplest division is to split only "/" and swap. The other is to separate the file appendices that read and write more frequently, so they are divided into "/", "usr", "/Home", "/var" and swap.

2. Multi-boot installation process and techniques

(1) New host and only one hard drive: Install Linux First, then install Linux

(2) The old host has more than one hard disk: Even if there are multiple hard disks, there will only be one MBR. Only the MBR in the first removable device is read by the system, so grub (multi-OS launcher) is installed into/DEV/SDA, which manages Windows/linux, even if Linux is installed on/dev/sdb.

(3) The old host and only one hard drive: assuming that only C and D drives, the C drive is the Windows system disk. We will first save the data of the D drive to another place and delete the D drive. Then rebuild D and E disks, D disk formatted as NTFS or FAT32, storing the previous data. E-Drive does not mount, this is Linux is expected to install the system disk.

Coding Road-Mastering the Basics of Linux (1): How Linux uses Hosts and disks

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.