Backup and Restore PC’s bootsector

Here I will explain how we will be backup and restore the boot sector of a PC.

In this exampe I will consider my hardisk is /dev/hda.

backing up existing bootsector in /dev/hda hardrive use the following command

dd if=/dev/hda of=bootsec.bin bs=512 count=1

Now to restore the bootsectore to the hardisk use the following commad.

dd if=bootsec.bin of=/dev/hda bs=512 count=1

Warning: The above command may corrupt your system boot sector which will put you system in non bootable state.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s