Wednesday, May 29, 2013

5.3 amd64 X200: Upgrading OpenBSD using USB Flashdrive.

Hey,

This is related to Creating USB Flashdrive installer. I posted previously. I have another OpenBSD machine in my office, not that the company requires it but as it's my machine, I installed whatever I want. The machine is still on 5.2, so this is a good chance to test my shiny USB Flashdrive installer.

If your machine is just like mine, which support USB Booting, I just boot from USB Flashdrive. Bolded is my input.

Welcome to the OpenBSD/amd64 5.3 installation program.
(I)nstall, (U)pgrade or (S)hell?
u

Available disks are: sd0 sd1.
Which disk is the root disk? ('?' for details) [sd0]
?
sd0: ST9160823AS (149.1G)
sd1: DataTraveler 2.0 (1.9G)


As you can see it asked for the root disk. Which is the disk I want to upgrade. I choose ? to check which device is for my primary disk and which is for the USB Flashdrive. As you can see, sd1 is my Kingston DataTraveler USB Flashdrive. So then I just press ENTER for the default choice [sd0] for the root disk.

Let's upgrade the sets!
Location of sets? (cd disk ftp http or 'done') [cd]
disk

Remember the sets are in the USB Flashdrive so I need to set the location correctly. So I choose disk.

Is the disk partition already mounted? [no] ENTER
Available disks are: sd0 sd1.
Which one contains the upgrade media? (or 'done') [sd1]
ENTER
  a:        1228768             64        4.2BSD    2048    16384    1
  i:        2658867        1228863        MSDOS
Available sd1 partitions are: a i.
Which one has the upgrade sets? (or 'done') [a]
Enter
Pathname to the sets? (or 'done') [5.3/amd64] 5.3

The sd1 is not mounted, so I need to answer accordingly. I then choose sd1 and then the a partition (remember sd1a is for OpenBSD, sd1i is for MSDOS). My 5.3 sets is in sd1a/5.3/ so I just input the directory name 5.3.

Select sets by entering a set name, a file name pattern or 'all'. De-select sets by prepending a '-' to the set name, file name pattern or 'all'. Selected sets are labelled '[X]'.

Now I can see the list of sets I have in the 5.3 directory. Continue to upgrade as usual. After it's upgraded, I rebooted the machine to change the timezone, then mount the USB Flashdrive again to do sysmerge. The usual stuff.

Installation via USB Flashdrive is FAST! Later.

Wednesday, May 22, 2013

5.3 AMD64 X200: Upgrading, the OpenBSD way.

Hi,

Remember 5.1 AMD64: Following -current & Radeon 6.14.3 installation?. Well, I have an apology to make.

The correct way to upgrade is:

1) Copy bsd* and *tgz files for upgrade.
2) Copy the bsd.rd to / .
3) Reboot, then boot> boot bsd.rd . Proceed with upgrade.
4) sysmerge.
5) Upgrade packages.

As you can see, sysmerge should be after upgrading, not before as I've posted previously. Sorry bout that. Yes I used my method from 5.0 until 5.3 without any issue but it's not the official way. It might break the upgrade process.

So, from now on, I will follow the official way.

Friday, May 17, 2013

5.3 AMD64 X200: Creating USB Flashdrive installer.

Heyya,

I've been thinking about some sort of installation method without using CDs. As OpenBSD release new version every 6 month, burning CDs for new ISO is just wasting CD. Currently I still hang on with my 5.0 installation CD and have all the installation files of 5.1 to 5.3 in an external drive. So, if my X200 went crazy, I need to install 5.0 then upgrade all the way to 5.3.

I thought of creating another partition in my X200, just to hold installation files. It will be something like an OS Recovery partition. It's a nice idea to play with, but then Recovery Partition is useless if my hard disk have hardware issue.

So I thought of using a thumbdrive as OpenBSD installation media. Good thing is, I can just update the OpenBSD version on the thumbdrive when new version is released.

I have a Kingston DataTraveler 2.0 USB thumbdrive, 2Gb capacity. 2Gb for OpenBSD installation media is too much, so I think of creating 2 partition on it, 600Mb for OpenBSD installer + all the installation files and the rest for normal thumbdrive usage (FAT32 filesystem).

After searching for relevant informations, this is how I did it. First, I need to clear the thumbdrive. The thumbdrive I want to use is identified as sd1 so yours might be different. Do take note as you don't want to wipe the wrong drive. So I booted my X200 into 5.3, then get to the console. I plugged in my thumbdrive and proceed with this command (bold is my input):

$ sudo fdisk -iy sd1
Writing MBR at offset 0.


Then I proceed to edit the thumbdrive's slice (partition) using fdisk.

$ sudo fdisk -e sd1
Enter 'help' for information


You can check your thumbdrive's slice but mine have 4 (0 to 3) with number 3 for OpenBSD. So I edit the slice's information for OpenBSD part.

fdisk: 1> e 3
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
*3: A6      0   1   2 -    241 254  63 [          64:     3887666 ] OpenBSD     Partition id ('0' to disable) [0 - FF]: [A6] (? for help) ENTER
Do you wish to edit in CHS mode? [n] ENTER
Partition offset: [64] ENTER
Partition size: [3887666] 600m


