How to Take backup of MBR

Follow the steps to taking backup of MBR

# sfdisk -d /dev/sda > sda.out

 # cat sda.out
    # partition table of /dev/sda
unit: sectors

/dev/sda1 : start=       63, size=480134592, Id=83, bootable
/dev/sda2 : start=480134655, size=  8257410, Id=82
/dev/sda3 : start=        0, size=        0, Id= 0
/dev/sda4 : start=        0, size=        0, Id= 0

 To restore it

# sfdisk /dev/sda < sda.out

Or you can take the backup and restore grub using dd command.

Backup
# dd if=/dev/sda of=grub.bkp bs=512 count=1

Restore
# dd if=grub.bkp of=/dev/sda bs=512 count=1




 

Terima kasih telah membaca artikel tentang How to Take backup of MBR di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.

Artikel terbaru :