mount points
I have just started ubuntu in the last month.
And am confused about mount points. I am trying to list the contents of the cdrom which was created on a windows system. It is a acronis boot cd. when I try and mount it mount /dev/sr0 /media/fstab I get etc/fstab not a directory Also if i do df i can see see the /dev/sr0 which I believe is telling me it is mounted? besides how to create mount points can you tell me how to read the above mentioned cd?? |
First, mounting the cd should not depend on the system creating it. The file system that is on the cd will be an ISO 9660 fs or an extension thereof. Doing anything with the contents is a different story.
Now, why are you mounting it to /media/fstab? There is a file /etc/fstab (file system table) which is a configuration file for mounting devices on specified mount points. I don't know why your system is referring to that in lieu of /media/fstab, but quite frankly I would staty away from the fstab name for anything other than the system file. Also, does the system say Code:
etc/fstab is not a directory Code:
/etc/fstab is not a directory Often a system is configured to mount a cd as soon as you load it in the drive. Is yours not? I'm going to make a guess that there is something wrong that you are not seeing with your mount command. So we will start there. I am assuming you are sure your cd is /dev/sr0. If it isn't that is another problem. If it is, try this command: Code:
sudo mount /dev/sr0 /mnt Code:
ls -l /mnt Code:
ls /mnt If you think the cd may be mounted anyway, try Code:
grep /sr /proc/mounts |
The output of the df command should indicate where the disk is mounted in the last column. Optical disks and external media like flash drives are typically automatically mounted in a subdirectory of /media. You can use the file browser to navigate to /media and see what's there.
|
One thing at a time. The previous reply dealt with 'How to mount'. Here I'll try to answer your other questions.
You asked about df. Df only tells you how much space is free on a device or in a directory tree. As to what a mount point is. On linux everything is a file. Devices (cdroms, disk partitions, etc.) are accessed by the system through the directory through which they are linked, the mount point. So when you 'mount' the device referred to as /dev/sr0 at /mnt or any other directory it is simply using that directory to make it easy for you to access the device. Anything that was originally in the mount point is now hidden and will be available again when the device is unmounted. Also note that normally only root (or a user using sudo) is allowed to mount or unmount a device. This can be changed with the mount command. For mount points you can use almost any existing directory (/mnt and /media are common) or create a directory and then mount the device at it (the most common practice). As to how to access the contents of the cd once it is mounted, that depends. You can list the contents with the normal commands: ls etc. Doing anything with the contents depends. A normal text file you can access with a text editor or 'more' or 'less'. Be aware that Windows uses a different coding for the end of line than linux does. This may be allowed for by your program or it may not. If not you will see the difference almost immediately. It is mainly a PITA and can be worked around. As to executable files, Windows executables will not run on linux and vice versa. There is a chance if you load 'wine' that you can get SOME windows programs to run on linux. Also be aware that Windows has no understanding of linux permissions so that at times can necessitate some tinkering. |
Quote:
|
Generally, if a device is sensed or recognized in /dev and is not listed in /etc/fstab, it is mounted to /media or, in the hip young distros, to /run/media/[user name]. The "mountpoint" or the location to which the device (file system) is mounted is in /mnt, /media, or /run/media
Regarding /dev/sr0, "sr0" is one of many directories under /dev/ which is there to recognized a certain type of device (or, strictly speaking, file system) should it be sense. I think you will find ls /dev a useful command. Here's a tutorial that may help: https://www.poftut.com/linux-mount-c...rial-examples/ apropos " mount" will show a list of relevant man(ual) pages( putting the space in front of the word "mount" screens out words like "amount"). |
All times are GMT -5. The time now is 12:48 PM. |