Have you no backups? or at least a copy of config files...
It will be difficult to guess the entries of your fstab unless you havent done anything special... that means accepted the defaults at install time.
Unlike your registry however, it can be rewritten from scratch by hand in a reasonable amount of time. Use things like fdisk and such to find all your partitions, mount them in a restore disk to figure out which is which, and write entries into your fstab like so:
Of course, yours won't be exactly the same. The partition types, device names, and numbers will all differ, not to mention you won't have the same layout either. But that's how it works.
And when you've written the new fstab file, don't forget to back it up!
The possibility of overwriting important files is one of the reasons I tell new Linux admins to avoid routinely using the root account, but instead creating an account with sudo privileges for normal day-to-day stuff, at least it doesn't let you change important files without using sudo, so there isn't the same possibility of accidentally overwriting system files.
For future reference, if anything like this should ever happen again, typing
will give you the info you need to rewrite the fstab. I would suggest never rebooting or restarting after overwriting something critical - Unix-style systems are easy to get under the hood of, but not always so forgiving of human error.
would also be helpful.
Assuming you don't have a backup, you'll probably need to run fdisk/cfdisk and get an idea of what partitions are set up, and go from there.
But I am amusing that Linux don't have any preliminary feature for the back-up.
It can't be that vulnerable.
It would have been helpful if immediately upon submission of that command the shell had forked an assistant:
Quote:
Clippy: "nixhead, it looks like you are about to truncate a critical system file. Please choose one of the following options: Abort, Cancel, Shutdown.
All joking aside, that won't be your last mistake. They happen to everyone from time to time. The difference is whether you're prepared to recover. You should not only have backups but a tested recovery procedure.
I want to zip up my fstab file for backup purposes.
This does not work because of permission issues.
cd /etc/
zip -u fstab.zip fstab
Can I use this with zip?
echo xxx | sudo -S
or change fstab owner to me? (3 Replies)
Hi,
I am looking to replace value (fifth and sixth ) column to "0 0" in /etc/fstab file by scripting.
can any one please help me.
/dev/VolGroup00/tmp /tmp ext3 defaults 1 1 (2 Replies)
How will Full Disk encryption effect how open-source software is compiled and run using ubuntu 14.04. Are there alternatives that are recommended? Thank you :). (0 Replies)
Hi,
Good Day,
I had this question in my mind.Hope someone can give me his/her thought about it.
Question: I had a binary files stored in the nfs system and mounted several workstation locally and running as deamon. Is there in effect to the networks or any problem me arise regarding network... (3 Replies)
I installed rhel 6.0 in my laptop but it is not upporting 3d graphics of rhel6 and i am getting an error message
"Accelerated 3d graphics not available
Desktop effects require hardware 3D support."
my laptop is dll studio 1558 and my graphic card is ATI Radeon 5470 with 1 gb dedicated ram. (6 Replies)
Hello,
I just installed RHEL6 OC on my T61p. It's great!
Just for fun I'd like to use some fancy cool Desktop effects. I tried to enable 3D Desktop effects from OC Welcome Center but it gave me error message:
Accelerated 3D graphics is not available. Desktop effects require hardware 3D support.... (7 Replies)
Hi,
I comment out some vol group in fstab accidentally.
I also comment the swap space in /etc/fstab
But I cannot edit /remove it back by using vi /etc/fstab again in init 1 and init 6 .
The file system /etc/fstab is read -only . I cannot chmod .....
What can I do in order to recover it ... (2 Replies)
I'm on a Solaris box that doesn't have -o as an option for grep (trying to return match only).
Is there any way to get this functionality without the -o option?
I've tried both sed and awk doing something like:
echo "this is a test" | awk '/test/'
or
echo "this is a test | sed '/test/p'... (8 Replies)