Take note that I didn't use the CHS mode. For the OpenBSD slice, it's ok. But I need to use the CHS mode for the FAT32 slice or else I won't get the 2 partitions I needed.

fdisk: 1> e 0
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused     
Partition id ('0' to disable) [0 - FF]: [0] (? for help) 0B
Do you wish to edit in CHS mode? [n] y
BIOS Starting cylinder [0 - 241]: [0] 76
BIOS Starting head [0 - 254]: [0] 125
BIOS Starting sector [1 - 63]: [1] 49
BIOS Ending cylinder [0 - 241]: [0] 241
BIOS Ending head [0 - 254]: [0] 254
BIOS Ending sector [1 - 63]: [1] 63


As you can see, slicing the FAT32 part is a bit tricky. I need to verify my OpenBSD's slice CHS information (Ending) and adjust the FAT32 CHS informations (Starting - Ending) accordingly. As you can see, my OpenBSD's CHS ended at 241 - 254 - 63 so I used that info as Starting CHS detail for the FAT32 slice. The Ending part should be the maximum of the CHS available.

Now I flag the OpenBSD slice to make it active.

fdisk:*1> flag 3
Partition 3 marked active.

Then quit and save changes.

fdisk:*1> quit

That was only the slicing part. In Window's world it's called partitioning. But now I need to partition the OpenBSD slice created. For this I need to use disklabel.

$ sudo disklabel -E sd1
Label editor (enter '?' for help at any prompt)
> a
partition: [a] ENTER
offset: [64] ENTER
size: [1228799] *
FS type: [4.2BSD] ENTER
Rounding size to bsize (32 sectors): 1228768

As the thumbdrive will just be an installation media, no need to create SWAP or any other partition. To confirm, I need the partition info.

> p m
OpenBSD area: 64-1228864; size: 600.0M; free: 0.0M
#                size           offset  fstype [fsize bsize  cpg]
  a:           600.0M               64  4.2BSD   2048 16384    1
  c:          1906.0M                0  unused                  
  i:          1298.3M          1228863   MSDOS

Looks good. Remember that sd1a is the a (OpenBSD) partition and sd1i is for the FAT32. Now quit and save changes.

> q
Write new label?: [y] ENTER

Sliced and partitioned, the thumbdrive is ready to be formatted. I use newfs.

$ sudo newfs /dev/rsd1a
$ sudo newfs /dev/rsd1i

It might take a while depending on how big your thumbdrive's capacity is. When done, I mount the OpenBSD's slice sd1a.

$ sudo mount /dev/sd1a /mnt

Then I copy my X200's /boot file to that thumbdrive.

$ sudo cp /boot /mnt

After that I make the slice bootable.

$ sudo /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd1

Then I need to create a folder named 5.3 and copy all 5.3 installation files (bsd* & *tgz) into it.

$ sudo mkdir /mnt/5.3

Then I need to create an etc folder, create a boot.conf file inside it.

$ sudo mkdir /mnt/etc
$ sudo touch /mnt/etc/boot.conf

Edit /mnt/etc/boot.conf and add:

set image /5.3/bsd.rd

Finally, I unmount the thumbdrive, reboot to test. The bsd.rd got booted nicely but I haven't tested the installation or upgrade procedure. Didn't want to mess with my current installation. If you tried this, do comment on how it goes. Later.

Update: Here's my experience on Upgrading OpenBSD using USB Flashdrive that I've created above.

Saturday, May 04, 2013

5.3 amd64 X200: Update to 5.3 but biosboot have problem! Ahhh!

Hola,

I updated my X200 to 5.3 last night, using the bsd.rd upgrade method. The usual stuff.

But when I reboot my X200, it's stuck at:

Loading...

That's all. Tried downloading the bsd, bsd.rd and bsd.mp file and do the upgrade process again, still with the same issue. Tried repairing the installboot

# cp /usr/mdec/boot /boot
# /usr/mdec/installboot -n -v /boot /usr/mdec/biosboot sd0


But then still I just can see the Loading... screen. Ahhh! Currently I'm logging in to my X200 using my old 5.0 install cd.

To do that, just boot the laptop using CD, when I see the boot> title:

boot> boot hd0a:/bsd

So basically the upgrade is ok, but the /boot have issue. Ahhh!


[Update 04/05/2013]

I wrote to misc@ and thanks to Dawe who replied, I managed to solve the issue.

By looking at the changelist, there's many changes in 5.3. Including biosboot(8) and installboot(8). But I didn't quite see the exact connection with the problem I had. So Dawe pointed me to the same problem faced by him, and solved via creating a new openbsd.pbr so Win7's bootloader can boot OpenBSD properly.

I tested that, and so, it does work as advertised. So, problem solved.

Sunday, April 28, 2013

5.2 amd64 X200: xorg.conf to get Trackpoint to behave properly.

Heyya. One of the thing that I like about X200, is the lack of touchpad. I don't quite like touchpads. It's a nuisance at best. Surely some OS can disable the touchpad when external mouse is connected but then, what's the point? Most of the time I'll be ignoring the touchpad.

