Smokes your problems, coughs fresh air.

Category: Technology (Page 26 of 47)

Nokia N79

Two weeks ago, I acquired a shiny “new” second-hand Nokia N79, because my good old Nokia 1600 (which has served me well for over three years) died as a result of drowning in my leaky tent during a high-school hiking trip in the Czech republic.

Nokia N79

So far, I’m really fond of the phone. 🙂 It fills in the gadget gap that was left by my desire for a decent portable music player. After choosing an appropriate S60 app, it might even satisfy my decadent desire for a Bluetooth remote to control my laptop (when viewing a movie, for example).

FM transmitter

One of the things that I’m really happy with is the built-in FM transmitter. I’ve been wanting one of those so that I don’t have to much about with cables when I want to play media through some stereo system. Especially when I was thinking of buying a portable music player, I also wanted to be able to route it through any car radio. Now I can. I can even pick any frequency I want! I am surprised.

IMAP

Another neat feature which I find myself using a lot is the IMAP support. Now, I don’t have to boot my laptop just to find out if I have new mail and to write simple replies or delete some of the crap that I get sent daily. Setting up Gmail access was easy thanks to Gmail’s IMAP support. Yesterday, after teaching kung fu with a friend, on my way to relax at the lake, I found myself stopping my bicycle at a few unsecured WiFi networks to quickly compose a mail and check for responses so that I’d be able to better relax.

Maps

The Nokia-supplied Maps application is fun, but I don’t think I’ll a be a big user of it, since I’d sincerely like to learn to navigate without the aid of high-tech devices. Nevertheless, I’ve downloaded all map data for The Netherlands so that I don’t have to initiate an expensive Internet connection when I’m lost. Symbian Underground has a list of direct links to all the downloadable map files on Nokia’s own servers.

Syncing stuff

This brings me to the subject of syncing data to and from the phone. Of course, the phone has USB Mass Storage support, which makes it easy to add and remove music. Just an hour ago, I also added NL maps this way. However, this mode only gives you access to the installed memory card (which the phone supports up untill 8GB). To access other stuff, you need to do some Bluetooth magic, which I haven’t tried yet.

Normally, when using Windows, you’d download Nokia PC Suite to be able to backup and sync pretty much everything on the phone. I don’t have Windows, so for some tasks I either have to wait until PC Suite’s successor, Nokia OVI Suite, becomes available for Linux or I have to find or create some alternatives for some of PC Suite’s functionality.

Mail for Exchange

Google supports Microsoft’s Exchange protocol to sync Gmail contacts, Google calendar data and mail with mobile devices. For phones which don’t already support this protocol, such as my N79, Nokia supplies the Mail for Exchange application. I got this application set up successfully and synced my calendar successfully, but I can’t start the application a second time. I simply can’t open it. Maybe I should report a bug, but probably it’ll be easier to find another sync solution or to just give up Google Calender and settle for a backup only solution. For my contacts, I’ll also be satisfied when I find a backup-only solution. And my email needs are already well served by the device’s built in IMAP support.

Other stuff

I’ve never really wanted a camera, but still I’m glad that I have one now so I can look at movies of my baby nephew being bathed or make a quick photograph when I need it. Heck, it’s a fun toy!

Besides Mail for Exchange, the only app I’ve installed so far is Skype, which is fun to use on my phone although I find the quality horrible compared to my laptop (and I wasn’t a fan of Skype’s quality to begin with).

Did I mention that browsing for porn pics using Google’s mobile image search is strangely satisfying?:oops:

Customizing displayed headers in Mozilla Thunderbird

For some reason, the new Thunderbird 3 thought it was useful to show me the content_encoding header per default, below the addressee and stuff. This header had such a long name that it disrupted the layout. Luckily, you can change what headers it displays by editing “mailnews.headers.extraExpandedHeaders” in the configuration editor.

I just removed the content_encoding header and it worked.

Aligning partitions with RAID and LVM on drives with 4 kB sectors

Hard disks are being released that abandon the long-established standard of 512 byte sectors. I just got two Western Digital WD15EARS ones, which uses 4 kB sectors. Western Digital Refers to this as “Advanced Format”. This poses some serious problems. I will describe those, and what I did to ‘solve’ it.

This article is as much for myself as for other people correcting me. So, if you see faults, let me know 🙂

First, you may want to read this IBM article and this LWN article. Reading these articles is important to understand this issue. Too summarize a bit, hard disks can’t really have 4 kB sectors, because then BIOS, bootloaders, operating systems, partition software and who knows what will just go beserk. So, they still report a sector size of 512 bytes. This emulation presents certain performance issues (explained in the links), which can only be avoided by aligning the filesystems on disk, which the IBM article explains well. In short, I configured fdisk to 224 heads and 56 sectors. This aligns the partitions properly. Do remember, however, to start at cylinder 2 for your first partition, otherwise there isn’t enough space for the bootloader.

