查看磁盘第一个扇区的信息
1. 使用dd命令
[root@host-172-16-2-221 test]# dd if=/dev/vda of=part.dump bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000240905 s, 2.1 MB/s
[root@host-172-16-2-221 test]# vi part.dump
vim中把文件转换为16进制来显示:
:%!xxd
返回正常显示:
:%!xxd -r
2. 使用c语言输出
#include <stdio.h>
void print(char c){
int m = c;
int high = 0x000000f0, low = 0x0000000f;
high &