…Or the /etc/fstab mystery

Debian
…Or installing Debian with a USB flash-drive created from a CDROM ISO file may make things buggy
Preface:
The other day I wiped out ,on purpose, my laptop hard drive on my trusty Dell Inspiron 5100 so that I could improve my chops with another version of Linux. I decided to install the latest version of Debian. As a regular Ubuntu user I felt that I needed to get away from Ubuntu a bit and get back to some basics. I installed the Debian Linux from an ISO file converted to boot from a USB flash-drive. I do this all the time. What could go wrong? It seemed to work like a champ! Enter problem solving.

Dell Inpiron Laptop 5100
As I have been a Linux junkie since 1998 I have installed many times various flavors of GNU/Linux. I started with Redhat. Since that time I have solved thousands of problems hacking away and making things work.
The Phone Interview:
Last Tuesday I had a phone interview with a local web-hosting company. The HR interviewer made me think about my skills when at the end of the conversation she said: “You really need to work on your ability to work with the command-prompt (the shell).”
How can I show what I know from a phone conversation? The question she had asked previously in the interview was: “Do you use the GUI or the Shell most of the time?” I answered honestly. ”The GUI,” I said. That was where I realized the question was for work. My little brain entered defensive mode.
I knew that I used the command-prompt all of the time. But I don’t use it most of the time. My Linux distributions work. If they did not, then I would be using the shell most of the time. Again, I needed to show my work, not just talk about it. Fortunately I was able to get a sit down interview from that conversation. Move on.
I still needed to show my work. The only way to do that was blog about the problems and solutions I found.
The Face to Face Interview:
As I was preparing for my face interview I plugged in my external usb hard drive with all of my stuff so that I could get some diagrams or some other things to make me look smart and cool. I plugged it into my usb hub and…
Error mounting: mount exited with exit code 1: helper failed with: mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
Oops, that was not what I expected. Did my hard drive just die? Was the file system compromised? Is it spinning? Since 1983 I have learned one thing with regards to software warning messages: Ignore them until you do the same thing seven times wrong to fix it. But now was not the time for me to launch into fixing the problem. I let it go.
I made it to the interview. I chatted. I rambled. I answered questions. I made eye contact. I shook hands. I left. On the way back home I was thinking: “Why won’t my USB drives work.”
Problem Solving:
This morning I woke up at 4:00. My brain could not accept that it hat a problem like this. So I did some Google searches and found a whole lot of BAD advice.

"An hour of hard work can save you sixty seconds on Google" --Greg Wilson
I started taking that bad advice and experimenting. I could mount the drive manually through the shell. I had already plugged it into another computer to make sure the drive was not biting the dust. It was fine, but just in case I dumped it’s contents onto another drive. Be safe. Thy data is only as good as the hard drive that turneth and readith and writith.
After screwing around with some solutions search resulted posts (read: SWAG — Scientific Wild-Ass Guesses): “Install usbmount, change user permissions, stand on your desktop and howl, eat more fiber, get pmount… bla bla bla.” I realized that, after plugging – unplugging – replugging, I was totally going in the wrong direction. I was installing packages. Editing and poking around. I was as far from solving the problem as Australia was from Moscow.
Australia to Moscow
I had no idea what I was doing. I was just doing. I had to evaluate the steps I was taking and find out what was right, what was wrong, and what can I do about it. It was then that the great epiphany came to me. I realized: “This is all too complicated. Linux is easy. Linux is simple. Linux is clear.” KISS: Keep it Simple (you) Stupid (son of a lovely mother).
Solution Occureth:
Gee, I thought, maybe I should try another search. We are about hour 5 into my quest. After searching for prejudiced arguments I went back to the original error message. I knew what it was telling me. The OS was trying to mount the wrong file system. I had also observed how when I would plug in the USB drive the for a split second the CDROM icon would show up and then would change as quickly to a hard drive picture.
It befuddled me. This was the kind of thing that I dealt with when I was first using Redhat or Linux Mandrake back in the ’90s. Mandrake (Mandriva) solved the problem by automount. Automount did not require root permission to mount things. Great for desktop use, bad for server use.
I copied the text from the error message (wish I could have done that with Windows XP/Vista/7) and pasted into my Google search.
Here is the successful search string I used:
Error mounting: mount exited with exit code 1
I found more bad advice, but then the idea of the /etc/fstab kept presenting itself. Hmm… Then I found the following bug report 612119 from debian.org.
I read this bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612119.

Debian Flashdrive
This made since with what was happening. I had installed Debian from a flash drive. The OS treated it as a CDROM device. So I looked at my /etc/fstab file and sure enough, I had /dev/sdb1 as a CDROM. I also had /dev/sdc1 as a CDROM. I only had 1 CD/DVD optical device.
This meant that the first (SCSI – Its not SCSI, but that is how Linux eventually treated all drives instead of hda, but that is another discussion.) other than internal hard drive was treated as a CDROM (Optical Media – DVD -etc.). It was dedicated to this sole purpose.

Optical Media
I decided to insert a CD and see what happened. It was mounted, but it was a little screwy. I now knew it was /etc/fstab. I also knew that all external USB drives are typically designated /dev/sdb*. I also could not umount the CDROM. I did not have privileges as a regular user.
I went to /etc/fstab. I saw the offending line. I deleted the line on my fstab file and I shut down my system. Restarted my system. I plugged in my usb hard drive and it mounted. My regular user could read and write to it. My other usb flash drives also behaved respectfully. I put a CDROM into my optical drive and I could read the contents. I could also dismount it with no repercussion. Satori.
The email from the interview:
By the time It was 1500 EST -4. I was back in business and cleaning up OgFOMK ArTS Blogginest. I was tweeting wildly. I was blogging again. I was working on this post. I was enabling users to connect to OgFOMK ArTS Blogginesst and comment. I was busy.
I checked my email and I was informed that I was not the right candidate. I thanked them. I had already called my former employer who gave me the option to go to Washington, DC (4 hours away) or take unemployment.
I said that I could not afford to stay up there. I was not going to get any travelling expense money. They said: “Ok, we’ll miss you. We’ll let you know when we are in the area again.” I filled for unemployment at 1600.
At least now I can plug in my USB media and get the files that I think are important without having to worry. After all what’s the point of using an OS if you can’t get anything done?
Case closed. Next issue.
