Linux - NewbieThis 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
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.
Trying to mount my internal hard drive that has all the data and is my long-time Windows drive. Debian is on the other drive.
This other drive will not mount with a simple mount command with the complaint that there is nothing about it in the /etc/fstab file.
So, I try to add to this file the last line shown:
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/sda / ext3 defaults 0 0
Two questions: 1) Should this work?
2) Why can't I seem to save it? I think I am "root" when I try to save it. If I go to the terminal screen now and type who, it gives me both my username and root.
Trying to mount my internal hard drive that has all the data and is my long-time Windows drive. Debian is on the other drive.
This other drive will not mount with a simple mount command with the complaint that there is nothing about it in the /etc/fstab file.
If there's nothing in fstab about a drive or partition, then the system is being asked to decide for itself what type of filesystem the device contains (that won't work - you need to tell it), and it doesn't know where to mount it - you need to tell it the mount location also. Finally, you'll need to tell it any particular options you wish to use when mounting the device, such as "readonly" or "users" or whatever. Without specifying these items on the CLI, the system relies on /etc/fstab.
Quote:
So, I try to add to this file the last line shown:
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/sda / ext3 defaults 0 0
Two questions: 1) Should this work?
No, for possibly 2 reasons:
1) you are trying to mount the drive on "/", which means "root filesystem". You cannot do that, since you already have a root filesystem mounted.
2) Unless the entire drive is one large partition (read: partitionless) then you will need to specify what partition to mount, such as /dev/sda2 or /dev/sda5 for example.
Quote:
2) Why can't I seem to save it? I think I am "root" when I try to save it. If I go to the terminal screen now and type who, it gives me both my username and root.
Please copy & paste for us, the exact data from your terminal, where you are running your commands - and show us the output produced, such as from the `who` command when you run it. You must be root, or use the `sudo` command, to edit a root-owned system file such as /etc/fstab. Also, you might want to try the `whoami` command instead.
Also, a couple tips:
-- Generally it is a good idea to let us know what Linux OS you are using when asking a question - in case it affects the exact commands, or locations of certain files, or use of `sudo` or not. Then folks don't need to ask what OS the problem is happening on. EDIT I see it is Debian - sorry.
-- Please use code tags when posting snippets from files, or console output. Tags will retain the text formatting, making it much easier to read what you've posted. Code tags: http://www.phpbb.com/community/faq.php?mode=bbcode#f2r1
Any further questions, do feel free to elaborate!
Kind regards.
Last edited by GrapefruiTgirl; 01-04-2011 at 05:36 PM.
Reason: a couple edits..
is incorrect for a windows drive. You can mount the partition without an fstab entry by specifying the file system type mount -t ntfs <devicename> <mountpoint>.
Can you post the output of fdisk -l as root so we can make sure you're trying to mount the correct partition?
GrapefruiTgirl covered most of what I would have said.
But in addition, I wonder if you are correct about sda being your Windows drive. It is certainly possible sda is your Windows drive and hda is your Linux drive. But it is a less common mix.
You should post the output from the following command as root:
Code:
/sbin/fdisk -l
That will tell us what drives and partitions you really have so our subsequent advice will be more accurate.
Thanks for the great detailed replies, GrapefruiTgirl and pljvaldez,
Here's the update: I tried
Code:
mount -t nfts /dev/sda1 /home
This looks like progress. There were no error messages after this command. However, now if I go to the /home folder on the GNOME file system and it gives me a message
Code:
Couldn't display "home/myname". Access was denied.
When I get back to this computer later today, should I try again, but pick a more appropriate directory to mount to? Was /home a bad choice? Or is this more likely a problem with the format of the files?
Last edited by thorgamma; 01-05-2011 at 07:41 AM.
Reason: update and clarify
Two issues: 1) the file system type is ntfs, not nfts, and 2)you have to create a separate mount point. /home is already used for your personal files. You have to think of the linux filesystem as a tree. / is called root, the base of the filesystem. Then you have some standard branches like /home, /bin, /sbin, /mnt, etc. When mounting a separate drive (an external USB drive, a non system internal drive, etc.) the typical convention is to create a new folder under the /mnt directory and use that.
So for example go to the /mnt by using the cd (change directory) command. Then make a new folder (mkdir) called windows. Then use the mount command to assign /dev/sda1 to the directory /mnt/windows.
you have to make sure that your linux system should be able to read NTFS file system. As the old version of RHEL (If u r using)version don't have this abitity default. If you have FAT filesystem then no need of additional RPM,Just make a new directory wherever you want and mount the partions.
For permanent mountion you have to make an entry in fstab file.
you have to make sure that your linux system should be able to read NTFS file system. As the old version of RHEL (If u r using)version don't have this abitity default. If you have FAT filesystem then no need of additional RPM,Just make a new directory wherever you want and mount the partions.
Looks like it's reading okay.
Quote:
For permanent mountion you have to make an entry in fstab file.
Please correct me if i am wrong.
I'll have to figure out how to do that next. Thanks!
One computer two hard drives - set up to read windows drive
This is to summarize what it took to get this to work (but one open issue - see bottom):
1. Mounted the hard drive:
Code:
mount -t ntfs-3g /dev/sda1 /mnt/win
You might like to call it /mnt/windows if you're not into the whole brevity thing.
2. edit the fstab file in /etc folder to include:
Code:
/dev/sda1 /mnt/win ntfs-3g rwx, user 0 0
(Of course, this should be adjusted for the first entry to match the drive ID and the second entry to match how where it is mounted.
3. If you don't have ntfs-3g, you need to get the package. I did this on my Debian installation, I used the Synaptic Package Manager to find and install the package. (This SPM is found on GNOME under the System drop-down menu.
Open Issue: There is something wrong with the fstab: I get the message:
[code]Can't find /mnt/win in etc/fstab or /etc/mtab. Therefore, it doesn't mount the hard drive.
Last edited by thorgamma; 01-09-2011 at 03:12 PM.
Reason: Error with fstab
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.