dd to backup mbr, you should care not to rewrite the Partion table

原创 2011年01月23日 14:03:00

Sorry for writen in English, my Chinese input method is down
usually we use dd to backup MBR, but few people knows that you may destroy your Partion table if not used correctly. So I'd write this to notify you.

MBR Total size
446 + 64 + 2 = 512 byte
446 bytes is Bootstrap, this is what we manly backup
64 bytes is Partion table
2 bytes is Signature

if you restore the MBR to a different disk, like backup sda, but restore to sdb, then the 64 + 2 shouldn't be used

So we come up with these commonds:
backup:
# dd if=/dev/sda of=mbrsda.bak bs=512 count=1
restore all, including Partion table
# dd if=mbrsda.bak of=/dev/sdb bs=512 count=1
only for Bootstrap, Partion table is not destroyed
# dd if=mbrsda.bak of=/dev/sdb bs=446 count=1

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

apache rewrite 重写后出现 出现404 not found及You don't have permission to access 以及No input file specified

本文实例讲述了 【解决一】设置apache伪静态出现404 not found及You don't have permission to access / on this server解决方法。 ...

Error message when you try to save a table in SQL Server 2008: "Saving changes is not permitted"

SYMPTOMS When you use Data Definition Language (DDL) to modify a table, and then you try to save th...

【TED】How to get better at the things you care about?

0:11 Most of us go through life trying to do our best at whatever we do, whether it’s our job, fami...

C++11的变化-The Biggest Changes in C++11 (and Why You Should Care)

摘自:http://www.softwarequalityconnection.com/2011/06/the-biggest-changes-in-c11-and-why-you-should-ca...

The Biggest Changes in C++11 (and Why You Should Care)

It’s been 13 years since the first iteration of the C++ language. Danny Kalev, a former member of th...

can't get git rev, you should add git to system path or just input test value, such as 'testTinkerId

can’t get git rev, you should add git to system path or just input test value, such as ‘testTinkerId...

What 10 things should you do every day to improve your life?

1) Get out in nature: You probably seriously underestimate how important this is. (Actually, ther...

The Biggest Changes in C++11 (and Why You Should Care)

From:http://www.softwarequalityconnection.com/2011/06/the-biggest-changes-in-c11-and-why-you-should-...

The Biggest Changes in C++11 (and Why You Should Care)

Posted by Danny Kalev on Mon, Jun 20, 2011 @ 06:03 AM It’s been 13 years since the first ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)