Archive for May, 2010

Question Dissection: Making Boot Diskettes

Note: The Question Dissection Series is designed to present a sample LPIC Exam question taken from various sources for study, providing the right and wrong answers with explanations designed to show you how questions should be read and understood. Additionally there are Notes that point to sites, resources and other tools to help you study properly for the concepts contained in the question.

Question: Making Boot Diskettes

From objective 103.3 Perform basic file management

You need to create a boot disk on a running Linux system. Which command is used to perform this function?

❍ A. rawrite.exe
❍ B. diskcopy
❍ C. makeboot.bat
❍ D. dd

Answer D is correct because the dd command can write disk images from the installation CD-ROM to a floppy.
Answers A, B, and C are incorrect because they run on a DOS/Windows system.

Notes: While making boot diskettes isn’t the most up to date topic, you will definitely find situations still today that require a boot floppy, either because the machine has weird hardware, no DVD drive, or all you need to do is boot and repair something quick.

Several resources can be helpful in learning more about this topic, the first of which would be Chapter 1 of the current version of my LPIC 1 Exam Cram 2 book (look for it in the sidebar ->), starting on Pg 13, the second would be the dd man pages ( man dd ).

Any comments, suggestions or questions are welcome.

RossB

Copyright 2000-2009 Ross Brunson

No Comments

Certifiable: LPIC Level 1 Exam Question Types – Part 2 of 2

rossbrunsonCertifiable is a series dedicated to helping you get ready to take the LPIC 1 exams, both in mental state and how to study and experiment more effectively.

LPIC Exam Question Types – Continued…

In part 1 of this mini-series we covered how to take apart and answer the more common question types.  In this, part 2, we’ll cover some of the lesser-well-known question types, ones that the typical Microsoft or Cisco candidate won’t have any experience with, and that can be much more difficult to answer.

Fill-in-the-Blank Questions

This question type has been nicknamed by attendees of my bootcamps as TFQs (those fine questions). Fill-in-the-blanks are the most difficult of the types because the possibility of guessing your way through one is about zero. There is just the question and a large, long text box to type your answer into. Typically, the exams contain 6–11 of these questions, by my estimation.

Rule: If it works on the command line, it should be correct. Don’t get tricky, though, and try to show off your skills—simpler is better. Always double-check exactly what the question wanted. Don’t type in a long command string for a question that asks just for the command name.

Sample Fill-in-the-Blank Question

What command with necessary switches shows you the information page and a complete listing of files for a downloaded RPM package file named pkg1.rpm? (Type in the answer below.)

_____________________________

Answer rpm –qpil pkg1.rpm is correct. When typing in answers, be sure you use that standard order of options, such as the q character coming first in queries, followed by the rest of the options. Long options, such as –nodeps, are typically entered right after the short options.

Note: There are multiple correct versions of these answers. For example a tar command that uses the – before options is correct, and one that has the same options without a – is correct, too.

LPI has a table in the exam software that contains all the right strings; your answer is matched against this table when you click Next.

Identify-the-Component Questions

Very few of these appear on the LPIC exams, but the odd one has been sighted by a few people, including the author. Essentially, you’re shown a graphic and asked to identify the component or to select the correct component from a list of graphics shown as answers. Don’t get excited about how Linux+-like this type of question is; very few of them appear on the LPIC exams.

Sample Identify-the-Component Question

What is the component in the exhibit?  (There will be a picture in the testing interface of a physical component such as a PCMCIA Card.)

❑ A. PCI card
❑ B. VLB card
❑ C. PCMCIA card
❑ D. Async I/O card

Answer C is correct. The card is obviously a PCMCIA card due to the size, style, and connector type on the left side. Answer A is incorrect because the exhibit shows a PCMCIA card. Answer B is incorrect because the exhibit shows a PCMCIA card.
Answer D is incorrect because the phrase Async I/O Card is too ambiguous and doesn’t mean anything.

Warning: Watch out for questions about SCSI connectors or cable ends; counting the pins is
the best option.

Additional Exam Tips

If you are not finished when 95% of the time has elapsed, use the last few minutes to guess your way through the remaining questions.

Tip: Remember that guessing is potentially more valuable than not answering because blank
answers are always wrong, but a guess can turn out to be right.

If you don’t have a clue about any of the remaining questions, pick answers at random or choose all As, Bs, and so on. The important thing is to submit an exam for scoring that has an answer for every question.

Danger, Will Robinson

Be extremely careful when changing previously answered questions! Many an attendee has missed the exam by 10 or 20 points, and when queried how many questions they weren’t sure about and changed, the typical answer is “one or two.” Don’t change answers unless you are certain you have found a better answer in a later question—go with your gut.

