Showing posts with label problem. Show all posts
Showing posts with label problem. Show all posts

11 May 2008

Kernel Panic: CPU Too Old

Ever see that message? I got it in February when I put Ubuntu 7.10 Server Edition on my roommate's laptop. Jdong pointed me at a bug explaining the problem. I don't believe I ever mentioned it here, but I was just on the phone with a friend, and he said he had this weird problem where it said the CPU was wrong instead of booting. "CPU too old, you mean?" "Yeah, that's it" "Server Edition?" "Yep"

The reason it's doing this is that the -server kernel expects PAE, which lets PCI devices be mapped above the 4GiB line so if you have 4GiB, you can actually use all 4 instead of having your PCI devices be mem-mapped right over where your memory should go and right out of the range of what 32bit can handle.

To fix it, get out a live cd and chroot into the hard drive. sudo chroot /dev/sda1, assuming first drive, first partition (change sda1 to whatever corresponds to your partition if this is not the case). Once in there, run sudo apt-get install linux-image-386, or, if you have a dual-core processor (so you can get SMP), sudo apt-get install linux-image-generic. Then, remove the -server kernel by entering sudo apt-get remove linux-image-$(uname -r) in your terminal. After a reboot, it should, well, be able to boot.

05 March 2008

Doing Splits on a Log

So I turned on my computer today and saw something along the lines of "starting mysql.....failed (not enough space on partition /dev/sda2)". That means / was really close to full. I nearly DoS'd myself. Awesome. The first place to look when / is suddenly full is /var. It's called "var" because of its variable size. Specifically, look in /var/log/. You can use the Disk Usage Analyzer (aka Baobab) in GNOME to figure out where the problem is, assuming you can reach GNOME. If your disk is so full you can't get into a GUI or if you use KDE (which I know nothing about), du -csh * will tell you the total size of each file/directory in the current directory including everything contained inside them. It's an extremely useful command. When I looked there, I found about 3GB of logs in /var/log/mythtv/. I starting playing with MythTV a few days ago because I'm setting it up for a school project.

While logrotate was kind enough to split the logs into 300-400MB chunks, that's still huge. At least, it's still too huge for vim to open the log in any reasonable amount of time. Enter the "split" command. A quick look at the manpage and I decided to be lazy about it and just ran split mythtvbackend.log. As per the defaults, I ended up with 1000-line files named xaa, xab, xac,...xzy, xzz, and then it complained it had run out of 2-letter combinations. Whatever, I didn't care. I only needed to be able to see inside one of them. Check the manpage if you want to change how many characters it makes available at the end for naming thousands of files it creates.

A quick peak inside the first of those showed that MythTV was looking for its default password instead of the one I set for it. Well, that's easy enough to fix in the Mythbuntu Control Center. I guess I shouldn't have ignored it when MythTV kept telling me it couldn't reach the database...oh well, live and learn.

My system administration teacher says "didn't I mention making a separate /var partition?" Yes, yes, but I didn't expect to be running any log-producing services on a laptop like I would be on a server.

28 February 2008

Content Scrapers, Scum of the Interwebs

Don't you just love it when you do the work and someone else takes all the credit? Yeah, me too. Imagine my surprise when I saw that all my blog posts were posted elsewhere. The entire text was taken. There wasn't a credit or linkback attached. They were just plain...usurped! Yes, steals articles. Don't bother looking for my stuff now; I've already complained and had my content removed. You might want to check and make sure your blog isn't being ripped off too, though. What's even more fun is that they then CC-by-SA-NC-license the articles. There's a page listing their licensing. Yes, they republish and relicense other people's articles without permission. Isn't that just lovely?

There are quite a few blogs which are being ripped off in this way. I've attempted to contact a bunch of them. We'll see how that goes.

For the sake of clarification, I want to point out that I don't care if you take a paragraph or two and then do a "link to full article here...." thing. If you want to translate a whole post into a foreign language, that's fine (I saw a site today that did that) as long as there's a linkback with it. But please, always remember to cite your sources. If you don't, it's plagiarism.

EDIT: the person responsible for the plagiarism has been fired from the site.

02 February 2008

