Thursday, May 30, 2013

Low-Level vs High-Level Formatting

Many people do not distinguish low-level formatting (also called physical formatting) from high-level formatting (also called logical formatting).
Even though hard drives can be very small, they still contain millions of bits and therefore need to be organized so that information can be located. This is the purpose of the file system. The surface of each cylinder, which is originally uniform, is divided during formatting (by divided we mean of course that the surface particles are magnetised...) into little parcels that can be more easily located.



Low-level formatting

The purpose of low-level formatting is to divide the disk surface into basic elements:
  • tracks
  • sectors
  • cylinders
Remember that a hard drive consists of several circular platters rotating around an axis and covered on either side by a magnetic oxide which, since it is polarised, can be used to store data.

The tracks are the concentric areas written on both sides of a platter.

Finally, these tracks are divided into pieces called sectors.


There are millions of tracks and each has around 60 to 120 sectors.
cylinder refers to all the data located on the same track of different platters (i.e. vertically on top of each other) as this forms a "cylinder" of data in space.

Physical formatting therefore consists in organizing the surface of each platter into entities called trackers and sectors, by polarising the disk areas using the write heads. Tracks are numbered starting from 0, then the heads polarise concentrically the surface of the platters. When the head goes from one track to the next, it leaves a gap. Each track is itself organized into sectors (numbered starting from 1) and separated by gaps. Each of these sectors starts with an area reserved for system information called a prefix and ends with an area called a suffix
The purpose of low-level formatting is therefore to prepare the disk surface to receive data (and therefore does not depend on the operating system) and to mark "defective sectors" using tests performed by the manufacturer.
When you buy a hard drive, it has already undergone low-level formatting. 
SO YOU DO NOT NEED TO PERFORM LOW-LEVEL FORMATTING!


High-level formatting

Logical formatting occurs after the low-level formatting. It creates a file system on the disks that will allow an operating system (DOS, Windows 95, Linux, OS/2, Windows NT, ...) to use the disk space to store and access files.
Operating systems use different file systems, so the type of logical formatting will depend on the operating system you install. So, if you format your disk with a single file system, this naturally limits the number and type of operating systems that you can install (in fact, you can only install operating systems that use the same file system).
Fortunately, there is a solution to this problem which is to create partitions. Each of the partitions can effectively have its own file system, and you can therefore install different types of operating systems.

Types of Hard Drive Partitions and Drive Partitioning Operations

Disk partition
A partition is a part or section of a hard disk, or, in other words, a storage space unit of the highest level on it. You can have only one partition, occupying 100% of your HD, or divide your hard disk into multiple partitions (each for a certain purpose), determine their size, install the operating and file system you want. As a result, your single physical hard drive will turn into several smaller logical disks.
Actually a hard disk can exist on your machine without any partitions on it, but it’ll be pointless because you won’t be able to implement even basic tasks, say, install an operating system and thus store and access your data properly. It need be added that you can install the majority of Windows OSes onto a non-partitioned disk - in this case the operating system will implement partitioning itself in the course of installation.


Types of hard drive partitions

Primary Partition is a partition that is needed to store and boot an operating system, though applications and user data can reside there as well, and what’s more, you can have a primary partition without any operating system on it. There can be up to a maximum of four primary partitions on a single hard disk, with only one of them set as active (see “Active partition”).
Active (boot) partition is a primary partition that has an operating system installed on it. It is used for booting your machine. If you have a single primary partition, it is regarded as active. If you have more than one primary partition, only one of them is marked active (in a given PC session).
Extended partition can be sub-divided into logical drives and is viewed as a container for logical drives, where data proper is located. An extended partition is not formatted or assigned a drive letter. The extended partition is used only for creating a desired number of logical partitions.
Logical drive is created within an extended partition. A logical partition is a way to extend the initial limitation of four partitions. An extended partition can contain up to 24 logical partitions (you’re limited by the number of drive letters and the amount of hard drive space available for creating drives; of course, it’s senseless to use 24 partitions on a system in most cases, because it will be a data organization nightmare). Logical partitions are used for storing data mainly, they can be formatted and assigned drive letters; their details are listed in the extended partition’s table - EMBR (Extended Master Boot Record).


Drive partitioning operations

There are 2 types of partition operations: basic and advanced. The former are more frequent, but you are likely to need to perform the latter ones either. So, let’s analyze both types.
Basic partition operations:
  • Create partition
  • Increase/decrease partition size
  • Increase free space
