LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mount filesystems from hda1 and hda2 (https://www.linuxquestions.org/questions/linux-newbie-8/mount-filesystems-from-hda1-and-hda2-140014/)

jhirshon 01-29-2004 11:40 AM

mount filesystems from hda1 and hda2
 
I have a fresh installation of Fedora Core 1.0 on its own hard drive. The system is set up for dual boot. How do I mount filesystem hda1 (FAT) and filesystem hda2 (NTFS)

Thanks,
Jordon

druuna 01-29-2004 11:56 AM

Both (FAT, NTFS) must have kernel support. I'm sure that FAT will be enabled, not sure about NTFS. If it is you will probably only have read access (still a bit dangerous to write to an NTFS fs).

Take a look at the mount manpage (man 2 mount) for all the options for mounting.

Here's the short version:

Create a directoy where your partion is going to be mounted. On most systems there is already a directory (/mnt) where you can create these dirs.

$ mkdir /mnt/hda1
$ mount -t vfat /dev/hda1 /mnt/hda1

You should be able to access your FAT disk.

To unmount:

$ umount /dev/hda1

If you want to make this permanent, add it to your /etc/fstab.
Something like this (read the manpage first, don't copy/paste this!!):

/dev/hda1 /mnt/hda1 vfat defaults 1 2

MartinN 01-29-2004 12:00 PM

Hi Jordon! Welcome to LinuxQuestions.

There are two answers to your question. The first answer is if you want to mount them once, the second is if you want them to always be mounted automatically.

First, you need an empty directory as a mount point (actually, it doesn't need to be empty, but once you mount something the stuff that was there before will be hidden).

Now, for mounting a disk once, root gives this command:
mount -t vfat /dev/hda1 some_directory
The NTFS partition must be mounted read-only, blame Microsoft who don't give any information as to how NTFS works :rolleyes:
mount -r -t ntfs /dev/hda2 some_other_directory

To automatically mount a partition, you (root) must edit the file /etc/fstab
Add two lines that look like this:
Code:

/dev/hda1                      /some/directory                vfat    defaults        0 0
/dev/hda2                      /some/other/directory  ntfs    ro              0 0

I think that the two above lines are correct, but I haven't tested it. Anybody has a second opinion?

Regards
Martin

DrOzz 01-29-2004 12:05 PM

but we do now have something that enables read/write to ntfs ... never tried it (cause not only do i not use windows, it wouldn't be formatted as ntfs if i did)
you can read up here


All times are GMT -5. The time now is 01:23 AM.