Hard disk and partition number in GRUB, UUID hard disk number: first, if you are a single hard disk, you do not need to think about it, it will only be hd0. What if there are two or more hard disks? You can do this: when the BIOS screen appears during boot detection, when all the hard disk data appears, immediately press the Pause key (my... hard disk and partition number in GRUB, UUID hard disk number: first, if you are a single hard disk, you do not need to think about it, it will only be hd0. What if there are two or more hard disks? You can do this: when the BIOS screen appears during boot detection, when all the hard disk data appears, immediately press the "Pause" key (above the "Page Up" key ), at this time, the startup process will be paused, and then take a closer look. For example, I have four hard disks-two IDE disks, 40 GB and 160 GB respectively, and two SATA disks, 80 GB and 320 GB respectively. The BIOS detection sequence is as follows: IDE40, IDE160, SATA320, and SATA80. Therefore, GRUB indicates IDE40 (hd0), IDE160 (hd1), SATA320 (hd2), and SATA80 (hd3 ), that's all. please write down it! Note: Here is a variable: boot disk sequence. In the above example, my GRUB is installed in the MBR of SATA320, and I usually use this hard disk to start the computer. so GRUB in SATA320 thinks that my hard disk should be numbered as follows: SATA320 (hd0), IDE40 (hd1), IDE160 (hd2), SATA80 (hd3 ). Oh, you understand! The GRUB number principle is as follows: 1. how fast is the hard drive order completely copying the BIOS detection results? 2. the boot disk must be hd0 (no matter what the BIOS is), and other hard disks are reshuffled according to the BIOS detection results. 3. whether it is IDE or SATA, it is regarded as an IDE hard disk! That is, numbers similar to (sd0, 0) are not used. this method is different from that of linux! Partition number: You know that a single hard disk can only coexist in four primary partitions. Therefore, for hd0 hard disks, the numbers are (hd0, 0), (hd0, 1), and (hd0, 2), (hd0, 3), this is only divided into four main partitions, this number will never change; but in this case, you will not be able to use more partitions, therefore, you should sacrifice a primary partition (usually the last one) and convert it to an extended partition (extend) so that more logical partitions (logical, note that it has nothing to do with the company that sells the mouse ). [Linux community www.Linuxidc.com] The extended partition may be (hd0, 0 ~ 3) this number will never be used in menu. lst. All logical partitions start from (hd0, 4) (because 0 ~ 3 occupied by the primary partition), which are (hd0, 4), (hd0, 5), (hd0, 6), (hd0, 7 )...... Okay. for most people, two or more primary partitions are useless, so the usual practice is-one primary partition, one extended partition, and several logical partitions. Therefore, the numbers on the same hard disk are usually: (hd0, 0), (hd0, 4), (hd0, 5), (hd0, 6 )....... Similarly, the second hard disk is (hd1, 0), (hd1, 4), (hd1, 5), (hd1, 6 )....... Digress ---- linux numbering method. Well, this is simple. according to the BIOS detection results, the first hard disk is sda, the second hard disk is sdb, and the third hard disk is sdc ......, No matter which one is the boot disk. Specifically, GRUB, the system I started with the third hard drive, thinks it is (hd0), while linux still thinks it is sdc, understand? In addition, since 8.04, all hard disks are numbered as "sdxx", that is, no matter IDE or SATA, they are regarded as SCIS hard disk UUID: (it is recommended to specify the mount location in fstab) each partition must be mounted before it can be used, including the system root partition, home directory, and swap. these are what the system has done at startup, but you don't know. So how does the system handle it? Use the fstab file! You can open/etc/fstab and look at it by yourself #/dev/sdb5UUID = 3E40C99340C95277/home/winD NTFS-3G defaults 0 0 the first line is annotation, the feature is that there must be a character "#" at the beginning, which is the syntax format of linux and can be seen in other configuration files. The second line is the real focus. Note that each space or Tab symbol represents the end of an instruction string. one or more consecutive spaces or Tab symbols are regarded as one. Five tabs divide this sentence into six parts: 1. target partition, which can be specified in three ways: ● UUID (Universal Unique identification code Universally Unique Identifier ), ls-al/dev/disk/by-uuid can be used to view UUID of all partitions ● device name (such as "/dev/sdb1") ● partition volume LABEL (such as "LABEL = winD ", of course. Must exist. Can be changed in windows Resource Manager ). 2. the Mount directory must be created in advance. 3. what file system is used for this partition, if it is FAT and FAT32, it is written as "vfat"; if it is NTFS, it is written as "NTFS-3G"; or ext3, ext4.4. column 4 is a complex parameter, but it is essential. Fortunately, for general applications, enter "ULTS", which is the default setting. If you want to implement stricter access control, you can study it on your own. 5. the last two columns are also essential parameters. for the win partition, write "0 0". after changing the fstab, run sudo mount-.
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.