If a partition’s capacity is not sufficient for storing extra data on it, you might need to increase its space. The increase free space wizard will help you fulfill this task.
  • Move partition
In what cases do you move partitions? First, if you want to change the letter order assigned by the OS. Then in case you need to work with some older OS that can boot from binary partitions located at the beginning of the disk, you also perform this kind of operation. Speeding up partition operations and changing partition configuration are also implemented by means of moving partitions.
  • Copy partition
You perform this operation when you create a partition backup or want to move all data from an old disk to a new one.
  • Delete partition
After a partition is deleted, its space is added to unallocated disk space. It can be used for a new partition or to resize an existing partition.
  • Delete partition and destroy data (Wipe process)
To securely wipe out data stored on the deleted partition use special partitioning tools, which include powerful hard disk/partition wiping utilities.
  • Split partition
You can split a partition in two or create an empty partition from another partition’s free space.
  • Merge partitions
You can merge two partitions, even if their file systems are different. All data will stay intact and reside on the resulting partition.
  • Explore partition
You can explore and manage partition contents before configuring operations on that partition.
  • Changing partition labels
The partition label is a name assigned to a partition for easier recognition, for example, “System”, “Data”, etc.
  • Format partition
To organize a file system that supports files and folders data storage, you must format a partition.
  • Checking hard disk partitions for errors
  • Defragmenting a partition
Defragmentation is reorganizing file storage on a hard disk partition so that parts of files are not spread about the disk, which allows the red head to move less across the disk and thus, increases PC and server performance.
Advanced partition operations:
  • Changing partition letter
Some operating systems assign letters to hard disk partitions at startup. Connecting an additional disk as well as creating or deleting a partition on existing disks might change your system configuration. As a result, some applications might stop working or user files might not be opened. To avoid this, you can change letters assigned by the operating system.
  • Converting a file system
Some file systems do not support large-sized partitions, files, or disks. They may also have a limited root size. To improve these characteristics you can use this particular feature.
Supported conversions:
FAT 16→ FAT 32
FAT 16→NTFS
FAT 32→FAT 16
FAT 32→NTFS
NTFS→FAT 16
NTFS→FAT 32
Ext2→Ext3
Ext3→Ext2
  • Hiding a partition
This option is necessary for protecting important information from unauthorized or casual access. Partition software usually allows you to hide both primary and logical partitions.
  • Unhiding a partition
This feature lets the operating system see the partition, assign a letter and provide access to its files.
  • Setting active partition
Since a hard disk can have only one active partition, the latter must be set.
  • Resizing a root
The FAT 16 partition is located in a special place and has a limited size. Advanced partitioning tools enable you to change the size of existing partitions.
  • Changing cluster size
A file occupies at least one cluster (one unit of disk space allocation for files and directories). Smaller clusters reduce slack disk space.
  • Changing partition type
This operation is performed to change a hexadecimal value that defines the file and operating system suitable for a partition.

Tuesday, May 28, 2013

MaraDNS - Implements DNS on Windows and UNIX

A small open-source DNS server



MaraDNS is a package that implements the Domain Name Service (DNS), an essential internet service. MaraDNS is open source software; this means that anyone is free to download, use, and modify the program free of charge.
People like MaraDNS because it's small, lightweight, easy to set up, and remarkably secure. It's also cross platform -- the program runs both in Windows and in UNIX clones.

More information describing MaraDNS is on the overview and summary page.


Download MaraDNS :

The current stable release of MaraDNS is MaraDNS 2.0.07, released January 20, 2013. This release is available as UNIX/Windows source code (in two different compression formats) as well as a Windows binary (the win32.zip file).

Download Link :

http://www.maradns.org/download.html


MaraDNS tutorial :


With this tool you can  implement DNS on your own home PC running Windows or Linux.

What Is a Port Number (Logical Port)?

In computer networking, the term port can refer to either physical or virtual connection points.
When considering computer networks, there are two kinds of port that we deal with - Physical Ports and Logical Ports. 



Physical network ports allow connecting cables to computers, routers, modems and other peripheral devices. Several different types of physical ports available on computer network hardware.
A physical port, as opposed to a virtual or logical port is an interface on a computer into which you can insert a connector for a device.
Examples of Physical Port : RJ45 port (Ethernet/LAN/NIC Port), Serial Port (RS-232), USB Port.

