linux读取硬盘指定扇区
摘要:主要参考:http://www.linuxforum.net/forum/showflat.php?Cat=&Board=linuxK&Number=288776&fpart=allhttp://www.linuxforum.net/forum/showflat.php?Cat=&Board=linuxK&Number=69203&page=&view=&sb=&o=&vc=1我暂时改成了我需要的(这还不是我的最终需求): 1 /* by hugang at 6/8 9:40 */ 2 /* mod by jeva
阅读全文
posted @
2012-08-31 12:00
J.evan
阅读(1297)
推荐(0)
主引导记录(MBR)分析
摘要:主引导记录(Master Boot Record,缩写:MBR),又叫做主引导扇区,是计算机开机后访问硬盘时所必须要读取的首个扇区,它在硬盘上的三维地址为(柱面,磁头,扇区)=(0,0,1)。详情:http://zh.wikipedia.org/wiki/%E4%B8%BB%E5%BC%95%E5%AF%BC%E8%AE%B0%E5%BD%95首先使用shell如何查看MBR信息:1 #使用dd导出MBR到mbr.bin文件2 dd if=/dev/sda of=mbr.bin bs=512 count=1 3 #使用dd导出MBR并且使用xxd显示4 dd if=/dev/sda bs=51
阅读全文
posted @
2012-08-29 14:03
J.evan
阅读(1229)
推荐(0)
c通过system取得分区信息
摘要:1#include<fcntl.h>2#include<stdlib.h>3#include<errno.h>4#include<sys/stat.h>5#include<sys/types.h>6#include<string.h>7#include<unistd.h>8#include<stdio.h>9#include<assert.h>1011//level:12//0:majorprint,callpath13//1:moredetailedprint14//2:mostdet
阅读全文
posted @
2012-08-24 17:06
J.evan
阅读(283)
推荐(0)