LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-04-2011, 06:23 PM   #1
thorgamma
LQ Newbie
 
Registered: Dec 2010
Location: Aiken, SC, USA
Distribution: Debian 5.0.6
Posts: 16

Rep: Reputation: 0
Mounting Internal HD


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.

Much obliged for any suggestions,

Thor
 
Old 01-04-2011, 06:33 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by thorgamma View Post
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 06:36 PM. Reason: a couple edits..
 
1 members found this post helpful.
Old 01-04-2011, 06:36 PM   #3
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
The last line
Code:
/dev/sda / ext3 defaults 0 0
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?
 
1 members found this post helpful.
Old 01-04-2011, 06:41 PM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
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.
 
Old 01-04-2011, 10:14 PM   #5
thorgamma
LQ Newbie
 
Registered: Dec 2010
Location: Aiken, SC, USA
Distribution: Debian 5.0.6
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by johnsfine View Post
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, johnsfine. Here it is:

Code:
Disk /dev/sda: 80.0 GB, 80025280000 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x136f136f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9728    78140128+   7  HPFS/NTFS

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdbbdab36

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        4660    37431418+  83  Linux
/dev/hda2            4661        4865     1646662+   5  Extended
/dev/hda5            4661        4865     1646631   82  Linux swap / Solaris
 
Old 01-04-2011, 10:32 PM   #6
thorgamma
LQ Newbie
 
Registered: Dec 2010
Location: Aiken, SC, USA
Distribution: Debian 5.0.6
Posts: 16

Original Poster
Rep: Reputation: 0
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 08:41 AM. Reason: update and clarify
 
Old 01-05-2011, 11:43 AM   #7
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
1 members found this post helpful.
Old 01-05-2011, 12:10 PM   #8
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Rep: Reputation: 1
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.




Please correct me if i am wrong.
 
Old 01-05-2011, 10:01 PM   #9
thorgamma
LQ Newbie
 
Registered: Dec 2010
Location: Aiken, SC, USA
Distribution: Debian 5.0.6
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pljvaldez View Post
Two issues: 1) the file system type is ntfs, not nfts,
I don't know how I goofed up the typing.

Quote:
... make a new folder (mkdir) called windows. Then use the mount command to assign /dev/sda1 to the directory /mnt/windows.
This worked! Here's what I did:
Code:
debian:/home/myname# cd /mnt
debian:/mnt# mkdir win
debian:/mnt# ls
win
debian:/mnt# mount -t ntfs /dev/sda1 /mnt/win
debian:/mnt# cd /mnt/win
debian:/mnt/win# dir
8ca1391d50a6567a9ccca9e209  installs	  pagefile.sys
AUTOEXEC.BAT		    IO.SYS	  Program\ Files
boot.ini		    launcher.log  Python27
CONFIG.SYS		    Log.txt	  RECYCLER
Documents\ and\ Settings    MSDOS.SYS	  SIERRA
EPSONREG		    My\ Music	  stub.log
GS390GO			    Netgear	  System\ Volume\ Information
hiberfil.sys		    NTDETECT.COM  temp
ifx			    ntldr	  WINDOWS
Next, I'll work on permissions, etc. Hopefully, I can do that without help. Thanks a ton!
 
Old 01-05-2011, 10:04 PM   #10
thorgamma
LQ Newbie
 
Registered: Dec 2010
Location: Aiken, SC, USA
Distribution: Debian 5.0.6
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by aggrishabh View Post
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!
 
Old 01-09-2011, 12:15 AM   #11
thorgamma
LQ Newbie
 
Registered: Dec 2010
Location: Aiken, SC, USA
Distribution: Debian 5.0.6
Posts: 16

Original Poster
Rep: Reputation: 0
Cool 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 04:12 PM. Reason: Error with fstab
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mounting a new internal hard drive Graham1941 Linux - Hardware 8 02-27-2009 07:30 AM
bit of a problem mounting second internal hdd firedancer Linux - Desktop 1 08-31-2007 06:31 PM
Mounting a 2nd and 3rd internal harddrive trox Linux - Hardware 3 06-20-2007 04:18 PM
Mounting internal drive C10CKVV0RK Linux - Laptop and Netbook 3 06-19-2007 01:25 PM
Installation of internal HP DAT 40i DDS internal tape drive netkepala Linux - Hardware 3 11-08-2004 01:22 PM


All times are GMT -5. The time now is 10:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration