Questions and answers

1. Filesystem and Devices

1.1.

Why was it necessary to develop the Linux File Hierarchy?

The location of certain files and utilities not being standardized led to problems with development and upgrading between various distributions of Linux.

Linux File Hierarchy

1.2.

Does the inode part of the UNIX filesystem structure contain the name of a file?

No, an inode contains all the information on a file, except its name.

UNIX filesystem structure

1.3.

What is the fastest way to erase all data in an ext2 filesystem mounted at /mnt?

The command mkfs -t ext2 /mnt will erase all data in the /mnt filesystem by creating a new, empty filesystem. Part of the data may still be recoverable, of course.

Erasing all data in a filesystem

1.4.

Which file in the pseudo directory /proc contains basically the same information about swap as does the command free?

The file /proc/meminfo contains similar information.

Swap information

1.5.

What would you type before rebooting a system to ensure that the ext filesystems are not checked during boot?

Use e.g. tune2fs -c 5 -C 0 /dev/hda1 as well as for all other devices, in order to postpone filesystem checking for 5 remounts.

Use tune2fs

1.6.

What switches would you use in order to run debugfs in read-only mode?

Debugfs operates in read-only mode by default, therefore no switches are needed.

Use debug2fs

1.7.

What is the main purpose of auto-mounting?

It avoids the necessity of having to use the mount command in a number of situations. Mounting and unmounting is done automatically upon accessing the directory upon which the mount is to be done. This is useful in networked environments and for removable devices, such as USB attached disks and CD-ROMs.

Autofs and automounter

1.8.

What happens if you combine the floppy drive and the cdrom drive into the same supplementary (autofs) file?

Each file will have only one automount program running for it, so if one entry fails, the other will not work either.

One supplementary file per entry

1.9.

Which two commands are used for creating a mountable CD-ROM?

mkisofs is used to create the ISO9660 image and cdrecord is used to write that image to a CD-ROM.

CD-ROM filesystem

Copyright Snow B.V. The Netherlands