Centos cannot enter the logon page

Source: Internet
Author: User

Note: centos cannot enter the logon interface. It stays on the blue interface with a mouse or arrow. This is also true for restarting. The system is centos5.4 and is used as a server. Because the service needs to be set to start and run the User-Defined program, the/etc/rc. d/RC. local (or/etc/rc. local) file, add and save the program to be started, and then restart. The original Startup Mode of the system is 5, that is, the graphic interface. After the restart, the system is loaded normally (with progress bar) until/etc/rc is executed. when a local file is added, the screen (black screen at this time) prompts that the startup information added is incorrect. Then, the system loads other information, and a blue screen appears, with one mouse hovering over and no longer running down. This is also true when the instance is restarted multiple times. Some netizens suggested using livecd to fix the problem.


Step 1. Download the centos5.4-i386-liveCD.iso (my system is centos5.4 ). Unfortunately, I couldn't find it, so I had to subscribe to centos5.5. Set centos5.5.iso
Burn it to a boot CD (DVD). You can find it online.

Step 2. Put the centos5.5 CD into the server optical drive and restart. The system starts from the CD. There will be a 10 s countdown wait time. You can press enter to select the start mode. There are 5 middle modes in total, the first is the graphical interface mode of boot and livecd; the second is the text boot and livecd character interface mode; there are three other modes, which will not be introduced here. If you select the first type of graphical login, the system will have 10 seconds after loading the system file for you to enter the user name. You can enter root to indicate the root user or do not process it (non-Root User Login by default ), we recommend that you use root to log on. Similarly, if you select the character logon interface, you are prompted to enter a user name when the system file is loaded. We recommend that you use the root user.

Step 3. Enter fdisk-l in the terminal or character command bar to list detailed information about the local partition of the system. If you have noticed the screen information when loading system files, you may already know that the system has automatically mounted four hard disk partitions, such as sda1, sda2, sda3, and sda5 (sda6 is the swap partition, for my system), mounted under/mnt/disc. The first time I used a graphical login, I found the root of the original system (~) In sda3, find the RC. Local file under/mnt/disc/sda3/etc, and find that the file system is read-only and cannot modify the file/etc/rc. Local.

Step 4. Partitions automatically loaded by the system are read-only and cannot be modified. Therefore, uninstall it first. If you log on to the GUI, you need to open a terminal. If you use character logon mode, use the command directly. Because the files I need to modify are in sda3, I only need to operate sda3. First, create a mount point. Command: mkdir/mnt/temp, unmount/mnt/disc/sda3, command: umount
/Mnt/disc/sda3; run the command in step 3: fdisk-L to obtain 6 partitions of the local hard disk (for my partition):/dev/sda1 ~ 6. Remount sda3 and define it as read/write. Run the command: Mount/dev/sda3/mnt/temp-o rw. Then, you can perform read and write operations on the files in sda3. Go to the root directory and run the following command: CD
/Mnt/temp; I deleted the error definitions in/etc/rc. Local and saved and exited. To meet my actual needs, I modified the/etc/inittab file and changed the login mode from 5 to 3. Then add the executable permissions to/etc/inittab and/etc/rc. Local. Command: chmod + x etc/inittab
And chmod + x etc/rc. Local.


Step 5. Restart the system. Remove the disc when the system is powered on again. The familiar character logon interface appears.

To sum up, if the problem occurs, it is generally caused by an error after the system startup file is manually modified. You can use livecd to enter the file with the system modification error, which file is wrong? You need to view the screen information during system loading or use your memory. In addition, livecd can be used for system repair or data backup.

Related Article

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.