Now, what happens if you don’t put a file system on your partition, but make a software RAID1+LVM out of it? It gets a lot more complicated to align the filesystem blocks this way, because of all the layers. I did the following:

First I created the aligned partition with fdisk on two disks. Then I made a RAID1 array out of it. Luckily, Linux MD has the ability to store the RAID superblock at the end of the partition. It can also store it at the beginning, but you shouldn’t do that! The RAID superblock is 256 bytes + 2 bytes per drive long, which means one logical sectors, which in turn means that the start of the MD partition is in the middle of a 4 kB sector on disk. You can use metadata format 1.0 or 0.9 to put the superblock at the end of the disk (see mdadm man page).

Then it’s time to create the logical volume. When preparing the RAID1 partition for use in the volume group, give pvcreate the –dataalignment 4096 option. Then, with “pvs -o +pe_start”, you should be able to see where the first PE (physical extent) starts. I accidentally created mine with alignment 8, but the first extent is at 136.00 kB (139264 bytes), which is divisable by 4096.

Then, I created the volume group with an extent size of 4MB. 4 MB is also divisible by 4096. Logical volumes are created as multiples of the extent size, so you can now create them at will, and they will be aligned.

When creating a RAID array that deals with striping, be sure to make the stripe size a multiple of 4 kB. I guess this also applies to logical volumes with striping.

What I still would like to know, is whether the file system journal is also made up of 4 kb blocks. Also, the RAID array’s write intent bitmap (if you have one) is also still unclear to me. Where is that stored? Does it write in multiples of 4k?

Installing Arch Linux on RAID+LVM

I just installed Arch Linux on a RAID1+LVM, which involved some work. There already is a nice article about it, but I wanted to summarize for myself.

Arch has no GUI or menu for you to do this. So, when the installer has started, just go to another VT and create the RAID+LVM.

In my first attempt, I created one RAID partition with LVM, from which I intended to boot using Grub2, since it understands LVM and RAID. However, the grub installer kept saying there was no mapping for /dev/mapper/lvmroot or something, so I decided to make two partitions: one boot and one rest, which was meant as physical volume for the LVM. The advantage of linux software raid (when you store the superblock at the end of the partition, at least), is that grub can access it like a normal disk; it doesn’t need to know RAID).

After the array was made using something like:

mdadm --create /dev/md0 -l 1 -n 2 -x 0 -e 1.0 /dev/sda1 /dev/sdb1
mdadm --create /dev/md1 -l 1 -n 2 -x 0 -e 1.0 /dev/sda2 /dev/sdb2

It was time to create the LVM. So, I ran (don’t know the exact syntax, so this is an abstraction):

pvcreate /dev/md1
 
# In my research for my initial lvm problem, I found people who had 
# problems with dashes in the volume group name, so I don't 
# use those anymore...
vgcreate lvmonraid /dev/md1
 
lvcreate -n root -l [wanted size/extentsize] lvmonraid
lvcreate -n home -l [wanted size/extentsize] lvmonraid
lvcreate -n swap -l [wanted size/extentsize] lvmonraid

Extent size is normally 4 MB, so a 40MB partition would have “-l 10”. You can also supply sizes in bytes, but that is not only inprecise because it gets rounded to the extent size, but I also noticed bugs in what metric and binary units were supposed to be; it seemed like the command line options don’t differentiate between G and g, for instance, and they’re all GiBi, whereas the –units option does.

When this is done, you can configure the block devices in arch to assign the purpose.

When the installation is almost done, it asks to modify some configuration files. This is important, otherwise the initramfs won’t load the LVM. You need to:

  • Make an mdadm.conf in /etc (of the live CD) with “mdadm –examine –scan > /etc/mdadm.conf”.
  • Add the raid1 and dm_mod module to the MODULES list in /etc/mkinitcpio.conf.
  • Add the mdadm and lvm2 hook to the HOOKS list in /etc/mkinitcpio.conf, before ‘filesystems’
  • Edit your /etc/rc.conf, and set the USELVM parameter to “yes”

Then it will create the ramdisk. The next thing is installing Grub. The config file it makes is fine, except you need to add (hd0,0) after the empty “root” directive, twice. Installing grub fails because of the RAID, so you have to do that by hand:

# grub
grub> root (hd0,0)
grub> setup(hd0)
grub> root (hd1,0)
grub> setup (hd1)