Virtual ports are part of TCP/IP networking. These ports allow software applications to share hardware resources without interfering with each other. Computers and routers automatically manage network traffic traveling via their virtual ports. Network firewalls additionally provide some control over the flow of traffic on each virtual port for security purposes.



Logical Port :

In computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint in a computer's host operating system. A port is associated with an IP address of the host, as well as the type of protocol used for communication. The purpose of ports is to uniquely identify different applications or processes running on a single computer and thereby enable them to share a single physical connection to a packet-switched network like the Internet.

The protocols that primarily use ports are the Transport Layer protocols, such as the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) of the Internet Protocol Suite. A port is identified for each address and protocol by a 16-bit number, commonly known as the port number. The port number, added to a computer's IP address, completes the destination address for a communications session. That is, data packets are routed across the network to a specific destination IP address, and then, upon reaching the destination computer, are further routed to the specific process bound to the destination port number.
Note that it is the combination of IP address and port number together that must be globally unique. Thus, different IP addresses or protocols may use the same port number for communication; e.g., on a given host or interface UDP and TCP may use the same port number, or on a host with two interfaces, both addresses may be associated with a port having the same number.

In computer networking, a port number is part of the addressing information used to identify the senders and receivers of messages. Port numbers are most commonly used with TCP/IP connections. Home network routers and computer software work with ports and sometimes allow you to configure port number settings. These port numbers allow different applications on the same computer to share network resources simultaneously.




[ Click On Image to Enlarge ]

How Port Numbers Work

Port numbers are associated with network addresses. For example, in TCP/IP networking, both TCP and UDP utilize their own set of ports that work together with IP addresses.
Port numbers work like telephone extensions. Just as a business telephone switchboard can use a main phone number and assign each employee an extension number (like x100, x101, etc.), so a computer has a main address and a set of port numbers to handle incoming and outgoing connections.
In both TCP and UDP, port numbers start at 0 and go up to 65535. Numbers in the lower ranges are dedicated to common Internet protocols (like 21 for FTP and 80 for HTTP).

Port numbers are typically processed by network hardware and software automatically. Normally you will not see them while casually using a network nor need to take any action involving them. However, in these special cases you can work with network port numbers:When You May Need to Take Action with Port Numbers

  • network administrators may need to set up port forwarding to allow the port numbers of specific applications to pass through a firewall. On home networks, broadband routers support port forwarding on their configuration screens.
  • network programmers sometimes need to specify port numbers in their code, such as in socket programming.
  • sometimes, a Web site URL will require a specific TCP port number be included. For example, http://localhost:8080/ uses TCP port 8080. Again, this is more usually seen in software development environments than on the Internet.
For List Of UDP and TCP Port Numbers Please Visit this LINK :


In TCP/IP and UDP networks, a port is an endpoint to a logical connection and the way a client program specifies a specific server program on a computer in a network. Some ports have numbers that are pre-assigned to them by the IANA, and these are called the "well-known ports" which are specified in RFC 1700.
Port numbers range from 0 to 65536, but only ports numbers 0 to 1024 are reserved for privileged services and designated as well-known ports. This list of well-known port numbers specifies the port used by the server process as its contact port.
Port NumberDescription
1TCP Port Service Multiplexer (TCPMUX)
5Remote Job Entry (RJE)
7ECHO
18Message Send Protocol (MSP)
20FTP -- Data
21FTP -- Control
22SSH Remote Login Protocol
23Telnet
25Simple Mail Transfer Protocol (SMTP)
29MSG ICP
37Time
42Host Name Server (Nameserv)
43WhoIs
49Login Host Protocol (Login)
53Domain Name System (DNS)
69Trivial File Transfer Protocol (TFTP)
70Gopher Services
79Finger
80HTTP
103X.400 Standard
108SNA Gateway Access Server
109POP2
110POP3
115Simple File Transfer Protocol (SFTP)
118SQL Services
119Newsgroup (NNTP)
137NetBIOS Name Service
139NetBIOS Datagram Service
143Interim Mail Access Protocol (IMAP)
150NetBIOS Session Service
156SQL Server
161SNMP
179Border Gateway Protocol (BGP)
190Gateway Access Control Protocol (GACP)
194Internet Relay Chat (IRC)
197Directory Location Service (DLS)
389Lightweight Directory Access Protocol (LDAP)
396Novell Netware over IP
443HTTPS
444Simple Network Paging Protocol (SNPP)
445Microsoft-DS
458Apple QuickTime
546DHCP Client
547DHCP Server
563SNEWS
569MSN
1080Socks
For further information, see RFC 1700.

