Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-02-2007, 12:03 PM
|
#1
|
Member
Registered: Jul 2007
Posts: 137
Rep:
|
Can't edit fstab??
hi,
i can not edit my fstab. it say permission denied eventhough i have logged in as root.
what do i do? please help.
|
|
|
07-02-2007, 12:41 PM
|
#2
|
Senior Member
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761
Rep:
|
|
|
|
07-03-2007, 12:39 PM
|
#3
|
Member
Registered: Jul 2007
Posts: 137
Original Poster
Rep:
|
hi,
the output is as follows
-rw-r--r-- 1 root root 542 Jul 3 22:03 /etc/fstab
what do i do now? i am using Fedra core 4
|
|
|
07-03-2007, 01:22 PM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
In a terminal, do "su" to become root, and then open an editor like so:
gedit /etc/fstab
That SHOULD work
|
|
|
07-03-2007, 01:34 PM
|
#5
|
Member
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548
Rep:
|
Permissions show you should be able to edit the file.
If using vi, even when it says it can't write the file out if you do a
:w!
in command mode (not insert mode) it will write the file. The ! forces it.
|
|
|
07-03-2007, 02:48 PM
|
#6
|
LQ Newbie
Registered: Jul 2007
Posts: 1
Rep:
|
Quote:
Originally Posted by DotHQ
Permissions show you should be able to edit the file.
If using vi, even when it says it can't write the file out if you do a
:w!
in command mode (not insert mode) it will write the file. The ! forces it.
|
Might have the immutable attribute set.
Do: lsattr /etc/fstab
If it comes back with:
s---i---c--------- /etc/fstab
( the i means it's set to immutable ).
To be able to update it, do:
chattr -i /etc/fstab
To change it back once done updating do
chattr +i /etc/fstab
|
|
|
07-04-2007, 12:18 PM
|
#7
|
Member
Registered: Jul 2007
Posts: 137
Original Poster
Rep:
|
Quote:
Originally Posted by pixellany
In a terminal, do "su" to become root, and then open an editor like so:
gedit /etc/fstab
That SHOULD work
|
thanks. it has worked and i am able to edit fstab. please find output of fstab;
Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 c W95 FAT32 (LBA)
/dev/sda2 1276 10010 70163887+ f W95 Ext'd (LBA)
/dev/sda5 1276 2550 10241406 b W95 FAT32
/dev/sda6 2551 5100 20482843+ b W95 FAT32
/dev/sda7 5101 7650 20482843+ b W95 FAT32
/dev/sda8 7651 10010 18956668+ 83 Linux
now i want to mount all sda5,6 and 7 drives. please correct me as it doesnt agree with this command;
mount -t vfat/dev/sda5 /mnt/c_drive
it say i am not using -t command right. please guide!
also, what should i type in fstab once i have mounted these drives?? step by step plese!
|
|
|
07-04-2007, 12:21 PM
|
#8
|
Member
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906
Rep:
|
Need a space.
mount -t vfat /dev/sda5 /mnt/c_drive
|
|
|
07-04-2007, 01:04 PM
|
#9
|
Member
Registered: Jul 2007
Posts: 137
Original Poster
Rep:
|
Quote:
Originally Posted by Hern_28
mount -t vfat /dev/sda5 /mnt/c_drive
|
thanks Hern28. it works.
what command i should put in fstab so that i dont need to mount it everytime i boot?
|
|
|
07-04-2007, 01:11 PM
|
#10
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep:
|
/dev/sda5 /mnt/c_drive vfat auto,rw 0 0
should do it. You may like to read the following: http://www.tuxfiles.org/linuxhelp/fstab.html.
|
|
|
07-04-2007, 01:15 PM
|
#11
|
Member
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906
Rep:
|
Anytime.
Nylex's should get your setup finished. Goodluck .
|
|
|
07-04-2007, 01:39 PM
|
#12
|
Member
Registered: Jul 2007
Posts: 137
Original Poster
Rep:
|
Thanks for your time!
[QUOTE=Nylex]/dev/sda5 /mnt/c_drive vfat auto,rw 0 0
should do it.
i have opened fstab remaining in terminal through this command;
nano /etc/fstab
i have incorporated the changes as your directed me to. then rebooted. but nothing has happened??
when i directly try to open fstab it doesnt permit me to make changes ????
|
|
|
07-04-2007, 01:42 PM
|
#13
|
Member
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906
Rep:
|
Try:
/dev/sda5 /mnt/c_drive vfat defaults 1 1
You will need to get into root user mode using a root terminal, su, or sudo then nano fstab to be able to edit. Be sure the drive is not mounted in the file manager or you might not see the change.
Last edited by Hern_28; 07-04-2007 at 01:44 PM.
|
|
|
All times are GMT -5. The time now is 01:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|