The answer to your IT questions
 

Advanced search  • Search tips
My QUESTIONS & ANSWERS
 Question:

Compare boot sectors MBR of two disks in raid1

User Asked by: james73
Published on: 09:42/13.01.2009
Status: OPEN
I have 2 disks in software raid1 on linux (/dev/sda and /dev/sdb) and the second one is hot added and recovered. Is there a way to see if the system is able to boot from second disk? Can I compare the MBR (master boot records) of two hard drives?
 Answers: 1
Sort by: /\ date | rating
Image Answer by: xpert
Posted on: 08:42/13.01.2009
Rating: 3 from possible 5 with 2 votes
You can extract first 512 bytes from each hard drive and compare them.

This two lines

dd if=/dev/sda of=/tmp/bootsectorSDA.txt bs=512 count=1

dd if=/dev/sdb of=/tmp/bootsectorSDB.txt bs=512 count=1


will produce two files /tmp/bootsectorSDA.txt and /tmp/bootsectorSDB.txt - you can compare them. If they are different then probably you don't have MBR on second hard drive.
Vote:

Please vote! Your opinion matters!
If you haven't found what you've looking for, post a question
  
| Home | Hall of fame | Register | Log in | Terms of service | Help | Contacts |