LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   accessing ntfs drive (https://www.linuxquestions.org/questions/linux-newbie-8/accessing-ntfs-drive-317483/)

ntisoldtech 04-26-2005 06:42 PM

accessing ntfs drive in slackware
 
im using slackware. i have an ntfs drive with some music on it but i need it mounted or some shit. what do i need to type in the konsole to get it reconized? without music im just gonna switch back to windows, computer freezing sucks, help me out.

visaris 04-26-2005 08:41 PM

Lol, your use of profanity made me laugh, I have to reward that with a response.

Here's a basic outline of how to mount the drive:

You need to find out what harddrive and partition the ntfs volume is. Look around in the /proc/ide/ directory (ls /proc/ide). My computer has a number of entries, the ones you want start with an 'h'. The ones of interest on my system are "hda", "hdb", and "hdc". These represent the ide drives that are present in your system (not exactly, but hell, close enough). Each of these is itself a directory. You can look in each of them if you want: "ls /proc/ide/hda/", "ls /proc/ide/hdb/", etc. You should see these entries (or at least most of them) : "capacity" "driver" "identify" "media" "model" "settings". You care about the "model" one. This will help you identify the drive which has the ntfs volume on it. To look at the model information, do this "cat /proc/ide/hdx/model" where the 'x' in "hdx" is replaced with the letter of the drive you want to know about. Mine says this:
Code:

foo@bar baz $ cat /proc/ide/hdc/model
WDC WD1200JB-00DUA3

I now know that "hdc" or more correctly, "/dev/hdc" corresponds to my 120GB Western Digital harddrive. See, isn't that easy? Find the drive that has the ntfs partition by finding the drive with the correct model number on it (look in windows to make sure). Now, we are halfway done. Next you need to know about the partitions on the drive. To do that, log in as root (or use "su"), and do this: "fdisk /dev/hdx", again, where 'x' is the letter of the drive you are interested in. At the fdisk prompt type 'p' for print. Mine looks like this:
Code:

Command (m for help): p

Disk /dev/hdc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hdc1  *          1      14593  117218241  83  Linux

This says that my drive has only one partition and that it is a linux partition. You see that the line starts with "/dev/hdc1". This means that partition 1, or more correctly "/dev/hdc1" is of type Linux. Yours will list a number of partitions (that number may be 1), and should have somthign about NTFS under the system field. Once you know what partition it is you are ready to continue. Type 'q' at the fdisk prompt to exit it. Now you have all the information you need to know to mount the NTFS volume.

Create a mountpoint. As root (or with "su"), type this "mkdir /mnt/windows". This is the folder which will contain your windows data. Then mount the windows volume to the mountpoint using the mount command: "mount -t ntfs /dev/hdxn /mnt/windows", where the 'x' in "hdxn" is the letter of the drive you found by the above method, and 'n' is the number of the partition you found, again, using the above method. Now, your windows data will be in /mnt/windows, where you can get at it.

If you need any more help from me, you'll have to be funny again. Though, always read the manpage of every command you ever type, and after a while, you'll know exactly what they all do. "man <command goes here>". Is your friend. Just in case you don't know the 'q' key will exit the manpage.

visaris 04-26-2005 08:42 PM

You took out the funny part......... I'd have a good mind to just erase my whole post.

ntisoldtech 04-26-2005 08:49 PM

ok i put the swearing back in, now to try typing some shit, thanks for the response.


All times are GMT -5. The time now is 11:08 PM.