For X200, it only comes with Trackpoint with 3 buttons. The left and right buttons are the standard left-right click, and the middle button is for scrolling. In Windows, pressing the middle-button then using the Trackpoint will scroll to the desired point (Right, left, up, down). But that's for Windows, I want it for my 5.2.

Surely, what's the point of having the best documentations if I didn't use it, right? So, man xorg.conf. Then I notice something. In the INPUTDEVICE SECTION, it's stated that:

"It is usually not necessary to provide InputDevice sections in the xorg.conf if hotplugging is in use (i.e. AutoAddDevices is enabled). If hotplugging is enabled, InputDevice sections using the mouse, kbd and vmmouse driver will be ignored."

Now that's different from what I used to remember. Previously I just alter my /etc/X11/xorg.conf like this:

Section "InputDevice"
    Identifier    "Trackpoint"
    Driver        "mouse"
    Option        "Protocol"    "Auto"
    Option        "Device"    "/dev/wsmouse"
    Option        "Emulate3Buttons"    "False"
    Option        "EmulateWheel"    "True"
    Option        "EmulateWheenButton"    "2"
    Option        "XAxisMapping"    "6 7"
    Option        "YAxisMapping"    "4 5"
EndSection


But now that won't work. It doesn't do anything. My USB Mouse's wheel is working fine, but Trackpoint does nothing as I wanted. So I alter the SERVERLAYOUT section:

Section "ServerLayout"
    ...snip...
    Option        "AutoAddDevices"    "False"
EndSection


But then both the Trackpoint and USB Mouse is not working. At all. This is not good. After re-reading the relevant xorg.conf manual, I found the answer. It lies in the INPUTCLASS SECTION. This is the working snippet of my /etc/X11/xorg.conf files.

Section "InputDevice"
    Identifier    "Trackpoint"
    Driver        "mouse"
    Option        "Protocol"    "Auto"
    Option        "Device"    "/dev/wsmouse"
EndSection


Section "InputClass"
    Identifier    "Trackpoint"
    MatchIsPointer    "True"
    Option        "Emulate3Buttons"    "False"
    Option        "EmulateWheel"        "True"
    Option        "EmulateWheelButton"    "2"
    Option        "XAxisMapping"        "6 7"
    Option        "YAxisMapping"        "4 5"
EndSection


Basically the INPUTCLASS can be used to add different function to different input devices (eg: Trackpoint, USB Mouse with Scroller etc) if configured correctly. In my case, I managed to get the Trackpoint's scrolling function using the middle button and the paste buffer function is also working as needed. But then my USB Mouse is also inheriting the same function. Ah well I will try to alter the INPUTCLASS SECTION so that the Trackpoint and USB Mouse have distint function.

So in the end, I got my Trackpoint working as I wanted. Take note that I'm using cwm and scrolling is tested and working in vim, Firefox and other programs. Great.

Oh, before I forget. I had problem generating my xorg.conf as there's error when I use X -configure. X -configure exited with error. But in the end the xorg.conf file did got generated. Current status is:

- Trackpoint scrolling function now working.
- intel (4) is working fine.
- Video display is 1280x800.
- VGA Out is not tested yet.
- Ultrabase's DisplayPort & VGA Out is not yet tested.

Here's my current /etc/X11/xorg.conf.


Thursday, April 25, 2013

5.2 amd64 X200: Current experiences and dmesg.

Here's the dmesg for my (not so) new Lenovo Thinkpad X200. So far this is the current status:

- Thinkpad buttons working great like increase/decrease sound, mute/unmute sound, increase/decrease LCD brightness etc.
- intel GM45 display is working out of the box. Crisp 1280x800 automatically. Played some HD (720p) and (1080p) movies via mplayer and no stuttering unlike my K43U's radeon.
- LAN is working fine.
- Wireless LAN needs additional downloadable firmware iwn. Not tested yet but seems to be working.
- Trackpad is working, no touchpad in this model. Managed to get the scrolling function using Trackpad working using xorg.conf (Will upload this file later).
- Ultrabase docking is detected and working via acpidock. Eject button & function is working fine.
- Using apmd_flags="-A" is working great. Enhanced Speedstep working fine.
- SDCard Reader is working fine. Opened up my Lumix DMC GH-1 sdcard and can mount properly.


5.2 amd64 X200: Goodbye Asus K43U, hello Lenovo Thinkpad X200.

Hola. It's been quite some time since I last put anything in here. What's new? Well, I sold my Asus K43U laptop via mudah.my. The official warranty is still valid until October 2013, I upgraded the RAM to 8Gb, 500Gb HDD.

I posted the asking price of RM1000, then got an offer of RM850. The chap was desperate for a laptop as he told me his old laptop died on him. He insisted to test my laptop that night, when the time was around 18:00. He was a Windows XP guy, and as my K43U is dual-boot of OpenBSD & Win 7 x64, he kept on telling me what his "IT-guy" friend think about the instability of Win 7 64-Bit. I told him, for Windows, my fav was XP x64 before I had to install Win 7 x64 for my K43U because of the lack of device drivers, then after I tried Win 7, I never turn back to XP anymore.

