Using Linux:Managing the Filesystem
-->
Previous
Table of Contents
Next
Creating New Filesystems with cabaret
After you have configured a new filesystem entry using cabaret, you must create the filesystem on the disk itself. The Status button in cabaret provides a Format button. The resulting menu gives several options for the filesystem type with the format, but the type you already configured is preselected for you. If the filesystem you want is VFAT (Windows 95), you must format the disk as an MS-DOS disk, because the only difference between the two kinds of filesystems is the different way they handle long filenames.
The Red Hat Filesystem Manager
An easy way to set up filesystem entries in /etc/fstab is with the configuration tool Filesystem Manager in the Red Hat Control Panel (although you can invoke it separately as fstool). This program must be run during X11 sessions. The Filesystem Manager is shown in Figure 29.5.
Figure 29.5 The Filesystem Manager.
When you start fstool, it produces a window that contains all the entries in /etc/fstab. Each entry shows the device name, mount point, filesystem type, size, space used, and space available. Additionally, each mounted filesystem is marked with an asterisk. The Info button displays extra information about the highlighted filesystem (the same information as is indicated in /etc/fstab and in the output of the df command).
Filesystems can be mounted or unmounted with two buttons: Mount and Unmount. Any errors that occur are shown in a dialog box; this can happen if, for example, you try to mount a CD-ROM when there is no CD in the drive. (Go ahead and try it.) The Format button works only for hard disk partitions; for these, it runs mkfs (see the section Creating New Filesystems Manually, later in this chapter). Other media (for example, floppy disks) are formatted differently.
The Check button works only for ext2 and minix filesystems. If you get the error fsck: command not found, this just means that the directory /sbin is not on your path; you should be able to fix this by running su - root. (You might also need to do export DISPLAY=:0.0, if that is necessary.) Checking a filesystem can take a while, and the result is shown in a dialog box afterward. It is very unusual for errors to be shown for hard disk filesystems here because these are checked at boot time and dont get corrupted during the normal operation of Linux.
The NFS menu is used to add and remove NFS network mounts. You can exit the Filesystem Manager by selecting the Quit option from the FSM menu.
Editing /etc/fstab Manually
The filesystem table /etc/fstab is just a text file; it is designed to have a specific format that is readable by humans and not just computers. /etc/fstab is separated into columns by tabs or spaces and you can edit it with your favorite text editor. You must take care, however, if you modify it by hand, because removing or corrupting an entry can make the system unable to mount that filesystem next time it boots. My /etc/fstab looks like this:
#
# /etc/fstab
#
# You should be using fstool (control-panel) to edit this!
#
#<device> <mountpoint> <filesystemtype> <options> <dump>
<fsckorder>
/dev/hda1 / ext2 defaults 1 1
/dev/hdb5 /home ext2 defaults,rw 1 2
/dev/hda3 /usr ext2 defaults 1 2
/dev/hdb1 /usr/src ext2 defaults 1 3
/dev/hdc /mnt/cdrom iso9660 user,noauto,ro 0 0
/dev/sbpcd0 /mnt/pcd iso9660 user,noauto,ro 0 0
/dev/fd1 /mnt/floppy vfat user,noauto 0 0
/proc /proc proc defaults
/dev/hda2 none swap sw
Order is important in /etc/fstabFilesystems appear in /etc/fstab in the order in which they are mounted; /usr must appear before /usr/src, for example, because the mount point for one filesystem exists on the other. Be sure to use the proper order if you have partitioned your hard drive in order to separate parts of the Linux file system.
Previous
Table of Contents
Next
Wyszukiwarka
Podobne podstrony:
Kultowa 500 EskaRock 2012US NSA Pays Israel $500,000 in 2004Ethofol 500 SCOSCAR 500 SCDakota 500 SCGOLDEN FENIKAN 500 SC503 Wpusty żeliwneTerex RCI 500 Troubleshooting ManualZALACZNIK 4 RODZINA 500słowniczek 500remote master 500 bw5080ewięcej podobnych podstron