Grub2 guides LinuxISO for CentOS system installation and rescue

Source: Internet
Author: User
In many Linux releases, the Grub boot loader is used to directly Guide ISO. in practical applications, I found that this method can not only guide system installation, it can also guide the system into the Linux rescue mode for system emergency rescue. The configuration methods in CenTOS7 and DEBIAN7.6 are described in detail. 1. DEBIAN usage: 1.1. system installation guide:

In many Linux releases, the Grub boot loader is used to directly Guide ISO. in practical applications, I found that this method can not only guide system installation, it can also guide the system into the Linux rescue mode for system emergency rescue. The configuration methods in CenTOS7 and DEBIAN7.6 are described in detail.
 
1. DEBIAN usage:
 
1.1 System Installation Guide:
 
To directly Guide DEBIAN7.6 iSO in GRUB2 for system installation, we need to download DEBIAN7.6 installation ISO and

Http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/hd-media/

Download initrd.gz and vmlinuz to support direct ISO guidance.

Start the system and enter GRUB2 mode. run the following command in the GRUB2 command:
01. grub> set root = (hd0, 2)

02. grub> linux/debian_amd64/vmlinuz

03. grub> initrd/debian_amd64/initrd.gz

04. grub> boot
The command set root = (hd0, 2) specifies the current active partition of the system as the second partition of the first hard disk. Then the system enters the installation mode.
 
1.2 guidance on the system rescue mode:
 
Enter the GRUB2 mode and enter the following command in the GRUB2 command:
01. grub> set root = (hd0, 2)

02. grub> linux/debian_amd64/vmlinuz linux rescue/enable = true

03. grub> initrd/debian_amd64/initrd.gz

04. grub> boot rescue/enable = true
The system rescue mode is enabled by adding the rescue/enable = true parameter to GRUB2, so that the system enters the emergency rescue mode when it is started. In this mode, the administrator can fix and handle failures that cannot be started by the system, such as GRUB. Sometimes you may encounter RAID devices supported by software or the motherboard. During DEBIAN installation and system rescue, we also need to add the dmraid = true parameter to the system startup Kernel to support the RAID card. Otherwise, problems and faults such as failure to install the system may occur.
 
2. CenTOS7 usage:
 
2.1 System Installation Guide:
 
Start the system and enter GRUB2 mode. run the following command in the GRUB2 command:
01. grub> set root = (hd0, 2)

02. grub> loopbadk loop/CentOS7/CentOS7.iso

03. grub> linux (loop)/isolinux/vmlinuz linux repo = hd:/dev/sdg2:/CentOS7

04. grub> initrd (loop)/isolinux/initrd.gz

05. grub> boot
In the repo = hd:/dev/sdg2:/CentOS7 parameter, hd indicates hard disk installation,/dev/sdg2 indicates the partition where the ISO image is located, and/CentOS7 indicates the directory where the ISO image is located. ":" Should be the delimiter required by the parameter format. please modify it according to the directory and partition where your ISO is located. For the partition issue, you need to note that after the/CentOS7 installer is started, the hard disk installed on the computer will be set to/dev/sda. I use a mobile hard disk to load the boot program CentOS7, start to use/dev/sdb2 after hd: But the installer always reports that the ISO file cannot be found because there is a RAID card device in the hardware environment during installation, later, check the boot log and find that after the installer is started, the mobile hard disk will be changed to/dev/sdg, and the hd: after the partition is changed to/dev/sdg2, you can smoothly enter the CentOS7 installation interface and complete system installation.
 
2.2 guidance on the system rescue mode:
 
Enter the GRUB2 mode and enter the following command in the GRUB2 command:
01. grub> set root = (hd0, 2)

02. grub> loopbadk loop/CentOS7/CentOS7.iso

03. grub> linux (loop)/isolinux/vmlinuz linux rescue repo = hd:/dev/sdg2:/CentOS7

04. grub> initrd (loop)/isolinux/initrd.gz

05. grub> boot linux rescue
We can find that the GRUB2 pilot CentOS7ISO startup and rescue mode can be converted from the installation mode to the rescue mode by adding the linux rescue parameter to the startup Kernel.
 
Through the above method, our system administrator can directly create the GRUB2 boot loader on the mobile hard disk, and create the directory folder of the corresponding system and the ISO image file of the corresponding system in the mobile hard disk, you can easily use this mobile hard disk to install and rescue the system. this method reduces the workload of administrators, especially when multiple LINUX systems exist in the data center, it also makes system installation and rescue easier to operate.

Article reprinted from the network manager House: http://www.bitscn.com/ OS /linux/201408/301578.html

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.