# Solved: FC4 - Need to veiw NTFS Partition



## Omega_Shadow (Aug 2, 2004)

Under Mandrake I can read from my NTFS paritions. I never had to set anything up, it was all automatic. The drives partitions where listed under /mnt

Now with Fedora, I need to know how to access those drives. Any suggestions?


----------



## linuxphile (Mar 6, 2003)

There is an FAQ/HOWTO on this at http://www.fedorafaq.org/#ntfs

Once you've installed the kernel module you should be able to mount your NTFS drive with a command similar to: mount /dev/hda1 /some/mountpoint

Where /dev/hda1 is your NTFS partition.


----------



## Omega_Shadow (Aug 2, 2004)

wow, that was easyer then I thought...
Almost disipointed.
All well, Thanx for the help!

EDIT> Spoke too soon
[[email protected] Omega_Shadow]# yum install kernel-module-ntfs-$(uname -r)
Setting up Install Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: kernel-module-ntfs-2.6.11-1.1369_FC4
Nothing to do
[[email protected] Omega_Shadow]# mount /dev/hda2
mount: can't find /dev/hda2 in /etc/fstab or /etc/mtab


I followed everything to the letter. What did I do wrong?

EDIT> Edited YUM and got the kernal module to install, stil can not mount the drive though.


----------



## Omega_Shadow (Aug 2, 2004)

Under Root I type the command "mount /dev/hda2". Is this correct or am I doing something wrong?


----------



## linuxphile (Mar 6, 2003)

You haven't provided a mount point.


Try mount /dev/hda2 /somedir
Where somedir is an empty directory that you can use for mounting /dev/hda2


----------



## Squashman (Apr 4, 2003)

linuxphile said:


> You haven't provided a mount point.
> 
> Try mount /dev/hda2 /somedir
> Where somedir is an empty directory that you can use for mounting /dev/hda2


Yep, just keep it simple. Create a directory under /mnt to mount the file system to. If you want the filesystem to mount everytime you turn on your system you will need to edit the file /etc/fstab


----------



## Omega_Shadow (Aug 2, 2004)

[email protected] Omega_Shadow]# mount /dev/hda2 /mnt/win_d
mount: you must specify the filesystem type

How do I specify the filesystem?

And while on the subject, how do I edit /etc/fstab?


----------



## Squashman (Apr 4, 2003)

mount -t ntfs


----------



## Omega_Shadow (Aug 2, 2004)

[[email protected] Omega_Shadow]# mount /dev/hda2 /mnt -t ntfs
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
missing codepage or other error
(aren't you trying to mount an extended partition,
 instead of some logical partition inside?)
In some cases useful info is found in syslog - try
dmesg | tail or so

What did I do wrong this time?!


----------



## Squashman (Apr 4, 2003)

Create a directory in /mnt to mount the filesystem to.

mount -t ntfs /dev/hda2 /mnt/windows 

Kind of helps to read the man page to know the syntax of the command.


----------



## Omega_Shadow (Aug 2, 2004)

It realy surprizes me how the Linux elite always say something is simple and then leave out all the major details (talking about the FAQ, not you guys)

I cant make a dir in /mnt. I could become root and do it, but If I understand linux security then I would only be able to accsess said folder as root, defeating the perpouse of haveing my windows media partition "easly accessable". I even tried makeing a folder on the desktop and mounting to it. The folder automaticly locks itself after the mount. What is the point of mounting a drive if I cant get to it?


----------



## brendandonhu (Jul 8, 2002)

ALL filesystems are mounted as root on most systems. You can still access the mounted partition as a regular user.
Its not really that hard to make a directory as root...
sudo
mkdir /mnt/blah

And you're done.

Add the partition to /etc/fstab if you want it to be mounted automatically.


----------



## Omega_Shadow (Aug 2, 2004)

""Omega_Shadow is not in the sudoers file. This incident will be reported.""

Reported to whom?! Myself?!


----------



## brendandonhu (Jul 8, 2002)

Try doing
/bin/su instead
That shouldn't need any configuration. If you want to use sudo you can edit yourself into the /etc/sudoers file.


----------



## Omega_Shadow (Aug 2, 2004)

brendandonhu said:


> If you want to use sudo you can edit yourself into the /etc/sudoers file.


How do I do that?


----------



## brendandonhu (Jul 8, 2002)

As root, run visudo to edit the /etc/sudoers file.


----------



## Omega_Shadow (Aug 2, 2004)

Sorry to sound like a broken record, but how do I do that?

(I am starting to sound like my girlfreind asking me how to do something in windows)


