Link to home
Start Free TrialLog in
Avatar of fluked
fluked

asked on

Accessing Second Hard Drive

I have successfully installed fc3 on my pc. I have two hard drives on my computer. The first hard drive has the whole linux O/S on it. The second one  is FAT32, and i need to access it from linux. Any way i can mount this drive so I can access my files on it?
Avatar of Luxana
Luxana
Flag of Australia image

this is easy:

this is outpu of my terminla where I mount fat windows partiton:

# fdisk -l

Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         255     2048256   12  Compaq diagnostics
/dev/hda2             256        1530    10241437+   7  HPFS/NTFS
/dev/hda3   *        1531        1956     3421845   83  Linux
/dev/hda4            1957        4864    23358510    5  Extended
/dev/hda5            1957        4752    22458838+  83  Linux
/dev/hda6            4753        4783      248976   82  Linux swap
/dev/hda7            4784        4864      650601    6  FAT16

Disk /dev/sda: 131 MB, 131072000 bytes
16 heads, 32 sectors/track, 500 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         500      127983+   6  FAT16
Partition 1 has different physical/logical endings:
     phys=(498, 15, 32) logical=(499, 15, 31)
# mkdir /mnt/win
# mount -t vfat /dev/hda7 /mnt/win

thet all files can be found in /mnt/win folder

hope this help.
Avatar of fluked
fluked

ASKER

[eli@localhost ~]$ fdisk -l
bash: fdisk: command not found
[eli@localhost ~]$
the command fdisk -l is not essential if you know what partiton is your fat just run mount command as above.
>[eli@localhost ~]$ fdisk -l
>bash: fdisk: command not found
>[eli@localhost ~]$

run fdisk -l as root not as user !!!

# ==> root
$ ==> user
Avatar of fluked

ASKER

Disk /dev/hda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14        4998    40042012+  8e  Linux LVM

Disk /dev/hdb: 20.4 GB, 20411080704 bytes
255 heads, 63 sectors/track, 2481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        2481    19928601    7  HPFS/NTFS
[root@localhost eli]# mkdir /mnt/win
[root@localhost eli]# mount -t vfat /dev/hdb1 /mnt/win
mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
       or too many mounted file systems
You are trying to read an NTFS partition using FC3. Therefore, the mount command should be
mount -t ntfs /dev/hdb1 /mnt/win

However, your kernel must support NTFS partitions reading. You will need to install relevant packages to enable NTFS partition support.

You can check out http://linux-ntfs.sourceforge.com for further details and the relevant packages for your kernel.

you can also simply try,
mount /dev/hdb1 /mnt/win

if FC3 knows how to read NTFS partitions, then it will mount and you can access them. still only read access is allowed as NTFS writing feature is experimental.

if you are not able to mount, probably you have to recompile your kernel with NTFS read support.

Gopi
I would refer to the site that gtkfreak mentioned, but the site actually is http://linux-ntfs.sourceforge.net/  not .com.  I've made that mistake a few times too.

STEPS

1.Find out what kernel you are running using this command:

uname -r

2.Download the appropriate fedora core 3 rpm here:

http://linux-ntfs.sourceforge.net/rpm/fedora3.html

Be sure to get the right one!

3.  Excecute as root:

rpm -ivh kernel-module-ntfs*   (to install the package)

mount -t ntfs /dev/hdb1 /mnt/win (mounts the drive)
If you are unsure of what processor you have, execute:

rpm -q --queryformat "%{ARCH}\n" kernel

This should tell you if you need and i686 rpm (most likely) or one from a different column.
NTFS support is of questionable quality under Linux.  Don't mount the partition read-write unless the data is unimportant to you (i.e. you don't care if it all gets lost and Windows stops working).  Mounting it read-only should be safe, but it'd be better to have a shared FAT32 partition that both Windows and Linux can access.  You would need to resize the existing partition in order to create a new one; Partition Magic is a common (commercial) utility for resizing Windows partitions.

You can make future mounting of Windows partitions easier by adding an entry in /etc/fstab.  E.g.

/dev/hdb1 [tab] /mnt/windows [tab] vfat [tab] noauto 0 0

Replace "noauto" with "default" to have it automatically mounted.  Add ",user" (e.g. "noauto,user") to allow non-root users to mount the partition.  Replace "[tab]" with a tab in the above example; not required, but preferred, for easy reading of the file.  You can use pico, vi or something else to edit files like fstab, but vi is more friendly to the files (and less friendly to the novice user); I recommend picking up a quick reference book for vi, if you're new to it.
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial