Software >> OS >> Unix >> Solaris >> How to verify existence of boot block

 

Verifying bootblk
# -------------------------------------------------------------------------------------

# TO check if our system disk has a valid boot block, read it from disk(s) and compare
# it to /usr/platform/platform_type/lib/fs/ufs/bootblk.

DISK=c0t0d0s0

dd if=/dev/rdsk/$DISK of=/tmp/bootblk.$DISK bs=1b iseek=1 count=15 conv=sync


# No differences are expected but if we have following output we may think that
# our disk contains a valid boot block

cmp /tmp/bootblk.$DISK /usr/platform/`uname -i`/lib/fs/ufs/bootblk

   cmp: EOF on /usr/platform/sun4u/lib/fs/ufs/bootblk

REFERENCES

[1] https://sites.google.com/site/syscookbook/solaris/solaris-boot-block-install-check