----------



## brendandonhu (Jul 8, 2002)

Login as root.
Run visudo

man sudoers will tell you exactly how you can edit the file.
If you want your user to be able to use mount and umount, you could add
username ALL=/sbin/mount,/sbin/umount

But if I were you , I'd just use "su", so much simpler


----------



## Omega_Shadow (Aug 2, 2004)

problem is I CAN'T. I have tried almost every single syntex to the letter you guys have given me. Every time Linux spits out an error along the lines of "I dont like you". Even trying to run visudo, I get NOTHING. I open the run dialog (loged in as root of corse) type in visudo and press enter and nothing happens.


----------



## brendandonhu (Jul 8, 2002)

You need to run these commands from a terminal, not just the Run Command box if that's what you mean.


----------



## Omega_Shadow (Aug 2, 2004)

I got a "command not found" error. Thats it, I have had it for today. Tomarow I will start fresh from the begining


----------



## brendandonhu (Jul 8, 2002)

On which command?
Opening a root console then doing /usr/sbin/visudo should work fine.


----------



## Omega_Shadow (Aug 2, 2004)

....
could have used the "/usr/sbin" part a few post ago 

Think of me as a complete n00b, unless you tell me, I realy dont know.


----------



## brendandonhu (Jul 8, 2002)

Actually I forgot it until that last post


----------



## Omega_Shadow (Aug 2, 2004)

after I open the file and place "Omega_Shadow ALL=/sbin/mount,/sbin/umount" how do I close and save the file?


----------



## brendandonhu (Jul 8, 2002)

I believe its the same as vi

Hit Escape. At the little : prompt, type
wq

That will save and close.

If Escape doesn't get you to the : prompt, hit Ctrl [ instead.


----------



## jiml8 (Jul 3, 2005)

Omega_Shadow said:


> It realy surprizes me how the Linux elite always say something is simple and then leave out all the major details (talking about the FAQ, not you guys)
> 
> I cant make a dir in /mnt. I could become root and do it, but If I understand linux security then I would only be able to accsess said folder as root, defeating the perpouse of haveing my windows media partition "easly accessable". I even tried makeing a folder on the desktop and mounting to it. The folder automaticly locks itself after the mount. What is the point of mounting a drive if I cant get to it?


Seems to me you have the security on your system set too high. I have mine configured so that I can create a mountpoint in /mnt as an ordinary user. Whether I can mount a drive as a user depends on how that is set in fstab.

In any case, you can deal with these permission issues using the chmod and chown commands. Do a man on those, and you shall be enlightened, grasshopper!


----------



## Omega_Shadow (Aug 2, 2004)

The security is the defalt security that FC4 is installed with. I would not know even how to begin to change those settings!

People keep talking about "man", is that a command or just short for "Manual", and if it is, where can I get these manuals?


----------



## Squashman (Apr 4, 2003)

man mount
man su
man .................


----------



## jiml8 (Jul 3, 2005)

man is a shell command. Type in "man cmdname" will give you extensive information (a manual) about the command cmdname if that info is available.

Another similar command is the info command. Not all commands have information in info, but if man doesn't work try info.

To use any *nix (which includes BSD) you need to become familiar with the shell. All modern distros will give you a way to open a shell from a window manager. You need to figure out how to do it in your installation.


----------



## Omega_Shadow (Aug 2, 2004)

brendandonhu said:


> I believe its the same as vi
> 
> Hit Escape. At the little : prompt, type
> wq
> ...


