i just wanted to check if a machines boot-block is corrupted.
i came up with checking the "pre-defined" block at /usr/platform/..../bootblk against the installed. the following procedure works on veritas volumes as well as metadevices and raw-slices. you just have to remember the 1 offset (iseek=1) on the "real" disks:
# dd if=/usr/platform/SUNW,Sun-Fire-15000/lib/fs/ufs/bootblk ibs=1b count=1 | od -c | head -3
1+0 records in
1+0 records out
0000000 375 003 J 331 \0 \0 027 0 314 022 \t / p a c k
0000020 a g e s 002 004 4 024 \0 034 022 024 C a n '
0000040 t f i n d / p a c k a g e s
# dd if=/dev/md/rdsk/d0 ibs=1b iseek=1 count=1 | od -c | head -3
1+0 records in
1+0 records out
0000000 375 003 J 331 \0 \0 027 0 314 022 \t / p a c k
0000020 a g e s 002 004 4 024 \0 034 022 024 C a n '
0000040 t f i n d / p a c k a g e s
# dd if=/dev/rdsk/c1t1d0s0 ibs=1b iseek=1 count=1 | od -c | head -3
1+0 records in
1+0 records out
0000000 375 003 J 331 \0 \0 027 0 314 022 \t / p a c k
0000020 a g e s 002 004 4 024 \0 034 022 024 C a n '
0000040 t f i n d / p a c k a g e s
if there's no difference at all, the boot-block should be ok.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment