其中是分区标记,如C:D:E:F:存储在磁盘中 [英] where is the partition marker like C: D: E: F: stored in disk

查看:75
本文介绍了其中是分区标记,如C:D:E:F:存储在磁盘中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个支持不同文件系统的文件擦除应用程序。因此恢复软件无法恢复已删除的文件。首先,我想知道文件存储的分区''文件系统类型。我想在分区表或分区引导扇区中找到分区属性,但我找不到分区表或分区引导扇区中的分区标记。你能给我一些地址吗,谢谢你

I want to create a file wiping application that support different file system. so the deleted file cannot be recovered by recovery software. First of all, I want know the partition'' file system type that the file stored. I want to find the partition attribute in the partition table or partition boot sector, but I cannot find the partition marker in partition table or partition boot sector. Can you gave me some addvice, thank you

推荐答案

它没有存储在我认为你的意思的文件系统中。操作系统会跟踪它。如果您所描述的磁盘有4个分区,并且驱动器上有2个或3个Windows操作系统,则每个操作系统的实例都有自己的意见,其中包括C:,D:,E:和F :。



tl; dr:询问操作系统哪个。
It is not stored in the file system in the sense that I think you mean. The operating system keeps track of it. If you have a disk with 4 partitions as you describe, and have 2 or 3 Windows operating systems on the drive, each operating system ''instance'' will have its own opinion of which is C:, D:, E: and F:.

tl;dr: Ask the operating system which is which.


据我所知告诉传统的DOS样式Windows驱动器号,C:D:E:等不存储在磁盘上的任何位置。每个分区都有一个从适当的低级子系统分配的1开始的编号。在启动时,可能会根据以字母C:开头的分区号将字母分配给磁盘驱动器设备的分区。 A:和B:保留或分配给1或2个软驱。



我不知道但确定分区编号如何工作会很有趣在混合的IDE / SATA环境中,或者它如何与重叠的NTFS概念卷交互。当我插入一个新的磁盘设备(如USB大容量存储驱动器)时,在资源管理器中弹出''E:''的魔术代码实际上很难复制,我不相信微软已经完全复制了透露他们如何实现这一目标如果你能避免的话,我会避免尝试使用或驱动信件。



在NTFS上获得如此低级别的信息,因为它看起来像你''需要最好的方法可能是转到像GPartEd这样的Linux工具的源代码。 FAT应该是一个公共规范,所以也许你可以获得官方文档。

很多卷信息,如卷上的文件系统类型可以通过WMI检索但是有或者在丢失RAID和镜像数据这些信息方面是令人沮丧的漏洞,没有好删除文件的一个副本只是让系统恢复它为你。



PS如果您还没有Microsoft DDK(最好是最新的和原始的Win2K版本),那么您将需要它。存在低级磁盘相关常量和定义,这些常量和定义不是MSDN记录的或平台SDK中可用的,包括一些非常简单的用户级别的东西,如设备更改消息ID。
As far as I can tell the traditional DOS style Windows Drive letters, C: D: E: etc are not stored anywhere on the disk. Each partition has a number starting at 1 assigned by the appropriate low level subsystem. On boot drive letters are assigned to the partitions of disk drive devices based possibly on partition numbers beggining with the letter C:. A: and B: are reserved for or assigned to 1 or 2 floppy drives.

I don''t know but it would be interesting to determine how partition numbering works in a mixed IDE/SATA environment or how it interacts with the overlapping NTFS concept of Volumes. The ''magic'' code which makes ''E:'' pop up in Explorer when I insert a new disk device such as a USB mass storage drive is actually very difficult to replicate and I don''t believe Microsoft have ever fully disclosed how they achieve this. I would steer clear of trying to work with or from drive letters if you can avoid it.

To get such low level information on NTFS as it looks like you''ll need the best way may be to go to the source code for a Linux tool like GPartEd. FAT is supposed to be a public specification so perhaps you can get official docs on that.
A lot of Volume information like what sort of file system is on a Volume can be retrieved through WMI but there are or were frustrating holes in that information like missing RAID and mirroring data, no good deleting one copy of a file only to have system ''recover'' it for you.

P.S. If you don''t already have the Microsoft DDK (preferably latest and original Win2K version) then you will need it. There are low level disk related constants and definitions in there that are not MSDN documented or available in the platform SDK including some pretty simple user level things like device change message ids.


这篇关于其中是分区标记,如C:D:E:F:存储在磁盘中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