LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 12-13-2009, 06:02 PM   #1
Lorax
Member
 
Registered: Nov 2009
Posts: 215

Rep: Reputation: 32
Access to other partitions: NTFS and FAT32


Debian Lenny Gnome
Compaq, 1100MHz, 512k

I have 2 partitions on the Windows HD that I'd like to access, and another HD also installed in the She-Beast.

How do I mount a drive?

My computer is really screwy, and I think Eric became frustrated trying to help me get this going. At one point, The winderz partition was mounted, but it showed 0 files in the folder.

Eric has been so kind to offer many hours of his time on this, as well as other ailments. I just don't want to bother him with this one anymore. He needs a rest from me!!!
 
Old 12-13-2009, 06:55 PM   #2
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Give us the output of:
fdisk -l
That will show the locations of all partitions on all drives. Then we can mount them so you can have access.
 
Old 12-13-2009, 07:01 PM   #3
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Did you install ntfs-3g?
 
Old 12-13-2009, 07:24 PM   #4
Lorax
Member
 
Registered: Nov 2009
Posts: 215

Original Poster
Rep: Reputation: 32
Not sure what it all means...

Quote:
LORAXNETWORK:~# fdisk -l

Disk /dev/hda: 20.4 GB, 20416757760 bytes
240 heads, 63 sectors/track, 2637 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x18b418b3

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1219 9215608+ 7 HPFS/NTFS
/dev/hda2 1220 2637 10720080 c W95 FAT32 (LBA)

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

Device Boot Start End Blocks Id System
/dev/hdb1 1 7177 57649221 83 Linux
/dev/hdb2 7178 7390 1710922+ 5 Extended
/dev/hdb5 7178 7390 1710891 82 Linux swap / Solaris

Disk /dev/hdd: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x135cdb28

Device Boot Start End Blocks Id System
/dev/hdd1 1 38913 312568641 7 HPFS/NTFS
 
Old 12-13-2009, 07:26 PM   #5
Lorax
Member
 
Registered: Nov 2009
Posts: 215

Original Poster
Rep: Reputation: 32
Quote:
Did you install ntfs-3g?
Not sure how to that, or what it means...
My brother Eric mentioned that too...
 
Old 12-13-2009, 07:34 PM   #6
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Type in a terminal:

su

Enter password for root.

Quote:
apt-get update && apt-get install ntfs-3g
Now :

Quote:
cat /etc/fstab
Copy it and paste the output here.

You have 2 NTFS partitions at:
Quote:
/dev/hda1 and /dev/hdd1 and one FAT32 at /dev/hda2
is this correct?
 
1 members found this post helpful.
Old 12-13-2009, 07:36 PM   #7
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
if on debian, run apt-get install ntfs-3g then mount -t ntfs-3g /dev/your_ntfs_drive /where/to/mount
 
Old 12-13-2009, 07:40 PM   #8
Lorax
Member
 
Registered: Nov 2009
Posts: 215

Original Poster
Rep: Reputation: 32
The output:

Quote:
LORAXNETWORK:~# apt-get update && apt-get install ntfs-3g
Hit http://ftp.debian.org lenny Release.gpg
Ign http://ftp.debian.org lenny/main Translation-en_US
Ign http://ftp.debian.org lenny/contrib Translation-en_US
Ign http://ftp.debian.org lenny/non-free Translation-en_US
Get:1 http://security.debian.org lenny/updates Release.gpg [835B]
Ign http://security.debian.org lenny/updates/main Translation-en_US
Ign http://security.debian.org lenny/updates/contrib Translation-en_US
Get:2 http://security.debian.org lenny/updates Release [40.8kB]
Hit http://ftp.debian.org lenny Release
Get:3 http://www.lamaresh.net lenny Release.gpg [198B]
Ign http://www.lamaresh.net lenny/main Translation-en_US
Ign http://ftp.debian.org lenny/main Packages/DiffIndex
Hit http://www.lamaresh.net lenny Release
Err http://www.lamaresh.net lenny Release

Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/contrib Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Ign http://security.debian.org lenny/updates/contrib Sources/DiffIndex
Ign http://ftp.debian.org lenny/contrib Packages/DiffIndex
Ign http://ftp.debian.org lenny/non-free Packages/DiffIndex
Ign http://ftp.debian.org lenny/main Sources/DiffIndex
Ign http://ftp.debian.org lenny/contrib Sources/DiffIndex
Ign http://ftp.debian.org lenny/non-free Sources/DiffIndex
Hit http://security.debian.org lenny/updates/main Packages
Hit http://security.debian.org lenny/updates/contrib Packages
Hit http://security.debian.org lenny/updates/main Sources
Get:4 http://www.lamaresh.net lenny Release [1558B]
Hit http://security.debian.org lenny/updates/contrib Sources
Hit http://ftp.debian.org lenny/main Packages
Hit http://ftp.debian.org lenny/contrib Packages
Hit http://ftp.debian.org lenny/non-free Packages
Hit http://ftp.debian.org lenny/main Sources
Hit http://ftp.debian.org lenny/contrib Sources
Ign http://www.lamaresh.net lenny Release
Hit http://ftp.debian.org lenny/non-free Sources
Ign http://www.lamaresh.net lenny/main Packages/DiffIndex
Ign http://www.lamaresh.net lenny/main Packages
Hit http://www.lamaresh.net lenny/main Packages
Fetched 43.4kB in 2s (18.2kB/s)
Reading package lists... Done
W: GPG error: http://www.lamaresh.net lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 905C75258D4B24D2
W: You may want to run apt-get update to correct these problems
Reading package lists... Done
Building dependency tree
Reading state information... Done
ntfs-3g is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
totem-youtubeh264: Depends: totem (>= 2.22) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
LORAXNETWORK:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hdb1 / ext3 errors=remount-ro 0 1
/dev/hdb5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
LORAXNETWORK:~#
 
