Backup partition Table MBR

Source: Internet
Author: User

Backup method: 1, Backup partition table information sudo fdisk-l >hda.txt # partition Table information redirected output to a file 2, backup Mbr[email protected]:~/ex$sudo dd if=/dev/sda of=mbr bs=512 count=1# input file/dev/sda, output file MBR (own definition), input (out) block size 512 bytes, copy once, because MBR is 512 bytes, so read write to MBR file 1+0 records in1+0 records out512 bytes (512 B) copied,4.0728e-05 sec, 12.6 mb/s [email protected]:~/ex$ ls # view backup successful hda.txt MBR master boot record 512 bytes, first 446 is program code, 64 bytes contains partition table information, The last 2 byte ID is MBR 3, recovery partition table dd if=mbr of=/dev/sda bs=1 skip=446 count=66 #输入文件mbr, Output/DEV/SDA, block size 1 bytes, input skips 446 bytes, recovers 66 bytes, appears to recover only 66 bytes If none of the logical partitions are available, then use Fdisk to follow the Hda.txt information again.
In addition, DD can clone the entire hard disk and partition, no matter what type of file system you can, but because of the slow speed, it is generally not recommended, cloning USB stick is recommended, you can also convert the CD-ROM to ISO
Cloning a hard disk
Code:DD IF=/DEV/SDA of=/sda.img
Clone partition
Code:DD if=/dev/sda1 of=/sda1/img
Making a disc image
Code:DD If=/dev/cdrom Of=/cdrom.iso

Backup partition Table MBR

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.