Rescue problem - How do I edit /etc/fstab without vi?
Linux - SoftwareThis 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.
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.
Rescue problem - How do I edit /etc/fstab without vi?
I had a corrupt file system problem, and had to run fsck manually. (Debian Linux).
In order to do so, I had to stop the system mounting the various /dev/hda5, /dev/hda6,/dev/hd7 because otherwise fsck said it couldn't repair them because they were in use, not even with the -f option.
So I changed /etc/fstab, and gated with # the three lines that mounted them.
Big mistake, as it now turns out.
I managed to repair the file system manually, but...... I can't put anything back as it was.
I can now boot up to a certain point, where the system asks me for the root password for maintenance. I have the root file system mounted, but nothing else. This means that I can roam about the root file system, and I can cat /etc/fstab, but without vi I can't put it back as it was.
How can I edit /etc/fstab to put everything back to normal? - I only have the use of programmes in /bin and /sbin, none of which enable me to edit.
I have tried creating a rescue floppy disk from Windows, which is working normally, so I have access to the web (hence this post) and the rescue floppy correctly started the system, but rescueing the root disk from the floppy just brought me to the same point as booting normally. i.e. no editing programmes.
Any help appreciated, I see to be in a big hole here.
you mean the / or the /root dir? vi should be in your /bin unless its some /bin thats mounted on a floppy? So you are saying that you can not boot to any of your linux partitions, just off a floppy? /bin/vi and /bin/ed are in my /bin. It sounds like your /dev/hd? is mounted in your /. I dont know much about Debain, I've never used it. It seems like your saying you can boot your system? There should be editors in /bin. I know there is in mine. Tell us more about what you are trying to do. Just edit your /etc/fstab, or start x11? From wht you say it sounds like you have access to your system, and not the network?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.