Disk partition table backup, deletion, and recovery

Disk partition table backup, deletion and recovery

Partition table backup

? The MBR partition table is stored in the 0th sector of track 0 of the hard disk, a total of 512 bytes, the first 446 bytes It is the bootloader, the middle 64 bits are the disk partition table information, each partition information occupies 16 bytes, and it is stored in 4 partitions in total. 
? Check the hexadecimal file of the hard disk, among the first 512 bytes of the hard disk, the 64 bytes from 2080 to aa55 is the disk partition table we need to back up

Disk partition table backup, deletion and recovery

Backup

    < li>Use the dd command to back up the information of the hard disk partition table
    disk partition table backup, delete and restore
  1. Check the backed up data to ensure correctness.
    Disk partition table backup, deletion and recovery
  2. will be backed up Transfer the file to a remote host, or copy it to a USB flash drive for backup.
    Disk partition table backup, deletion and recovery
  3. Log in to the remote host , And review the data to ensure consistency.
    Disk partition table backup, deletion and recovery

Clear the disk partition table

  1. Use the dd command to clear the 64 bytes after the 446 bytes
    disk partition table backup, delete and restore
  2. View the data after emptying
    Disk partition table backup, deletion and recovery
  3. The disk partition is damaged, restarting will not be able to enter, the system error message shows that there is no disk
    Disk partition table backup, deletion and recovery

Restore data

  1. Disconnect the power and restart, and quickly press the Esc key to select the disc mode
    disk partition table backup, delete and restore
  2. Select Troubleshooting
    disk partition table backup, deletion and recovery
  3. Select Rescue a CentOS system to enter rescue mode
    disk partition table backup, deletion and recovery
  4. Select 1 Continue, press Enter to select default Recognize SHELL
    disk partition table backup, deletion and recovery
  5. this When the host does not have a network address, so you need to configure the host with a network address
    disk partition table backup, deletion and recovery
  6. From the remote host, copy the backup file to the local
    disk partition table backup, delete and restore
  7. Use the dd command to restore the backup partition table data to /dev/sda and restart the system
    disk partition table backup , Delete and restore
  8. The system starts normally, and the /dev/sda data is successfully restored
    < img alt="Disk partition table backup, deletion and recovery" src="/wp-content/uploads/images/hardware/network-card/1626799164707.png" >

Leave a Comment

Your email address will not be published.