Archive for the ‘Linux/Unix’ Category

wide wide world of characters

Tuesday, September 11th, 2007

I was getting a lot of “Wide character in print” errors from a perl script. A little googling led me to this page and the solution. In short, I was printing unicode characters to an I/O layer that did not support unicode, hence the error. Adding a call to binmode solved this.

example:

open(FILEHANDLE, “>$filename”);
binmode(FILEHANDLE, “:utf8”);
printf(FILEHANDLE, “Hello World!n”);

Linux Utilities

Monday, October 2nd, 2006

These are some handy Linux system utilities:

  • blkid (part of e2fsprogs) will print label and other information from block devices.
  • dmidecode will print information from your system BIOS and more.
  • partprobe (part of parted)will reload the kernel partition table after edits with fdisk

Postfix virtual domain hosting

Tuesday, August 29th, 2006

Links

Install Debian on Sun Netra T1 105

Monday, August 21st, 2006

I recently acquired a Sun Netra T1 105 to play with. A few eBay purchases later and I had 512MB of RAM and a couple of 9GB Compaq SCA drives installed. Debian is pretty well supported for sparcs so that’s what I chose to install. The install was done over serial console as this box doesn’t have keyboard or framebuffer support.

After netbooting a kernel image following the instructions here the rest of the install was just a normal Debian install.

After the install and rebooting the machine I was greeted with a trap 3e error and an ok prompt. From googling it looks like this is a common problem with several possible causes. The fix that worked for me was to put a small script in nvram (I LOVE real server-class hardware).

ok setenv use-nvramrc?=true
ok nvedit
0: probe-all install-console banner
1: probe-scsi install-console banner
2: ” Working around Trap 3e” type cr
3: boot^c
ok nvstore
ok reset-all

Note: line 3 is “boot” followed by a Ctrl-c to get back to the ok prompt

For some reason on this machine I had to do a probe-all followed by a probe-scsi for it to pick up the SCSI drives reliably after poweron.

The combination of a LOM (Lights Out Management) module and OBP (Open Firmware Prom) make for easy server management.

This website is now hosted on this machine in my basement.