LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Access to other partitions: NTFS and FAT32 (https://www.linuxquestions.org/questions/linux-newbie-8/access-to-other-partitions-ntfs-and-fat32-775427/)

Lorax 12-13-2009 06:02 PM

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!!!

SharpyWarpy 12-13-2009 06:55 PM

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.

~sHyLoCk~ 12-13-2009 07:01 PM

Did you install ntfs-3g?

Lorax 12-13-2009 07:24 PM

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

Lorax 12-13-2009 07:26 PM

Quote:

Did you install ntfs-3g?
Not sure how to that, or what it means...
My brother Eric mentioned that too...

~sHyLoCk~ 12-13-2009 07:34 PM

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?

Web31337 12-13-2009 07:36 PM

if on debian, run apt-get install ntfs-3g then mount -t ntfs-3g /dev/your_ntfs_drive /where/to/mount

Lorax 12-13-2009 07:40 PM

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:~#

Lorax 12-13-2009 07:44 PM

Shylock, you are correct about the partitions/formats (post #6)

~sHyLoCk~ 12-13-2009 07:46 PM

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


Lorax 12-13-2009 08:15 PM

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?

Web31337 12-13-2009 08:23 PM

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.

~sHyLoCk~ 12-13-2009 08:26 PM

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

Lorax 12-13-2009 08:33 PM

SOLVED!
Thanks friends!


All times are GMT -5. The time now is 09:34 AM.