LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   fstab file (https://www.linuxquestions.org/questions/linux-general-1/fstab-file-228055/)

Haroon 09-08-2004 04:12 AM

fstab file
 
Haw can i make changes in fstab file and how can i find fstab file, to get access in my windows partition and my Windows files.

jkobrien 09-08-2004 04:18 AM

It depends on how your hard disks and partitions are set up.

If you look at the fstab file you'll see that it's a line per mount, with 5 entries:

the device; the mount point; the filesystem type; options and then two options for dumps and filesystem checks.

man fstab will give you more detail, as will reading up on partitions.

John

p.s. the file is at /etc/fstab. To find a file, you can always try 'locate fstab'

ppuru 09-08-2004 04:22 AM

fstab resides in the /etc directory. You can edit it with a text editor like vi.

if you windows partitions are FAT32 based, you can use vfat. If they are NTFS, you will need to compile the kernel to add ntfs support OR if your distro supports, download the appropriate rpm from http://linux-ntfs.sourceforge.net.

For example ... <DO NOT cut & paste>
/dev/hda3 /dose vfat noauto,user,rw 0 0

Haroon 09-08-2004 04:48 AM

Thank you jkobrien and ppuru!
i find the fstab file, where can i write the command :
mount /dev/hda1 -t vfat /mnt windows

ppuru 09-08-2004 04:58 AM

Quote:

where can i write the command :
mount /dev/hda1 -t vfat /mnt windows
That command can be executed at the commandline either on the linux console or a terminal window. you will require root rights to do that.

Oliv' 09-08-2004 05:03 AM

Hi,

You don't have to write this command in fstab, you have to "fill fields"
in the first column, put your device
second column: your mount point
third: filesystem
fourth: options... for example: umask=000 if you want anybody to access your fat partition
fifth: for non ext2 partitions, put 0
sixth: for non ext2 partitions, put 0
so your new line should look like this:
Code:

/dev/hda1 /mnt/windows vfat umask=000 0 0
Oliv'

Haroon 09-08-2004 05:04 AM

I am sorry i mean where in fstab file because i want to have a regular access to my Windows partition.
should i write a new line

jkobrien 09-08-2004 05:11 AM

Yep, just add a new line to the end.

John

Haroon 09-08-2004 05:25 AM

I opened the fstab file with text editor vi but i could not write, i cant not go to the next line?

ppuru 09-08-2004 05:30 AM

Ok step by step

cp /etc/fstab /etc/fstab.orig // make a backup of the original fstab file
vi /etc/fstab
type G (G in caps) // takes you to the bottom of the file
type o (no caps) // insert after the current line
/dev/hda1 /mnt/windows vfat noauto,user,rw 0 0
Hit ESC // exit edit mode
type :wq (colon w q) // save and quit

Haroon 09-08-2004 05:40 AM

I don't understand what does this line do" cp /etc/fstab /etc/fstab.orig" then i open the fstab with text editor vi. what dose this line
type G (G in caps)?
type o (no caps)?
what is noauto,user,rw 0 0?
what is Hit ESC?

ppuru 09-08-2004 05:52 AM

I have edited my previous post, added comments about what each line does.

Haroon 09-08-2004 06:09 AM

Thank you for your comments, you have helped me very much


All times are GMT -5. The time now is 08:37 PM.