How to install Linux on a hard drive

Source: Internet
Author: User

I. Question proposal
In the IBM 80x86 series PC, the hard disk addressing is based on the Basic Input/Output System (BIOS) stored in CMOS. read the Master Boot Record (MBR, Main Boot Record) of the hard disk) then, the system in the partition is guided by the data stored in the partition or the corresponding partition, or directly load the information required for the boot from the primary boot partition to complete the boot, such as LILO.
Due to historical reasons, the hard disk reading method used by many systems during boot is still the old interrupt call int 13 h. the hard disk addressing mode in this interrupt is displayed in three dimensions: cylindrical, Head, and track (CYLs, HEADs, SECs ). the cylinder number is saved in the high 10 bits of the CX register of the central processor (CPU), and occupies 10 bits ). this determines that the addressing range can only be 0-1023. with the development of computer science and the constant expansion of hard disk capacity, the limitations of this interrupted call are also exposed. this is the Linux system that cannot be installed after the 1024 Cylinder Using LILO boot.
In fact, it is not totally impossible. access to the hard disk can also take another form, that is, using linear address space, instead of using a cylindrical, Head, or track 3D address Positioning method. this is also the key to using LILO provided by GNU/Linux to boot the operating system installed anywhere on the hard disk.
Ii. Analysis of LILO
As a mature operating system boot system, LILO can certainly use the above two methods to boot the system in the hard disk. of course, the general situation is to use a common three-dimensional address space to access the hard disk, and for some special systems, it is necessary to use linear mode to access the hard disk. in this case, you need to add parameters to the Boot Record of the system to be booted so that LILO can make the correct processing.
Generally, when you install LILO on a Linux system, you will be asked if you want to use the linear mode. If you want to use it, you need to fill in some parameters. at this time, the system prompts you to ask if there are special systems that coexist with Linux. this message actually confuses almost everyone. (Note: the prompt information here is the RedHat Linux series and some improved versions on this basis) in fact, you can add some special parameters to implement some special functions. specific parameters correspond to what functions are beyond the scope of this article. You can refer to the LILO Manual documentation, which has been translated into Chinese by ZEO of the China Linux forum. here, we are only interested in one of the parameters, that is, the CHS parameter of the hard disk.
Iii. Problem Solving
If you have a large hard disk larger than 8 GB and you need to install Linux in a relatively low position, you can select the linear mode during installation and add hard disk parameters to it. the hard disk parameters during installation can be written as follows:
Hd? = CYLs, HEADs, SECs
The uppercase letters must be replaced by the actual hard disk parameters. These parameters can be found from the hard disk spear, or the line in which the hard disk parameters correspond to the LBA mode in BIOS settings. the question mark is determined based on the hard disk. In actual use, it can be one of the four letters a, B, c, and d. for example, hda = 1869,63, 255 is a parameter of the IBM 15.2 GB hard drive.
After entering Linux, You can edit/etc/lilo. add the file in conf and run lilo again to achieve the same purpose. below is the lilo before I add parameters. conf content:
Boot =/dev/hda
Map =/boot/map
Install =/boot. B
Prompt
Timeout = 50
Image =/boot/vmlinuz
Label = linux
Root =/dev/hda1
Initrd =/boot/initrd-2.2.12-20.img
Read-only
After adding parameters in the linear mode, the format is as follows:
Boot =/dev/hda
Map =/boot/map
Install =/boot. B
Prompt
Linear <----- added this line
Timeout = 50
Image =/boot/vmlinuz
Label = linux
Root =/dev/hda1
Initrd =/boot/initrd-2.2.12-20.img
Read-only
Append = "hda = 1869,63, 255" <------ added this line
Save the modification and run the lilo command at the command prompt. When the Linux system is started again, LILO will guide the system in linear mode. in addition to addressing and positioning on hard disks, there is no impact on other aspects. the above is just an example. In fact, there is no practical solution, but note that the append parameter is for each system Boot Record and must be placed under the image or other, in this way, it can play a role.

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.