At, a graduate student suddenly called to say that the Linux system in his machine room could not be started. The problem seemed very serious, so he took the Ubuntu boot disk and looked at it.
There are more than 30 computers in the IDC, and only one computer can access Linux. I tried to find one. After I chose to enter the Linux system, I got stuck. The lights on the keyboard kept flashing and did not respond when I pressed any key. However, Windows can access the system (dual system ).
Start the Q & A session:
Q: Do I upload the same data after the host is installed? A: Yes. Can the machine be started after simultaneous transfer? A: Why can't I enter again? A: modified./Boot/GRUB/Grub. cfg file Q: Why is this file modified? A: This is a public data center with dual-host systems. I installed XP first and RedHat later. After the installation, the first startup Item is RedHat. Only RedHat is used, and XP is used on other computers, so I want to adjust the default startup sequence. Modified the file and moved the RedHat-related startup Item to XP. (PS: I used to do this kind of thing. Because I have many systems on my computer, Linux is the first, win7 is the last, and I have to press the arrow keys several times each time I enter win7. This is troublesome, so I changed win7 to the second place, that is, to modify the file. There is no problem .) Q: Can I access Linux after modification? A: Yes. Now, one machine can be started. Q: other machines are also modified in this way? A: No. I directly modified the machine./Boot/GRUB/The grub. cfg file overwrites the corresponding file on other machines. (PS: You are patient! More than 30 machines, one copy !) Q: Can I enter after modification? A: We modified all the hosts in one breath. After the modification, we found that all the modified hosts could not be entered! I have been searching for the Internet for a long time, but I didn't encourage you to come out, so I invited you here. Q: You should test the modified ECs instance. A: Our mentor has always said that we (workshop )~
The problem is basically locked on that file, so I plugged in my USB flash drive Ubuntu boot disk, went to the system, opened the disk management tool, and looked at it. When I installed the Linux system, I divided it into three zones, 11g/partition, 1g/boot partition, 4G swap partition. Mount the boot partition and open the grub/grub. cfg file. My idea is to restore this file. Because this file is overwritten, it can only be restored based on his memories. After the restoration, restart and enter Linux, which is still the same as the previous situation. It does not seem to be a matter of order.
Although the system cannot be started, there are still two lines of prompts (I forgot to take the picture and regret ing ). Graduate students said they searched the internet for the problem. They said that the system was flying, and then they tried various methods. After a long time, they did not finish the problem.
"The system is flying", which is an important reference. Why is the system flying? I remember what the hardware teacher said before,ProgramIf the program is not executed in the order you requested, and the pointer points to an address other than the program, the program execution cannot be controlled. In the embedded system, a circuit called the watchdog is used to solve this problem.
I have read an article about system guidance before.Article:When the computer is started, the program in the BIOS first executes self-check. After the self-check is passed, find the boot loader program in the mbr of the first disk that can be started according to the CMOS configuration (usually in the first physical sector of the boot disk, accounting for 416 bytes), and give the control to the boot loader, boot Loader further loads the operating system kernel. After the boot loader finds the kernel, it gives control to the operating system kernel, and the kernel continues to start the system. Http://linux.chinaitlab.com/administer/726807.html)
The current system problem should be said that there is no normal boot, because it modified the/boot/GRUB/grub. cfg file. Why can't it be started after the file is modified? With this problem, the grub. cfg file is opened through the boot disk again. Then start the analysis. Similar to the following file (not a source file, but not recorded below, this file is searched from the Internet and compared to the following)
Menuentry ' Ubuntu, with Linux 2.6.32-21-generic ' -- Class Ubuntu -- class GNU-Linux -- class GNU -- Class OS {recordfail Insmod Ext2 set Root = ' (Hd0, 3) ' Search -- No-floppy -- FS-UUID -- set 5cf7c0d3-8b4d-428f-a54a- Ea43ce486654 Linux /Boot/vmlinuz- 2.6 .32 - 21 -Generic root = UUID = 5cf7c0d3-8b4d-428f-a54a- Ea43ce486654 Ro quiet splash initrd /Boot/initrd. IMG- 2.6 . 32 - 21 - Generic}
We can see that there is a "UUID" in it, which instantly shines. Remember that the previous teacher said that UUID is a unique identifier of a partition, grub. in the cfg file, the system uses UUID to determine the partition. If the uuid in the file is not the uuid on the actual hard disk partition, the corresponding boot partition cannot be found correctly when the system starts. Of course, the system cannot start the partition. Decisively open the/etc/fstab file and check it. It's really different !!! It seems that the problem is here. Because the system/boot has UUID, I don't know which one to use. First, the fact is/boot. An error is reported during startup, saying that/boot has been mounted, then try the uuid of "/". It can be started normally! Cheers ~~ However, when half of the boot time, the system prompts SELinux to fix the disk. It takes about 10 minutes to fix the disk and then enters the system normally!
The next step is to teach them how to modify the grub. cfg file ~
The dormitory is closed ~