From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Backup the partition table

Backup the partition table

From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Start my 1-month free trial

Backup the partition table

- [Instructor] After we've created our partitions, we may want to back up the partition table. On BIOS based systems, this would be the master boot record which we can back up using DD. If we're using a GPT based system, we can use DD or Gdisk to back up the partition table. To back up a BIOS based master boot record, we'll copy the first 512 bytes of the disc to a file. Let's use slash dev slash sdc as the drive because we created a standard NBR partition table on the strive using parted. In a terminal, type in sudo space dd space if=/dev/sdc, this is our input file, space of=/home/user1/sdc-mbr.bin, this is our output file, space bs=512, that's the block size, space count=1, that's one block of 512 bytes, and hit enter. If you wanted to back up a GPT partition table, we change the block size of 512 to 1,536. Now if we check our home directory, we'll see a file named sdc-mbr.bin. This is our master boot record backup. To restore it back to the drive, you just reverse the arguments to…

Contents