That should be it, basically. I actually did a lot more because of my new Western Digital WD15EARS disk with 4 kB sectors, but I’ll write about that soon.

Disabling Intellipark on the WD15EARS

I just got two Western Digital 1.5TB WD15EARS disks. This drive has a feature called intellipark, which parks the head after the disk is not used for a while. This is supposedly a power saving feature. But, as someone explains, it can also severely decrease the lifetime of your drive.

To disable, download wdidle and disable it. This needs to be done from a dos environment. Dos bootdisks should be available for download.

USAGE:
WDIDLE3 [/S[<Timer>]] [/D] [/R] [/?]
where:
/S[<Timer>] Set timer, units in seconds. Default=8.0 (8.0 seconds).
Resolution is 0.1 seconds from 0.1 to 12.7 seconds.
Resolution is 30 seconds from 30 seconds to 300000 seconds.
Note, times between 12.8 and 30 seconds will be set to 30 seconds.
/D          Disable timer.
/R          Report current timer.
/?          This help info.

Disabling it actually causes it to go even more beserk. In a few hours, SMART logged 5000 load_cycles, and the drive was making very funny noises all the time. Instead, I set it to 300 seconds, which effectively disables it.

Someone also made a boot CD with the tool available (wgetting it works, clicking doesn’t). I don’t think the link will be there forever though. (can I attach zips to a blog post?)

The forum post I linked to also has info about TLER, which I’ll get back to.

Aihato WordPress development notes

I’m collaborating with YTEC on a new website for Aihato. I’ve picked WordPress to do most of the heavy lifting for this project. So far, I’ve spent most of my time on this project to get a good development environment in working order, with WordPress living in its own directory and some deployment recipes managed from a Makefile.

Now that I’m well-settled in the YTEC office with everything set-up and running, I hope to make some actual progress on this project next time that I’m here. 😉

Awesome window manager

I’m officially a convert. I finally went from a floating-only window manager to a tiling window manager. And it does floating too! Awesome seems to be everything that Window Maker just couldn’t be for me.

For a very long time I’ve known that a tiling WM would probably be nicer for me, but there were quite a few to choose from. After looking at the likes of Ion, I ended up looking at Ratpoison when I noticed that the successor to Ratpoison, StumpWM, was based on LISP. Since I never could get the hang of Emacs, this looked like another excellent opportunity to learn LISP.

Sadly, StumpWM is quite a piece of crap with only a very limited feature set and some initial stumbling blocks I just couldn’t get over. My first enthusiasm was tempered by some random errors and my inability to configure it in such a way that I could use my Windows key (Mod4) instead of the GNU Screen like Ctrl-f prefix. It turned out that I couldjust the Mod4 modifier. StumpWM seemed to insist on me using a kind of prefix made of any number of modifiers combined with a regular key.

Luckily, I came across Awesome, which, until now, really seems awesome.

The default configuration comes with a lot of niceness right away.

One thing I particularly like are its default key bindings, mostly because they all use some combination of the Windows/Mod4 key. Some defaults are even exactly the same as I had configured them in Window Maker, such as Mod4-r to type the name of a program to execute and Mod-1 through Mod-9 to switch between Workspaces called tags in Awesome. For as far as the key bindings are different, I actually like them more than what I’ve used before. Most of the key bindings, however, are of course new because they simply weren’t available in Window Maker (or other tiling window managers), often much to my chagrin.

I thought that when switching to a tiling window manager, I’d probably have to get something like Gkrellm for my system monitors and system tray and such, but Awesome actually sports many of these. The Gentoo default configuration even has the system tray already enabled in the statusbar. This is particularly nice because of the crappyness of the available systray DockApps for Window Maker that I had gotten used to.

I’m not yet done playing with Awesome. I like that I probably will never stop tuning it to my preferences and the Lua configuration format means I don’t have to. It’s a modern window manager which supports the latest FreeDesktop standards and it is infinitely lean, mean and flexible. What’s not to like? I’ll comment when I find out. 😉

Upgrading Samba from Lenny-backports

For some reason, after upgrading to the Samba version from Lenny-backports I needed to support Windows 7 profiles, the workstations suffered from severe problems. The entire profile seemed to be read-only, even though they weren’t on disk. I couldn’t change any setting and reverting profile configuration from backups didn’t help. In the end, the only thing that fixed it was recreating the user profile, both server and client side. This was an upgrade from 3.2.5 to 3.4.7.

Another issue I had is that the user database got a new backend and all the users were gone. You can import your existing smbpasswd file with pdbedit.

So, when doing this again, be sure to make workstation and server backups.

« Older posts Newer posts »

© 2024 BigSmoke

Theme by Anders NorenUp ↑