Linux-migration and Replication

Source: Internet
Author: User
Tags linux mint

Most of the time, we are faced with the following problem: we have installed a Linux System in disk (I) and various software. If we want to copy the system to others, or how to operate other disks. Migration and replication of linux systems are involved here. I don't want to mention the linux dd command. The speed can be used to compete with the snail guard. The method mentioned here is to copy the system file: copy the disk (I) the installed system files are copied to the disk (J) intact. Then, you need to modify some system parameters and system boot files in disk (J) to make the disk (J) in! The following is an example:

Use Windows 7 as an operating tool to copy and migrate linux systems on two disks:

 

Original disk: disk (I), linuxmint

Copy target disk: disk (J)

Operating tools: win7 System

 

Step 1: copy the system files in disk (I) to disk (J), [linuxmint (or Ubuntu), entire folder]

 

Step 2: add the system boot guide project to the win7 System

This step is implemented through the bcdedit command in win7 (implemented through boot. ini in XP)

This is very detailed. The general steps are divided into three steps (to prevent modification errors, you can back up the boot file first)

[Backup] C: \ Windows \ system32> bcdedit/export d: \ backup_bcd

[Recovery] C: \ Windows \ system32> bcdedit/import d: \ backup_bcd

[1 new] bcdedit/create/d "LinuxMint"/application bootsector # create a startup Item named "LinuxMint" for the real-mode startup sector

Copy the generated {ID}
[2] bcdedit/set {ID} device partition = J: # set the partition where the Boot Sector file is located. The partition where wubildr. mbr is located.
[3] bcdedit/set {ID} path \ linuxmint \ winboot \ wubildr. mbr # specify the path and file name of the boot sector File
[4] bcdedit/displayorder {ID}/addlast # Add this Ubuntu menu item to the end.

You can use bcdedit/enum to view the modified boot guide item.

 

Step 3: Start File Replication

Copy the wubildr. mbr and wubildr boot files under the \ linuxmint \ winboot \ directory (for ubuntu, It is \ ubuntu \ winboot) to the C root directory.

\ Linuxmint \ winboot \ wubildr ==> C :\\

\ Linuxmint \ winboot \ wubildr. mbr ==> C :\\

 

 

Step 4: restart win7. In the boot option, select "LinuxMint" (do not select win7)

Generally, an error is reported because the UUID changes after the linux system copies data from disk (I) to disk (J). Therefore, you need to make some adjustments:

When an error is reported, press the escape key several times to enter the grub command (to find the correct UUID) and enter the command

Grub> ls-l

Multiple disks are displayed. You can find the UUID of disk J Based on the disk name, and write down the UUID of disk J: 1ADC8962DC893951.

This time is not far from success ~~~

Step 5 Press Ctrl + ALT + DELETE to restart

Repeat Step 4 until an error is reported, and press escape once to jump out and press e to enter the editing mode: Modify the UUID in the boot file.

At this time, you can edit it. When a UUID is located, replace it with 1ADC8962DC893951. There should be three replicas.

/* UUID = 1ADC8962DC893951 */

 

 

After modification, press F10 to start the system !!!!!

 

Step 6 Save the changes

It is very troublesome to modify the changes at every startup ~~~ After the Linux mint system is started, enter the sudo update-grub2 in the command line, and save it. At this time, you can view the files in/boot/grub/and check whether the UUID is modified successfully ~~~ Success

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.