Old 12-13-2009, 07:44 PM   #9
Lorax
Member
 
Registered: Nov 2009
Posts: 215

Original Poster
Rep: Reputation: 32
Shylock, you are correct about the partitions/formats (post #6)
 
Old 12-13-2009, 07:46 PM   #10
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Edit your /etc/fstab as root:
Code:
nano /etc/fstab
And add:
Code:
/dev/hda1 /ntfs1  ntfs-3g  rw,users,auto,noatime,exec  0 0
/dev/hda2 /fat   vfat     users,rw,auto,noatime,exec          0 0
/dev/hdd1 /ntfs2  ntfs-3g  rw,users,auto,noatime,exec  0 0
Make those directories, remember you can use any other names instead of ntfs1 and 2 and fat. Create them:
Code:
mkdir /ntfs1 /ntfs2 /fat
mount -a

Last edited by ~sHyLoCk~; 12-13-2009 at 07:48 PM.
 
1 members found this post helpful.
Old 12-13-2009, 08:15 PM   #11
Lorax
Member
 
Registered: Nov 2009
Posts: 215

Original Poster
Rep: Reputation: 32
GREAT!!! Thank yous!
Now I have access to my music, movies, and porn!
;-D

Will the drives be automatically mounted the next time I start the box?

hdd is constantly changed out with other HDs; I have a dozen of them...
Will Debian recognize the new drive as hdd also? Any foreseen issues with this?
 
Old 12-13-2009, 08:23 PM   #12
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
you'd better know what are you really doing. what if we adviced you to rm -fr ~ ? =) or, say, paste an output from execution of an obfuscated perl command that will copy /etc/shadow and encrypt it, then returned?)))

well, to be on-topic, /etc/fstab is a config that is read by kernel on boot, it means all partitions added in there are going to be mounted by kernel, if possible(if they really exist and have valid fs).
--
upd: i used vol_id that returned me an UUID of partition. i too have 3 HDDs, linux won't boot if i use standard method of specifying /dev/sda1 or /dev/sdc1 in /etc/fstab. my current fstab was created by me from an outputs of vol_id in the past, it looks like:
Code:
UUID=ad4ade0f-7ffe-4df1-b567-7e730dfcb6d1       /               ext3    errors=remount-ro 0       1
UUID=879907d8-a709-4258-b1a3-c2fd29ce7ac6       /home           ext3    defaults        0       2
UUID=45e3b3b8-938f-4ccf-966a-c70ef70b808b	/home/web31337/300G	reiserfs	defaults 0 3
UUID=6abc5ddd-165d-45a7-8de6-749cdbcdc98f	/home/web31337/500G	ext3		defaults 0 4
it's simply made by replacing your paths of /dev/hda1 with it's UUID returned from vol_id /dev/hda1
in fact 1-2, 3 and 4 entries here are separate HDDs.

Last edited by Web31337; 12-13-2009 at 08:29 PM. Reason: UUID
 
Old 12-13-2009, 08:26 PM   #13
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
These drives will be automatically mounted at the specified mount points.
Suppose you have a HDD X which is ntfs and you place it where HDD Y [which was FAT32], then you will run into unable to mount problem at boot. But you can always edit your fstab like I showed and mount them accordingly. Also if you wouldn't want to make the change permanent , that is, you would like to just plugin a HDD and mount it and do your work and plug it out. Then use this instead [it will temporarily mount your HD]:

Code:
mount -t ntfs-3g[or vfat incase of fat32] -o rw,users /dev/hda[N] /mount/point
Replace /hdaN accordingly, check your fdisk -l output and it will show where your HDD was plugged.

After the job is one use:
Code:
umount /dev/hdaN
Regards

Last edited by ~sHyLoCk~; 12-13-2009 at 08:33 PM.
 
Old 12-13-2009, 08:33 PM   #14
Lorax
Member
 
Registered: Nov 2009
Posts: 215

Original Poster
Rep: Reputation: 32
SOLVED!
Thanks friends!
 
  


Reply



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
Dual Boot and FAT32/NTFS Partitions Certic Mandriva 3 07-03-2006 12:19 AM
accessing my FAT32 and NTFS partitions d0tc0mguy Linux - Newbie 2 04-21-2005 03:42 PM
[NTFS]/[EXT(2 or 3)]/[FAT/FAT32] partitions fraz Linux - Software 5 11-14-2004 07:43 AM
only root can access my fat32 and ntfs partitions on Mandrake 9.2 el_pajaro! Mandriva 2 02-03-2004 05:19 AM
2 fat32 partitions on fbsd5/w2k dual. Can only access one fat32 so far.. mipia *BSD 1 10-06-2003 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:55 AM.

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
Open Source Consulting | Domain Registration