Install a grub interface that can run on other computers

Source: Internet
Author: User

Purpose:Create a grub interface that can run on other computers.Pure entertainment.

Principle:According to the Linux system startup process, we only know that grub is used to guide the operating system, so we can completely, create a grub page and run it on other computers.

General process introduction:A dual-Hard Disk Linux system is required. Install a grub interface on the hard disk that is not the root device, and then take the hard disk to other systems for running.


1) Add a new disk to a Linux system. The disk must be specified as a single file.

 

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4C/6E/wKiom1Q9Mt7jR_sXAAGN0KZPheQ200.jpg "style =" float: none; "Title =" 1.png" alt = "wkiom1q9mt7jr_sxaagn0kzpheq200.jpg"/>

2) Remember the location of the disk file, which will be used later.


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4C/6E/wKioL1Q9MxXzUSTAAADhHkRDkJU664.jpg "style =" float: none; "Title =" 2.png" alt = "wkiol1q9mxxzustaaadhhkrdkju664.jpg"/>

3) create a 20 m partition on the Newly Added Disk.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4C/6E/wKiom1Q9Mt_gIuRbAAD_PgN0cpY212.jpg "style =" float: none; "Title =" 3.png" alt = "wkiom1q9mt_giurbaad_pgn0cpy212.jpg"/>

4) format the partition.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4C/6E/wKioL1Q9MxbS0-dmAAJ6Mt4m5U8416.jpg "style =" float: none; "Title =" 4.png" alt = "wKioL1Q9MxbS0-dmAAJ6Mt4m5U8416.jpg"/>

5) create a boot directory under the/mnt directory and mount/dev/sdb1 to the/mnt/boot directory.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4C/6E/wKiom1Q9Mt-xIj5YAACGdjfgAyQ872.jpg "style =" float: none; "Title =" 5.png" alt = "wKiom1Q9Mt-xIj5YAACGdjfgAyQ872.jpg"/>

6) Run grub-install -- root-directory =/mnt/dev/SDB to install grub under/MNT. The command will automatically find the boot directory without manual specifying


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4C/6E/wKioL1Q9MxaQBiVzAAFNp9AdS1Q953.jpg "style =" float: none; "Title =" 6.png" alt = "wkiol1q9mxaqbivzaafnp9ads1q953.jpg"/>

7) When you view/mnt/boot, you will find that grub has been installed under the boot directory, and grub directory also has the relevant files.


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4C/6E/wKiom1Q9Mt_xzLwyAADyt9BEZb4184.jpg "style =" float: none; "Title =" 7.png" alt = "wkiom1q9mt_xzlwyaadyt9bezb4184.jpg"/>

8) Create a New Grub. conf folder, write the following content, and use the sync command to synchronize the file to the disk. Otherwise, the file will still be saved in the memory.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4C/6F/wKioL1Q9MxaTdHGyAACT2x4DwdY893.jpg "style =" float: none; "Title =" 8.png" alt = "wkiol1q9mxatdhgyaact2x4dwdy893.jpg"/>

9) create a new virtual machine, but select an existing disk when selecting a disk.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4C/6E/wKiom1Q9MuCxqYVpAAF1-_XZ_eg172.jpg "style =" float: none; "Title =" 9.png" alt = "wKiom1Q9MuCxqYVpAAF1-_XZ_eg172.jpg"/>

10) Select the disk to be added at the beginning.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4C/6F/wKioL1Q9MxfDx-rqAADXRzbKrfE363.jpg "style =" float: none; "Title =" 10.png" alt = "wKioL1Q9MxfDx-rqAADXRzbKrfE363.jpg"/>

11) then open the new virtual machine and you will see the newly created grub interface, but the system cannot run because there is no Kernel File.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4C/6F/wKioL1Q9Mxegs2I-AADz3z0SqjU132.jpg "style =" float: none; "Title =" 11.png" alt = "wKioL1Q9Mxegs2I-AADz3z0SqjU132.jpg"/>


 


This article from the "plum blossom from bitter cold" blog, please be sure to keep this http://wangjunkang.blog.51cto.com/8809812/1564121

Install a grub interface that can run on other computers

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.