nether esc or ctrl [ get me to prompt. I looked throught the visido man and could not find how to close and save


----------



## brendandonhu (Jul 8, 2002)

Surely one of those works.
Its a small prompt...it just has a :

man vi will tell you more about it.


----------



## Omega_Shadow (Aug 2, 2004)

I see no such prompt. See for yourself....

As for man vi, I see the prompt there like it should be in visido. I have given up on this line of thought and going back to the begining...

Need to access NTFS Drive. Steps I completed succsesfuly: Installed NTFS-Kernal-Moduel. Steps yet to complete: Mount Partition 2 on Hda. I think I will do this by having the system mount it automaticly by editing /etc/fstab. Can anyone walk me though that process?

EDIT> To get to the prompt in Visido, the keystroke is Shift :


----------



## lynch (Aug 3, 2002)

To close and save in vi, vim or visudo you hit Esc to leave Insert(edit) mode, and then type ZZ.
That's Shift+zz.
lynch


----------



## brendandonhu (Jul 8, 2002)

I think he's saying Esc doesn't get him into command mode. Also, doesn't :wq save and exit?


----------



## lynch (Aug 3, 2002)

That's odd: hitting the Esc key should put you there. Unless he never entered Insert mode to begin with.
Yes, typing :wq will quit and save, but ZZ is easier. 
lynch


----------



## brendandonhu (Jul 8, 2002)

wq = 2 key presses
ZZ = 2 or 3


----------



## Omega_Shadow (Aug 2, 2004)

Shift : put me into command mode. Esc and ctrl [ where just doing weird things to my termanal screen (changeing the icon for the termanal session, for instance)

On to bigger things: that didnt work, Fedora still thinks I am trying to hack into it. Frankly, I dont care, as long as I can access this partittion within the next few days or Fedora is going bye-bye. I have no use for an OS that makes the simplist task a monumental project.

Lets try it this way: if *you* wanted to get into an NTFS partition, what would you do? Go step by step, dont leave a single command or keystroke out. No more half guesses on my part. 

Then maybe, MAYBE, we can get something done


----------



## Squashman (Apr 4, 2003)

You still need to type the colon.


----------



## brendandonhu (Jul 8, 2002)

Omega_Shadow said:


> Shift : put me into command mode. Esc and ctrl [ where just doing weird things to my termanal screen (changeing the icon for the termanal session, for instance)
> 
> On to bigger things: that didnt work, Fedora still thinks I am trying to hack into it. Frankly, I dont care, as long as I can access this partittion within the next few days or Fedora is going bye-bye. I have no use for an OS that makes the simplist task a monumental project.
> 
> ...


All you need to do is add it to /etc/fstab, as someone said earlier. You only need to edit sudoers if you want to mount it as a regular user.



> You still need to type the colon.


Whoops, confused nano and vi.


----------



## Omega_Shadow (Aug 2, 2004)

brendandonhu said:


> All you need to do is add it to /etc/fstab, as someone said earlier.


What do I add? How do I add it? Please remember I used to be a windows user and not used to thinking (  ) I need specific instructions


----------



## brendandonhu (Jul 8, 2002)

Login as root
Edit the file /etc/fstab
Add a new line to it like this:

/dev/hda1 /mnt/stuff ntfs user,rw 0 0

Change /dev/hda1 to the location of this partition.
Change /mnt/stuff to the folder you want it to be mounted to.
Save, exit, and reboot.

You don't have to use vi to make this edit, you can do it in KDE if you like, as long as you're root.


----------



## Omega_Shadow (Aug 2, 2004)

Ok! Now we are getting somewhere! After the re-boot I saw a drive icon on my desktop (hda2). Upon clicking it I get the dialog posted below.

So close....


----------



## brendandonhu (Jul 8, 2002)

How many partitions do you have on /dev/hda1?


----------



## Omega_Shadow (Aug 2, 2004)

lets see; win_c, win_d, and my mandrake install (a partition and a swap, I think) So thats about 4

The partition I want to mount is D


----------



## brendandonhu (Jul 8, 2002)

OK, in fstab
Try changing /dev/hda2 to /dev/hda5
If that doesn't work, do /dev/hda6


----------



## lynch (Aug 3, 2002)

brendandonhu said:


> wq = 2 key presses
> ZZ = 2 or 3


Your way: Shift+ colon +w + q = 4 
My way: Shift +z + z = 3  
squashman's right: you forgot your colon. 
Omega_shadow: post the contents of /etc/fstab here so we can have a look.
lynch


----------



## brendandonhu (Jul 8, 2002)

lynch said:


> Your way: Shift+ colon +w + q = 4
> My way: Shift +z + z = 3
> squashman's right: you forgot your colon.


No, I forgot that I don't have vi 
(nano gives me the colon)


----------



## lynch (Aug 3, 2002)

The nano ( or pico) I run is Ctrl+o to write and Ctrl+x to quit.


----------



## brendandonhu (Jul 8, 2002)

Yes but the prompt w/ options is already there, I figured vi would be the same.


----------



## Omega_Shadow (Aug 2, 2004)

Hda5: Drive not on desktop. Went to /mnt/win_d, folder was locked
Hda6: Drive on Desktop. Opens to empty folder


----------



## brendandonhu (Jul 8, 2002)

I think the problem is just the wrong partition number then.
You could give hda7 a shot, or wait for lynch to tell me what I'm doing wrong.


----------



## Omega_Shadow (Aug 2, 2004)

<sacrifices a floopy disk in hopes that the mighty Lynch will share his wisdom

lol

Hda7 didnt work. Going to post a graphic repersentation of my partitions when I get the chance...


----------



## CouchMaster (May 26, 2003)

https://wiki.ubuntu.com/Automatical...tions?highlight=(windows)|(mount)|(partition%


----------



## lynch (Aug 3, 2002)

open a terminal and type su -
type in root password
type fdisk -l /dev/hda
copy and paste the output here
Then...

Open /etc/fstab and paste it's contents here.
Armed with that info, somebody can get this straightened out.
lynch


----------



## mrbig (Nov 11, 2004)

okay I typed fdisk -l and here is what came up.

Disk /dev/hda: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4880 39198568+ 7 HPFS/NTFS
/dev/hda2 4881 7366 19968795 83 Linux
/dev/hda3 7367 7476 883575 5 Extended
/dev/hda5 7367 7476 883543+ 82 Linux swap / Solaris

Here is what is in my fstab file.

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


----------



## Omega_Shadow (Aug 2, 2004)

> bash: fdisk: command not found
> 
> # This file is edited by fstab-sync - see 'man fstab-sync' for details
> /dev/VolGroup00/LogVol00 / ext3 defaults 1 1
> ...


I went into mandrake and found that the partition I want _IS_ Hda5.

EDIT> I found this very odd. I can't even read my MANDRAKE install from fedora!

And just for those that think I did not log in as root before trying to run fdisk...


----------



## lynch (Aug 3, 2002)

Try it with the dash: *su -* 
In Fedora you may need to type * /sbin/fdisk -l /dev/hda* 
Edit the /etc/fstab and add a line for hda5:
*/dev/hda5 /mnt/win_c ntfs defaults,user,ro,umask=0222 0 0* 
If that does'nt work try:
*/dev/hda5 /mnt/win_c ntfs defaults 0 0* 
Then, as root, try mounting hda5:
*mount -t ntfs /dev/hda5 /mnt/win_c*

*** change /mnt/win-c to whatever mount point name you created for /dev/hda5 ***

HTH
lynch


----------



## Omega_Shadow (Aug 2, 2004)

The dash after su worked


> Disk /dev/hda: 122.9 GB, 122942324736 bytes
> 255 heads, 63 sectors/track, 14946 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
> ...


I am attempting the to edit fstab and mount the drive now. Be back with more news


----------



## mrbig (Nov 11, 2004)

lynch said:


> Try it with the dash: *su -*
> In Fedora you may need to type * /sbin/fdisk -l /dev/hda*
> Edit the /etc/fstab and add a line for hda5:
> */dev/hda5 /mnt/win_c ntfs defaults,user,ro,umask=0222 0 0*
> ...


Is this message directed towards me. Please let me know.


----------



## mrbig (Nov 11, 2004)

I typed fdisk -l /dev/hda2 and here is what came up. 

Warning: ignoring extra data in partition table 6
Warning: ignoring extra data in partition table 6
Warning: ignoring extra data in partition table 6
Warning: invalid flag 0x792e of partition table 6 will be corrected by w(rite)

Disk /dev/hda2: 20.4 GB, 20448046080 bytes
255 heads, 63 sectors/track, 2486 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda2p1 1 764 6136798+ 83 Linux
/dev/hda2p2 765 827 506047+ 5 Extended
/dev/hda2p5 765 827 506016 82 Linux swap / Solaris
/dev/hda2p6 ? 71751 141910 563552663 2e Unknown


----------



## Omega_Shadow (Aug 2, 2004)

Lynch....

 IT WORKED!!!


----------



## lynch (Aug 3, 2002)

No, it was for Omega_Shadow. 
Where'd you come from?


----------



## Omega_Shadow (Aug 2, 2004)

I think he has the same problem I had.


----------



## mrbig (Nov 11, 2004)

lol. I noticed when I booted up it said 
/mnt/win2k doesnt exsist. 

Do you think this may have something to do with it? btw I am running kubuntu


----------



## lynch (Aug 3, 2002)

Omega_Shadow , glad to hear that!
 :up: 
mrbig: you need to run *mkdir /mnt/win2k* as root to create the mount point.


----------



## mrbig (Nov 11, 2004)

lynch said:


> Omega_Shadow , glad to hear that!
> :up:
> mrbig: you need to run *mkdir /mnt/win2k* as root to create the mount point.


okay. I think I am almost there. win2k folder is locked. I went to the konsole and changed directories and i typed ls -all and it gave me what I wanted to see. now how do I get it to give me permission to access it other prgrams or do I leave it like this so no one else can access it.


----------

