Accessing Second Hard Drive

Posted on 2005-04-30
Last Modified: 2013-11-13
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?
Question by:fluked
    LVL 10

    Expert Comment

    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.
    LVL 1

    Author Comment

    [eli@localhost ~]$ fdisk -l
    bash: fdisk: command not found
    [eli@localhost ~]$
    LVL 10

    Expert Comment

    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
    LVL 1

    Author Comment

    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
    LVL 9

    Expert Comment

    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 for further details and the relevant packages for your kernel.
    LVL 2

    Expert Comment


    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.

    LVL 8

    Expert Comment

    I would refer to the site that gtkfreak mentioned, but the site actually is  not .com.  I've made that mistake a few times too.


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

    uname -r

    2.Download the appropriate fedora core 3 rpm here:

    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)
    LVL 8

    Expert Comment

    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.
    LVL 7

    Expert Comment

    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.

    Accepted Solution

    PAQed with no points refunded (of 25)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now