Linux system Troubleshooting (Start Troubleshooting)

Source: Internet
Author: User

Although the Linux system is very powerful, stable, but we use the process, if the human operation is not appropriate, will still affect the system, and may even make the system does not boot, unable to run services and other problems. Then this blog post summarizes some common troubleshooting methods, but it is impossible to cover all, can only continue to supplement, update.

first, the administrator forgot the password

(1), restart the computer, enter the single-user mode

12345 [[email protected] grub]# rebootBroadcast message from root (pts/2) (Wed Dec  2 18:45:32 2015): The system is going down forreboot NOW!

(2), grub display interface, hit the P key

(3), enter the password and press ENTER

(4), at this time can see the Edit menu below has been unlocked, users can edit their own, at this time we hit the E-key

(5), move the cursor to the second line, that is, kernel this line, and then hit the E-key

(6), at this time into the kernel Edit menu, we only need to add a number at the end of the line after 1 press ENTER

(7), at this time to tap the B key, you can restart the system

(8), at this time the system has been restarted, after the boot is complete, is a single user mode, directly modify the root password

(9), at this time is the root user directly login, enter passwd to change the root password, and then restart into level 3 can

Note: The above step is to enter the single-user mode method, the following single-user mode will not repeat this step

Second, the system does not start

1, Grub stage1 damage (MBR first 446 bytes corrupted)

(1), when rebooting the system is the following screen

(2), at this time need to mount the CD and then restart into the rescue mode, the prompt to enter the Linux rescue can be

(3), select the language type, we choose English here

(4), select the keyboard type, we choose the American keyboard here

(5), whether to enable the network, according to their own needs to choose, I do not use the network

(6), if you need to modify the file, then select Continue, or select Read-only,skip directly into the command line

(7), specify the current root partition, if there are more than one hard disk

(8), prompt root file system is mounted to/mnt/sysimage, if you want to switch, execute chroot/mnt/sysimage

(9) After entering the command line interface, enter grub to enter the prompt interface

(10), first specify the kernel partition, and then install grub, install the completion of the exit and then restart

(11), pay attention to unmount the disc or adjust the boot sequence, after starting to display the following screen to repair success

2. Grub Stage2 Corrupt (stage1.5 and stage2 files are missing)

(1) When the stage2 of grub is damaged, it will be the same when rebooting the system

(2), at this time we only need to specify the disk and partition, kernel file path, initrd file path can be

(3), start after the completion of the following display, and then directly log on the system

(4), copy all files under/usr/share/grub/x86_64-redhat to/boot/grub directory.

1234 [[email protected] ~] # ls /usr/ share/grub/x86_64-redhat/ e2fs_stage1_5  ffs_stage1_5       jfs_stage1_5    reiserfs_stage1_5  stage2            ufs2_stage1_5    xfs_stage1_5 fat_stage1_5   iso9660_stage1_5  minix_stage1_5   stage1             stage2_eltorito   vstafs_stage1_5 [[email protected] ~] # cp /usr/share/grub/x86_64-redhat/* /boot/grub/ -a

3. grub.conf configuration file is missing

(1), when the grub.conf configuration file is lost, it will be the same when rebooting the system

(2), at this time we only need to specify the disk and partition, kernel file path, initrd file path can be

(3), start after the completion of the display as follows, enter the system we can create grub.conf

Note: Here the find command is very useful, specify root, kernel, initrd to start

Third, users can not log on the system (migetty, bash corruption)

1. Bash corruption

Go to rescue mode and reload bash

Note: Many failures can be solved by user mode or rescue mode

Linux system Troubleshooting (Start Troubleshooting)

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.