GRUB ( The Grub bootloader )

GRUB stands for GRand Unified Bootloader. It's meant as a alternative to the widely-used LILO (LInux LOader). In many ways, it is superior to LILO. One such advantage of GRUB is that if the configuration file is incorrect or corrupted, you may still be able to boot your system. It does require a basic familiarity with using GRUB in Interactive mode.



Few methods to deal with GRUB Issues :


To restore Grub to the MBR:

$ su
< password >
# grub-install /dev/hda

To setup Grub or add new entries:

Note:

Grub uses its own naming structure for drives and partitions, in the form of (hdn,m), where n is the hard drive number, and m the partition number, both starting from zero. This means, for instance, that partition hda1 is (hd0,0) to Grub, and hdb2 is (hd1,1). Grub doesn't consider CD-ROM drives to be hard drives, so if you have a CD on hdb, for example, and a second hard drive on hdc, that second hard drive would still be (hd1).

Note that GRUB does _not_ distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally, any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.


Setup Grub:

# grub

First, tell Grub where to find the 'stage files' -- you can use Tab to show the alternatives: ( in this example hda4 )

root (hd0,3)

Now tell Grub to install into the MBR of hda:

setup (hd0)

And close with:

quit

Make or adapt the menu.lst: ( And new entries )

# vi /boot/grub/menu.lst

# Begin /boot/grub/menu.lst

# By default boot the first menu entry.

default 0

# Allow 30 seconds before booting the default.

timeout 30

# Use prettier colors.

color green/black light-green/black

# The first entry is for Linux.

title Linux
root (hd0,3)
kernel /boot/vmlinuz root=/dev/hda4 ro

# If you want, a second entry for RedHat

title RedHat
root (hd0,2)
kernel /boot/kernel-2.4.20 root=/dev/hda3 ro
initrd /boot/initrd-2.4.20

# You wish to include Windows ?

title Windows
rootnoverify (hd0,0)
chainloader +1

Emergency

If things go really wrong and you get only a grub prompt you can still boot . . . .

For Windows:

grub> root noverify (hd0,0)
grub> chainloader +1
grub> boot

For Linux ( on hda4 like in example above ):

grub> root (hd0,3)
grub> kernel /boot/vmlinuz root=/dev/hda4 ro
grub> boot



Install and Run DHCP Server on Windows XP / Vista / 7


A DHCP Server assigns IP addresses to client computers. This is very often used in enterprise networks to reduce configuration efforts. All IP addresses of all computers are stored in a database that resides on a server machine.
This is a very simple and easy to use implementation of a DHCP Server for Windows based systems supporting all Windows operating systems from Windows 98 to Windows 7.
The configuration data as well as the client “database” is kept in an INI file.

The DHCP Server runs instantly without any installation as a service or application.


RUNNING THE DHCP SERVER

A DHCP Server is a protocol server for TCP/IP networks that supplies IP addresses to other computers. DHCP Server for Windows also supports TFTP, DNS and HTTP protocol which makes a nice package for easy and simple to install networks e.g. for remote boot and other purposes. DHCP server runs on all Win32 capable Windows operating systems starting from Windows 95 to Windows 7.

Installation

The DHCP Server is a portable application and runs from anywhere on your computer. Extract the content of the zip file wherever you like, e.g. D:\dhcpsrv. You will now find the following files in there:
  • dhcpsrv.exe
  • dhcpwiz.exe
  • readme.txt
  • wwwroot
    • dhcpstyle.xsl
    • dhcppkgstyle.xsl
    • favicon.ico
    • index.html
    • RJ45_5.jpg
    • RJ45_52.jpg

Configuration with dhcpwiz.exe

If you are a first time user of DHCP server then the dhcpwiz.exe program gives you a good head start in setting up the ini file needed to run the DHCP server. The dhcpwiz.exe program is a wizard style configuration program for the DHCP server. It will guide you in 6 easy steps through the basic configuration of the software.

For More details regarding DHCP Installation and Configuration please visit the following link :


