tHog

DIARY 2008

(2007)

DECEMBER

NOVEMBER

OCTOBER

SEPTEMBER

AUGUST

JULY

MAY

APRIL

MARCH

FEBRUARY

JANUARY

2008

Wed, Oct 22

<23:36 EEST> Today's Linux tweaks are about the Huawei E169 dongle that I got with the cheapest 3G service from Saunalahti. Naturally I'd set up everything I could beforehand:

After enabling the E169 model from /etc/usb_modeswitch.conf, the switcher is launched upon plugging-in via udev. With HuaweiMode=1 you can still see the fake cdrom partition. Another drive is visible with no partitions; I assume it's the micro-SD card reader.

The connection works without glitches, so far for 1:45 hours with no cutoff. There's a very slight drawback in that the dongle turns into a slow mode (non-HSDPA) after a few seconds of inactivity. It's apparent when typing via ssh, and there's a noticeable latency when you start typing after a break. Mostly the latency is not a problem, though it's clearly there. The ping time to Finnish servers is around 100 ms, which makes typing not quite optimal, while the 30 ms with my DSL is indistinguishable from local use. The latency issue is naturally apparent from the other side too, as Saunalahti gives a proper IP address, allowing ssh logins to my server.

Thu, Oct 16

<21:16 EEST> Every now and then I've found myself with a full root partition, usually when emerging something huge like OpenOffice (that recently hit 3.0). Pruning logs and caches usually helps, but I also happened to have a 1-GB swap partition next to /, so I decided to merge the two. (I have another swap partition of 3 GB.) As resize_reiserfs can only add to the end of the filesystem, and the extra space was preceding the /, I did a complete remake of the partitions and the filesystem. This also enabled a change to JFS, which I've found even better.

As I already keep regular rsynced backups of root, there was little problem in this initial stage. Using fdisk to delete partitions in the middle of the disk, and creating new ones in their stead, turned out a source of slight surprises, though. Partitions are always numbered sequentially, in the order of their creation. The numbering is updated at every step you take with fdisk, so it required some care to delete two consecutive partitions. My /etc/fstab didn't need much updating, since I already use UUIDs, but the partition numbers are still used at some places, such as the GRUB kernel /command line, and the hibernation partition. GRUB was otherwise unaffected, as the /boot partition was kept intact.

At the first new boot came another surprise. After the kernel itself had booted up, there was a "Warning: unable to open an initial console." instead of the usual init output. The login prompt came up normally though, and everything worked as usual after that. (Except for some missing /var/log directories I had excluded from the backups, and some weird ownership changes, probably due to different username/uid mappings between my two machines.)

I figured the problem was with the empty /dev directory that only came alive when starting udev. My backup only included the / filesystem, thus leaving out the udev-managed /dev mounted as a ramdisk. As found in a UDEV Primer, you only need the console and null devices at this stage.

The remaining problem was, is it possible to put files into a directory, while another filesystem is mounted (and in use) on top of it? There are probably some elegant hacks, but as I was already booting around with a Gentoo minimal install CD, I simply rebooted with that. These are the required devices in detail:

# mknod /dev/console c 5 1
# chmod 600 /dev/console
# mknod /dev/null c 1 3
# chmod 666 /dev/null

If you've read this far, it's probably safe to disclose the recent event that I've found myself a flat in Kuopio. More on that will probaby follow in the next weeks and months.


Risto A. Paju