Not to mention that I had to entertain his questions of how's the performance of AMD APU of my K43U, how it stack up with intel processors bla bla. I happily responded to all his queries until I felt it was taking too much of my time (I was out shopping with my family) and gave a respond "I think you better research what application you use then decide what type of laptop you want".

He said that he's interested in buying my K43U but can only give RM850 for it as there's another ads for that same price but with warranty until June 2013 with lower HDD capacity & RAM. Heck. What a comparison. But then, I need to sell the laptop. So I agreed. He want it urgently, but I need to get my hundred Gbs worth of data out from it first. He said ok.

After that my buddy called me, chat a bit, told him about me going to sell my lappy for RM850 and got a "Oh what didn't you tell me because I was looking to buy one" kind of answer. Yeah right. I even put the ads in my Facebook.

We met later that night, quite late. Around 22:00 I think. He wanted to test the machine at a cafe that have WiFi, and I gladly oblige. So we went to a restaurant with free WiFi access, he started to test the laptop. Asking me to play HD (720p) movie while he browse internet, working with a few MS Accel(?, what's the name of that MS Office spreadsheet program?), opening 2-3 batch of file transfer windows from his external drive into the laptop, while also watching HD youtube video. All while he's actively seeking a sign of slow-response or suffering from the laptop and talking about it.

In the end, the youtube video did stutter. Heck it's only AMD E-450 APU, a low-to-mid spec laptop. Not a "core i"bla bla machine! And he opened so many programs. He looked worried about the youtube video stuttering under heavy load, which then I asked him "Do you use the machine like this every time?" and "Can your previous laptop work under this load" and received a double "no" for answer. Case closed. I nearly bailed out from the deal as I have a buddy who's also interested in the lappy.

So then he paid me, I gave him the laptop + bag + receipts + manual + CDs + downloaded updated device drivers + box. And I remind him to utilise the warranty on any hardware issue. Then we parted ways.

The next day, I received a phone call by the chap. He's having problem with his external drive which have password. ARGHHHH! Told him to refer to the external drive's documentation as I don't use any. Then the next day he called me about the DVD-RW drive kept on resetting. By the symptoms described to me, probably device driver issue. I told him I never had any of the issues during the 1 year++ I spent my time with the laptop, so I told him to install whatever OS he desired and go to Asus service center on any hardware issue. To be honest, I was tired. Eventually the problem resolved by itself, to my relief. If not then I might take back the laptop and refund it as it's too much of a hassle.

Was it worth it now? Well, recently I used the money from the sale, add another RM50 and got myself a Lenovo Thinkpad X200 laptop + Ultrabase docking. The guy asked for Rm1000, got negotiated to RM900. intel P8600 2.4Ghz dual-core, 320Gb HDD and 2Gb RAM. We met near the guy's place, at a restaurant, I booted the machine, entered Win 7, shut it down then pay the money and left the place.

Why Thinkpad? Because I heard many OpenBSD devs uses Thinkpad. Then the replacement parts are plenty. Then the build quality is great. Along with Panasonic Toughbooks, Thinkpads are the models of laptop I don't mind having intel inside. Mind you I also considered AMD's version of Thinkpad Edge, but like other laptop makers, they make half-baked AMD machines that didn't do justice for AMD's great potentials.

I'll update my experiences on running OpenBSD with this X200, and I'll tell you something, the legend about Thinkpad's keyboard is true. And OpenBSD on X200 is a joy! Later.

Tuesday, February 26, 2013

5.2: Uninstalling all packages.

Heyya,

OpenBSD is at 5.2 now. And been using it for a while, and trying to get my hands dirty on Gnome and xfce. First, what? 5.2? I thought I was already on that? Well, that was on -current, but now on -release.

With packages installed, and by installing bloated wm like gnome, surely I will need to delete the packages sooner or later. Which I do after 2 days of trying out Gnome.

pkg_delete is adequate, but when trying to clean up lots of gnome's dependencies, there's a better way.

It's amazing what gem is stored inside old news. For instance, http://www.openbsd.org/faq/upgrade37.html.

Yeah, pkg_delete /var/db/pkg/*. But remember that you're doing this because you want to uninstall ALL PACKAGES. Like me.

Now I'm trying out xfce.

p/s: Not sure if it's just my office but I can't seems to read all my gist. Hmmm.

Saturday, September 15, 2012

5.2 amd64 K43U: Conky not showing correct cpu core's load.

Well, I'm getting more comfortable with cwm. In fact I installed conky again because of cwm. Currently cwm is my main window manager and although spectrwm is still my favorite, I've been using cwm more.

I just found out something interesting today. I'm interested in playing with conky again after I found cwm. Thinking that it will be a great combination. Installation went fine, although I noticed that there's more dependencies needed to install conky now (or I didn't notice it earlier in previous versions).

Then I noticed that the graph and load percentage for 2nd core of my cpu is zero. Nil. Nada. Reading about updates of 5.2 tells me that that version have much more improvements on SMP handling, so obviously OpenBSD is not the issue here. Then I use xstatbar and found that both of my cpu cores are displayed and working as usual. I double check the man for conky and it's confirmed that cpu0 is for all cores, cpu1 is for 1st core and cpu2 is for the 2nd core. So, something wrong with conky again huh. Ok. I know it's not written with OpenBSD in mind so I'm not complaining. Gonna find some sort of workaround for this.

I might try dzen and see if it's any good. Later.

p/s: Oh, this is my 200th post for this blog-o-mine. Hah!

Wednesday, September 12, 2012

amd64 K43U: Upgrading to 5.2-current (via FTP) & cwm - Calm Window Manager.

Hi,

Currently I'm upgrading my K43U to 5.2-current. Using FTP install. But that's not my main point.

Calm Window Manager, or cwm has been in OpenBSD's base install since 4.2. But only now I have the privilege of knowing about it. Sheesh. I'm currently testing it and I can say that it's as fast as spectrwm. But I haven't configured any of it yet. As always, man is the way.


Upgrading 5.1-current to 5.2-current:

Most of the steps are the same as 5.1 amd64: Following -current & radeon 6.14.3 installation topic I posted before. The only thing that's different is the method I'm getting the snapshot files and updating the packages. For this one, I used my Celcom Broadband connection and retrieve all the essential files via ftp.

So first of all, I fired up the Celcom connection, you can check the 4.8 - Script to connect to Celcom 3G link. Bolded is my input:

# celcom3g connect
Connection Celcom3G...


Then it's time to get the files. My fav server is ftp.OpenBSD.org. I make sure I'm in the dir that I want to store all the files first:

# cd /mnt/snapshot/amd64/
# ftp ftp.OpenBSD.org

Connected to openbsd.sunsite.ualberta.ca.
220 openbsd.srv.ualberta.ca FTP server ready.
name (ftp.OpenBSD.org:karl):


Ah. Login name? Err. I just hit Return and got this:

530 User karl access denied.
ftp: Login karl failed.

Now it's getting interesting. After reading the manpage, I found that I should use "-a" to login anonymously. So back to ftp:

# ftp -a ftp.OpenBSD.org
*** Login successful printout ***

Great. Now to get the files.


ftp> cd pub/OpenBSD/snapshots/amd64/
250 CWD command successful.
ftp> mget bsd*
ftp> mget *.tgz
ftp> quit


After this the steps are the same as my previous post. After I done upgrading the OpenBSD to 5.2-current, I updates my packages online (without downloading to local dir like I've always do before).

# export PKG_PATH=http://ftp.OpenBSD.org/pub/OpenBSD/snapshots/packages/amd64/
# sudo pkg_add -vui


Then enjoy, wait, it'll take some time depending on how many stuff you installed already. After a brief testing last night, noticeable improvement is the radeon driver which is updated to 6.14.6. Previously playing 720p mkv movie will stutter like mad but now it's smooth although tearing effect is there. I still have to explore more to comment more on 5.2-current.

Oh, regarding cwm. What's the different between cwm and spectrwm? Short answer:

cwm = stacking
spectrwm = tiling

But cwm is already in base, and spectrwm is available in package. I still need to explore cwm more. Later.

Wednesday, September 05, 2012

Bitrig, fork of OpenBSD.

Hola,

There's another *BSD forked emerge now. It's Bitrig. Notice that there's no "BSD" in it's name? Well I guess there's a first time for everything. Bitrig aims to be OpenBSD with newer PC hardware.

Hopefully the fork can benefit all the other *BSDs in the family.

Oh, I noticed that OpenBSD 5.2 is coming soon. Yeah!

Tuesday, March 20, 2012

5.1 amd64 K43U: Alpine > UW-IMAP > OfflineIMAP > Davmail > OWA stuck.

1) Install Alpine+ldap, setting up DavMail.

Install Alpine using port with FLAVOR set to ldap. I just referred to my previous post. So this post will focus more on OfflineIMAP and UW-IMAPd side of the project.

1) Install imap-uw2007

read the /usr/local/share/doc/pkg_readmes/uw-imap-2007f and follow the instruction. For me, I vim /etc/inetd.conf and add:

imap stream tcp nowait root /usr/local/libexec/imapd imapd
imap stream tcp6 nowait root /usr/local/libexec/imapd imapd


And it's also stated a way to enable plain text login. So I vim /etc/c-client.cf and change:

#set disable-plaintext nil

to

set disable-plaintext nil

You can restart inetd, but I just reboot. Then I telnet to localhost:143.

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ SASL-IR LOGIN-REFERRALS STARTTLS] localhost IMAP4rev1 2007f.404 at Tue, 20 Mar 2012 13:27:16 +0800 (MYT)


So far so good. In Alpine I just need to Add Folder collection (S+L+A) with the details:

Nickname: UW-IMAPd
Server: localhost:143
Path: mail/MyCompany/INBOX/
View:


Then after I saved the settings, inside folder list (L) Alpine will ask for my username (same as my OpenBSD's login name) and password (also same as my OpenBSD's password) then I can manipulate my IMAP's INBOX folder. I can add folders, delete etc. So this part is ok.

3) Installing and configuring OfflineIMAP.

I installed OfflineIMAP from OpenBSD's packages. Then I create ~/.offlineimaprc and put the basic as stated in offlineimap.org.

[general]
accounts = MyCompany

[Account MyCompany]
localrepository = Local
remoterepository = Remote

[Repository Local]
type = IMAP
remotehost = localhost
remoteport = 143
remoteuser = karl

[Repository Remote]
type = IMAP
remotehost = locahost
remoteport = 1143
remoteuser = ASIA\karl


Then I run OfflineIMAP by issuing offlineimap. Lo and behold, I got this error:

$ offlineimap
OfflineIMAP 6.3.4
Copyright 2002-2011 John Goerzen & contributors.
Licensed under the GNU GPL v2+ (v2 or any later version).

Account sync MyCompany:
***** Processing account MyCompany
Copying folder structure from IMAP to MappedIMAP
Establishing connection to localhost:1143.
WARNING: Error occured attempting to sync account 'MyCompany':
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/offlineimap/accounts.py", line 177, in syncrunner self.sync()
File "/usr/local/lib/python2.7/site-packages/offlineimap/accounts.py", line 235, in sync remoterepos.syncfoldersto(localrepos, [statusrepos])
File "/usr/local/lib/python2.7/site-packages/offlineimap/repository/Base.py", line 124, in syncfoldersto srcfolders = src.getfolders()
File "/usr/local/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 303, in getfolders self.accountname, self))
File "/usr/local/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 32, in __init__ self.name = imaputil.dequote(name)
File "/usr/local/lib/python2.7/site-packages/offlineimap/imaputil.py", line 36, in dequote if not (string[0] == '"' and string[-1] == '"'): IndexError: string index out of range

***** Finished processing account MyCompany


Eh. Bah. Something is wrong somewhere. Help....

Sunday, March 18, 2012

5.1 amd64 K43U: Alpine reloaded, but snapshot has been updated.

Heyya,

I was trying to install Alpine this evening but aspell dependency is giving out error like something have changed. Then I checked my fav snapshot site and found that it's updated since 15th March.

So I'll be updating the snapshot tomorrow.

What's with Alpine again? Well previously I mentioned about trying to make Alpine to be offline email client (Alpine+UW-IMAPD+DavMail+OfflineIMAP) but the adventure never took off. So I'm visiting the trail again. Heh.

p/s: Not to mention that the Alpine+DavMail+OWA post have the most comment by readers. So it might be a useful post to some people. Later

Saturday, March 17, 2012

Thunderbird 9: Fixing screwed menu bar position.

Hi,

my -current is using Thunderbird 9x. And yesterday, somehow, I managed to screw the layout of it's Menu bar and Toolbar. The Menu bar should be on top, then below it the Toolbar. But by some magical keyboard shortcut I would never have known nor I can recall, I managed to swap the position between those 2 and leaving the Toolbar on top and below it, the Menu bar. It was ugly, dysfunctional and just plain wrong.

After a few misleading internet articles and forums regarding the issue, or nearly identical issues, I was left with the option of delete-and-test procedure. There's .thunderbird folder inside my $HOME and all the related settings is inside xxxxxxxx.default folder. Because there's a bunch of files, I deleted a subfolder inside then open up Thunderbird just to see did the layout was reverted back to normal. After nearly clearing the content of the .thunderbird folder, I found that the folder extensions is the one that I'm looking for.

So after I deleted the extensions folder, the layout reverted back to factory-default at the expense of losing my downloaded theme. Ah well that made me think that I can achieve the same result by changing theme to default and so it seems so. Better to lose the themes than lose my email settings. Later then.

Wednesday, March 14, 2012

5.1 amd64 K43U: dmesg version 2.

OpenBSD 5.1 (GENERIC.MP) #207: Sun Feb 12 09:42:14 MST 2012
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8165330944 (7787MB)
avail mem = 7933804544 (7566MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeafd0 (50 entries)
bios0: vendor American Megatrends Inc. version "220" date 02/20/2012
bios0: ASUSTeK Computer Inc. K43U
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG HPET SSDT SSDT SLIC
acpi0: wakeup devices SBAZ(S4) P0PC(S4) GEC_(S4) UHC1(S4) UHC2(S4) USB3(S4) UHC4(S4) USB5(S4) UHC6(S4) UHC7(S4) PE20(S4) PE21(S4) PE22(S4) PE23(S4) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD E-450 APU with Radeon(tm) HD Graphics, 1646.70 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 16-way L2 cache
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD E-450 APU with Radeon(tm) HD Graphics, 1646.50 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 16-way L2 cache
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
ioapic0 at mainbus0: apid 3 pa 0xfec00000, version 21, 24 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (PE20)
acpiprt2 at acpi0: bus 4 (PE21)
acpiprt3 at acpi0: bus -1 (PE22)
acpiprt4 at acpi0: bus -1 (PE23)
acpiprt5 at acpi0: bus -1 (BR15)
acpiprt6 at acpi0: bus -1 (PCE6)
acpiprt7 at acpi0: bus -1 (PCE7)
acpiprt8 at acpi0: bus -1 (PCE8)
acpiprt9 at acpi0: bus 1 (PCE4)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, PSS
acpicpu1 at acpi0: C2, PSS
acpitz0 at acpi0: critical temperature is 99 degC
acpibat0 at acpi0: BAT1 model "PA3533U " serial 41167 type Li-Ion oem "ASUSTEK"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID_
acpivideo0 at acpi0: VGA_
acpivideo1 at acpi0: VGA_
cpu0: 1646 MHz: speeds: 1650 1320 825 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
vga1 at pci0 dev 1 function 0 "ATI Radeon HD 6320" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 3 int 18
drm0 at radeondrm0
azalia0 at pci0 dev 1 function 1 "ATI Radeon HD 6310 HD Audio" rev 0x00: msi
azalia0: no supported codecs
ppb0 at pci0 dev 4 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 3 int 19, AHCI 1.2
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: SCSI3 0/direct fixed naa.50014ee6ac21175d
sd0: 476940MB, 512 bytes/sector, 976773168 sectors
cd0 at scsibus0 targ 1 lun 0: ATAPI 5/cdrom removable
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 3 int 18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 3 int 17
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
ohci1 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 3 int 18, version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 3 int 17
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "ATI EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x42: polling
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
pciide0 at pci0 dev 20 function 1 "ATI SB700 IDE" rev 0x40: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
azalia1 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x40: apic 3 int 16
azalia1: codecs: Realtek ALC269
audio0 at azalia1
pcib0 at pci0 dev 20 function 3 "ATI SB700 ISA" rev 0x40
ppb1 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x40
pci2 at ppb1 bus 2
ohci2 at pci0 dev 20 function 5 "ATI SB700 USB" rev 0x00: apic 3 int 18, version 1.0, legacy support
ppb2 at pci0 dev 21 function 0 "ATI SB800 PCIE" rev 0x00
pci3 at ppb2 bus 3
re0 at pci3 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E-VL (0x2c80), apic 3 int 16, address 14:da:e9:a2:a3:06
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 5
ppb3 at pci0 dev 21 function 1 "ATI SB800 PCIE" rev 0x00
pci4 at ppb3 bus 4
athn0 at pci4 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 3 int 17
athn0: AR9285 rev 2 (1T1R), ROM rev 14, address d0:df:9a:85:1a:ef
ohci3 at pci0 dev 22 function 0 "ATI SB700 USB" rev 0x00: apic 3 int 18, version 1.0, legacy support
ehci2 at pci0 dev 22 function 2 "ATI SB700 USB2" rev 0x00: apic 3 int 17
usb2 at ehci2: USB revision 2.0
uhub2 at usb2 "ATI EHCI root hub" rev 2.00/1.00 addr 1
pchb1 at pci0 dev 24 function 0 "AMD AMD64 14h Link Cfg" rev 0x43
pchb2 at pci0 dev 24 function 1 "AMD AMD64 14h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 14h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 14h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 14h CPU Power" rev 0x00
pchb5 at pci0 dev 24 function 5 "AMD AMD64 14h Reserved" rev 0x00
pchb6 at pci0 dev 24 function 6 "AMD AMD64 14h NB Power" rev 0x00
pchb7 at pci0 dev 24 function 7 "AMD AMD64 14h Reserved" rev 0x00
usb3 at ohci0: USB revision 1.0
uhub3 at usb3 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci1: USB revision 1.0
uhub4 at usb4 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb5 at ohci2: USB revision 1.0
uhub5 at usb5 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb6 at ohci3: USB revision 1.0
uhub6 at usb6 "ATI OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support
uvideo0 at uhub0 port 3 configuration 1 interface 0 "04081-00050100C417910FV ASUS USB2.0 WebCam" rev 2.00/0.05 addr 2
video0 at uvideo0
umass0 at uhub0 port 5 configuration 1 interface 0 "Generic USB2.0-CRW" rev 2.00/38.82 addr 3
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: SCSI0 0/direct removable serial.0bda0138516388200000
uhidev0 at uhub3 port 1 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/20.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
ugen0 at uhub3 port 4 "Lite-On Technology product 0x3002" rev 1.10/0.01 addr 3
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (e777c1bb59b96fd1.a) swap on sd0b dump on sd0b


This dmesg have Multi-Card detected and speaker working.

5.1 amd64 K43U: Updated BIOS to 2.20 and found some issues.

Hi,

I updated my K43U's BIOS 2 days ago to version 2.20 from previous version 2.17. Then I noticed something. I'm not sure this is related to me updating the BIOS but for sure, I noticed this issue after updating the BIOS.

Sometime the speaker will not function. Result of mixerctl will show that the speaker is not muted and if I attach a headphone, mixerctl will update accordingly - headphone works and detaching the headphone will result in still no sound coming out from the speaker. Rebooting will result in the same issue unless I opt for shutting down, then boot the machine. In Win7 the speaker is working fine with no issue so this might not be a BIOS update issue.

I also notice that this machine's Multicard Reader will sometime be detected and sometime not. If you refer to my dmesg, there no card reader detected but sometime I can see this dmesg result added:

umass0 at uhub0 port 5 configuration 1 interface 0 "Generic USB2.0-CRW" rev 2.00/38.82 addr 3
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: SCSI0 0/direct removable serial.0bda0138516388200000


To make it ever more weirder, when Multi-Card is detected, the speaker will have no problem. Eh. But then I never tested the Card Reader in either OpenBSD or Win7 so I don't know if it's faulty or what. My machine have 2 years warranty so I better make sure.

UPDATE 14/03/12: I found that my Realtek MultiCard Reader is not working. Even in Win7. So I better send the machine to Asus Service Center ASAP.

Later.

Monday, March 12, 2012

5.1 amd64 K43U: Screenshot anyone?


Hi,

Shown here is my Asus K43U running OpenBSD 5.1 (snapshot). There's tmux displaying a part of dmesg output, then the result of uname -a and lastly the scrot command I use to take this screenshot.

I'm using spectrwm (still scrotwm here) with xstatbar runnin at the bottom.

Oh yeah tmux is using 256 color. Heh. Later.

Friday, March 09, 2012

5.1 amd64 K43U: Something about APM.

Hi,

apm is working fine. In dmesg, I can see that my E-450 APU have 3 speed detected:

cpu0: 1646 MHz: speeds: 1650 1320 825 MHz

So I vim /etc/rc.conf.local and add:

apmd_flags="-A"

Basically this is to tell apm to use Automatic performance adjustment mode. So with power adapter connected, the processor will be in full force (1650Mhz) and will lower down to (825Mhz) when in battery mode and scale up/down according to load. Nice.

I will still need to find something about the LCD's brightness though because that's one of the major power-sucker. Will update on this later.

Tuesday, March 06, 2012

5.1 amd64 K43U: CUPS revisited.

Hi,

I just finished setting up CUPS and successfully made the Firefox to use CUPS for printing. At first I just installed cups-1.5.0p8 and change my /etc/rc.conf.local to add:

# Packages script to start (/etc/rc.d/)
pkg_scripts="cupsd"


At the bottom of the file. Now OpenBSD uses that instead of my previous posting and if I use my previous way, doing ps aux | grep cups will display bunch of cups threads being started. Recent way are much better.

So then when I open the http://localhost:631 (CUPS local page), I just add my network printer (HP Laserjet 9050dn) using socket://ip.address then downloading external driver from CUPS's website. Test printing went successful but when I want to print under Firefox, there's only Print to file and Print to lpr options with no CUPS printer. My office also have a Ricoh Aficio MP4500 printer but currently not working for me. Will try to figure this out later.

After searching for answers, I installed gtk+2-cups-2.24.9p0 with all of the dependencies. Restarting Firefox then checking the Print menu, I can now see the printer correctly. But when I tried to print, I get this pdftops failed error and printing queue stopped. So I went off to search for another answer.

Looking at OpenBSD's packages site, I saw cups-pdf-2.5.1 which might be the solution I was looking for. The packages is to print a file to PDF, but I have a feeling this can solve my printing issue. So I installed that, quit a lot of dependencies too then tried printing in Firefox. Wallah! Printing done, I'm happy so back to work. Later then.

Friday, March 02, 2012

5.1 amd64 K43U: ksh script for Asus K43U keyboard shortcut in spectrwm.

Hi,

I've written a simple script to use my K43U keyboard shortcuts. As stated previously, Fn+F1 (sleep) and Fn+F7 (Off LCD) shortcuts is working. But as the Fn button is undetected in OpenBSD or xorg, I cannot use the Fn button to create other shorcuts, instead I need rely on spectrwm's MOD key. I might change this back to Fn key if later on it's workable.

What's the purpose of this (current) script?
- MOD+F10 to mute/unmute master volume (mixerctl outputs.master.mute)
- MOD+F11 to decrease master volume (mixerctl outputs.master. For both LR channel)
- MOF+F12 to increase master volume (mixerctl outputs.master. For both LR channel)

If you're using xstatbar, like me, xstatbar will show a graph of master volume for each Left/Right channel. So by using this script, you can see how much percentage of the volume you increase/decrease.

Why ksh? Because OpenBSD's default SHELL is ksh and I'm using it. This script might work with other shell.

Copy the asusfn.sh to either your $HOME or if you want to use it exclusively for spectrwm (scrotwm), copy it to /usr/local/share/scrotwm/ but make sure to alter my .scrotwm.conf below accordingly as I put my asusfn.sh in $HOME. Make sure to chmod the asusfn.sh to executable.

Manual usage is:
$ ./asusfn.sh [param]

Replace [param] with:
aup : To increase volume.
adn : To decrease volume.
amt : To mute/unmute volume.

This top part is snippet of my $HOME/.scrotwm.conf. As stated above, alter accordingly.



And this part above is the asusfn.sh. If you read the script carefully, you can see that you can also use the command:

$ ./asusfn.sh info

Which is basically my debugging for the script. I'm not an expert on ksh scripting so I used that to check values/env/bla bla etc.

Future (might be) improvements:
- MOD+F2 to enable/disable athn0 (Wireless LAN)
- MOD+F8 to change display output
- MOD+F9 to enable/disable touchpad

I also found that there's acpiasus which is the Hotkeys driver for Asus's laptop. Currently not automatically working with this machine-o-mine so I need to search for clues on it.

Legal stuff. You can freely copy/use/alter the script any way you want. Don't mock my programming skill because I'm not a programmer and I know this script can be made more simpler. If you alter the script and gave it somebody, make sure you tell them it's not my version. If you find this script useful, thank me or don't either way it's ok. Later.

6.5 amd64: Modify existing certbot certificates.

Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...