Wednesday, October 15, 2008

Broke it, then fixed it

I started off my AA1 fun today by playing with the /etc/fstab file. I got a suggestion to check and make sure I was not mounting any tmpfs partitions (specifically /tmp). Well I wasn't, but there was a commented out line in my /etc/fstab that would do exactly that.

Ha ha! Lets uncomment the line.

As a result of that genius, the system now booted up to an odd X-Windows 'esc screen featuring an X cursor and a grey background. And that was it. Good job Mike, you broke it.

In trying to come up with a way to solve this problem, I learned a few things about Grub. While booting, I can mash the TAB key to bring up my Grub interface. From here I can either edit my bootup options (adding or removing arguments from the kernel line, and such), or drop in to a pseudo shell. In the pseudo shell I can't do much, but I can read files on my drive.

cat (hd0,0)/etc/fstab

Yes, I can enjoy my stupidity from the bootloader. Excellent.


The next step was to put a small Linux on a USB key, then try to get in to my main drive from there. I went with Damn Small Linux on a 256 MB key I have. I followed the instructions here to create the key.

http://www.althack.com/2006/03/10/how-to-run-linux-on-a-usb-drive/

Now that I had a key, I got the chance to figure out how to break in to my Linpus install.

From the BIOS boot stage (Acer Logo), you can mash the F12 key to pick a device to boot from. So I picked my Dell USB key, and we were off.

Possibly of note, my key was in the port on the left side. Probably nothing, but hey, just to know. :)

Damn Small Linux is set up in such a way that sudo works without a password. So from a terminal I ran "sudo su" to work my magic.

It wasn't quick, but I eventually found out that the device name for the SSD was "/dev/hdc1", so I mounted said device.

mount /dev/hdc1 /mnt/hd

The "/mnt/hd" folder already exstisted. Then from there, I used the decent looking built in text editor to change the file.

beaver /mnt/hd/etc/fstab

Made my fix, and we were back in business.


Oh, except for one little problem. My touchpad was dead. !?!

What's even more impressive is how I fixed it. I pulled out the battery.

Wow.


Anyways, we're back in action, and we learned something. I'm starting to think this is why I bought the system. :)

No comments: