LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Give root password for maintenance (https://www.linuxquestions.org/questions/linux-general-1/give-root-password-for-maintenance-263670/)

mijohnst 12-07-2004 11:36 AM

Give root password for maintenance
 
I messed up my fstab file by mistake. I have a copy of it on another computer but I can't write to my /etc/fstab file because it's a read-only. Is there a way to make the file system writable? Thanks again!

320mb 12-07-2004 11:46 AM

the permissions for /etc/fstab should be --AND should always remain 644

you may need to use a live CD like knoppix........OR if you have the Slackware CD set, CD #2 is a Live rescue CD.......

mijohnst 12-07-2004 04:32 PM

Thanks 320mb. I don't have a CD to boot too because this is a blade system. I wish that I could just edit the FSTAB file somehow and that would fix the system. I wish there was an easier way.

amfoster 12-07-2004 08:56 PM

use a rescue disk and mount the / file system. Edit ur file and then unmount it and reboot
mkdir ramdisk1
mount /dev/hda2 ramdisk1

of course use the hda partition that is your root file system.

mijohnst 12-08-2004 12:53 PM

Is there any way that I can just make one file writable in the maintenance mode? Seems silly that I can look at every file and see the problem, but I have to go through all this work just to modify it. I say alot of work because there is no floppy drive or CD attached.

Thank you for your responses... :)

ap1803 12-29-2010 10:07 AM

don't need a live/rescue cd...
 
Stummbled accross this when I had the same issue, stumped me for a bit but all you need to do when you've got the recovery prompt is remount the root filesystem as read write:


Code:

mount -o remount,rw /
Then you can edit the fstab as normal


All times are GMT -5. The time now is 07:10 PM.