Good Luck, we’ll cover next how to go back and study more about what you might have missed, particularly if you’re like a lot of people and get to, umm, take the exam again in a few weeks…

Enjoy,

RossB

3 Comments

Certifiable: LPIC Level 1 Exam Question Types – Part 1 of 2

rossbrunsonCertifiable is a series dedicated to helping you get ready to take the LPIC 1 exams, both in mental state and how to study and experiment more effectively.

LPIC Exam Question Types

In this article, you will learn more about how the LPIC test questions look and how they can and should be answered. Several types will be unfamiliar to those used to Microsoft and Cisco exams; these are covered in detail along with the usual question types/suspects.

Overall, the LPIC exams are most similar to the Sun Solaris exams; they feature the same question types and similar styles of answers. LPIC questions are short, blunt, and easy to answer if you’ve done the action or item being tested. I have seen grown-ups nearly cry  in frustration, particularly if the requisite labs and studying haven’t been performed.

Multiple-choice Questions

Multiple-choice questions are single-answer, as opposed to a Choose Two or Choose All That Apply question. LPIs are much the same as any other vendor’s multiple-choice questions. The main difference consists of long command strings and a lot of options to parse through. There is only one answer, and this question type is the easiest to get through.

Tip: An important strategy for getting through multiple-choice questions is to read all the possible answers and discard any that are silly, obscure, or outright wrong. It’s possible to not know the answer and get the question right through the process of elimination.

This is a main reason the LPIC exams have so many of the other question types—they don’t want us to guess our way into a certification!  Guessing a Multiple-Choice is not very hard, you have at least a 1 in 4 chance, maybe as high as 50/50 if you read it right.

Sample Multiple-choice Question

Which of the following commands shows the full listing of normal files in the current directory?

❍ A. ls –l
❍ B. ls -1
❍ C. du .
❍ D. df -h

Answer A is correct because the ls command and stat are the only utilities to show a full set of inode information about a file.
Answer B is incorrect because the 1 option shows files in a single column and shows just the filenames.
Answer C is incorrect because the du command doesn’t show the full file information.
Answer D is incorrect because the df command shows only the free/used disk space.

Choose Two/Three Questions

These are a little tougher than the multiple-choice questions because there are usually five or six answers and the question has you choose two or three answers from the available choices. Not selecting enough of the answers marks this question in the review screen as incomplete. If the exam wants you to choose all the correct answers from the list, the question states, “Choose all that apply.”

Sample Choose Two/Three Question

Which steps must be performed before a newly installed hard drive is available for use by a normal user account? (Choose three.)

❑ A. mkfs
❑ B. mount
❑ C. scsi_info
❑ D. dd
❑ E. fdisk

Answers A, B, and E are correct. For a disk to be used by a standard or normal user, it must have at least one partition put on it (fdisk), have a file system of some type on that partition (mkfs), and be mounted by the root user or an entry in the /etc/fstab file that enables users to mount it without the root user’s help.
Answer C is incorrect because the scsi_info tool gathers information about SCSI devices but is not necessary to the process of a user gaining access to a disk.
Answer D is incorrect because the dd command transfers one file format to another but has no effect on users accessing disks.

Choose All That Apply Questions

More difficult than the previous types, these actually make you think through all the possible answers because any of them might be right. LPI is the only vendor to my knowledge that uses these questions with only a single answer in some cases. The best strategy is to read all the answers and mark the correct ones. Use your note paper to keep track if it’s confusing.

Sample Choose All That Apply Question

Which of the following commands creates a second file that is identical to the first? (Choose all that apply.)

❑ A. cp file1 file2
❑ B. cat file1 | file2
❑ C. cp < file1 > file2
❑ D. dd if=file1 of=file2
❑ E. cat file1 > file2

Answers A, D, and E are correct. Using the cp command to copy one file to the other is normal; the difference between answers B and E is the incorrect use of the | symbol to another file. It must be followed by a program, and the unusual usage of the dd command will work in this case.
Answer B is incorrect because files may not be redirected via a pipe symbol (|).
Answer C is incorrect because the use of the < and > characters produces a syntax error.

To Be Continued…

RossB

3 Comments

Command Post: fdisk

Command Post is a series designed increase your understanding of a given command, it’s configuration files, usage and tips for exam questions about the command.

Understanding fdisk

The fdisk tool is line oriented and somewhat cryptic. When you issue commands to the fdisk tool, your choices and the output scroll upward over time and disappear from view, making it hard to see large sets of disk information and even to remember where you are in a complex configuration.  (This is in marked contrast to tools like cfdisk, where everything is screen-oriented and menu-driven.  We’ll be covering cfdisk separately in another Command Post.)