EeePC + VPN = :( Try EeeXubuntu

Two kids at school approached me recently asking if I had any idea how to get their EeePCs onto the school's VPN. Although it connects, traffic seems not to route through the VPN or something, because you still end up at the VPN gateway page. As it turns out, using eeeXubuntu instead of the default Xandros makes it work fine. So, if you're having trouble with it, try that.

04 August 2007

Initial Analysis of Automatix; several problems found

So usually when Automatix is asked about I just say "it's bad" because I know it's been known to break things royally. !automatix on an Ubuntu channel gets Ubotu telling ya about how it's not recommended and often breaks things and everything. Well, an Ubuntu dev finally went and analyzed the thing and WOW it really IS bad. As you read it just gets worse and worse. After you see this, you'll get why I stick to writing a little bash script containing not much more than #!/bin/sh
sudo aptitude install -y
with about 100 packages after it (every program, codec, and plugin that I like).

Ignore the Digg to the left, and click the one below. That goes to the original Digg for this story. The one on the left is just part of my template.

read more | digg story

30 July 2007

Tip: Lock Versions

So, after getting Nvidia's unsupported binary drivers, killing X, and compiling them, then blacklisting the bcm43xx driver for your Dell Broadcom 1390 wireless card, compiling a new version of Ndiswrapper, unzipping the Dell driver, and loading it into there (how I got my friend's new laptop going), you finally have your system working. Then what happens? A kernel update. Did you need that kernel update? Chances are, the answer is no. If you got all the hardware working, you probably don't need whatever added functionality the new kernel provides (2.6.20-16, for example, got Texas Instruments card readers working without compiling the drivers, such as with my script), so why install it then redo all your tweaks? You could sit there and remember to uncheck the kernel every time an update pops up, but what if you forget? Then either uninstall or remember to hit Esc on GRUB and pick the right one. Forget that. Just prevent the kernel update from coming through altogether.

Locking the version on a package prevents it from being upgraded. I'll show you two ways to do this. The first is to open a terminal and type: sudo aptitude hold linux-image-`uname -r` Those ` are backticks, usually located to the left of the 1/! key. For those who prefer to use GUIs, open Synaptic and scroll down to where the packages named linux-image- and then some numbers are. Find the one you are using (probably the highest number), and click Package > Lock Version.

Both of these will prevent the kernel from upgrading at all. So, when Gutsy's released, what do you do? OK, now you need to release those holds. Synaptic, that's no problem. Just uncheck it, do the upgrade, then make sure you lock version on the new one. For the command line one do sudo aptitude unhold linux-image-`uname -r`. Redo all your tweaks of course, and you're good to go.

05 July 2007

Can You Reproduce My Bugs?

I have 2 bugs which I have not reported because I need to gather more information and find someone who can reproduce them before I do. Since I can't tell you how to reproduce them, that's hard. So, I'm asking that if anyone has these bugs, can they please comment here or send me an email at macoafi AT gmail DOT com or /msg macogw @ Freenode IRC.

  1. This is on my mom's desktop. It has Intel graphics, so no claiming "buggy ATI/Nvidia drivers!" in response to this, okay? Ever since the upgrade to Feisty (at least, I was not informed by my family that the problem existed in Edgy), if I click "switch user" it seems like it does what it's supposed to. It leaves the f7 virtual console and goes the f9 one. X doesn't actually start up though. The noise that means "enter your password" plays, but the screen is black. The monitor's status light turns orange, like the computer has told it to shut off or it's not getting any info from the computer. Ctrl+alt+f7 takes it back to the first login session and that works just fine. Ctrl+alt+f1's tty also works fine.
  2. Also on mom's desktop, for the last few days I've had this new problem. First user logs out. Hours later, someone goes to log in. The screen is black, the status light is orange. Moving the mouse does nothing. I pressed the ctrl+alt+f7 thinking someone hit "switch user" as and that the above bug is in action. That screen is a tty with no real text. There's just a big mess of those characters that no one ever really has a reason to type, the ones that look like rectangles full of dots (like extended ASCII codes 177 and 178) and a few underscores. The entire screen is like that, so I hit ctrl+alt+f1 thinking maybe I can login and sudo /etc/init.d/gdm restart to restart GDM and clear that screen, and everything will be back to normal. No such luck. That screen is also a big mess. Attempts at typing just move an underscore that I can only assume is the cursor but all that shows up is more of those messy characters. Only thing left to do is hold in the power button until it turns off. Looking through the system log after turning it back on, nothing looks unusual, so I have no idea what's wrong.

So, have any of you had any of these problems, or are both of my computers insane?

23 April 2007

