Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I use two usb drives attached to my RHEL58 box for data and database storage, which I mounted manually (using mount) to two directories /media/A and /media/B. After mounting they showed up on desktop and automounted upon reboot just fine. Bot occasionally upon reboot, while both drives show up on desktop as usual, are mounted to new directories created by system in /mount. This results in broken links and references for programs that used them.
The obvious solution was to modify /etc/fstab to stop this from happening, which I did referring for correct entries to a textbook. I did this remotely logged as root over VNC and then rebooted the system. Now I cannot connect to the server over VNC, ssh, or even ping it.
I am afraid that somehow I inadvertently messed up some important part of fstab and the box cannot complete booting. The original fstab is still there as /etc/fstab~, but how I can return to it if the machine cannot boot? I am going to the office to confirm that and try to fix the problem - please advise what can and needs to be done.
Do you remember what device the root fs is on? You could probably get away with passing root=device to the grub/lilo line at boot and get in that way if all else fails. Then you can get access to /etc assuming it's on the same device as root (I always do in practice), and fix fstab or copy fstab~ to fstab.
I use two usb drives attached to my RHEL58 box for data and database storage, which I mounted manually (using mount) to two directories /media/A and /media/B. After mounting they showed up on desktop and automounted upon reboot just fine. Bot occasionally upon reboot, while both drives show up on desktop as usual, are mounted to new directories created by system in /mount. This results in broken links and references for programs that used them.
The obvious solution was to modify /etc/fstab to stop this from happening, which I did referring for correct entries to a textbook. I did this remotely logged as root over VNC and then rebooted the system. Now I cannot connect to the server over VNC, ssh, or even ping it.
I am afraid that somehow I inadvertently messed up some important part of fstab and the box cannot complete booting. The original fstab is still there as /etc/fstab~, but how I can return to it if the machine cannot boot? I am going to the office to confirm that and try to fix the problem - please advise what can and needs to be done.
You unplug the USB drives, boot from CD/DVD into rescue mode, mount your system drive manually, and undo the fstab changes. That's the easiest way to do it, in my opinion. And what does Red Hat support say about this? Since you're using RHEL, you are paying for it, right?
Ouch! It was not that bad, but the system could not complete boot as one of USB drives (ext2) for some reason had a bad superblock, so boot was aborted and dropped in shell. When I get to the office and logged in as root it moved into the filesystem recovery mode. All vital systems checked clean by fsck, except this USB drive with ext2. I had to
Code:
mount -o remount,rw /
to restore read/write access and then I could replace the offending fstab with its backup copy. The box booted normally.
Then I fixed the offending disk (unmounted) with
Code:
fsck /dev/sdc1
and also replaced the ext2 with ext3 and replaced its UUID, just in case
Code:
tune2fs -j -U time /dev/sdc1
Then I updated the corresponding line in /etc/fstab and rebooted - all worked fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.