Reborn Ace Hack

Chapter 153 Compiling the Kernel

(New book issue, please give me flowers, please collect!) After returning home, after dinner, Xiao Yuan did not go to school for self-study in the evening, but locked himself in the room and began to operate on the ThinkPad 600.

What he wants to do is to completely control that computer. If he wants to do this, the first step is to completely delete the original Windows 98 of the system from the computer, because out of commercial interests, Microsoft cannot

The source code of Windows is disclosed, and even in order to ensure the ease of use and stability of the system, many things that can be freely controlled under DOS are encapsulated and restricted. This will not have any impact on ordinary users, and even

It can be said to be a good thing, but for a hacker like Xiao Yuan who has a strong desire to control his own computer, it is unbearable.

Therefore, he wants to change his computer system to Linux, a completely open source operating system that can control and adjust any details of the system. The thing he downloaded from Gu Lang before was actually the Linux kernel.

Source code, as well as the software packages or source code packages required to build a complete operating system using the source code.

Of course, it is not easy to completely control a computer, and it is definitely not something that ordinary computer users can do. If there is no solid foundation, after deleting the pre-installed Windows 98 on the system, this will

A computer might just become a cold black box, unable to do anything.

Xiao Yuan put the CD that Gu Lang burned for him into the computer's CD-ROM drive, and then set it from the BIOS to boot from the CD-ROM drive. Soon, the system was booted to a black command line interface.

The first thing he had to do was to repartition and format the hard drive of his laptop, completely delete the fat32 file system supported by Windows 98, and replace it with a file system supported by Linux.

Because the hard drive is very small, only 3.2g, Xiao Yuan did the partition formatting step very quickly, completing it in about ten minutes.

What Xiao Yuan has to do next is to delete and configure the Linux kernel source code on the CD according to his own needs, write a compilation script, and then compile the source code to generate truly executable binary machine code. The tools he uses

It's all on that CD, too.

Regarding Linux kernel configuration, Xiao Yuan has done it countless times in his previous life, so this time he did everything with ease.

To write the kernel compilation script, you can use some automatic script generation tools. Of course, if you are very familiar with the syntax and format of this script, you can also write it yourself. Here, Xiao Yuan chose to write the operating system source code compilation script himself.

Although this is a little more troublesome, it gives you a higher sense of control and freedom than compiling scripts generated by some automatic tools.

Xiao Yuan enjoys this process very much, because when writing the compilation script, he can control every detail of the compilation process and ensure that only those functions he needs will be compiled, and those functions that are not needed will not be compiled, nor will they be compiled.

will appear in his system.

This kind of complete control over the system can only be achieved by open source operating systems. For closed source systems such as Windows systems, Microsoft provides a compiled binary software package, which is installed when the system is installed.

Although some configuration options are provided, there are very few things that can be configured and controlled. It is impossible to fully control it. It can even be said that more than 90% of the content is imposed on users by Microsoft, and some of the functions

The user may never use it, but these functions must be installed on the user's computer, and the user may even have to pay for them.

Or, there are some functions that users do not want to use provided by Microsoft, such as the Internet Explorer browser that has been bundled into the system since Windows 98, but only some technical experts can uninstall it, and ordinary users simply cannot do this.

After Xiao Yuan wrote the kernel compilation script, he exited the text editor and ran the script from the command line. What followed was a long wait. If it were a later generation computer, this process might only take half an hour, or even

It can be completed in ten or twenty minutes, but Xiao Yuan's current computer has a CPU of only 233mhz and a memory of only 64M. Therefore, it takes a lot of time to compile an operating system kernel on such a computer. According to Xiao Yuan's own experience

, it will take at least three or four hours to successfully compile the kernel, and this is when the kernel compilation script he wrote has no errors. If there are errors in the script he wrote, causing the compilation to fail, then the compilation script must be modified again.

,recompiling takes longer.

Naturally, Xiao Yuan would not waste the few hours waiting for the compilation results to come out. The final exam was coming soon and his homework needed to be reviewed, so he took out his textbook and immersed himself in reading.

During this period, Xiao Changtian came in to see Xiao Yuan once. When he saw Xiao Yuan immersed in reading, he left without saying anything.

At almost 10:30 in the evening, the kernel was finally compiled. Xiao Yuan saw the final message given by the compiler that the compilation was successful. He secretly rejoiced, packed up the textbook, and then started to compile the compiled kernel.

On to the next step.

After the kernel is compiled, a bootable Linux system with the most basic functions and a basic shell have been installed on the computer. At this time, the computer can already be started.

Xiao Yuan copied all the files on the CD to the hard disk in the optical drive system. Because at this time, the newly compiled system on the hard disk has not yet been configured with the optical drive driver, so once it is booted from the hard disk and enters the newly compiled system, it will not be recognized.

The CD came out.

Booting from the hard disk only requires loading a very streamlined operating system kernel and a few software packages, so it only takes a few seconds to boot, which is about the same time as turning on the TV to seeing the screen.

Looking at the login prompt on the computer screen, Xiao Yuan felt an indescribable sense of satisfaction. The Linux system is different from the Windows 98 system. It is a multi-user system, so the login process is necessary. Then he hit Enter.

After entering the system, because the system has just been compiled, the super user does not have a password yet. The first step Xiao Yuan needs to do is to set a password for the super user.

After setting the password, Xiao Yuan installed the Linux user manual, and then installed the macro assembler, C language compiler, and the most basic text editor. At this point, a basic Linux system that can work is done.

Well, of course, so far, this system can't do much work, because many computer hardware still lack drivers, and Xiao Yuan knows that these drivers cannot be found even if they are installed, so they can only write them themselves.

Writing these drivers is not a difficult task for him, but it does take time. It was already past eleven o'clock in the evening. Xiao Yuan thought that he would have to get up early tomorrow, so he turned off the computer and went to bed.

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like