From 646a5c1cbfd95873950a87b5f75d52073a967023 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 28 May 2018 19:12:29 +0000 Subject: Mon May 28 19:12:29 UTC 2018 a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded. --- slackbook/html/filesystem-structure-mounting.html | 184 ---------------------- 1 file changed, 184 deletions(-) delete mode 100644 slackbook/html/filesystem-structure-mounting.html (limited to 'slackbook/html/filesystem-structure-mounting.html') diff --git a/slackbook/html/filesystem-structure-mounting.html b/slackbook/html/filesystem-structure-mounting.html deleted file mode 100644 index e09694e40..000000000 --- a/slackbook/html/filesystem-structure-mounting.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - -Mounting Devices - - - - - - - - - - - -
-

9.4 Mounting Devices

- -

As was previously discussed in Section 4.1.1, all the -drives and devices in your computer are one big filesystem. Various hard drive -partitions, CD-ROMs, and floppies are all placed in the same tree. In order to attach -these drives to the filesystem so that you can access them, you have to use the mount(1) and umount(1) commands.

- -

Some devices are automatically mounted when you boot up your computer. These are -listed in the /etc/fstab file. Anything that you want to be -mounted automatically gets an entry in that file. For other devices, you'll have to issue -a command every time you want to use the device.

- -
-

9.4.1 fstab

- -

Let's look at an example of the /etc/fstab file:

- - - - - -
-
-% cat /etc/fstab
-/dev/sda1       /               ext2        defaults        1   1
-/dev/sda2       /usr/local      ext2        defaults        1   1
-/dev/sda4       /home           ext2        defaults        1   1
-/dev/sdb1       swap            swap        defaults        0   0
-/dev/sdb3       /export         ext2        defaults        1   1
-none            /dev/pts        devpts      gid=5,mode=620  0   0
-none            /proc           proc        defaults        0   0
-/dev/fd0        /mnt            ext2        defaults        0   0
-/dev/cdrom      /mnt/cdrom      iso9660     ro              0   0
-
-
- -

The first column is the device name. In this case, the devices are five partitions -spread out across two SCSI hard drives, two special filesystems that don't need a device, -a floppy, and a CD-ROM drive. The second column is where the device will be mounted. This -needs to be a directory name, except in the case of a swap partition. The third column is -the filesystem type of the device. For normal Linux filesystems, this will be ext2 (second extended filesystem). CD-ROM drives are iso9660, and Windows-based devices will either be msdos or vfat.

- -

The fourth column is a listing of options that apply to the mounted filesystem. -defaults is fine for just about everything. However, read-only devices should be given -the ro flag. There are a lot of options that can be used. -Check the fstab(5) man page for more information. The last two -columns are used by fsck and other commands that need to -manipulate the devices. Check the man page for that information as well.

- -

When you install Slackware Linux, the setup program will build much of the fstab file.

-
- -
-

9.4.2 mount and -umount

- -

Attaching another device to your filesystem is easy. All you have to do is use the mount command, along with a few options. Using mount can simplified if the device has an entry in the /etc/fstab file. For example, let's say that I wanted to mount my -CD-ROM drive and that my fstab file looked like the example from -the previous section. I would call mount like so:

- - - - - -
-
-% mount /cdrom
-
-
- -

Since there is an entry in fstab for that mount point, mount knows what options to use. If there wasn't an entry for that -device, I would have to use several options for mount:

- - - - - -
-
-% mount -t iso9660 -o ro /dev/cdrom /cdrom
-
-
- -

That command line includes the same information as the example fstab did, but we'll go over all the parts anyways. The -t iso9660 is the filesystem type of the device to mount. In this -case, it would be the iso9660 filesystem which is what CD-ROM drives most commonly use. -The -o ro tells mount to mount the device read-only. The /dev/cdrom is the name of the device to mount, and /cdrom is the location on the filesystem to mount the drive.

- -

Before you can remove a floppy, CD-ROM, or other removable device that is currently -mounted, you'll have to unmount it. That is done using the umount command. Don't ask where the “n” went because we -couldn't tell you. You can use either the mounted device or the mount point as the -argument to umount. For example, if you wanted to unmount the -CD-ROM from the previous example, either of these commands would work:

- - - - - -
-
-# umount /dev/cdrom
-# umount /cdrom
-
-
-
-
- - - - - -- cgit v1.2.3