Use Linux boot CD to troubleshoot server faults

Source: Internet
Author: User
Article Title: use Linux boot CD to troubleshoot server faults. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
By Scott Lowe
  
Service Interruptions caused by system crashes can cause huge economic losses to users. However, if appropriate tools are used, the system can be restored as soon as possible to minimize the loss. Although Linux systems are well known for their stability and reliability, they sometimes crash/or fail to be cited due to hardware problems. To solve this problem, the best solution is to use Linux to boot CD.
  
For the convenience of readers, I listed below the steps required to install Red Hat Linux 8.0.
  
Take notes for the installation process
After the typical installation of Red Hat Linux is complete, the system prompts you whether to create a boot disk. We recommend that you do not skip this step if you are willing to retain restoration methods for future system crashes. If you skip this step, you can also run mkbootdisk on the system command line to create a boot disk.
  
MkCDrec
The MkCDrec (Read-Only CD for building a recoverable System) command is a tool for establishing a disaster recovery CD in Linux. It supports most file systems, RAID (cheap redundant disk arrays), and optional tools for System Fault repair. These tools include partition management tools, memory detection tools, and data recovery tools. In addition, mkCDrec supports most of the currently released Linux systems, including Red Hat 8.0 and Mandrake 9.
  
Start stage
The first step to establish a bootable CD recovery is to download mkCDrec. When I write this article, the 0.6.7 version of the software has been published and can be downloaded. The pen downloads the mkcdrec_v0.6.7.tar.gz package and stores it in the/home/slowe directory. In addition, you can download other optional mkCDrec toolkit, including many useful tools that can be burned together into the boot CD. The SDK version is 0.6.7. At the beginning of CD production, I remind you to have the root permission for the Linux system before you can perform the following operations.
  
1. cd/home/slowe [switch to the mkCDrec download directory.]
2. tar zxvf mkCDrec_v0.6.7.tar.gz [decompress the mkCDrec package.]
3. decompress the cd mkcdrec [mkCDrec file and enter its directory.]
4. tar zxvf/home/slowe/mkCDrec_v0.6.7_utils.tar.gz [decompress the toolkit.]
5. make test [run a script to determine whether mkCDrecs is necessary in the user system. Click here to view the command example output by the script.
  
If the above Script output shows that the user's server has a problem, you must solve the problem before continuing the subsequent work. The Nasmc error in the example means that no compilation compiler is found in the user system. I downloaded the compiler and run the following command to install it:
Rpm -- install nasm-0.98-8.i386.rpm
  
In the system recovery boot CD, you must have an operating system kernel that can work and use it to boot and enter the Linux system. The Linux kernel of the MkCDrec program is 2.4.18.
  
The next error in the example indicates that a CD burning tool is missing in the system. Because I do not have CD recording software in Linux, I plan to install CD in Windows. You can change the configuration file to ignore the check on the CD recording software in Linux. Use the pico Config. sh command to edit the Config. sh file and change BURNCDR = y to BURNCDR = n.
  
After installing the nasm compiler and modifying the configuration file, you can run make test again to check whether there are any errors. In my operation, I have not encountered any trouble after I have ruled out the above problems.
  
The following operations are mostly completed through the menu. You can see the example menu in Listing B.
  
Option 1 is to create a bootable CD with an emergency recovery tool. However, no data is retained for the user's system.
  
Option 2 create a bootable CD with an Emergency Repair Tool and back up your system information. Do not litter the CD prepared by option 2 everywhere, because the CD can be used for unrestricted access to the stored data. This option creates one or more ISO image files and stores them in the/tmp/backup directory.
  
Option 3 is similar to option 2, except that the ISO image is not stored in the/tmp/backup directory.
  
Option 4 back up system information through the tape drive and establish the same system to guide the CD.
For example, if option 1 is selected, the generated ISO image file can be copied to the Windows system and burned to the CD. If you want to back up system files and configuration files to CD, you can select options 2 and 3. However, option 1 is a good choice for time and workload considerations. It provides a tool that users can guide and restore attempts, but this option does not provide important data backup functions for the current Linux system.
  
If option 1 is selected, the mkCDrec script starts to work. This process takes some time because the tool has to prepare all the content for the entire CD, including boot loader, kernel, and emergency tools. Listing C tells you what content is saved.
  
Burn CD
If you are not familiar with Linux or do not know much about how the operating system works, it is difficult to read the following content. The user wants to use the CD recording software to burn a bootable CD containing the Linux system kernel and the complete tool set.
  
I installed Roxio Easy CD Creator and Ahead Nero CD in my Windows system. These two CD burning software packages are quite Easy to use. Either of them can complete CD burning.
  
Remind the user to test whether the system can be properly guided after the CD production is complete. Otherwise, in case of system failure, but suddenly found that CD could not be guided, it would be too much trouble.
  
In addition, before starting the system with CD, you need to enter the Bios setting program of the Linux server to check whether it is configured to support CD boot. After confirming, you can start testing the boot CD you have prepared. After loading the CD to start the system, you will see the special guide interface of mkCDrec (figure A). This interface will gradually improve the user's operation
   
Figure A: mkCDrec boot page
When the system completes boot from CD, you need to pay attention to a few things. First, you need to run the linux core system (bare-bones) from the RAM disk (disk virtualized by memory ). Second, we need to mount the mkCDrec boot CD into/cdrom.
  
You also need to mount the device in any linux server. You can obtain the device information by running the cfdisk command. This command will display the list of devices in the user system. See figure B.
  
Figure B: Cfdisk Tool
To load/(root) partitions, run the following command:
Mount-t ext2/dev/sda2/mnt/local
  
After the command is run, the mount point points to the root directory of the linux server. You only need to switch to the/mnt/local directory to view the file system. Loading a file system is very important. In case of a boot loader corruption, you can also repair or transfer data to other servers.
  
What else can I do?
After mkCDrec CD is used for guidance, You can do many things. There are several important items, if the user chooses to create a system backup, then the user can execute the/etc/recovery/start-restore.sh command, after this command runs will prompt the user the complete system recovery process. Note that if you do not back up the boot CD, you will be prompted that no data can be restored.
  
The/etc/recovery directory contains many tools that can be used to recover the system or repair crashed servers. Detailed descriptions are provided on the mkCDrec Web site.
  
If you download the mcCDrec tool and install it correctly, it will be located in the/cdrom/utilities directory, such as parted (a partition editing tool) and memtest (a memory detection tool) and e2salvage (a data recovery tool from the ext2 partition ). Users can access the mcCDrec website.
  
System Crash is inevitable in life, but with the right tools, you can restore the system as soon as possible and minimize losses. Using the system recovery boot CD established by mkCDrec will play a huge role in your most need of help, thanks to the complete system backup function, mkCDrec is a powerful tool kit for disaster recovery by any Linux system administrator. (Responsible editor: Liu yanzhi)
  
  
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.