Articles tagged with "howto"

Catching a boot-time kernel oops call trace

Published on Tue 13 September 2011 under HTPC, howto

Another issue my HTPC exhibited recently was a tendency to crash early in the boot process. It became apparent it was suffering from an initialization issue in the iMon driver. I couldn't confirm it, though, since the call trace was too long to fit on the screen and it didn't turn up in any of the files under /var/log.

I studied various options for capturing the call trace, including netconsole and pstore but since I had access to an RS-232 cable with switched RX/TX pins (a.k.a. "null-modem cable"?) I ended up choosing the good old serial console. This involved connecting the HTPC to my notebook with the serial cable, starting cutecom on the notebook and doing the following on the HTPC:

sudo vi /etc/sysconfig/grub
# GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,19200n8 console=tty0"
sudo update-grub
sudo reboot

Of course, "19200n8" must match the parameters set in cutecom on the other side of the link. With this setup, it only took a few reboots to reproduce the crash, capture the call trace and confirm the iMon driver as the culprit. Fortunately, a patch for the problem already existed so it was only a matter of either waiting until it reached my aptosid kernel or patching the kernel on my own. In the meantime, I'm booting into the previous kernel.


Disabling ACPI in OpenBSD 4.8

As I've mentioned, OpenBSD 4.8 can't boot on a HP Mini 5101 netbook due to an apparent ACPI issue. The way to work around the issue is as follows:

  • When booting, enter boot -c at the boot> prompt. A UKC> prompt will appear shortly.
  • Enter disable acpi, then quit; the kernel should proceed to boot successfully to the login prompt.
  • After logging in, enter su (sudo won't work since you haven't edited /etc/sudoers yet).
  • Enter config -e -o bsd.noacpi /bsd; you will see the UKC> prompt again.
  • Enter disable acpi, then quit; you should be back in the shell, with a new file called bsd.noacpi in the current directory.
  • Enter mv /bsd /bsd.acpi && mv bsd.noacpi /bsd to replace the current kernel with the new one.
  • Enter chmod 0644 /bsd to set proper permissions for the new kernel.
  • Enter reboot to test things out; the computer should now boot into the login prompt without any assistance.

What's going on here? UKC is the User Kernel Config, OpenBSD's tool for tweaking a kernel without re-compiling it. As we've seen, it can be used to great effect even during the boot process. What's perhaps even more impressive, UKC can also tweak the currently running kernel without having to reboot. All relevant info can be found by entering man UKC and man config in the OpenBSD shell.


A short Blojsom FAQ

Published on Sat 06 November 2010 under meta, howto

(Please note that in May 2013 the blog ha migrated to Pelican.)

This blog is powered by the Blojsom blog engine, installed and managed by myself on my own server. Blojsom is a nice piece of work but its documentation pages seem to be down at the moment, so I had to poke around a bit while setting it up. I've compiled a quick FAQ based on that experience:

  • Is Blojsom suitable for me? If you're familiar with Java-based web technologies and you want to host a blog, Blojsom is probably your best choice. Just drop the .war file into Tomcat's webapps/, deploy, tweak an XML file, restart and you're done. If you have no idea what the previous sentence is about, Blojsom is definitely not suitable for you.
  • How do I configure Blojsom? Low-level settings can be set in WEB-INF/web.xml and WEB-INF/classes/*.xml. There are only two things you really need to set, both of them in WEB-INF/classes/blojsom-helper-beans-include.xml. The first is database location. Look for "jdbc:hsqldb:mem" and replace "mem" with the desired path (like "/home/joe/databases/blog" where "/home/joe/databases" is an existing writable directory and "blog" is an arbitrary database name). Blojsom will create database files during the next start-up. By default, Blojsom also destroys its database upon shutdown (the default settings are meant for initial testing). To prevent that from happening, look for "hbm2ddl.auto" and on the same line, change "create-drop" to just "create".
  • When I start Blojsom and go to its URL I see no blog, only something about a "meta refresh". What's up with that? A single Blojsom installation can run multiple blogs at once, hence it has no central home page. Instead, each blog gets its own page. The default blog is called "default" and its URL under Blojsom is /blog/default/, i.e. instead of http://server/blojsom/ you should go to http://server/blojsom/blog/default/. How to automatically bring visitors from /blojsom to /blojsom/blog/default is a topic beyond the scope of this FAQ.
  • How do I log into Blojsom? Blojsom's default theme has no Log in link. To get to a blog's login page, simply append "?flavor=admin" to the blog's URL. The pre-set admin account is "blojsom" (password "blojsom"). Once logged in, you can configure accounts under Weblog Settings > Users.
  • How do I change my blog's theme? Themes are simply collections of files in subdirectories under WEB-INF/themes. A few are pre-installed; you can choose among them under Plugins > Configure > Theme Switcher plugin. Keep in mind that while logged in, you see the blog's "admin" flavor but themes are applied to the "html" flavor by default.
  • I hate all of the bundled themes, how do I add my own? Oh come on, the "autumn" theme is pretty good ;-) Anyway, your best bet is to copy an existing theme into a new directory and tweak the files until you're satisfied. One caveat: Blojsom doesn't actually use the files under WEB-INF/themes when rendering a blog. Instead, whenever you choose a theme in the admin page, its files are copied into resources/ and that's where Blojsom looks when rendering. So each time you want to see the changes you've made under WEB-INF/themes/myCoolTheme you have to choose "myCoolTheme" in the admin page. You could, of course, edit files under resources/ directly but you would risk losing your changes at the next theme switch.

« Page 1 / 1 »
Proudly powered by Pelican, which takes great advantage of Python.