使命召唤109安装出现Fastfile for zone 'code_pre_gfx' is corrupt or unreadable是啥情况?求帮助

403 Forbidden vs 401 Unauthorized HTTP responses - Stack Overflow
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
For a web page that exists, but for which a user that does not have sufficient privileges, (they are not logged in or do not belong to the proper user group), what is the proper HTTP response to serve? 401? 403? Something else? What I've read on each so far isn't very clear on the difference between the two. What use cases are appropriate for each response?
18.7k1783132
A clear explanation from :
There's a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization.
Receiving a 401 response is the server telling you, “you aren’t
authenticated–either not authenticated at all or authenticated
incorrectly–but please reauthenticate and try again.” To help you out,
it will always include a WWW-Authenticate header that describes how
to authenticate.
This is a response generally returned by your web server, not your web
application.
It’s also some the server is asking you to try
So, for authorization I use the 403 Forbidden response. It’s
permanent, it’s tied to my application logic, and it’s a more concrete
response than a 401.
Receiving a 403 response is the server telling you, “I’m sorry. I know
who you are–I believe who you say you are–but you just don’t have
permission to access this resource. Maybe if you ask the system
administrator nicely, you’ll get permission. But please don’t bother
me again until your predicament changes.”
In summary, a 401 Unauthorized response should be used for missing
or bad authentication, and a 403 Forbidden response should be used
afterwards, when the user is authenticated but isn’t authorized to
perform the requested operation on the given resource.
of how http status codes should be used.
28.7k135084
401 Unauthorized:
If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials.
403 Forbidden:
The server understood the request, but is refusing to fulfill it.
From your use case, it appears that the user is not authenticated. I would return 401.
is obsolete, see
377k60677859
Something the other answers are missing is that it must be understood that Authentication and Authorization in the context of RFC 2616 refers ONLY to the HTTP Authentication protocol of RFC 2617. Authentication by schemes outside of RFC2617 are not supported in HTTP status codes and are not considered when deciding whether to use 401 or 403..
Brief and Terse
Unauthorized indicates that the client is not RFC2617 authenticated and the server is initiating the authentication process. Forbidden indicates either that the client is RFC2617 authenticated and does not have authorization or that the server does not support RFC2617 for the requested resource.
Meaning if you have your own roll-your-own login process and never use HTTP Authentication, 403 is always the proper response and 401 should never be used.
Detailed and In-Depth
From RFC2616
10.4.2 401 Unauthorized
The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8).
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.
The first thing to keep in mind is that "Authentication" and "Authorization" in the context of this document refer specifically to the HTTP Authentication protocols from RFC 2617. They do not refer to any roll-your-own authentication protocols you may have created using login pages, etc. I will use "login" to refer to authentication and authorization by methods other than RFC2617
So the real difference is not what the problem is or even if there is a solution. The difference is what the server expects the client to do next.
401 indicates that the resource can not be provided, but the server is REQUESTING that the client log in through HTTP Authentication and has sent reply headers to initiate the process. Possibly there are authorizations that will permit access to the resource, possibly there are not, but lets give it a try and see what happens.
403 indicates that the resource can not be provided and there is, for the current user, no way to solve this through RFC2617 and no point in trying. This may be because it is known that no level of authentication is sufficient (for instance because of an IP blacklist), but it may be because the user is already authenticated and does not have authority. The RFC2617 model is one-user, one-credentials so the case where the user may have a second set of credentials that could be authorized may be ignored. It neither suggests nor implies that some sort of login page or other non-RFC2617 authentication protocol may or may not help - that is outside the RFC2616 standards and definition.
is obsolete, see
According to
(HTTP/1.1) 403 is sent when:
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead
In other words, if the client CAN get access to the resource by authenticating, 401 should be sent.
If authenticating as another user would grant access to the requested resource, then 401 Unauthorized should be returned. 403 Forbidden is mostly used when access to the resource is forbidden to everyone or restricted to a given network or allowed only over SSL, whatever as long as it is no related to authentication.
From RFC 7235 (Hypertext Transfer Protocol (HTTP/1.1): Authentication):
3.1. 401 Unauthorized
The 401 (Unauthorized) status code indicates that the request has
been applied because it lacks valid authentication credentials
the target resource.
The origin server MUST send a
WWW-Authenticate
header field (Section 4.4) containing at least one
applicable to the target resource.
If the request
authentication credentials, then the 401 response
indicates that
authorization has been refused for those
credentials.
The client MAY
repeat the request with a new or
replaced Authorization header field
(Section 4.1).
If the 401
response contains the same challenge as
the prior response, and the
user agent has already attempted
authentication at least once, then
the user agent SHOULD present the
enclosed representation to the
user, since it usually contains
relevant diagnostic information.
And this is from RFC 2616:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated.
If the request method was not HEAD and the server wishes to make
public why the request has not been fulfilled, it SHOULD describe the
reason for the refusal in the entity.
If the server does not wish to
make this information available to the client, the status code 404
(Not Found) can be used instead.
Edit: RFC 7231 (Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content) changes the meaning of 403:
6.5.3. 403 Forbidden
The 403 (Forbidden) status code indicates that the server
understood
the request but refuses to authorize it.
A server that
make public why the request has been forbidden can
describe that
reason in the response payload (if any).
If authentication credentials were provided in the request, the
server considers them insufficient to grant access.
The client
SHOULD NOT automatically repeat the request with the same
credentials.
The client MAY repeat the request with new or different
credentials.
However, a request might be forbidden for reasons
unrelated to the credentials.
An origin server that wishes to "hide" the current existence of a
forbidden target resource MAY instead respond with a status code of
404 (Not Found).
Thus, a 403 might now mean about anything. Providing new credentials might help... or it might not.
TL;DR version
Checks are usually done in this order:
401 if not logged-in or session expired
404 if resource not existing (maybe expensive to check, db, ...)
403 if user does not have permission to access resource
UNAUTHORIZED: Status code (401) indicating that the request requires authentication. User/agent unknown by the server. Can repeat with other credentials. NOTE: This is confusing as this should have been named 'unauthenticated'.
FORBIDDEN: Status code (403) indicating the server understood the request but refused to fulfill it. User/agent known by the server but has insufficient credentials. Repeating request will not work.
NOT FOUND: Status code (404) indicating that the requested resource is not available. User/agent known but server will not reveal anything about the resource, does as if it does not exist. Repeating will not work. This is a special use of 404 (github does it for example).
6,61914441
This is an older question, but one option that was never really brought up was to return a 404. From a security perspective, the highest voted answer suffers from a potential . Say, for instance, that the secure web page in question is a system admin page, or perhaps more commonly, is a record in a system that the user doesn't have access to. Ideally you wouldn't want a malicious user to even know that there's a page / record there, let alone that they don't have access. When I'm building something like this, I'll try to record unauthenticate / unauthorized requests in an internal log, but return a 404.
OWASP has some
about how an attacker could use this type of information as part of an attack.
This question was asked some time ago, but people's thinking moves on.
in this draft (authored by Fielding and Reschke) gives status code 403 a slightly different meaning to the one documented in .
It reflects what happens in authentication & authorization schemes employed by a number of popular web-servers and frameworks.
I've emphasized the bit I think is most salient.
403 Forbidden
The 403 (Forbidden) status code indicates that the server understood
the request but refuses to authorize it.
A server that wishes to
make public why the request has been forbidden can describe that
reason in the response payload (if any).
If authentication credentials were provided in the request, the server considers them insufficient to grant access.
The client SHOULD NOT repeat the request with the same credentials.
The client MAY repeat the request with new or different credentials.
However, a request might be forbidden for reasons unrelated to the credentials.
An origin server that wishes to "hide" the current existence of a forbidden target resource MAY instead respond with a status code of 404 (Not Found).
Whatever convention you use, the important thing is to provide uniformity across your site / API.
they are not logged in or do not belong to the proper user group
You have stated each case should have a different response:
If they are not logged in at all you should return 401 Unauthorized
If they are logged in but don't belong to the proper user group, you should return 403 Forbidden
8,30055072
Practical Examples
If apache requires authentication (via .htaccess), and you hit Cancel, it will respond with a 401 Authorization Required
If nginx finds a file, but has no access rights (user/group) to read/access it, it will respond with 403 Forbidden
RFC (2616 Section 10)
401 Unauthorized (10.4.2)
Meaning 1: Need to authenticate
The request requires user authentication. ...
Meaning 2: Authentication insufficient
... If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. ...
403 Forbidden (10.4.4)
Meaning: Unrelated to authentication
... Authorization will not help ...
More details:
The server understood the request, but is refusing to fulfill it.
It SHOULD describe the reason for the refusal in the entity
The status code 404 (Not Found) can be used instead
(If the server wants to keep this information from client)
401: Every refusal that has to do with authentication
403: Every refusal that has NOTHING to do with authentication
8,90643440
This is simpler in my head than anywhere here, so:
401: You need HTTP basic auth to see this.
403: You can't see this, and HTTP basic auth won't help.
If the user just needs to log in using you site's standard HTML login form, 401 would not be appropriate because it is specific to HTTP basic auth.
I don't recommend using 403 to deny access to things like /includes, because as far as the web is concerned, those resources don't exist at all and should therefore 404.
This leaves 403 as "you need to be logged in".
In other words, 403 means "this resource requires some form of auth other than HTTP basic auth".
In the case of 401 vs 403, this has been answered many times. This is essentially a 'HTTP request environment' debate, not an 'application' debate.
There seems to be a question on the roll-your-own-login issue (application).
In this case, simply not being logged in is not sufficient to send a 401 or a 403, unless you use HTTP Auth vs a login page (not tied to setting HTTP Auth). It sounds like you may be looking for a "201 Created", with a roll-your-own-login screen present (instead of the requested resource) for the application-level access to a file. This says:
"I heard you, it's here, but try this instead (you are not allowed to see it)"
protected by
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10
on this site (the ).
Would you like to answer one of these
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabledFAT32 Hard Disk & Backup, Repair and Data Recovery - Free &
Resize: 800x600800x700
& Routines to Backup & Restore -
1. Track 0
: MBR sector (incl. Partition Table), MBR Backup sector
2. Primary Partition
: Boot sector, FS Info sector, FAT, Root Directory Table
3. Extended Partition : Extended-MBR sector (E-MBR)
4. Logical Partitions : Boot sector, FS Info sector, FAT, Root Directory Table
This set of Backup and Data Recovery routines is for a FAT32 hard disk only
~ It requires some knowledge of DOS, the MS-DOS disk operating system ~
You must be booted to real DOS mode to use the repair a
they will NOT work in a DOS box within Windows. They work on a Windows ME
system booted using a Windows ME Emergency Boot D or on a Windows 98
system, booted from a Windows 98 Boot D or on the 2nd edition of Windows 95
(Windows 95 OSR2) if it does NOT use FAT16, booted from a Win95 OSR2 Boot Disk.
You can download the appropriate MS-DOS Boot Disk here or here
A batch file containing the routines below can be downloaded from this link
& Disk Repair and Data Recovery -
The fact that the computer can't load Windows, or perhaps can't even recognise
the hard disk, does NOT mean the disk is unrecoverable!
There are many reasons why a disk might not be recognised, or is recognised
but can't load Windows. Most of them can be put right in DOS, loaded from
the floppy drive, using the instructions below. (NB: A brief DOS Tutorial)
& System -
In order to carry out disk repairs or data recovery using the software mentioned
below, you will need to have access to that sof the following
routines therefore assume you have a working second hard disk or a USB pen drive.
These backup and recovery routines were designed around a system with two hard disks
on the Primary IDE cable: the Primary Master had 2 partitions (Drive C and Drive E);
and the Primary Slave had 1 partition (Drive D); CD-ROM on the Secondary IDE
and a USB pen drive disk (Drive F), containing the rescue utilities, on a USB port.
The routines make very extensive use of the USB pen drive as Drive F, because
for serious disk repair or data rescue a 1.44MB floppy disk is much too small. I
use a ByteStor 8 GB USB 1.1 pen drive: the software only occupies 300 MB of disk
space, leaving more than 7 GB of free space for files rescued from the hard disks.
The routines can be easily modified to cater for a system in which the rescue tools,
and the free space to store rescued files in, are at a location other than Drive F.
The customised
is configured to provide an option,
when booting the system in DOS, to load DOS drivers for a USB 1.1 drive, thereby
providing access to a USB pen drive disk (a.k.a. USB memory stick) under DOS.
All the software referred to on this page can be found on-line, through the links
section, below.
These rescue routines were designed, originally, for use with Windows ME; and the
customised AUTOEXEC.BAT and CONFIG.SYS files can only be used with a Windows ME
Emergency Boot Disk. If you're using Win98/98SE (or Win95 OSR2 with FAT32) you'll
need to modfify a standard boot disk for that Operating System, particularly the
AUTOEXEC.BAT and CONFIG.SYS files on it, if you wish to access USB devices in DOS.
--------------------------------------------------------------------------------
DISCLAIMER:
You use this information entirely at your own risk. There shall be no duty of
care owed by me, and I hereby disclaim all liability. Also, there shall be no
implied term, condition or warranty of merchantability, nor of fitness for any
particular purpose. No representation or warranty is made as to the accuracy of
the information, nor is any such intended, and none shall be implied. I shall
not be liable for any loss or damage whatever, however arising: including, but
not limited to, damage to your equipment, loss of data, or financial loss,
either direct or indirect, whether or not caused by errors in the information.
This information is solely a result of my personal experiences in maintaining
my own home computers, running either DOS, Windows 95, 98SE or ME. I've never
owned a Windows NT, XP, Vista or 7 computer: their FAT32 structure may differ.
If you are not an experienced MS-DOS computer user, do not use this information.
You must pay for
Subject to the foregoing, the provisions at www.jimmyclitheroe.co.uk/legal.htm
apply, and any dispute shall be governed exclusively by the laws of England.
If you do not agree the terms herein contained or referred to, you may not use
this page or any information provided by it or accessed through it.
--------------------------------------------------------------------------------
& & & & & & & & &
& & & & & & & & &
& & & & & & &FAT32 HARD DISK
Section A :
Section B :
Section C :
Section D :
Section E :
Section F :
Section G :
Tip of the Day:
"The definition of insanity is doing the same thing over and over
and expecting different results" - Benjamin Franklin
"Data you don't have a backup of is data you don't want to keep"
_______________________
ABOUT THIS PAGE
_______________________
This page contains detailed instructions on how to backup and restore the key
sectors of a FAT32 hard disk (for any size of disk from ~32 MB to 127.53 GB).
Included are instructions on how to use those backups to recover from a disk
crash, and on how to recover from a disk crash even if you do not have those
backups (a rather more difficult problem).
A great deal of information about the data structure of a FAT32 hard disk is
included, in an attempt to provide an all-purpose DIY solution to disk repair
and data recovery for such a disk.
In terms of disk repair, this page tackles: (a) repairing the data structure of
a FAT32 disk which has suffered only data corruption (due to data being written
to the system area, overwriting the MBR, Boot Sector or FAT); and (b) repairing
a disk which has been physically damaged, including repairing bad sectors.
In terms of data recovery, this page explains how to safely copy files from a
crashed FAT32 hard disk to a new disk: how to install the new disk, and how to
safely copy the files to it (by cloning the old disk, to create an identical
bit-for- or by copying just the files, either one-by-one or en mass).
Instructions are also included on recovering from common file system errors,
such as the "Blue Screen Of Death". Many other error messages generated by
the Windows 98/ME operating systems are also tackled.
Each section of this page includes recommendations on which software to use,
and details of how to use it most effectively. These are mostly DOS programs,
to enable you to carry out the work even where Windows can't load.
Included at the bottom of the page are download links to enable you to obtain
on-line the software referred to.
Back-up all of your data before running any of that software (except in so far
as you need to run the software in order to do that backup).
Note: This page can ONLY help in resolving a fault on a FAT32
and ONLY if the disk uses
05, 0B, 0C and 0F only,
and if, but only if, the disk also matches all the requirements detailed below.
& The Batch File
A batch file is a plain text file with a filename that ends in .BAT
which, in its simplest form, contains a series of commands that could be
typed at the command prompt (i.e. the DOS prompt). The batch file stores
them, then runs them when you type its filename at the command prompt.
To write a batch file, you simply figure out what
you would type
at a DOS prompt to achieve your desired result, then type them, one per line,
in a text file - and rename it with the .BAT extension.
You do not need to be an expert on MS-DOS batch files to use the batch file.
You only need to know a little about them: for example, that if you execute
(i.e. run) a batch file it won't execute any line which begins with "rem"
or with a double colon "::" as those are used to disable ("comment out") a line.
That file contains many so it's best to make a copy of it,
and delete the sections that aren't applicable to your particular problem.
The file is self-explanatory and fully annotated. It contains all the information
on this page, for reference under MS-DOS (where your HTML browser can't be run).
View the contents of the batch file by using this command: SHOW RECOVERY.BAT
(to do so, the file
must be in your DOS path).
*** View the Batch file in DOS ***
SHOW RECOVERY.BAT
Here&s Wikipedia's
for quick reference. Windows 98 & 98SE
run on MS-DOS version 7, and Windows ME runs on MS-DOS version 8. See also Google.
& Crash-course on Disk Structure
This page gives a crash-course (no pun intended!) on how to survive a disk crash.
Read this page through completely, before taking any steps. Then read it AGAIN!!!
Make sure you understand what has gone wrong before attempting any recovery action!
NB: At the very least, read
completely (which explains Disk Structures),
and then read it AGAIN, before attempting any action.
You will need a basic understanding of the structure of a FAT32 disk. You may have
one which has only a single partition (e.g. Drive C:), or you may have one which
has more than one partition (e.g. Drive C: and Drive D:). This page tries to provide
the necessary basic understanding, but you will find it helpful to also read up on
the subject through Google (e.g. search for information on both FAT32 and MBR).
A disk is divided into sectors (millions of them). Each sector is usually 512 bytes
long. Two sectors thus total 1024 bytes, or 1 KB (kilobyte). Depending on the size
of the disk, usually either 32 sectors or 64 sectors make 1 cluster. The disk stores
information (files) in a cluster: so a file might only be 1 byte of information, but
will still be alloted 1 cluster all to itself (even though a cluster is typically
64 sectors, i.e. 64 x 512 bytes = 32,768 bytes). So a cluster can contain a vast amount
of empty space, in addition to your file's data. A file is alloted as many clusters as
which clusters contain the file is recorded in the File Allocation Table (FAT).
A disk can contain more than one Partition. Each Partition begins with a Partition
Table sector (e.g. the MBR, or Master Boot Record, the first sector on the disk);
this is typically followed 63 sectors later by the Boot Sector, which is typically
followed 32 sectors later by the first sector of the FAT (File Allocation Table). The
FAT might be 20,000 sectors (or longer), depending on the partition's size. A second
copy (i.e. a backup copy) of the FAT typically follows immediately after the first FAT.
The Root Directory table then typically follows immediately after the second copy of
the FAT. The rest of the Partition contains your files.
This page provides routines for making a backup copy of all of these vital data
structures: MBR, Boot Sector, FAT, and Root Directory table. It also explains how to
reconstruct them if you don't have a backup copy of them. And it tells you where to
find the tools to use to automate as much as possible of the recovery process if you
don't have the necessary backup copies of those key sectors.
The most useful tool for gaining a practical working understanding of disk structure
is probably Norton's
(DISKEDIT.EXE). The 2001 and 2002 versions (or later)
are needed for a FAT32 disk (because earlier versions either don't work at all for
FAT32, or only work if the disk is smaller than 8 GB). Norton DiskEdit includes tools
which will find for you the starting sector of the various data structures: such as
the Partition Table, Boot Sector, and each FAT.
CLONE the disk (carefully following the instructions ), as your first step:
before taking any recovery action! And carry out all recovery steps on the
clone disk (not on the damaged original), so that if things go wrong the original
is preserved and you can try again.
& What This Page Is Not
This page is NOT a guide to maintaining or repairing a FAT32 file system under
any version of Windows NT (including Windows XP, Vista or 7). Those NT variants
have built-in restrictions against using FAT32, designed to force the user into
using the NTFS file system instead. This page does not try to deal with the
differences arising out of the attempt to block the use of FAT32 on NT variants.
NB: For a complete description of the NTFS file system, go to
FAT32 partitions created by NT variants are NOT compatible with real FAT32
partitions (i.e. those created by 32-bit DOS or by 32-bit Windows 98/98SE/ME).
Do NOT use any information on this page in connection with a FAT32 partition
created by an NT variant. The so-called FAT32 structures on such a partition
will NOT match those on this page!
Furthermore, all of the software mentioned on this page is designed for use in
a computer with an x86 architecture running MS-DOS, Windows 98SE or Windows ME;
hence is unsuitable for use on the non-x86 Windows NT architecture, in critical
condition after a disk crash, in a DOS environment without Windows support.
FAT32 on Windows XP
Windows XP is crippled to prevent it creating a FAT32 partition larger than 32GB.
If a partition is larger than 32GB, it can't have been created by XP.
NB: If the partition size exceeds 32GB, Windows XP's Windows Disk Management
tool will NOT offer FAT32 as an option when formatting a partition.
If you must have a FAT32 partition, but have no safe means of creating one,
Windows XP can format a partition of 32GB or smaller as FAT32 if you type
the following command at the DOS Prompt (a.k.a. "Command Prompt") -
FORMAT X: /FS:FAT32
(where X is the drive letter)
NB: To open a DOS Prompt click on the START button, click on 'Run...',
then type CMD in the 'Open:' box which appears, then click on 'OK'
That procedure runs the program C:\Windows\System32\CMD.exe
Some online self-help forums recommend the following command instead, but
in my opinion this will format a partition as FAT16 -
FORMAT X: /FS:FAT
(where X is the drive letter)
NB: Using a FAT16 command may cause partitioning to fail if partition
size exceeds the FAT16 design limit of 65,526 clusters (about 2 GB)
According to Microsoft, it is unsafe to format as FAT16 or FAT32 a partition
which exceeds the design limits of the FAT filesystem -
& FAT16 restricts the number of clusters to no more than 65,526
& FAT32 restricts the number of clusters to between 65,527 and 4,177,917
See below for full details of the maximum safe size of a FAT16 and a FAT32
partition. In brief, FAT16 partitions must not exceed about 2 GB and FAT32
partitions must not exceed about 126 GB. Those are built-in design limits.
NB: Partitioning may fail if you exceed those limits.
Further information:
& MKDOSFS : Make DOS File Sytem
Jens-Uwe Mager has ported the Linux mkdosfs tool to Windows. It enables you
to create a FAT32 partition exceeding 32GB from the Windows NT command line.
It cannot be used to format a partition on which Windows NT / XP / Vista / 7
will be installed, as those operating systems MUST run on an NTFS partition.
To format drive X you type:
mkdosfs -v -F 32 -n volname X:
1. The option -v (verbose) displays extra on-screen details
2. The option -F 32 specifies FAT32 (it uses FAT16 by default)
3. Use the option -n volname to specify the volume name / label
4. The size of the partition is read from the disk's Partition Table
For the Help screen, type mkdosfs (i.e. without any options).
& It uses unusual cluster sizes, typically 4 KB Clusters
& CHKDSK.EXE may fail, reporting 'Unable to test a RAW filesystem'
Download mkdosfs (Windows NT version):
Further information:
& SwissKnife
SwissKnife allows the creation of FAT32 partitions larger than 32GB in WinXP.
SwissKnife can't resize, move or delete a partition. Nor can it create a new
partition on a system's boot disk. It can, however, create FAT32 partitions
on, for example, an external disk (e.g. a disk attached to a USB port).
You might have to create the partition as NTFS (with any partitioning tool),
then use SwissKnife to convert that partition to FAT32. Some users have said
this is sometimes the only way to successfully use the program.
In partitioning an external disk, you must disconnect and reconnect the disk
afterwards to see the changes, or the partitioning may appear to have failed.
WARNING: It is ESSENTIAL to read the instructions and the help pages provided,
because SwissKnife is less straightforward than it at first appears.
Download SwissKnife here: Download
NB: Users say that although it functions successfully on a Windows XP system,
it reportedly does NOT work under Windows Vista or Windows 7. Some users
have even said it doesn't work under Windows XP Service Pack 3, although
some do report using it successfully with that Service Pack installed.
Others report that it DOES run in Windows Vista, if you set the program to
"WINDOWS XP MODE" (right-click the program's .EXE file, click 'Properties',
click 'Compatibility' tab, select 'Windows XP Service Pack 2', click 'OK').
& EaseUS Partition Master v9.1.1
Partition Master is a partition manager:
¤ Create and delete partitions
¤ Resize partitions, e.g. extend NTFS system partition
¤ Merge adjacent partitions into one without data loss
¤ Wipe data in unallocated space
¤ Wipe disk or wipe partition, to permanently erase sensitive data
¤ Convert FAT file system to NTFS
¤ Convert a dynamic disk to a basic disk
¤ Convert Primary partition to Logical partition or vice versa
¤ Speed up computer by defragmentation
¤ Disk surface test to check for bad sectors
¤ Rebuild MBR to repair ability to boot system
Program supports:
& Hardware RAID, multiple removable storage devices, MBR disks,
and GPT disks
& Partition sizes up to 2 TerraBytes (4 TerraBytes on GPT disks)
O/S: Windows 2000 / XP / Vista / Win7 SP1 / Win8 (32 bit & 64 bit)
Download Partition Master here: Download
& Other Partitioning Software
The following programs are reportedly capable of creating a FAT32 partition
exceeding 32 GB on a system running Windows XP (all these are freeware):
& FAT32 Format v1.01 for WinXP / Vista (a.k.a. guiformat.exe): Download
& TOKIWA's Fat32Formatter v1.1 for WinXP / Vista / 7: Download
& 2Tware's Fat32Format: Download
*** Set Path ***
Set DOSpath=%path%
SET PATH=%path%;F:\
*** Disk Cache for MS-DOS Mode ***
** To make the routines run faster **
C:\WINDOWS\SMARTDRV.EXE 8192 16>nul
** Alternative file location **
F:\SMARTDRV.EXE 8192 16>nul
____________________________
SECTION A: DISK STRUCTURES
____________________________
DISK STRUCTURES OUTLINED
========================
(Includes a note about
and USB Flash Disks)
FAT32 FILE SYSTEM
=================
The FAT32 file system is a method for storing files on a computer's
hard disk, using magnetic storage. A disk may contain only a single
partition, or can be sub-divided into two or more.
A partition larger than 8GB must use the FAT32 file system, or it
will not have enough addresses for file stor
and a partition smaller than that may use it.
NB: A partition smaller than 8GB that is formatted for the FAT system
will normally be using the FAT16 file system (often termed "FAT").
Such a disk can NOT be backed-up or repaired using the procedures
or tools de data loss is certain if you do so.
FAT32 uses 32 bits for each entry in the File Allocation Table
(i.e. 4 bytes, as there are 8 bits in a byte: 4 x 8 = 32), so
providing more addresses than FAT16 (which uses only 16 bits).
NB: In some disk utility programs, FAT32 is called "BigFAT"
and FAT16 is called "FAT".
NB: The notes on this page are for the FAT32 file system only,
on a computer running only Windows ME or Windows 98/98SE.
Those Windows versions cannot access an NTFS partition.
Note: Install the SysInternals program "NTFS for Windows 98"
to read an NTFS partition in Windows 98/98SE/ME : NTFS98RO.EXE
Note: Install the program "NTFS4DOS" to read an NTFS partition
NB: This page does NOT describe a system that dual-boots
(shares a partition with more than one Operating System),
nor does it describe a disk that is larger than 127.53GB
(but it does contain procedures for cloning such a disk).
CHS ADDRESSING
==============
CHS = Cylinder : Head : Sector
Each sector (consisting of 512 bytes) has a CHS address.
A FAT32 disk starts at Cylinder 0, Head 0, Sector 1
(CHS 0-0-1), and is typically structured as follows -
There are normally 63 sectors per head
(counted from 1 to 63)
There are normally 255 heads per cylinder
(counted from 0 to 254)
Cylinder :
The maximum number of Cylinders is 1024
(counted from 0 to 1023; i.e. 1023 is
the largest value in a Partition Table)
NB: The maximum number will be less than
1023 if the disk is smaller than 8GB
NB: If the disk is larger than 8GB, the
number 1024 is used: meaning use LBA
values (sectors only) instead of CHS
Where the disk is larger than 8GB, Logical Block Addressing
(LBA) is used for all critical disk functions instead of CHS,
but some key disk structures nonetheless contain CHS values.
NB: The largest possible CHS address is the 1,024th Cylinder
(and this is commonly known as the 1024 Cylinder limit).
If the BIOS supports a hard disk larger than 8GB, set it
to LBA (Logical Block Addressing) or an error may occur
(e.g. "The 1024 cylinder limitation has been exceeded").
NB: See also
Technical Note:
CHS addressing uses 10 bits for the Cylinder number (thus
a maximum of 1,024 cylinders), 8 bits for the Head number
(thus a maximum of 256), and 6 bits for the Sector number
(thus a maximum of 64) -
2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 1,024
2 x 2 x 2 x 2 x 2 x 2 x 2 x 2
2 x 2 x 2 x 2 x 2 x 2
However, the largest values hard disks traditionally use are
1,024 Cylinders, 255 Heads per Cylinder, 63 Sectors per Head.
NB: For Heads per Cylinder, the largest value possible is 255
(not 256, the theoretical maximum), as 255 is the largest
decimal number that a 2-byte hex value can store (FF hex).
For Sectors per Head, the largest value possible is 63
(not 64, the theoretical maximum), as 0
i.e. the values used are 1 to 63, not 0 to 63.
Multiplying these values together, at 512 bytes per sector,
gives a maximum disk size of 8,422,686,720 bytes:
1,024 x 255 x 63 = 16,450,560 x 512 = 8,422,686,720
NB: 8,422,686,720 bytes ÷ 1,000,000,000 = 8.42 GB
8,422,686,720 bytes ÷ 1,073,741,824 = 7.84 GiB
That is the largest disk size which can be addressed using
the Int13h (Interrupt 13 hex) interface, i.e. CHS addressing.
Larger disks must use Extended Int 13 functions (i.e. LBA).
LOGICAL BLOCK ADDRESSING (LBA)
==============================
An LBA sector is the same as a CHS sector: a 512 byte block
CHS cannot provide sufficient addresses for a disk exceeding
8GB, so LBA addressing must be used instead. LBA uses sectors
only, treating the disk as a single unbroken chain of them.
NB: LBA is an alternative to C-H-S addressing, giving only
a sector number (instead of the traditional three numbers:
Cylinder, Head and Sector).
NB: In LBA the sectors begin with sector 0, whereas CHS values
begin with sector 1; thus their sector numbering is always
out-of-step with each other by 1.
Formula to convert a CHS value into an LBA value:
(Cylinders x Heads per Cylinder x Sectors per Head)
+ (Heads x Sectors per Head) + (Sectors - 1)
This formula, in practice, is usually:
(Cylinders x 255 x 63) + (Heads x 63) + (Sectors - 1)
This formula is only of use if the disk is smaller than 8GB;
a larger disk will have artificial (i.e. maximum) CHS values.
This formula can, nevertheless, calculate the number of sectors
on a disk from the CHS information printed on the disk's casing
(since the disk label does not observe the rule that Cylinder
values cannot exceed 1023, because this form of labelling is a
convenient way to record the disk's "geometry" - see below).
Convert using PT Calc:
The program PTCALC.EXE (and ) can translate
CHS values to LBA, and vice versa ("PARTITION TABLE EDITOR", below).
Sanity Check of Partition Table:
In the MBR Partition Table, the starting sector and ending sector
of each partition is described by a CHS value. These should agree
with the LBA values for "start sector" and "number of sectors",
even though those LBA values are enough to define the partition.
NB: If the partition ends beyond the 8GB boundary, the CHS value
for the ending sector will be merely the maximum permitted
(typically ). A Cylinder value of 1024 is a special
value, indicating that LBA values are in use instead of CHS.
The LBA start sector is stored directly in the Partition Table.
To calculate the LBA end sector:
( "Start sector" + "Number of sectors" ) - 1
DISK GEOMETRY
=============
The Disk Geometry will usually be 255 Heads per cylinder and
63 S 255 x 63 = 16,065 sectors per Cylinder.
But don't just assume that, as other values are sometimes used.
NB: Disk Geometry (the number of Cylinders - Heads - Sectors)
can be read from the BIOS. It is also printed on a label
on the Hard Disk's casing.
To enter the BIOS, press the appropriate key (e.g. DEL)
(on some systems, F1 or F2 or F11) repeatedly at startup.
A sector is a real disk structure: a block of 512 bytes. But the
terms 'Head' and 'Cylinder' are now mere
they are no longer related to the actual engineering structures.
In a disk larger than 8GB all CHS CHS cannot
address a disk larger than 8GB. But CHS values must be used in
key disk structures, to ensure compatibility with the BIOS. So
the CHS values used are typically the largest allowable values,
(or sometimes 512-254-63).
NB: These CHS values are in what is known as "L-CHS" format,
as they are CHS values that have been modified by LBA.
The disk manufacturer will still typically label the disk with
CHS values, but the values given are unreal. An 80GB hard disk
will typically be labelled CHS , but it does not have
9,729 cylinders within it, nor can a CHS value greater than 1024
be used in a Partition Table: that CHS value is merely a literal
translation of the number of sectors on the disk.
CHS values remain important because key BIOS functions are based
on the Disk Geometry, by which is meant the CHS values: the
number of Cylinders, Heads per cylinder, and Sectors per head.
NB: The CHS value printed on the disk's casing, although unreal,
is a convenient means of telling the user the Head and Sector
values, which remain important (even though the figure given
for the number of Cylinders is irrelevent, except for the key
fact that the value exceeds 1,023).
If you are unsure what the correct disk geometry is, try using the
following values in the Partition Table, as one of these values is
likely to be the correct one:
(a) Sectors per Head: The most likely value is 63 (as almost all
hard disks base their CHS values on this traditional number)
(b) Heads per Cylinder: Try 255, 16, 32, 64, 128 and 240
(in that order).
NB: The number FF in Hexadecimal (base 16) represents
255 in Decimal (base 10); thus 255 is the maximum
decimal number that a 2-byte hex value can store.
(Being the maximum value possible, 255 is the value
most likely to be the correct one on a normal disk)
The equivalent LBA sector number will be 1 less than
the actual number (as LBA numbers start from 0 rather
than 1). So the maximum LBA value in a Partition Table
entry is 254 (i.e. 255 - 1 = 254).
NB: Computers use Binary storage, so any factor of two
that can be stored in a 2-byte hex value can be valid
(i.e. 4, 8, 16, 32, 64, or 128).
Disk Size in Megabytes -
To calculate the size of a hard disk from its C-H-S values:
(Cylinders x Heads per Cylinder x Sectors per Head)
÷ 2,048 = MegaBytes
To calculate the size of a disk from its LBA value:
(LBA Sectors + 1) ÷ 2,048 = MegaBytes
1. The LBA figure will be slightly greater, as the LBA calculation
gives the true number of sectors on the disk. The CHS calculation
only counts the number of sectors included i
a few sectors are left unused, as partitioning rules demand that a
partition MUST end on a Cylinder boundary (1 Cyl = 16,065 sectors).
2. To calculate the size of a Partition from its
Kilobytes ÷ 1,024 = MegaBytes
Kilobytes ÷ 1,048,576 = GigaBytes
NB: Even if the hard disk has only a single partition
that is NOT the size of the disk. It doesn't include
the System Area (Track 0, Boot Sector, FAT x2, etc).
3. To convert from Bytes to MegaBytes:
1 MB = 512 x 2,048 (i.e. 2,048 sectors) = 1,048,576 bytes
Bytes ÷ 1,048,576 = MegaBytes
MegaBytes x 1,048,576 = Bytes
NB: 1 MB = 1,024 x 1,024 (i.e. 1,024²)
4. To convert from Bytes to GigaBytes:
1 GB = 1,048,576 x 1,024 = 1,073,741,824 Bytes
Bytes ÷ 1,073,741,824 = GigaBytes
GigaBytes x 1,073,741,824 = Bytes
NB: 1 GB = 1,024 x 1,024 x 1,024 (i.e. 1,024³)
DISK SIZE LIMITATIONS
=====================
A. BIOS LIMITATIONS
A disk attached to the motherboard's ATA interface (a.k.a. the IDE
interface) cannot exceed 137 GB, as the original ATA specification
used 28 bits for sector numbers, in the interface between the BIOS,
the Operating System, and the Hard Disk.
As this gives a maximum of 2^28 sectors (i.e. 268,435,456 sectors),
at 512 bytes per sector it imposes a maximum size of 137.4 GB for
any disk connected to the IDE cables.
For BIOS limitations that restrict disk size to less than 137 GB see
B. WINDOWS LIMITATIONS
There are four design limitations of Windows that limit the size
of partition which Windows 95/98/98SE/ME can run on, as follows.
Note: These limitations are included here for convenience. But
whereas BIOS limitations restrict the size of the hard disk,
Windows limitations are limitations of the Operating System
hence they concern only partition size, not disk size.
1. ScanDisk and Defrag
In Win 95B/98/98SE, the disk tools SCANDISK.EXE and DEFRAG.EXE
are 16-bit applications. They accordingly have a maximum memory
allocation of 64 KB less than 16 MB (i.e. 16,711,680 bytes).
NB: The revised version of Windows 95 is known as Windows 95B
or as Windows 95 OSR2 (Operating System Release 2).
These tools cannot correctly process a File Allocation Table
(FAT) if it is larger than that.
As FAT32 uses 32 bits (i.e. 4 bytes) to record each cluster's
address (hence the name FAT32), a FAT of 16,711,680 bytes can
record a maxmum of 4,177,920 clusters:
16,711,680 ÷ 4 = 4,177,920
The MAXIMUM partition size (including the 2 reserved clusters)
that these tools can process, using the largest valid cluster
size (32KB per cluster), is:
4,177,920 x 32,768 = 136,902,082,560 bytes
1. 32KB = 32 x 1,024 = 32,768 bytes
2. 136,902,082,560 ÷ 1,048,576 = 130,560 MB
3. 136,902,082,560 ÷ 1,073,741,824 = 127.5 GB
Therefore, for compatibility with Windows 95 OSR2 / 98 / 98SE,
127.5 GB is the largest safe partition size.
The versions of SCANDISK and DEFRAG in Windows ME do not have this
limitation, and can be used with Windows 98 and 98SE also. As true
32-bit applications, they function on a partition of up to 512 GB.
But a partition exceeding 127.5 GB could be damaged if accidentally
used with an unmodified Windows 95 OSR2 / 98 / 98SE system.
Calculation Notes:
1 MB = 1,048,576 bytes (512 bytes x 2,048 sectors)
16 MB = 1,048,576 bytes x 16 = 16,777,216 bytes
1 KB = 1,024 bytes (512 bytes x 2 sectors)
64 KB = 1,024 x 64 = 65,536 bytes
Subtract 64 KB from 16 MB:
16,777,216 - 65,536 = 16,711,680 bytes
Divide by 4 to convert to Clusters:
16,711,680 bytes ÷ 4 = 4,177,920 clusters
2. ESDI_506.PDR
Windows 95/98/98SE/ME do not support 32-bit addressing for IDE disks.
Although they were intended to support 32-bit disk access, a fault
in the IDE driver file (ESDI_506.PDR) resulted in it actually only
using 28-bit LBA. Accordingly, the maximum possible partition size that
Windows can recognise is 127.53 GB, the largest possible for 28-bit LBA.
NB: The Windows ESDI_506.PDR driver file is only used by disks connected
to the IDE ports. Therefore this partition size limit does not apply
to disks connected to the PCI slots, which map as SCSI devices.
NB: Some recovery programs and their documentation refer to 28 bit LBA,
32 bit LBA and 48 bit LBA as LBA28, LBA32 and LBA48 respectively.
Workarounds for the ESDI_506.PDR fault:
These workarounds will only work if the BIOS chip supports 48-bit LBA.
If so, use any of the following in conjunction with a hard disk on the
IDE cables that does not exceed 512 GB.
& Workaround #1
Partition the disk into several partitions, each smaller than
127.53 GB, with a user-friendly program (e.g.
& Workaround #2
Patch the system, using one of the non-Micro$oft replacements
for the defective Micro$oft ESDI_506.PDR file such as BHDD31.ZIP
3. 64 GB Barrier in Windows 98/98SE
There is a fault in the Windows 98 and 98SE versions of FDISK.EXE
, which use 16-bit values in their calculations:
which consequently 'overflow' if the disk size is 64GB or larger.
The versions of FDISK and FORMAT in Windows ME do not have this
fault, and can be used with Windows 98 and 98SE also. As true
32-bit applications, they function on a partition of up to 512 GB.
Download the Windows ME version of FDISK.EXE here:
There is no fix , as the fault is only cosmetic.
Whilst a partition is being formatted, the screen will show wrong
but the formatting will nevertheless complete properly.
4. 32 GB Limit in Windows 95
Windows 95 does not support FAT32 partitions larger than 32 GB.
If a computer has Windows 95 installed as its Operating System,
then EVERY partition in that system will necessarily be 32 GB
or smaller.
NB: This applies only to Windows 95 OSR2 (Operating System Release 2),
also known as "Windows 95B".
The original release of Windows 95 ("Windows 95A") was a 16-bit O/S,
and can only run on a FAT16 it can't recognise any FAT32
partitions. Furthermore, a FAT16 partition cannot exceed 2 GB.
PARTITIONS
==========
A partition is a contiguous area of disk space (i.e. a single
continuous region, without intervening data), usually defined
by its size. Known also as a "Drive" or a "Volume".
NB: It is an uninterrupted sequence (or chain) of sectors.
Partition sizes are normally given in bytes (or, more commonly,
Megabytes or Gigabytes), or in sectors (1 sector = 512 bytes).
There are three kinds of partition:
a. Primary
: Normally the first partition on the disk. If there
is only one partition, it is usually of this kind.
A disk cannot have more than one Primary partition.
NB: Sometimes called a "Primary DOS" partition,
as it was historically associated with the
DOS operating system.
b. Extended : Not really a partition at all, but a container
for L it may contain only one
Logical partition, or it can contain several.
A disk cannot have more than one Extended partition.
c. Logical
: A partition which can only exist within an Extended
partition.
Primary and Logical partitions can't be sub-divided. An Extended
partition can be partitione but, alternatively,
it can be fully occupied by a single Logical partition.
Creating a Partition:
The tool you MUST use to create a partition is Micro$oft's FDISK.EXE
as this is the closest thing there is to a partitioning standard.
Other partitioning progra but none has better
compatibility with the infinite variety of hardware and software
configurations which are possible in a modern computer system.
Only use other tools, such as Partition Magic, for tasks which FDISK
cannot handle. And ALWAYS use FDISK to partition new hard disks.
Further information:
You should not run CHKDSK or SCANDISK or any other disk scanning
program if the disk has crashed, e.g. if there is a logical error
in the Partition structures (Boot Record, FAT, or Root Directory).
Running such programs in that situation can cause data loss.
PARTITION SIZE
==============
The disk space is divided into one or more separate Partitions
(usually called "Drives").
These are the ranges for partition size:
Min Partition Size
Max Partition Size
------------------
-------------------------------------
33,472,512 bytes)
2,047 MB (2 GB) (2,147,123,200 bytes)
2,000 GB (2 TB) (
about 2^40 bytes)
Note: If the partition is larger than 2GB it must be using FAT32.
It can't be FAT16, because the partition could contain more
than 65,526 clusters, which is the most FAT16 can address.
Practical Limits:
The above partition sizes are the theoretical limits, but
the following practical restrictions also apply -
1. Although FAT16 cannot be used for a partition larger than 2GB,
a disk of up to 4GB can have several FAT16 partitions on it,
each not exceeding 2GB.
2. Large Disk Support (FAT32) is NOT available on disks smaller
than 510MB. A FAT32 partition smaller than 510MB can only exist
as one of several partitions on a hard disk larger than that.
3. Windows 98/ME can't address a FAT32 partition exceeding 127.53GB,
and Windows XP can't create a FAT32 partition exceeding 32GB;
so in practice those are upper limits for a FAT32 partition.
12-bit FAT (i.e. FAT12) is used by 1.44MB floppy disks.
16-bit FAT (i.e. FAT16) is commonly referred to simply as FAT
by many disk tools (including FDISK.EXE ), and
in documentation and Help files accompanying those programs.
32-bit FAT (i.e. FAT32) is sometimes referred to as "BigFAT"
by disk tools, and in documentation and Help files.
PARTITION STRUCTURE
===================
It may help in understanding disk structure to think of
a partition as starting with a Partition Table, followed
63 sectors later (i.e. 1 Head later) by a Boot Sector.
NB: Technically, though, the Partition Table defines
the Partition (as begining with the Boot Sector),
and is NOT treated as being part of the Partition.
The Boot Sector defines the 63 sectors containing the
Partition Table as "hidden sectors", and they are NOT
counted as part of the Partition by any disk tool.
However, it is necessary to INCLUDE "hidden sectors"
in calculating whether a partition is an exact multiple
of 16,065 sectors.
In the case of the Primary DOS partition, the Partition Table
is in the MBR sector, at CHS 0-0-1; and the Boot Sector is in
CHS 0-1-1 (i.e. 63 sectors later).
In the case of Logical Partitions, the relationship is clearer:
the 1st Logical partition is defined in the MBR as beginning
with its Partition Table sector (the MBR points to that sector).
NB: Technically, the MBR is defining the Extended partition, by
pointing to the first sector of it (which happens to contain
the Partition Table for the 1st Logical partition).
As with the Primary partition, the 63 sectors containing
the Partition Table are defined as NOT being part of the
1st Logical partition and are treated as "hidden sectors".
Note on Partition Reconstruction:
The Boot Sector usually contains all the necessary information
(see below) to undelete the partition that it belongs to.
Every partition begins with a Boot Sector, immediately preceeded
by 1 Head (typically 63 sectors) containing a Partition Table.
Thus a partition ends immediately before a sector that contains
ONLY another Partition Table (not any boot code, because Logical
partitions are not bootable): the sector will be entirely BLANK
(i.e. filled with zeros), except for a 32 byte Partition Table.
NB: A Logical partition can be bootable, but only in special
circumstances not usually encountered (see below).
To be valid, a Partition Table usually must be on a cylinder boundary
(but see "PARTITIONING RULES", below, for exceptions). (NB: If it
is not, it might be a backup copy created by a disk recovery tool)
NB: A sector is on a Cylinder boundary if its LBA Sector Number + 1
is an exact multiple of 16,065 (see "PARTITIONING RULES", below)
Regions in the Partition:
A FAT32 partition is composed of three regions, laid out in the
following order:
------------------------------
----------------------
Reserved region
Typically 32 sectors
FAT region
FAT size in sectors x2
File and Directory Data region
Remainder of partition
NB: A FAT32 partition also contains a fourth region, Hidden
Sectors, pre typically 63 sectors.
PARTITIONING RULES
==================
Partitioning rules demand that a partition MUST end on a
Cylinder boundary (1 Cylinder = 255 x 63 = 16,065 sectors);
i.e. every partition must be a multiple of 16,065 sectors.
NB: This is a FUNDAMENTAL requirement. Data damage is a
certainty if this rule is breached!
NB: But this ONLY applies to the Primary DOS partition and the
Extended Partition, not to the Logical partitions within
the Extended Partition. However, the 1st Logical partition
will obey this if it is the ONLY Logical partition and
occupies ALL the space in the Extended partition.
NB: This applies even if the partition uses LBA instead of CHS
addressing. For backwards compatibility (with Windows 95)
all FAT32 partitions must be a multiple of 16,065 sectors.
Partitions are thus "cylinder aligned": they start and end
on a cylinder boundary (even though a Cylinder is now only
a logical, rather than a physical, disk structure).
NB: For tools to convert LBA values to CHS, and vice versa,
see below under PTCALC.EXE and
Such a partition must begin with the CHS address xxxx-0-1
(i.e. the first sector of a cylinder), and must end with the
CHS address xxxx-254-63 (i.e. the final sector of a cylinder).
NB: The Partition Table will therefore be at CHS xxxx-0-1
and the Boot Sector will therefore be at CHS xxxx-1-1
Although Logical partitions (other than the 1st Logical partition)
can begin part-way through a Cylinder, they nevertheless will NOT
begin part-way through a H they always start at CHS xxxx-x-1.
PARTITION TABLE
===============
The Partition Table in the MBR sector defines:
- one Primary partition (type 0C);
- one Extended partition (type 0F) if any disk space remains.
The Partition Table in the Extended partition defines:
- one Logical partition (type 0B) within the E
- a further partition (type 05) if remaining disk space within
the Extended partition permits.
The Partition Table in a Type 05 partition defines:
- one Logical partition (type 0B), filling the type 05
- a further partition (type 05) if remaining disk space within
the Extended partition permits.
NB: There can be several Logical partitions on the disk -
& Drive letters A: and B: are reserved for floppy disks.
& Drive letter C: is reserved for the Primary partition.
& Drive letters D: to Z: (23 drives!) are available for
Logical partitions.
Every Partition Table contains only two 16-byte entries
(the other two entries are blank in FAT32) -
1. Entry No.1 defines the Start and End sectors of the current
partition (e.g. the MBR defines the Primary DOS Partition)
2. Entry No.2 points to the Start sector of the NEXT partition
(i.e. it points to its Partition Table sector, a.k.a. E-MBR)
[Entry No.2 will be BLANK if there are no further partitions]
3. Entry No.3 is BLANK (16 bytes, all zero)
4. Entry No.4 is BLANK (16 bytes, all zero)
In a WinME (or Win98/98SE) system using 32-bit FAT -
1. The Primary DOS partition will normally be type 0C (i.e.
the 1st entry in the MBR's partition table will be type 0C).
2. The Extended partition, in which the Logical partitions
are stored, will normally be type 0F (i.e. the 2nd entry
in the MBR's partition table will normally be type 0F).
NB: If the Extended partition ends at cylinder 1024 or later
(i.e. the hard disk exceeds 8GB), the Extended partition
must be type 0F. If it is not, data damage will occur.
3. Each Logical partition (INCLUDING the first) will normally be
type 0B (i.e. the 1st entry in each E-MBR partition table, with
which the Logical partition begins, will normally be type 0B).
NB: Each partition table sector (other than the MBR sector
at CHS 0-0-1) is called an Extended MBR (E-MBR) sector,
because it's part of the Extended partition.
4. Each Logical partition (EXCEPT the first), although part
of the Extended partition, will also be in an individual
partition of its own, of type 05 (i.e. the 2nd entry, if any,
in each E-MBR partition table will normally be type 05).
If a partition table (in the MBR or any E-MBR sector) does NOT
specify the normal partition type expected, check carefully to
establish why! An abnormal partition type may cause data damage.
Partition Table sector -
& 1st sector in the Partition
& 1st sector of the partition's Hidden Sectors
PARTITION TYPES
===============
ID types in a Partition Table -
FAT32 typically uses four main partition types: 05, 0B, 0C and 0F
(these are numerical values, expressed in hex: i.e. hexadecimal).
NB: The procedures set out on this page are ONLY safe to use with
a hard disk that has these partition types only AND NO OTHER
0C = FAT32 Primary DOS Partition, ending at cylinder 1024 or later
Entry No.1 in the MBR
Type: FAT32X (Type 0B with Interrupt-13 extensions)
(i.e. FAT32 with LBA) ("Win95 FAT32 (LBA)")
(NB: The normal type of FAT32 for a Primary partition larger
than 8GB, i.e. where the 1024 cylinder limit is exceeded)
Note: If the disk is bootable and contains only one partition,
that will be a Primary DOS Partition (i.e. type 0C).
NB: Same as type 0B, but with LBA (Interrupt 13 hex) extensions
0F = FAT32 Extended Partition, ending at cylinder 1024 or later
Entry No.2 in the MBR
Type: Extended X (Type 05 with Interrupt-13 extensions)
(i.e. FAT32 with LBA) ("Win95 Extended")
(NB: The normal partition type for an Extended partition on a disk
larger than 8GB, i.e. where the 1024 cylinder limit is exceeded)
NB: This is a container of partitions (NOT a container of data),
as indicated by its being labelled an "Extended" partition.
Note: If there is more than one partition, an Extended partition
(i.e. type 0F) contains all of them except the first one.
(The first one, of course, is the Primary DOS partition)
Note: The 2nd partition is a Logical partition (i.e. type 0B),
as are any further partitions (e.g. the 3rd, 4th, etc).
Note: If there are only two partitions on the disk, the 2nd partition
will normally completely fill the Extended partition. If the disk
has three or more partitions, each Logical partition will occupy
PART of the Extended partition, but without any overlapping.
NB: Same as type 05, but with LBA (Interrupt 13 hex) extensions
0B = FAT32 Logical Partition ("Win95 FAT32") (NB: Originated in Windows 95)
Entry No.1 in an E-MBR
ALL Logical partitions on a FAT32 disk are type 0B
Note: If a FAT32 disk contains more than one partition, the
2nd partition (i.e. the 1st Logical partition), and any
subsequent partition(s), will each be type 0B.
05 = MS-DOS Extended Partition
Entry No.2 in an E-MBR
On a FAT32 disk a SECOND or subsequent Logical partition
is contained in - and entirely fills - a partition of type 05
NB: This is a container of partitions (NOT a container of data),
as indicated by its being labelled an "Extended" partition.
Note: If there are MORE than two partitions on the disk, the
3rd partition (i.e. the 2nd Logical partition), and any
subsequent one, each completely fills one type 05 partition.
Hidden Partitions:
1B = Hidden FAT32 0B Partition
1C = Hidden FAT32 0C Partition (e.g. hidden IBM rescue partition)
A hidden partition type starts with a 1, and an unhidden type
starts with a 0. To hide a partition, change leading 0 to 1.
For example: Type 0B is FAT32, and type 1B is Hidden FAT32.
Warning for Windows 95:
Types 0E and 0F can cause data loss in Win95 (but not in Win98 or
WinME), if you exit from Windows to MS-DOS mode WITHOUT rebooting
(although only if the Disk has more than one partition).
This fault can be cured by installing the updated Windows 95 file
DISKTSD.VXD v4.00.952 (dated 3/22/96), or any later version.
NB: The earliest releases of Windows 95 used the FAT16 filesystem
by default. Only Windows 95 OSR2 used FAT32 by default. These
notes CANNOT be used as a guide to repairing a FAT16 disk.
Note on FAT16:
If the partition type is 06 the partition is using FAT16. This also
means the partition size cannot be larger than 2GB.
NB: A FAT16 disk cannot safely be repaired using any procedure set out
there are crucial differences from FAT32 in the MBR, in the
Partition Table, in the Boot Sector, in the Boot Record, in the
File Allocation Table structure, and in the Root Directory table.
Note on NTFS:
If the partition type is 07 the partition is using NTFS. This also
means the partition cannot be accessed by Windows 95/98/98SE/ME.
NB: Partition type 17 is a Hidden NTFS partition.
Note: Install the SysInternals program "NTFS for Windows 98"
to read an NTFS disk in Windows 98/98SE/ME : NTFS98RO.EXE
(which can READ from, but NOT write to, such a partition)
NON-DOS PARTITION
=================
The first 63 sectors on the Disk (CHS 0-0-1 to 0-0-63). For
historical reasons, sometimes called "Track 0".
NB: Although called the "Non-DOS Partition" this is NOT truly
a partition at all, as it does not contain any user data.
(As disks were once so small that they usually had only a
single DOS partition, the name "Non-DOS Partition" arose)
It starts at sector 1 (CHS 0-0-1) (LBA 0) and ends at sector 63
(CHS 0-0-63) (LBA 62); a hidden 63 sectors at the start of the
disk. It contains the Partition Table for the entire Disk.
NB: The LBA sector numbering starts at 0, whereas CHS sector
numbering starts at 1; hence there is a discrepancy of 1.
Sector 1 (CHS 0-0-1), the Master Boot Record (MBR), contains
the Partition Table.
All other secto but special backup software
sometimes stores recovery data in the 62 empty sectors, so it is
prudent to make a backup copy of ALL the 63 sectors of Track 0.
(a) Sector CHS 0-0-3 sometimes contains recovery data.
(b) Sector CHS 0-0-9 typically contains a backup copy
of the MBR sector from CHS 0-0-1.
(c) Sector CHS 0-0-62 sometimes contains recovery data.
(d) Sector CHS 0-0-63 sometimes contains recovery data.
The name "Non-DOS partition", used for historical reasons, is
misleading. This is NOT a partition: it contains NO user data.
It's actually an essential part of ALL the partitions on the
disk, because it contains the Master Partition Table.
Master Boot Record (MBR) -
The Master Boot Record is located in the first physical sector of
the disk. It contains some executable code and the Partition Table.
The executable code is loaded into RAM at boot time and executed.
Its role is to determine which partition is the bootable one,
and then to load and execute the code in the Boot Sector of that
partition (which in turn loads the Operating System, i.e. Windows).
FDISK's notorious /MBR command recreates the executable code in
the Master Boot Record (but on Disk 0 only).
NB: That command will be HARMFUL if any drive overlay software is
installed (e.g. OnTrack Disk Manager), to handle large disks,
something that is required only on a disk larger than 127.53 GB.
The loader code in the MBR on such a disk
the command will destroy the special loader code, so the disk
will no longer be accessible. (The Partition Table information
is also not the same on such a disk as it would be on a disk
that does not have drive overlay software.)
How OnTrack Disk Manager works: The MBR boot code loads a program
located in CHS 0-0-10 and the following sectors, which installs a
TSR program that replaces the BIOS code for interrupt 13h.
NB: That command will also be HARMFUL if -
(a) the Hard Disk has more than four partitions, or
(b) the Hard Disk has dual-boot capability installed, or
(c) the Hard Disk was originally partitioned using a SpeedStor
utility from Storage Dimensions, with the /BOOTALL option.
Structure of MBR Sector:
-------------------------
Executable code
1st partition table entry
2nd partition table entry
3rd partition table entry
4th partition table entry
Executable marker (55 AA)
Executable Code:
On a FAT32 hard disk, formatted by Windows 98/98SE/ME, the first 446 bytes
of the MBR Sector normally look like this (in Hex and ASCII):
& }

我要回帖

更多关于 使命召唤4 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信