For Downloading the DHCP Server files please visit the following link:


DHCP Server assigns IP addresses to multiple clients


Friday, May 24, 2013

What is Mac OS HFS+ format ?


The Mac OS Extended Format (HFS+) is a volume format compatible with Mac OS 8.1 and higher, including Mac OS X. In terms of volume, folder, and file size limits, it is similar to the Macintosh Standard Format (HFS). 
HFS+ or HFS Plus is a file system developed by Apple Computer Inc. to replace their Hierarchical File System (HFS) as the primary file system used in Macintosh computers (or other systems running Mac OS). It is also one of the formats used by the iPod music player. HFS+ is also referred to as Mac OS Extended Volume Hard Drive Format, where its predecessor, HFS, is also referred to as Mac OS Standard.

HFS+ is an improved version of HFS, supporting much larger files (block addresses are 32-bit length instead of 16-bit) and using Unicode (instead of Mac OS Roman or any of several other character sets) for naming the items (files, folders) - names which are also character encoded in UTF-16 and normalized to a form very nearly the same as Unicode Normalization Form D (NFD) (which means that precomposed characters like é are decomposed in the HFS+ filename and therefore count as two characters and UTF-16 implies that characters from outside the Basic Multilingual Plane - often seldom used and characters from ancient writing systems - also count as two characters in an HFS+ filename). HFS Plus permits filenames up to 255 UTF-16 characters in length, and n-forked files similar to NTFS, though until recently, almost no software takes advantage of forks other than the data fork and resource fork. HFS+ also uses a full 32-bit allocation mapping table, rather than HFS’s 16 bits. This was a serious limitation of HFS, meaning that no disk could support more than 65,536 allocation blocks under HFS. When disks were small, this was of little consequence, but as larger-capacity drives became available, it meant that the smallest amount of space that any file could occupy (a single allocation block) became excessively large, wasting significant amounts of space. For example, on a 1 GB disk, the allocation block size under HFS is 16 KB, so even a 1 byte file would take up 16 KB of disk space.

How do I know a hard disk is HFS+ format?

Select the hard disk in the Finder and choose the Get Info command in the File menu. The format information will specify either Mac OS Standard (hfs) or Mac OS Extended (hfs+). 

What are the differences between HFS+ format and HFS format?

The most visible difference between HFS+ format and HFS format, other than the minimum file size, is the maximum number of files. 

An HFS+ volume contains five special files:

  1. Catalog file - Describes the folder and file hierarchy of the volume. It is organized as a "balanced tree" for fast and efficient searches
  2. Allocation file - Specifies whether an allocation block is free (similar to $Bitmap in NTFS). This is stored in a bitmap, specifying a free allocation block with a "clear bit"
  3. Attributes file - Contains attribute information regarding files or folders
  4. Extents overflow file - Additional extents (contiguous allocation blocks allocated to forks) are stored in a b-tree in this file
  5. Startup file - Allows computers to boot that do have built in support for HFS+ file systems

What is FAT and NTFS ?


FAT Definition:

FAT, short for File Allocation Table (used by hard disks, disks, Smartmedia™, Compact Flash™, Memory Stick and other), 
A table that the operating system uses to locate files on a disk. Due to fragmentation, a file may be divided into many sections that are scattered around the disk. The FAT keeps track of all these pieces. 
It is a file system that was created by Microsoft in 1977. FAT ( also know as FAT, FAT16, and FAT32 ) is still in use today as the preferred file system for floppy drive media and portable, high capacity storage devices like flash drives.

FAT was the primary file system used in all of Microsoft's consumer operating systems from MS-DOS to Windows ME. The New Technology File System (NTFS) is the primary file system on Microsoft's newer operating systems but FAT is still a supported option.

