It’s too long to type everything again, so I’ll just copypasta the email I sent to Dad. Also, while I do know the file is really “fs tab” for “file systems table”, I still read it the way I did the first time I saw it, which is f-stab. That was a long time ago, but I still think it’s funny. 😀

A very long time ago, I was in a computer lab that had a rather irreverent poster picturing a cartoon Jesus and the words, “Jesus saves, and you should, too!” I thought it was funny, but I also took the meaning to heart. That poster just saved me literally DAYS of work.

I had got a used server on eBay for less than it was worth; I paid 50 bucks including shipping, and it had to cost $35 for them to ship it because that thing is heavy! Anyway, it’s old, but it’s good enough for my purposes, so I was very happy with the deal. I installed Ubuntu Linux (an operating system, like you guys use Windows as your operating system), and then installed a server called Apache, a MySQL database manager, and then the software that runs my security cameras, and the software that runs my media server so I can stream my own files (video that I ripped from my own DVDs) to TVs, tablet, or phone. I also installed home control software called Hass.io to integrate Google Girl somewhat, and perform some automation. Linux, Apache, MySQL, Zoneminder, Hass.io…all of this is completely free; anyone can download it and use any of it at no charge, and change it in any way they wish if they know how. That said, sometimes, configuring everything to do exactly what you want can be complicated and/or time consuming. I also wanted to be able to control things in my house from remote locations. I’ll spare you the long, boring explanation, but it basically comes down to the fact that without some finagling, you can’t access your own home computer by using www.whateveryoucallit.com. Point being, I had spent weeks sorting this out, and it worked the way I wanted it to work.

When updates are available for software, I usually proceed with extreme caution because an update that doesn’t affect most people might affect one of my customizations, and I obviously don’t want to break something that took me a lot of time and effort to do. Last Sunday, we were installing a remote in the bedroom ceiling fan. I was waiting for Patrick to finish wiring in the remote, so I went out to my office and thought I’d just check the load on the server…mostly out of curiosity. I noticed that there were some updates available, so I quickly scanned the list. Just then, Patrick finished with the wires, so instead of carefully looking through the list, for reasons I don’t quite understand, I hit “update all” and walked away. Once the updates had completed, the server rebooted, and…I couldn’t access it remotely. Well, that’s strange. I turned on the monitor attached to it, and there, at the end of a bunch of error messages, I saw, “read-only file system.” Oh…that is baaaaad!

When a computer is doing something, or you are doing something on a computer, the majority of it is that files are being read. However, in order to read those files, other files are created and written, such as temporary files. For instance, in order for that server to connect to my security cameras, it needs to create temporary directories and files for the images. When a file system is read-only, no changes may be made to the file system, not even one tiny text file, and my server could not finish booting. That meant that everything was unavailable–an absolute disaster! I’ve used Linux long enough, though, to know that even a disaster can often be fixed without reinstalling the whole thing, so I left it alone until today, when I had time to try to figure out what went wrong.

On every Linux system, there is a file called “fstab”. Violent-sounding name for a little text file that basically tells the system, “Hey, these are your hard drives, and here is where you should mount them so you can find them, and here how to communicate with them.” It took me about an hour of looking through system messages to figure out that somehow, all of those updates running at once had made changes to my fstab file, and those changes made the system think there was a hardware problem. To protect the file system and minimize potential data loss, it had made it read-only.

Back when I was configuring the server, I had customized my fstab file. Remembering cartoon Jesus, though, I had also made a backup of it once I had everything working the way I wanted it. I called it “fstab.bak” so it would be easy to find. So…in order to recover from a disaster that would have taken me days to fix if I’d had to start over, I did this in literally five minutes, including the reboot.

1. Told the system to remount as read/write instead of read-only. This alone would not fix it because it would read the damaged fstab when I rebooted, and again would set read-only.
mount -n -o remount,rw /dev/sda1 /

2. Now Jesus comes in. After I had made the system read/write, I could fix it in literally one line.
cp /etc/fstab.bak /etc/fstab

That’s it. That line says, “Make a copy of the file called fstab.bak and use it to replace the current copy of the file called fstab.” I rebooted the server, and everything was just as it was before I stupidly applied a bunch of updates without looking first. Jesus saves, and I did, too! 🙂

Print Friendly, PDF & Email

Warning: include_once(/home/u108-fuqxxthnvx9m/www/bettatude.com/public_html/twatch/api/LogRequest.php): failed to open stream: No such file or directory in /home/customer/www/bettatude.com/public_html/blog/wp-content/themes/rose-newpbc-fluid-10/footer.php on line 9

Warning: include_once(): Failed opening '/home/u108-fuqxxthnvx9m/www/bettatude.com/public_html/twatch/api/LogRequest.php' for inclusion (include_path='.:/usr/local/php74/pear') in /home/customer/www/bettatude.com/public_html/blog/wp-content/themes/rose-newpbc-fluid-10/footer.php on line 9

Fatal error: Uncaught Error: Call to undefined function twatchLogRequest() in /home/customer/www/bettatude.com/public_html/blog/wp-content/themes/rose-newpbc-fluid-10/footer.php:10 Stack trace: #0 /home/customer/www/bettatude.com/public_html/blog/wp-includes/template.php(770): require_once() #1 /home/customer/www/bettatude.com/public_html/blog/wp-includes/template.php(716): load_template('/home/customer/...', true, Array) #2 /home/customer/www/bettatude.com/public_html/blog/wp-includes/general-template.php(92): locate_template(Array, true, true, Array) #3 /home/customer/www/bettatude.com/public_html/blog/wp-content/themes/rose-newpbc-fluid-10/single.php(67): get_footer() #4 /home/customer/www/bettatude.com/public_html/blog/wp-includes/template-loader.php(106): include('/home/customer/...') #5 /home/customer/www/bettatude.com/public_html/blog/wp-blog-header.php(19): require_once('/home/customer/...') #6 /home/customer/www/bettatude.com/public_html/blog/index.php(17): require('/home/customer/...') #7 {main} thrown in /home/customer/www/bettatude.com/public_html/blog/wp-content/themes/rose-newpbc-fluid-10/footer.php on line 10