• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

NTFS in Linux

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

striker85

Member
Joined
Mar 7, 2006
Location
Connecticut
I am a total noob to Linux. But I've been reading and experimenting. I have a fresh copy of Ubuntu installed on my primary IDE. I two other IDE's that are installed. Ubuntu can see them and they are enabled in the disks manager, but because it is NTFS, it can not access them.

edit:

I got the plugin for reading NTFS installed. But now when I try to access the drives it says I don't have permissions. I am the only user on the computer and I have full permissions. Also, when I right click on the drive and try to change the permissions of the drive, it won't let me. So now what do I do?
 
Last edited:
That or you can simply mount them. Ubuntu was doing this with me, and was odd since most distros automount my NTFS drives. If you happen to be in a situation where you dont want to edit your fstab file (Unlikly...) then you can just do this as an example:

sudo mount /dev/hdb2 /some/directory/here

hdb2 is just an example. The reason the disk manager isn't mounting it is that the program does not have permission to mount to that folder (What folder are you trying to mount it in?). I would recomend creating something in your home directory (/home/(username)/hdd) and mount it there. it should be ok.
 
I think the problem is that I'm not totally understanding the architechture of Linux. I've read the official documentation, the community documentation...but nothing seems to be able to communicate in an effective way the principles of Linux. Is there a walk-through guide or something to help me just get a grasp of the differences between Windows and Linux? I'm so used to just plug-n-play stuff with windows that it seems like so much of a trouble to just get something to work in Linux.
 
striker85 said:
I think the problem is that I'm not totally understanding the architechture of Linux. I've read the official documentation, the community documentation...but nothing seems to be able to communicate in an effective way the principles of Linux. Is there a walk-through guide or something to help me just get a grasp of the differences between Windows and Linux? I'm so used to just plug-n-play stuff with windows that it seems like so much of a trouble to just get something to work in Linux.
Here's the main principle of Linux, file-system wise.

Everything's mounted under '/' -- which is the top of the file system. Upon installation, Ubuntu created at least two and possibly more partitions. One was a swap partition which, properly speaking, isn't mounted anywhere (but managed with the swapon/swapoff commands--don't mess with 'em yet). The other was the root partition, mounted under / and almost certainly of type Ext3.

If you go ahead and go into the terminal and type less /etc/fstab you'll see a file like this. Yours is probably waaay simpler, so I'll cut the lines out that you don't have.
Code:
proc            /proc           proc    defaults        0       0
/dev/hda2       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda1       /boot           ext3    defaults        0       2
/dev/sda2       /home           ext3    defaults        0       2
/dev/hdb1       /usr            ext3    defaults        0       2
/dev/sda1       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdc1       /home2          ext3    defaults        0       0
On the left, the device file associated with the file system is displayed. The device file indicates what sort of drive you have ('hd' is IDE, 'sd' is SCSI or Serial ATA), what drive (a, b, c, d ...), and what partition (1-6) the file system is on.

The second column is the mount point. Reading the table, you can see that in my example /dev/hdb1 is mounted under /usr.

The third column is the file system type. Almost everything on there is ext3; that's simply how I have it set up.

The third one is mount options. If you type man fstab at the terminal you can read all about them. The fourth and fifth ones are about dumps and backup passes (as I recall; again, consult the manual page (man fstab) for information).

If you have any more questions, please feel free to ask.
 
I understood you for the most part. My only question is about the second column. You say that it represents where the drive is mounted. What implications does this have? Does having a drive mounted under /usr have any different roles in the function of the OS as opposed to a drive mounted under /home?
 
striker85 said:
I understood you for the most part. My only question is about the second column. You say that it represents where the drive is mounted. What implications does this have? Does having a drive mounted under /usr have any different roles in the function of the OS as opposed to a drive mounted under /home?

you can mount them anywhere you want. Generally, all additional drives are mounted in to /mnt to keep things neat, but this is not a hard-fast rule. So you can do this for instance:

mkdir /cdrom
mount /dev/cdrom /cdrom

and there is nothing wrong with that. But keeping things within /mnt helps you remember where they are and helps you remember what is mounted. so:

mkdir /mnt/cdrom (most likely it's already there)
mount /dev/cdrom /mnt/cdrom

and then you might also have /mnt/hd2, /mnt/samba1, /mnt/floppy, /mnt/usbkey.....whatever you want.
 
ok, that explains it well. thanks

my next question...i know this is digressing a little from file systems, but commands. commands in linux confuse me. i dont understand the whole sudo thing. also, is root to be considered the same as admin? is there a list of commands and explanations available?
 
striker85 said:
ok, that explains it well. thanks

my next question...i know this is digressing a little from file systems, but commands. commands in linux confuse me. i dont understand the whole sudo thing. also, is root to be considered the same as admin? is there a list of commands and explanations available?

http://www.linuxdevcenter.com/linux/cmd/

sudo is a "fake root". it allows a normal user to run commands as the root user. Root is similar to Administrator. Root can see everything, run everything, and edit everything. Normal, underpriveledged users can use su to become a Super User, basically changing them in to Root. There is more too it, check out those introduction links i posted before.
 
Root is basically like an administrator in windows, except that Linux requires that you have it, and windows doesn't. I don't actually use sudo, I just su to become root, but sudo is easier in some cases for executing a single command.

/ is the root partition (not to be confused with the /root partition, which is root's home directory). Everything, all disks, removable media, flash drives, network drives, etc. is mounted off of /. The actual physical disk that a file is stored on is somewhat transparent. For example, on a standard gentoo install, there is a directory called /usr/portage. This holds information about programs that can be installed. If you don't tell the system otherwise (i.e. you don't mount any drive to /usr/portage), it assumes that portage is on the same volue as /usr, its parent directory. However, I actually mount the hard drive from my file server to /usr/portage, so that all my pc's access the same place to get information on portage installs. So / is on my local hard drive, and so is /usr, but when I cd to /usr/portage, it's now on a networked file system on the file server. This allows you to mount things in very different configurations without software caring/noticing.

ntfs support in linux isn't great, because MS has gone out of their way to obscure the filesystem. Linux can read ntfs now (it has been reverse engineered) and it has limited write capability. I use FAT32 for my windows partition because it's a lot more compatible, and I store large files (several gb or more, that cannot be stored on a FAT32 system) on my fileserver. With FAT32, I can read and write perfectly from linux, which is a greater advantage to me than those offered by NTFS. However, you should definitely be able to read ntfs.

The simple way to check is to try to mount it:

mount -t ntfs /dev/hda1 /mnt

Change /dev/hda1 to the drive/partition that your ntfs filesystem is on. If you want to see a list of partitions, type fdisk -l (that's a lowercase L). Remember linux/unix is case sensitive, like the C programming language.

Then type cd /mnt and ls to see the files in that directory. It should show you the contents of your ntfs filesystem.

A lot of this can be done with the GUI too in KDE or Gnome, I just don't know how to do the gui stuff as I find the command line faster/easier. You can probably mount stuff by clicking in some way.
 
Back