Below is more information on the versions of the FAT file system:
  • FAT12 - The initial version of the FAT file system, FAT12 was introduced in 1977, even before MS-DOS, and was the primary file system for Microsoft operating systems up to MS-DOS 4.0. FAT12 supports drive sizes up to 32MB.
  • FAT16 - The second implementation of FAT was FAT16, introduced in 1981. FAT16 was the primary file system for MS-DOS 4.0 up to Windows 95. FAT16 supports drive sizes up to 2GB. It was designed originally to handle files on a floppy drive, and has had minor modifications over the years so it can handle hard disks, and even file names longer than the original limitation of 8.3 characters, but it's still the lowest common denominator. The biggest advantage of FAT16 is that it is compatible across a wide variety of operating systems, including Windows 95/98/Me, OS/2, Linux, and some versions of UNIX. The biggest problem of FAT16 is that it has a fixed maximum number of clusters per partition, so as hard disks get bigger and bigger, the size of each cluster has to get larger. In a 2–GB partition, each cluster is 32 kilobytes, meaning that even the smallest file on the partition will take up 32 KB of space. FAT16 also doesn't support compression, encryption, or advanced security using access control lists.
  • FAT32 - FAT32 is the latest version of the FAT file system. It was introduced in 1996 for Windows 95 Service Pack 2 users and was the primary file system for consumer Windows versions through Windows ME. FAT32 supports drive sizes up to 8TB.
    FAT32 shares all of the other limitations of FAT16, and adds an important additional limitation—many operating systems that can recognize FAT16 will not work with FAT32—most notably Windows NT, but also Linux and UNIX as well. Now this isn't a problem if you're running FAT32 on a Windows XP computer and sharing your drive out to other computers on your network—they don't need to know (and generally don't really care) what your underlying file system is.



New Technology File System (NTFS):

NTFS Short for NT File System, is a high-performance and self-healing file system used in Windows Vista, Windows XP, 2003, 2000, NT and Windows 7, which supports file-level security, compression and auditing. It also supports large volumes and powerful storage solution such as RAID. NTFS supports hard drive sizes up to 256TB.

NTFS supersedes the FAT file system as the preferred file system for Windows operating systems. NTFS has several improvements over FAT and HPFS (High Performance File System) such as improved support for metadata and the use of advanced data structures to improve performance, reliability, and disk space utilization, plus additional extensions such as security access control lists (ACL) and file system journaling.

The most important new feature of NTFS is the ability to encrypt files and folders to protect your sensitive data.

The Advantages of NTFS:

The NTFS file system, introduced with first version of Windows NT, is a completely different file system from FAT. It provides for greatly increased security, file–by–file compression, quotas, and even encryption. It is the default file system for new installations of Windows XP, and if you're doing an upgrade from a previous version of Windows, you'll be asked if you want to convert your existing file systems to NTFS. Don't worry. If you've already upgraded to Windows XP and didn't do the conversion then, it's not a problem. You can convert FAT16 or FAT32 volumes to NTFS at any point. Just remember that you can't easily go back to FAT or FAT32 (without reformatting the drive or partition), not that I think you'll want to.

The NTFS file system is generally not compatible with other operating systems installed on the same computer, nor is it available when you've booted a computer from a floppy disk. For this reason, many system administrators, myself included, used to recommend that users format at least a small partition at the beginning of their main hard disk as FAT. This partition provided a place to store emergency recovery tools or special drivers needed for reinstallation, and was a mechanism for digging yourself out of the hole you'd just dug into. But with the enhanced recovery abilities built into Windows XP (more on that in a future column), I don't think it's necessary or desirable to create that initial FAT partition.

What is a Sector and a Bad Sector ?

A sector is a small area on the surface of a hard drive or a floppy disk.


The smallest unit that can be accessed on a disk. When a disk undergoes a low-level format, it is divided into tracks and sectors. The tracks are concentric circles around the disk and the sectors are segments within each circle. For example, a formatted disk might have 40 tracks, with each track divided into 10 sectors. The operating system and disk drive keep tabs on where information is stored on the disk by noting its track and sector number. 

Modern hard disk drives use a technique called zoned-bit recording in which tracks on the outside of the disk contain more sectors than those on the inside. 

A sector that cannot be used due to a physical flaw on the disk is called a bad sector.

What is Bad Sector?

Hard drives are contain millions of sectors. It is very normal for some of these sectors to be bad sectors, even when the drive is first manufactured.

In addition, a small number of sectors will normally go bad during the lifespan of a drive.

When this happens, the data in those sectors may be lost, but the data on the rest of the disk will be unaffected and the disk is still completely usable.

A bad sector cannot be repaired, but it can be marked as unusable. Once marked as unusable, the Operating System will know not to attempt to store data in that bad sector. The storage capacity of the disk will be decreased by the amount of storage space in the bad sector.

If your hard drive develops a bad sector, back the hard drive up immediately. If the bad sector was caused by a faulty drive head, the problem can quickly spread to other sectors on the disk.