LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-27-2019, 06:19 PM   #1
jackdagnon
LQ Newbie
 
Registered: Mar 2019
Posts: 2

Rep: Reputation: Disabled
Unhappy 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??
 
Old 03-27-2019, 06:49 PM   #2
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
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
or does it say
Code:
/etc/fstab is not a directory
. Big difference - the leading /. As you show it it is looking for etc/fstab in the curent working 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
. That should mount it at /mnt. Check to make sure you as a user have access to read the directory:
Code:
ls -l /mnt
If you do, then
Code:
ls /mnt
You should now see the contents of the cd. Do you or what error messages do you get?

If you think the cd may be mounted anyway, try
Code:
grep /sr /proc/mounts
That should tell show you any mounts of anything containing the character string "/sr".

Last edited by agillator; 03-27-2019 at 06:56 PM. Reason: Added checking /proc/mounts
 
1 members found this post helpful.
Old 03-27-2019, 07:03 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
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.
 
1 members found this post helpful.
Old 03-27-2019, 07:15 PM   #4
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 03-27-2019, 07:33 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
Quote:
I am trying to list the contents of the cdrom which was created on a windows system. It is a acronis boot cd.
The OP asked two questions which I interpreted the primary question as listing the contents of the cdrom which can be easily be accomplished by using the file browser and navigating to the /media directory. The df command shows the disk space usage of mounted filesystems and if the OP sees /dev/sr0 in the output then it is mounted.
 
1 members found this post helpful.
Old 03-27-2019, 08:11 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,346
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
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").
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NFS mount points don't mount during boot Quakeboy02 Debian 11 06-16-2013 07:11 AM
mount one device to two mount points secretlydead Linux - General 3 03-28-2007 05:30 AM
play free (World of WarCraft , xBox Live, Live Points, Wii Points, Free Habbo) laraaj Linux - Games 1 02-09-2007 05:50 PM
SCRIPT: check if auto-mount mount-points are still mounted markus1982 Linux - Software 0 05-25-2003 05:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration