Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Whe i tried mounting CD-ROM as below gives error as follows..
[root@devtest ~]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
mount: you must specify the filesystem type
[root@devtest ~]#
When using commands a user can rely on 'man command'. From 'man mount';
Quote:
mount - mount a filesystem
SYNOPSIS
mount [-lhV]
mount -a [-fFnrsvw] [-t vfstype] [-O optlist]
mount [-fnrsvw] [-o option[,option]...] device|dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir
DESCRIPTION
All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several
devices. The mount command serves to attach the filesystem found on some device to the big file tree. Conversely, the umount(8) command will detach it
again.
The standard form of the mount command, is
mount -t type device dir
This tells the kernel to attach the filesystem found on device (which is of type type) at the directory dir. The previous contents (if any) and owner
and mode of dir become invisible, and as long as this filesystem remains mounted, the pathname dir refers to the root of the filesystem on device.
If only directory or device is given, for example:
mount /dir
then mount looks for a mountpoint and if not found then for a device in the /etc/fstab file.
The listing and help.
Three forms of invocation do not actually mount anything:
mount -h
prints a help message
mount -V
prints a version string
mount [-l] [-t type]
lists all mounted filesystems (of type type). The option -l adds the labels in this listing. See below.
The device indication.
Most devices are indicated by a file name (of a block special device), like /dev/sda1, but there are other possibilities. For example, in the
case of an NFS mount, device may look like knuth.cwi.nl:/dir. It is possible to indicate a block special device using its volume LABEL or UUID
(see the -L and -U options below).
The recommended setup is to use LABEL=<label> or UUID=<uuid> tags rather than /dev/disk/by-{label,uuid} udev symlinks in the /etc/fstab file.
The tags are more readable, robust and portable. The mount(8) command internally uses udev symlinks, so use the symlinks in /etc/fstab has no
advantage over LABEL=/UUID=. For more details see libblkid(3).
Note that mount(8) uses UUIDs as strings. The UUIDs from command line or fstab(5) are not converted to internal binary representation. The
string representation of the UUID should be based on lower case characters.
The proc filesystem is not associated with a special device, and when mounting it, an arbitrary keyword, such as proc can be used instead of a
device specification. (The customary choice none is less fortunate: the error message `none busy' from umount can be confusing.)
The /etc/fstab, /etc/mtab and /proc/mounts files.
The file /etc/fstab (see fstab(5)), may contain lines describing what devices are usually mounted where, using which options.
The command
mount -a [-t type] [-O optlist]
(usually given in a bootscript) causes all filesystems mentioned in fstab (of the proper type and/or having or not having the proper options) to
be mounted as indicated, except for those whose line contains the noauto keyword. Adding the -F option will make mount fork, so that the
filesystems are mounted simultaneously.
When mounting a filesystem mentioned in fstab or mtab, it suffices to give only the device, or only the mount point.
The programs mount and umount maintain a list of currently mounted filesystems in the file /etc/mtab. If no arguments are given to mount, this
list is printed.
The mount program does not read the /etc/fstab file if device (or LABEL/UUID) and dir are specified. For example:
mount /dev/foo /dir
If you want to override mount options from /etc/fstab you have to use:
mount device|dir -o <options>
and then the mount options from command line will be appended to the list of options from /etc/fstab. The usual behaviour is that the last
option wins if there is more duplicated options.
When the proc filesystem is mounted (say at /proc), the files /etc/mtab and /proc/mounts have very similar contents. The former has somewhat
more information, such as the mount options used, but is not necessarily up-to-date (cf. the -n option below). It is possible to replace
/etc/mtab by a symbolic link to /proc/mounts, and especially when you have very large numbers of mounts things will be much faster with that
symlink, but some information is lost that way, and in particular using the "user" option will fail.
The non-superuser mounts.
Normally, only the superuser can mount filesystems. However, when fstab contains the user option on a line, anybody can mount the corresponding
system.
Thus, given a line
/dev/cdrom /cd iso9660 ro,user,noauto,unhide
any user can mount the iso9660 filesystem found on his CDROM using the command
mount /dev/cdrom
or
mount /cd
For more details, see fstab(5). Only the user that mounted a filesystem can unmount it again. If any user should be able to unmount, then use
users instead of user in the fstab line. The owner option is similar to the user option, with the restriction that the user must be the owner
of the special file. This may be useful e.g. for /dev/fd if a login script makes the console user owner of this device. The group option is
similar, with the restriction that the user must be member of the group of the special file.
Please notice the bold information above. Be sure to look at 'man fstab'.
'man' is your friend when using the 'cli'.
Quote:
Just a few links to aid you to gaining some understanding;
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.