View system startup kernel detection hardware information dmesg, kernel dmesg
Dmesg is used to display the boot information. The kernel stores the boot information in the ring buffer. You can use dmesg to view the information if you cannot view it at startup. The boot information is also saved in the/var/log directory and named dmesg. Dmesg is used to detect and control the kernel ring buffer. Programs are used to help users understand system startup information.
Dmesg check Nic startup status
Parameters:
-C: After the information is displayed, clear the content in the ring buffer.
-S <buffer size> is set to 8196, which is equal to the ring buffer size.
-N: set the record information level.
Detailed process of computer startup sequence (running hardware detection software) (System: Windows xp and later versions)
Computer (windows XP) startup sequence
Step 1: Pre-boot
After you press the power switch, the period before Windows XP is started is called the pre-boot phase. First, the computer will run the Self-check process, that is, POST (Power On Self Test, Power On Self-check), to detect the status of items including memory size and other hardware devices, the heap parameters in the Energy Star Screen at startup are self-check results. Then, the computer BIOS (Basic Input/Output System, Basic Input/Output System) carries out some necessary hardware configuration, and queries the device according to the set boot sequence, generally, find the first hard disk and then find the MBR (Main Boot Recorder, Master Boot Record, which is about kb in total with the partition table in the first physical sector of the primary partition ), load the boot program (also known as the Loader) according to the address saved in the MBR. The Boot Program includes OS Loader of Windows XP or LILO and GRUB in Linux, the name of the boot program for Windows XP is NTLDR.
Step 2: Guide
After NTLDR obtains control, it converts the original real mode to the 32-bit flat memory mode. In real mode, the system reserves KB of memory for the MS-DOS, and the rest of the memory is considered as extended memory; in 32-bit flat memory mode, the system (Windows XP) regards all memory as available memory. Then, NTLDR starts the built-in mini-file system drivers (mini file system driver), so that NTLDR can recognize the partitions of each NTFS or FAT file system, in this way, Windows XP that may be located in each partition can be loaded smoothly. In fact, another step in this process is to "consider" who should be started. It will ask about the boot under the root directory of the primary partition. ini, if the boot. ini tells it that there is only one system in the XXX location, NTLDR will of course start the system directly, and if there is a dual system, NTLDR will display a start menu for selection.
Step 3: load the kernel
In the internal kernel section, ntldrw.ntokrnl.exe (only load, not initialize), this file is the kernel of the operating system, and then ntldr loads the Hardware Abstraction Layer HAL (the file is hal. dll), and then the system loads [HKEY_LOCAL_MACHINE \ system] in the registry. NTLDR reads the "select" key value under it to determine which configuration data in the "Control Set" branch will be loaded (each "Control Set" branch contains the device drivers to be loaded and the required information of the loaded service ). NTLDR loads the underlying device driver with the "start" key value 0 under [HKEY_LOCAL_MACHINE \ system \ service. After the Current Control Set (in fact, the copy of the Branch used in each Control Set Branch) is fully loaded, ntldr handed over the Control and the kernel player in the competition went on stage.
Step 4: Initialize the kernel
Now you should be able to see the color Windows XP Logo and the scroll bar below. The system will load various device drivers and system services and complete some preparation work. For example, a well-known technique is to modify the pre-Read File parameters in the Registry to increase the startup speed, this is also a task at this stage.
Finally, some installed software self-start add-ons in the system.
Reference: bbs.360safe.com/viewthread.php? Tid = 466328
How does linux know whether the NIC has been detected during startup?
Dmesg | grep 'eth'
The dmesg command is to display some of the boot hardware, and then capture the eth keyword, you can see the eth0: regist as pci is similar.