Home > Articles


In this chapter, we have covered the types of partitions you will create. A primary partition is necessary for an operating system to boot. An extended partition is a container for logical drives that are then used to store data. Linux also has a special type of partition called a swap partition, which are used as virtual memory.

The fdisk utility is used to create these partitions. When creating a new partition, you must designate the beginning and ending cylinders. After the partitions are created, you must create a filesystem by using the format command.

The fsck command is used to examine the filesystem for errors and can be used to repair any errors found. Other utilities you can use to monitor your disk's health are the df and du commands, which are used to determine partition size and usage.


1. After installing a new hard disk, what is your first step?

A. You first will need to partition the hard disk. You can create up to four partitions on a single hard disk.

2. Before installing Linux on your computer, what should you do to prepare the hard disk?

A. After partitions have been created, you must associate each one with the appropriate filesystem and format the partitions so you will be able to save files to it.

3. Although you have 2GB of free space on your hard disk, when you use fdsk to create the partition, you receive an error and the action fails. Why?

A. One of two things might be the problem. First, if you already have four partitions on the hard disk, you will not be able to create any more partitions no matter how much free space you have. The second possibility is that you are trying to create an extended partition and one already exists. You can have only one extended partition at a time.

4. What can you do if you want to install Linux on a computer that is running Windows 95 and does not have any free space?

A. You can shrink the partition by using the fips program, provided that not all the partition is occupied by files. This will work as long as the partition is formatted with FAT16.

5. What do the terms hda1 and sdc3 mean?

A. These are both names of partitions. The first example, hda1, refers to the first partition on the first IDE drive. The second example, sdc3, is the name of the third partition on the third SCSI disk.

6. After creating a new partition, what might keep you from installing a new application on it?

A. One potential problem would be if there were not enough unoccupied space on the partition to house the application. Also, you must format a partition before you can save files to it.

7. Your system will not boot and you suspect that you have a corrupted filesystem. What should you do?

A. The most common problem is that the superblock is corrupted. First, you will need to boot your system from a floppy. Then, use the e2fsck command and one of the copies of the superblock to repair the damaged superblock.

8. How can you determine whether or not the system you administer has an adequate amount of disk space?

