Help - Search - Members - Calendar
Full Version: Automatic Mounting
Linuxhelp > Support > Technical Support
Waggy
Hi.
I installed slackware 9.1 2 days ago and after a few bumps, everything is fine, except for my drives.
I cant access any of them
I have 2 HDD"s on the Primary IDE chain, and 2 optical drives on the secondary.
The primary master has 4 partitions..
[NT page file] [NTFS with xp] [swap ] [ext2 for sackware]
The slave is just data, in NTFS.

Someone told me about the file, /etc/fstab , but didnt tell me how to edit it.
Can someone tell me what to put in there to allow use of all the drives?
Corey
Each device on your system has a character file in the linux filesystem. For example, your Primary Master hard drive is named /dev/hda , each partition on that primary master is given a name as well, for your system, it would be similar to the following:

/dev/hda1 - NT Page File
/dev/hda2 - Windows XP
/dev/hda3 - Swap
/dev/hda4 - Linux

When you want to access a filesystem in linux, it needs to be "mounted" to a local directory. When you boot up your system, the linux init process mounts /dev/hda4 (your linux partition) to the "/" directory (the root directory). Personally, for a Windows partition, i usually create the directory in /mnt/winxp (as root, issue 'mkdir /mnt/winxp').

Next, we must tell linux that when it boots up, it needs to automatically mount the WindowsXP partition to the location of /mnt/winxp. To do this, we need to edit the /etc/fstab. The format for this file is as follows:

-file system- -mount point- -type- -options- -dump- -pass-

definitions:
file system - the device that you are mounting
mount point - where your mounting the device to on your system
type - the filesystem type of the partition (ntfs for winxp/nt, vfat for win9x)
options - different options
dump - filesystem dump (you can ignore this for windows partitions)
pass - filesystem check on reboot (ignore this for windows as well)

So, if you wanted your Windows XP partition (with the ntfs filesystem) to be mounted on boot, you would add the following line:

QUOTE
/dev/hda2  /mnt/winxp  ntfs  auto 0 0


to your /etc/fstab file. After you save the file, you can immediatly mount the partition with:

QUOTE
user@host:# mount /mnt/winxp
Corey
One extra note, if you have an NTFS filesystem, you will not be able to write to your WindowsXP partition, only read. There are ways around this, but it's extreamly dangerous and you risk corrupting your entire windows install.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.