HOWTO: Texas Instruments SD/MMC card reader

This is only for Feisty. It is not for Gutsy. It is not even for a fully up-to-date Gutsy. It was needed for about 2 weeks after Feisty's release, and then Ubuntu sent out a kernel update that changed exactly what this changes.

Do you have a Texas Instruments SD card reader on your laptop? Having trouble getting it working? Here's how (should be distro-agnostic):

  • Dapper: sorry, no support. Upgrade to Edgy or Feisty, or try using the Feisty method (let me know if it works).If the Feisty way doesn't work, maybe I'll download the 2.6.15 sources and see if I can find out what's missing to make it work on Dapper, but I don't have a Dapper box to test with.
  • Edgy: The modules for the card reader aren't loading. gksudo gedit /etc/modules Add to that file:
    Save it, and on next reboot it will work fine. To get it working right now:
    sudo modprobe tifm_7xx1
    sudo modprobe tifm_core
    sudo modprobe tifm_sd
  • Feisty: The 2.6.20 kernel is lacking proper TI modules (version 0.7). I was going to say:
    Compile the good tifm modules (version 0.8)yourself. Packages are not yet available (and I'm sorry, but I do not know how to package them myself).
    but I figured I could make it easier. There's still compiling involved, but it'll be painless.

    John Dong said I should mention that I don't know yet how this will effect (if it does at all) kernel updates. I don't believe full kernel updates will be affected at all since the files are only in the current kernel, however if tifm is updated through the update manager (without a kernel update), I don't know what will happen. If you see a tifm update on the update manager, you should probably run the uninstall script before updating.

    If you haven't compiled anything before: sudo aptitude install build-essential linux-headers-`uname -r` You will need to download my TIFM installer. Save that installer file somewhere (Desktop works) and extract it or use the "Archive Manager" to extract it immediately. There's a readme, but I'll tell you what to do anyway (note, I'm sure the terminal way works, I didn't test the GUI way, so if it doesn't ask for your password or it doesn't do anything after asking for your password, try the terminal way).

    • GUI way: Right click on Go to properties > permissions and check off "execute". Double click on Choose "run in terminal."
    • Terminal way: If you saved and extracted to your Desktop (if not, cd to wherever you saved it),
      cd ~/Desktop<
      sudo chmod +x
    It should now run, copy files, compile, etc. At the end of that, you should have a working card reader. Please let me know if this doesn't work for you so I can modify it. Ubuntu did not include some of the necessary files by default in the kernel (part of what the script does is fix that), and I doubt that kernel updates will include those files either. As such, you will probably need to run this script after each kernel update.

If you have an XD, MS, or SM card, it won't work because those drivers have yet to be written. Sorry.

05 April 2007

Yesterday's Update: Slow Boot?

If after yesterday's Feisty updates, your boot time is magically somewhere along the lines of a minute or two, it's because /etc/network/interfaces was overwritten, and it was overwritten with a lot of extra interfaces that you probably don't have and that it can't find on boot. To fix it: sudo gedit /etc/network/interfaces and change it to:

auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

#auto eth1
#iface eth1 inet dhcp

#auto eth2
#iface eth2 inet dhcp

#auto ath0
#iface ath0 inet dhcp

#auto wlan0
#iface wlan0 inet dhcp

Alternatively, backspace out everything that's not lo. This won't break network-manager (this is actually how my /etc/network/interfaces always *had* to look for network-manager to work). It should fix your boot time though.

There is a bug filed for it. Someone did the update piece by piece to see what did it. He said ifupdown did it, but I rolled that back and the old version still has the problem. I think part of the installation of the new ifupdown was to rewrite that config file, and when that's the case, rolling back the package doesn't make any difference.

07 February 2007

Java Programming & Beryl Problems

There is a bug in Sun Java's Swing. It doesn't like certain window managers. Something about reparenting and not reparenting or something like that. Whatever. The point is, when trying to run a program you wrote using Swing, all you get is a big white nothing. Nothing draws in the window. Ahhh! What's wrong?! Yeah, I had some trouble with my Java class because of that one. Well, unfortunately, my favourite WM, Beryl, is a problem child with this. However, there is an easy fix for it. Open your .bashrc (that in ~). If you don't know how, do this in the terminal:gksudu gedit ~/.bashrc Add this line to it:

export AWT_TOOLKIT=MToolkit

Now try to run your program again. Now everything works. Yay!