A. You can use the du command with the -s option to determine how much space is being used and then subtract that number from the size of each partition. A better solution, however, is to use the df command, which provides you with the total size of each partition, amount of space being used, and amount of free space available.


  1. On a system with 8MB of RAM, what is the minimum and maximum recommended sizes of the swap partition?

  2. a. 8MB minimum, 16MB maximum

    b. 8MB minimum, 128MB maximum

    c. 16MB minimum, 16MB maximum

    d. 16MB minimum, 128MB maximum

    Answer a is incorrect; the swap partition should be equal to twice the amount of RAM and can be up to 128MB. Answer b is incorrect; the swap partition should be twice the amount of RAM. Answer c is incorrect; although the minimum size is correct, the maximum allowable size is 128MB. Answer d is correct; the minimum should be twice the amount of RAM (or 2x8MB) and the maximum allowable size is 128MB.

  3. When using the fdisk command, how do you indicate what size to make the partition?

  4. a. Indicate the starting and ending cylinders, which can be located anywhere on the hard disk.

    b. Pass the size of the partition as +nM to the fdisk command from the command line.

    c. Enter the starting cylinder, which should immediately follow the last partition and the ending cylinder or size.

    d. After selecting n to indicate a new partition, indicate its size as +nM.

    Answer a is incorrect; the starting cylinder must be the next one after the ending cylinder of the prior partition. Answer b is incorrect; fdisk takes only the name of the partition to divide as an argument. Answer c is correct; you must enter the starting cylinder, which has to be the next one after the ending cylinder of the last partition. You can then enter either the ending cylinder or the desired partition size, such as +80M, to create an 80MB partition. Answer d is incorrect; you must first specify the starting cylinder before the size of the partition.

  5. You have three partitions on your hard disk and 2GB of free space. You need to install an application that needs two partitions, a 50MB and a 300MB partition. What should you do?

  6. a. Create two new partitions in the free space.

    b. Create a new primary partition of 350MB and then use mkfs to divide it.

    c. Create a new extended partition of 2GB in size and then create two logical drives, one 50MB and one 350MB in size.

    d. Back up one of your partitions, delete it, and then re-create it, making it 350MB bigger.

    Answer a is incorrect; you can have only a total of four partitions. Answer b is incorrect; the mkfs command is used to create a filesystem on the new partition. Answer c is correct; because you can have only a total of four partitions, you must create an extended partition that can be divided into logical drives. Answer d is incorrect; although you could do this, it would not create the separate partitions you need.

  7. After creating your swap partition, what do you need to do to make it available to use for swapping by the operating system?

  8. a. Format the partition with the mkfs command.

    b. Change the type of partition to type 82 using the fdisk command.

    c. Format the partition with the mkfs.swap command.

    d. Pass the name of the partition to the kernel at boot.

    Answer a is incorrect; the swap partition does not need to be formatted. Answer b is correct; the swap partition needs to be designated as such by changing its type. Answer c is incorrect; there is no mkfs.swap command. Answer d is incorrect; you must change the type of a partition to make it a swap partition, not designate it as such on boot.

  9. Which of the following pieces of information is not necessary to pass to the mkfs command?

  10. a. Filesystem type

    b. Size of partition in bytes

    c. Partition name

    d. Size of partition in blocks

    Answer a is incorrect; you must tell mkfs the type of the filesystem to apply to the partition. Answer b is correct; the mkfs command does not need to know the number of bytes on the partition. Answer c is incorrect; you must tell mkfs which partition to format. Answer d is incorrect; you must tell mkfs how many blocks are present on the partition you are formatting.

  11. The inode structure contains all of the following, except

  12. a. Filename

    b. Access permissions

    c. The file's owner

    d. Date and time the file was last accessed

    Answer a is correct; the filename is stored in the directory, not the inode structure. Answer b is incorrect; the permission block is stored in the inode. Answer c is incorrect; both the owner and group names are stored in the inode. Answer d is incorrect; the times the file was last accessed and last modified are stored in the inode.

  13. You want to run fsck on your root partition. Which of the following will not enable you to do this?

  14. a. Boot with a floppy and then run fsck on root.

    b. Start in single-user mode and then run fsck.

    c. Use fsck with the -f option to force the check.

    d. Configure fsck to run at boot.

    Answer a is incorrect; if you boot from a floppy, you will be able to run fsck. Answer b is incorrect; booting into read-only, single-user mode will enable you to run fsck on root. Answer c is correct; there is no -f option to force fsck to run on a mounted filesystem. Answer d is incorrect; the most common time to run fsck on root is during boot.

  15. You need to prepare a report for your supervisor with the total space used by each user. What command would help you prepare this report?

  16. a. du

    b. df

    c. ls -l

    d. wc

    Answer a is correct; the du command displays the amount of disk space being used. Answer b is incorrect; the df command shows the amount of space used on an entire partition. Answer c is incorrect; this displays a list of all the files and their attributes. Answer d is incorrect; the wc command counts the words, characters, and lines in a file.

  17. You need to prepare a report that will be the basis of planning for needed hard disk space expansion. What command could you use to help prepare it?

  18. a. du

    b. df

    c. ls -l

    d. wc

    Answer a is incorrect; the du command displays the amount of disk space being used. Answer b is correct; the df command shows the amount of space used on each partition. Answer c is incorrect; this displays a list of all the files and their attributes. Answer d is incorrect; the wc command counts the words, characters, and lines in a file.

  19. The partition containing users' home directories is full. Which of the following solutions would not work?

  20. a. Create a new partition and move some users' home directories to the new partition.

    b. Back up the data, delete and re-create the partition with a bigger size, and then restore the data.

    c. Delete or move unused files.

    d. Instruct users to save files in another partition.

    Answer a is incorrect; by creating a new partition and moving some users' home directories you will solve your space problem. Answer b is incorrect; this is the only method available to enlarge a partition. Answer c is incorrect; this would be a good stopgap measure, but your space problem will likely recur. Answer d is correct; by instructing users to save files to a different partition, your organization scheme becomes chaotic, making files harder to find.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020