It’s very important to remember that fdisk destructively alters the partition table, with the writing taking place after you press the W key and Enter. Up to that point, pressing the Q key and Enter helps you escape an fdisk configuration gone bad.

Using fdisk

A typical fdisk session that creates a typical workstation disk layout is described in the following, step-by-step list. The partition layout consists of 200MB /boot, 750MB swap, and 6GB / (root). It then makes a single extended partition and a 1GB data partition in that extended partition:

Please note that output from the fdisk program is shown to support what the user will see. Anywhere you need to type or enter something, I’ve noted it.

1. Start the fdisk tool, specifying the disk to configure the following.  (For example, if you have a single IDE drive, you would use the target /dev/hda.)

# fdisk /dev/hda
The number of cylinders for this disk is set to 2088.
... (text deleted)
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help):

2. Type m for the menu:

Command action
  a toggle a bootable flag
  b edit bsd disklabelc toggle the dos compatibility flag
  d delete a partition
  l list known partition types
  m print this menu
  n add a new partition
  o create a new empty DOS partition table
  p print the partition table
  q quit without saving changes
  s create a new empty Sun disklabel
  t change a partition’s system id
  u change display/entry units
  v verify the partition table
  w write table to disk and exit
  x extra functionality (experts only)
Command (m for help):

3. Issue the p command to see the partition table, and assume it’s blank:

Command (m for help): p
Disk /dev/hda: 17.1 GB, 17179803648 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
    Device Boot Start End Blocks Id System
Command (m for help):

4. To create a 200MB /boot partition, issue the following commands:

n
p
1
(Press Enter)
+200MB
(Press Enter)

5. Check your new partition with the p command.

6. To create the 750MB swap partition, issue the following commands:

n
p
2
(Press Enter)
+750MB
(Press Enter)

7. To create the 6GB root partition, issue the following commands:

n
p
3
(Press Enter)
+6000MB
(Press Enter)

8. Enter the p command again to check the layout again:

Device Boot Start End Blocks Id System
/dev/hda1 1 25 200781 83 Linux
/dev/hda2 26 117 738990 83 Linux
/dev/hda3 118 847 5863725 83 Linux
Command (m for help):

9. To create the extended partition, issue the following keystrokes:

n
e
4
(Press Enter)
(Press Enter)

10. To create the data logical partition, issue the following keystrokes:

n
(Press Enter)
+1024MB
(Press Enter)

11. Lastly, set the 750MB partition to the type 82, which is used for Linux
swap partitions with the following:

t
2
L
82

12. Check your partition layout with the p command:

Device Boot Start End Blocks Id System
/dev/hda1 1 25 200781 83 Linux
/dev/hda2 26 117 738990 82 Linux swap
/dev/hda3 118 847 5863725 83 Linux
/dev/hda4 848 2088 9968332+ 5 Extended
/dev/hda5 848 972 1004031 83 Linux

13. Write the changes to the disk with the w command followed by pressing Enter.

It’s important to note that while the fdisk command may now indicate that the system might require a reboot at this point because you’ve altered the drive on which the system’s root (/) partition exists. Also note how the first logical partition becomes /dev/hda5 for IDE drives.

Summary

Partitioning properly is an important skill for a system administrator to have, and you’ll find that servers and workstations partitioning needs are quite different.  A workstation can have a very simple and direct partitioning structure, there’s usually a single user and most data will be in the /home/username directory.  If the user fills up their home directory and consequently the / of the drive, it will likely affect only the user.  (Well, and the poor helpdesk staffer who takes _that_ call.)

Servers are a completely different matter, there are many situations for a server that necessitate putting a section of the filesystem on it’s own partition.  For example, putting /home on it’s own partition is key, this limits the system’s users disk usage to that partition, leaving the root partition unaffected.  An additional high-traffic/volume directory tree is /var.  Putting /var on it’s own partition limits the damage that unusual amounts of log entries (/var/log) or mail (/var/spool/mail) or for some distributions web (/var/www) or FTP (/var/ftp) can cause.  An FTP upload session gone bad, or an attempted denial of service by uploading ISO images to the FTP upload directory can disable an improperly-partitioned server by quickly filling the drive, including the /.

You can get more information about the use of fdisk from a variety of sources, the first of which would be Chapter 1 of the current version of my book, LPIC 1 Exam Cram 2 (look for it in the sidebar ->), starting on Pg 10, the second would be the man pages for the fdisk command (man fdisk).

Enjoy,

RossB

No Comments