Disc formatting involves two different programs: low-level and high-level formatting.The former deals with the characteristics of disk surface formatting and disk sector number;After the low-level formatting is completed, the hardware disk controller can see and use the low-level formatting results;The latter deals with "specific information written with the operating system".[1]
Low level formatting
Low level formatting is also called low-level formatting or physical format. For some hard disk manufacturers, it is also called initialization.At the earliest time, with the emergence of disks using the CHS addressing method, frequency modulation (FM), improved frequency modulation (MFM) and other coding schemes, low-level formatting was used to refer to the operation of dividing the disk into cylinders, tracks, and sectors.
Nowadays, with the gradual withdrawal of floppy disks from daily use and the emergence of disks with new addressing methods and interfaces, the term has lost its original meaning. Most hard disk manufacturers define Low Level Formatting as the operation of creating hard disk sectors to make hard disks have storage capacity.Nowadays, people have some misunderstandings about low-level formatting. In most cases, the reference to low-level formatting often refers to the zero filling operation of the hard disk.[1]
For a standard 1.44 MB floppy disk, its low-level format will create 160 tracks (80 on each side), 18 sectors per track, and 512 bit sets per sector on the floppy disk;A total of 1474560 bit groups.Note that the low-level formatting of floppy disks is usually supported by the system.Generally, the format operation of the floppy disk includes low-level format operation andAdvanced formattingOperate two parts.[1]
Advanced formatting
Advanced format, also known as logical format, refers to an operation that writes specific data in a specific area of the disk according to the file system selected by the user (such as FAT12, FAT16, FAT32, NTFS, EXT2, EXT3, etc.) to initialize the disk or disk partition, and clear all files in the original disk or disk partition.Advanced formatting includes rewriting the corresponding area of the partition table in the master boot record, and according to the file system selected by the user, drawing a disk space in the partition for storing file allocation tables, directory tables, and other files for file management so that the user can use the partition to manage files.[1]
method
Announce
edit
In short, formatting is to initialize the disk so that we can record data on the disk step by step.For example, if we have a big house to store books, we will not move books to the house and throw them on the floor. Instead, we will set up bookshelves, mark categories, and put books in categories.[1]
Before using the newly purchased disk, to make the operating system recognize it, we need to write some magnetic marks to eacha sector, you can access the data on the disk under the operating system. This action is called formatting.[1]
Formatting actions can be divided into high-level format and low-level format.Floppy disks only have low-level formatting (although it looks like advanced formatting);The hard disk has not only high-level formatting, but also low-level formatting.Low level formatting is aimed atHardwareOfTrackTo work in units, this formatting action isHard disk partitionAnd advanced formatting. Generally, ordinary users will not do this.[1]
If not specified, the general formatting action refers toAdvanced formatting。stayMS-DOS operating systemAmong them, we can use the FORMAT command to format the hard disk and floppy disk, for example, to format a piece ofdisc driveA: And put the boot file into the disk, then use the 'FORMAT A:/S' command. In the Windows operating system, the formatting action isExplorerTo execute (right-click the disk name -->"Format...").[1]
The formatting action is usually written at the beginning of the diskboot sector (boot sector) data, record the disk label in the root directoryDocument Allocation Table(FAT) Reserve some space, and check whether there is a damaged sector on the disk. If there is a damaged sector, mark the file allocation table with a damaged mark (usually the capital letter "B" stands for "BAD"), indicating that the sector is not used to store data.[1]
Note: Before advanced formatting, we usually have todisc driveappointpartition(partition), which is to divide a physical disk drive into several partitions so that different operating systems can use different partitions, or divide it into several logical disk drives. This action is called“Disk partition”。[1]
Distinguish the lower level
Announce
edit
Low level formattingIt is to divide the blank disk into cylinder and track, and then divide the track into several sectors. Each sector is divided into identification part ID, interval GAP, data area DATA, etc.It can be seen that low-level formatting isAdvanced formattingThe previous work can only be completed in the DOS environment.Moreover, low-level formatting can only target one disk and cannot support a separate partition.Each piece of the product has been low-level formatted by the hard disk manufacturer when it leaves the factory, so users usually do not need to perform low-level formatting operations.In fact, we have afloppy diskA full format is a low-level format.[1]
It should be noted that low-level formatting is a lossy operation, which has a certain negative impact on the life of the hard disk.Therefore, many hard disk manufacturers advise users not to resort to this tactic unless they have to.When the hard disk is affected by the external strong magnet, strong magnetic field, or because of long-term use, the magnetic recording part of the sector format divided by the low-level format on the hard disk is lost, resulting in a large number of“bad sector”The "sector" can be re divided through low-level formatting.However, the precondition is that the hard disk is not physically scratched.[1]
Advanced formattingIt is to clear the data on the hard disk and generateGuidance areaInformation, initialization FAT table, annotationLogical badnessEtc.Generally, weReinstall the systemBecause MBR does not rewrite, there may be viruses.MBR virusCan be accessed viaanti-virus softwareClear or execute fdisk/mbr in DOS to rewrite the MBR to completely clear the virus.[1]
In short,Advanced formattingIt refers to the format related to the operating system. Low level format refers to the format unrelated to the operating system.
Advanced formatting is mainly used topartitionFormat the tracks and divide them logically.For advanced formatting, different operating systems have different formatsprogramDifferent formatting results and different track division methods.[1]
The low-level format is the physical level format, which is mainly used to divide the magnetic cylinder of the hard disk and establishsector numberAnd the interval ratio of selected sectors.The hard disk must be formatted at a low level before it can be formatted at an advanced level. However, the hard disk that has just left the factory has been formatted at a low level, so users do not need to perform low-level formatting again.Generally, users need to perform low-level formatting only when it is necessary. For example, yourHard disk bad trackToo many often lead to errors when accessing data, or even the operating system can't be used at all, so you need to perform low-level formatting.In addition, if some parameters related to low-level formatting on your hard disk are damaged by a virus, such as the disk spacing factor, you have to perform low-level formatting to re-establish these parameters.[1]
The CMOS of many motherboards provides the function of low-level format. Generally, in the HDD Low Level Format option, if your motherboard has this option, you can directly use the Hard Disk Low Level Format Utility to perform low-level format.There are also many motherboards that do not have low-level formatting functions. If so, you'd better use the hard disk management and low-level formatting programs provided by the hard disk manufacturer.There are also general low-level formatting programs, such as DM (Disk Manager), PC Tools, etc. If your hard disk is relatively standard, you can also use these tools to perform low-level formatting.[1]
format
Announce
edit
It can also be called formatting, which is applied in other phrase sentences according to specific formats (widely used in fields such as formulas)
Example: a * a/q
1*1/9
Windows/DOS
Announce
edit
In Windows anddos operating system There are formatprogram, however, once formatting is performedHard diskAll data in the hard disk will be lost!So before this action, make surediskWhether the data in is still needed, if so, please backup it separately.
Parameters can be filled in []. It is recommended that you do not fill in parameters generally, but directly type format C:, and then press Enter, because it is not meaningful for ordinary people to fill in parameters.
The most important and commonly used parameters of FORMAT:
/uyesHard diskPerform destructive formatting. If this parameter is not added, a hidden MIRROR will be generated in the root directory of the hard diskImage fileIf no other hard disk operation is performed, you can use UNFORMAT to restore the original hard disk content. Of course, it is better to back up the data to be backed up before formatting the hard disk.[1]
/sChange DOS after formattingSystem filesCopy toHard diskIn the root directory, fill in this parameter, and the hard disk can be booted to C:, which is very useful in the era of DOS, and has no practical significance now.[1]
/cformatHard diskCheck at the same time ofHard disk sectorAnd repairbad sector, this repair is not very reliable, and will also affect the speed of formatting.
There are also some parameters that are not commonly used.
We still need WINDOWS98Startup Disk, insert itcomputerDrive A, then turn on the computer, press 1, press Enter, ten seconds laterscreenA: will appear because weHard diskThere are 3partition, so type f:, enter, and the screen will become F: (if there are 2 partitions, type e: enter, if there are 4 partitions, type g:, enter, and so on), type format c: enter, and the following prompt will appear.[1]
WARNING , ALL DATA ON NON-REMOVABLE DISK
DRIVE C: WILL BE LOST!
Proceed with Format (Y/N)n
It means dangerous. Data in Area C will be lost. Format?
We press Y and enter, and then a progress digital indicator will appear, starting from 1 to 99 and formatting 5GHard disk, ifcomputerIf the configuration is high, it can be completed in about 2 minutes. If the configuration is low, it may take 5 or 6 minutes, perhaps more slowly. However, if the progress figure does not move for a long time, the hard disk is faulty and needs to be replaced or repaired.[1]
When the progress number flashes 99, the following prompt appears.
Volume label ( 11 characters , ENTER for none)?
It means let's make a hard driveVolume label, that is, the name. If you enter directly, there is no volume label name.
Then, after formatting,Hard diskThe list of space will tell us the total capacity of the hard disk, the available space, and the systemSpace occupied,bad sectorSpace occupied,Volume label, the remaining space and other data, and returned to the F:/status, which indicates that we have successfully completed formatting CpartitionAnd then complete the formatting of D: area and E: area according to the above steps.[1]
Format: refers to the alignmentdiskPerform pre-processing before use to store data.Generally speaking, new disks must be formatted, while used old disks can also be formatteddiskAll data on will be deleted.[1]
be careful:Hard diskFormatting is a very dangerous operation. It is recommended to back up important data in advance. If you do not back up in time, you can format(Advanced formatting)After that, users can use some recovery methodsSoftwareTo recover important data, but the precondition for the whole region recovery is not correctpartitionWrite anything.If the content is written in, it may not be recovered completely, but some data can still be recovered![1]
Quick format
OndiskWhen formatting, we also have the option of "Quick Format".
Theoretically,Advanced formatting(whether in fast or ordinary form)diskDelete data on the disk. It only gives the disk where the data is locateda sectorA special deletion mark is written at the beginning of the to tell the system that new data can be written here.As long as the entire data is not immediately overwritten with new data after formattingHard disk, then the original data will still be there, and only some specificSoftwareThe original data can be recovered.
by contraries,Low level formattingWhat we have done is todiskEach ona sectorCover with "00", which will completely destroyHard diskIt is no longer possible to recover all data on.[1]
Can format clear the virus on the hard disk?
Not necessarily.As long aspartitionWhen the format command of is executed, all existing data on this partition will be marked as unreadable.wrongBoot partitionAs a kind of virusProcedure documentsNaturally, it can't be seen, and of course, it can't run again.Boot area virusIt cannot be eliminated by formatting.[1]
In addition, it is worth noting that aHard diskMore than onepartition, shown in“My Computer”In, you will see several examples from C:Drive letter。You must put all these different drive letterspartitionYou can only say your own after formattingHard diskThere are hundreds of viruses.Otherwise, this disk is formatted, and there is a virus on that disk. When you open another disk to read, the virus will come back.[1]
Can I format all hard disk partitions in Windows?
The answer is "no".As soon as the Windows system starts upSystem disk(Generally C: disk, which can also be customized)System filesIs locked to be unmovable or deleted.The format command under Windows is Windows with graphical interfaceprogram, this program isWindows operating systemIt cannot run without the Windows operating system, so it cannot format the "parent" system programDisk partition。
As long as it's notsystem partition, other partitions can be easily formatted.[1]
How do I format all hard disk partitions?
Answer: Try to access DOS, such as using the startup CD of Windows.Enter DOSCommand line interfaceThen, use FORMAT X: (change X: to any letter+half colon, "X" must be FAT formatpartition)OK.Other third parties are also availableDisk managementTools such as PQ Magic.these ones hereDisk partitionSoftware, you can format the current partition at the same time as partitioning.[1]
Linux
Announce
edit
Formatting tool with graphical interface under Linux:
Gparted,Recommended for novices, with intuitive interface and convenient operation
Ubuntu/Debian users can use:
apt-get install gparted
To install it
In addition, the format command under Linux is mkfs[File system]
such as
mkfs.ext3
mkfs.vfat
mkfs.ntfs
mkfs.xfs
wait
If you want to format/dev/sda1 as Ext3 file system, enter
mkfs.ext3 /dev/sda1
The format is complete.Other operations are similar to this
Key points of adding new hard disk and partition formatting under Linux
Adding for host atHard diskBefore, first understandLinux systemLower pair of hard disk andpartitionThe naming method of.
Under Linux, IDE devices are named after hd. The first ide device is hda, and the second is hdb.And so on
commonlya main boardThere are two IDE interfaces on the. A total of four IDE devices can be installed.The two devices on the main IDE correspond to hda and hdb respectively, and the two devices on the second IDE port correspond to hdc and hdd.
commonlyHard disk installationOn the main interface of the main IDE, it is hda;The optical drive is usually installed on the main interface of the second IDE, so it is hdc (hdb should be used to name the slave interface of the main IDE)[1]
SCSI interfaceThe device is named after sd. The first device is sda, and the second is sdb.And so on
partitionIt is named by the device name and number.For example, hda1 represents hdaHard diskFirst on devicepartition。
eachHard diskUp to fourPrimary partition, which is used to name the primary partition of the hard disk with 1-4.Logical partitionIt starts from 5. For each additional partition, add one to the number.
For example, general systems have a masterpartitionIt is used to boot the system. This partition corresponds to the commonly known C partition. It is named hda1 under Linux.Later, we have three logicspartitionThe names of D, E, and F are hda5, hda6, and hda7 under Linux
Edit the/etc/fstab file with vi and add the following contents
/dev/dhb1 /mnt/hd reiserfs defaults 1 1
Antiviral effect
Announce
edit
Because formatting willdiskAll the information in is deleted, so the virus will also be deleted. Therefore, formatting is often regarded as aClear virusThe auxiliary means of.However, if the virus is lurking in the motherboard bios or is being formattedpartitionOf course, formatting cannot eliminate viruses in partitions other than.However, some viruses exist in the file, and formatting is also a good choice![1]
The format is in the physical drive(Hard disk)Formatting is a purely physical operation. At the same time, it checks the consistency of hard disk media and marks it unreadable and bada sector。Because mostHard diskIt has been formatted at the factory, so it is only necessary to format the hard disk media when an error occurs.[1]
DOS Start
If you have installed WIN98, press and hold Ctrl when starting the computer, and the startup appearsSelect Menu, select 5 "Command Prompt Only" to enter DOS mode.[1]
Our common operating systems are Windows 9x/Me, NT, 2000, Windows Xp, Windows 2003, Windows 7, Windows 10, etc. They are all visual interfaces.The operating system that people used before these systems was DOS.The DOS system is no longer used by anyone, but the DOS command still exists in the Windows system we use.MostDOS commandIt has become a visual interface in Windows, but some advanced DOS commands still need to be executed in the DOS environment.Therefore, learning the command line is necessary for us to operate Windows skillfully.[1]
If we need to format the C: disk, we cannot format the C: disk in the C: disk directory, but return it to the A: disk.In any case, the disks other than C: disk are usually A: disk after startupCDThe startup is not in disk A: (the specific disk depends on the number of diskspartition, it will automatically move backward).[1]
one
3、 Format command and diagram (please be careful of wrong format)
As we all know, newly boughtdiskAll must be formatted before use. The FORMAT command canfloppy diskandHard diskThe format of the format is "FORMAT [drive letter] [parameter]", for example: "FORMAT C:/S".It has two common parameters:
/Q: ProceedQuick format(Please be careful of incorrect formatting);
/S: Complete the format and set the systemboot fileCopy to thisdisk。
VB Format Function
returnVariant(String), which contains oneexpression, which is formatted according to the instructions in the format expression.
FormatThe syntax of a function has the following parts:
part
explain
expression
Required parameter.Any valid expression.
format
Optional parameter.A valid named expression or user-defined format expression.
firstdayofweek
Optional parameter.constant, indicates the first day of the week.
firstweekofyear
Optional parameter.Constant, representing the first week of a year.
Set value
firstdayofweekparameterThe following settings are available:
constant
value
explain
vbUseSystem
zero
Use NLS API settings.
VbSunday
one
Sunday (default)
vbMonday
two
Monday
vbTuesday
three
Tuesday
vbWednesday
four
Wednesday
vbThursday
five
Thursday
vbFriday
six
Friday
vbSaturday
seven
Saturday
firstweekofyearThe parameters are set as follows:
constant
value
explain
vbUseSystem
zero
Use NLS API settings.
vbFirstJan1
one
Start from the week containing January 1 (default).
vbFirstFourDays
two
From the first week of the year, there are at least four days in the middle of the year.
VbFirstFullWeek
three
Starting from the first week of the year, this week is completely in the middle of the year.
explain
format
practice
number
Use a predefined named numeric format or create a user-defined numeric format.
Date and time
Use a predefined named date/time format or create a user-defined date/time format.
Date and time ordinal
Use date and time format or numeric format.
character string
Create a custom string format.
If not specified when formatting numbersformat,FormatWill provideStrFunction is similar, although it is internationalized.However, withFormatActing on positive numbers does not reserve sign space, butStrI will.[1]