SDB:9.1: Conventional Mounting Instead of subfs

Şuraya atla: kullan, ara


Version: 9.1

Situation

You are not comfortable with the automatic mounting via submount and subfs implemented by default in SUSE LINUX 9.1 and later for removable media (floppy, CD, and DVD) and hotpluggable devices, like USB sticks and USB hard disks. Therefore, you would like to return to the conventional way of mounting media.

Procedure

For the floppy, CD, and DVD drives, this can easily be done by editing the file /etc/fstab. For example, for a DVD drive and a floppy drive, simply change the respective lines from

/dev/dvd     /media/dvd        subfs   fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0     /media/floppy     subfs   fs=floppyfss,procuid,nodev,nosuid,sync 0 0

to

/dev/dvd     /media/dvd        auto    ro,noauto,user,exec,iocharset=utf8    0 0
/dev/fd0     /media/floppy     auto    noauto,user,exec,sync                 0 0

Important: First make a backup copy of the original /etc/fstab.

For hotpluggable media, like USB sticks, the procedure is even easier. First, run a YaST Online Update to update the hotplug package. Then open the file /etc/sysconfig/hotplug as root and set the variable HOTPLUG_USE_SUBFS from yes to no. Use the following command to apply the change and restart the hotplug system:

rchotplug restart

In this case, hotplug will not cause directories to be created under /media when a new data medium is detected via hotplug. If no directory exists yet, it must be created manually, for example, with the following command:

mkdir /media/sda1

The data media can be mounted as usual, for example, with the following command:

  mount /dev/sda1 /media/sda1

<keyword>mount,subfs,cd,dvd</keyword>