TDC Huawei E180 tiny hack

November 11th, 2009

To get the Huawei E180 3 modem provided by TDC to work on Ubuntu, one needs to get rid of the airprime module.

In /etc/modprobe.d/blacklist, add:
blacklist airprime

The APN is "internet" so wvdial.conf becomes:

[Dialer tdcpin]
Modem = /dev/ttyUSB0
Init1 = AT+CPIN=****  <-- this is my pin code

[Dialer tdc]
New PPPD = yes
Phone = *99#
Username = irrelevant
Password = irrelevant
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","internet"

and commands are

wvdial tdcpin
wvdial tdc

Thank you to http://ubuntuforums.org/showthread.php?t=796766.

RAID monitoring on Sun servers

November 10th, 2009

Very brief blog post (but > 140 characters...)

After buying Sun server and realizing that they are NOT using LSI RAID controllers and MegaCli will not work, do not despair.

Yes it is Adaptec. Or a Sun-ified Adaptec called Storagetek, whatever.

Do what you would otherwise never do: Look on the CD that came with the server. (Or download from Sun's download page http://www.sun.com/servers/x64/x4450/downloads.jsp, but these non-understanding people requires you to register and I can never remember what password I used. Geek appeal -1).

You are looking for something called Storman. The package on the cd is called asm_linux_x64_v5_30_17509.rpm (or x86 if that stuff still exists :) and it can be alien'ed to debian with no hacks necessary at all:

alien asm_linux_x64_v5_30_17509.rpm

The package storman_5.30-17510_amd64.deb comes out of it and can be installed with

dpkg -i storman_5.30-17510_amd64.deb.
apt-get install libstdc++5.
chmod u+x /usr/StorMan/arcconf.

Now try the following commands:


/usr/StorMan/arcconf GETCONFIG 1 AL
/usr/StorMan/arcconf GETCONFIG 1 Ad

If you have more than one RAID controller I assume the next one has number 2.

The rest is easy. My little RAID monitoring cron entry:
10 * * * * /usr/StorMan/arcconf GETCONFIG 1 Ad |grep "Controller Status" |grep Optimal >>/dev/null || /usr/StorMan/arcconf GETCONFIG 1 AL | /usr/bin/mail myemailaddress@example.com -s "Servername RAID problem!!!"

This has been tried on a Sun Fire X4170 and a Sun Fire X4450 running Debian Lenny.

Firmware upgrade Perc6/e on unsupported Linux

October 20th, 2009

My Dell support man said I had to upgrade the firmware on my perc6/e controller just to make sure that old firmware was not the reason it threw disks offline.

And he sent me this link:

http://support.euro.dell.com/support/downloads/format.aspx?c=uk&l=en&s=gen&deviceid=12436&libid=46&releaseid=R216021&vercnt=5&formatcnt=0&SystemID=PWE_R900&servicetag=&os=WNET&osl=en&catid=-1&dateid=-1&typeid=-1&formatid=-1&impid=-1

Which has files for DOS/Windows, Redhat / SuSE Enterprise Linux, and ... Windows.

Soooo I know that my Debian Lenny is not a supported platform. And yes this is a choice we have made. It saves us a lot of custom compiling and stuff in our main area - bioinformatics - and cost us a little hassle when our hardware gives trouble.
So I am not whining that Dell does not support non RPM Linux. I am making a note to self, and others, about how I went about to upgrade the firmware anyway.

First of all I should mention that there seems to be a Linux Dell firmware project, which has at least Ubuntu in it, check out http://linux.dell.com/repo/community/. This is not supported by Dell. I cannot tell if it works since I did not use it.

My solution was more back to basics. In short I downloaded a boot CD image with some DOS boot images on it, added the DOS files from the Dell download to it, booted from it and ran the update.

The stepwise explanation is here:

  1. Download UBCD (Ultimate Boot CD): http://www.ultimatebootcd.com/download.html
  2. Mount it, and copy the contents to somewhere else:
    mount -o loop ubcd411.iso /media/cdrom
    mkdir myubcd
    cp -a /media/cdrom/ myubcd/
    
  3. Download the "Hard-Drive" installation package from http://support.euro.dell.com/support/downloads/download.aspx?c=uk&l=en&s=gen&releaseid=R216021&SystemID=PWE_R900&servicetag=&os=WNET&osl=en&deviceid=12436&devlib=0&typecnt=0&vercnt=5&catid=-1&impid=-1&formatcnt=5&libid=46&typeid=-1&dateid=-1&formatid=-1&fileid=307242
    -this is a self extracting exe file.
  4. Find a Windows box to unpack it. If you don't have a Windows box, this is the time to call a friend :(
  5. Copy the files that you unpacked to a subdir in your myubcd folder. I called mine dell-fir:
    cp -r path-to-unpacked-stuff/dell-fir myubcd/
  6. Create new bootable iso image:
    cd myubcd
    mkisofs -b isolinux/isolinux.bin -c boot.catalog -J -no-emul-boot -boot-load-size 4 -boot-info-table -o ../myubcd.iso .
  7. Burn a CD, f.ex.
    wodim dev=/dev/scd0 myubcd.iso
    
  8. Boot from the CD. Choose Dos/Linux Boot Disks, then LZ-DOS Boot Disk.
  9. When booting into DOS is done, copy the files from the CD to the RAM disk, and run update.bat:
    q:
    copy -r t:dell-fir .
    update.bat
  10. It should now display a page allowing you to cancel, or to continue with the upgrade. If you choose to continue, it does the firmware upgrade on the perc6/e controller, if it can find one.

I do not know if copying the files to RAM disk is necessary, but it wants to write some log files and it can't do that unless it has write access. Life was so much easier back in the floppy days (in some ways)...

Fantasy book: Poison Study. Magic Study, Fire Study

October 16th, 2009

- by Maria Snyder

This is the three books about Yelena Zaltana, which goes before "Storm Glass" i wrote about a month or two ago.

Starting in prison waiting to be executed for murder in the military state Ixia, Yelena instead gets to be the food taster of the Commander. Her boss and teacher in poison tasting is Valek, the commander's chief of security and best assassin.

Yelena makes some friends and some enemies, and starts to discover her magical abilities and has to make a run for Sitia, another country, where magic is allowed. However, not all the powerful magicians in Sitia are happy to see Yelena...

The story is written in first person and is very catching and I enjoyed reading it. Don't look for total consistency in fantasy book, though. Special rules goes for our heroine: Things people do for her is never considered disloyal or immoral in any way.

Book: Brave New World

September 30th, 2009

- by Aldous Huxley

This is a classic one has to read because one would sometimes miss references otherwise.

The title "Brave new world" is taken from a Shakespeare quote really:

O, wonder!
How many goodly creatures are there here!
How beauteous mankind is! O brave new world,
That has such people in't!

(The Tempest).

It is a future vision written in 1932 and the plot is supposed to go on
some 600 years later.

It is about a caste based nightmare civilization with artificial reproduction, to avoid the mess of sexual reproduction and to control the embryos' development into the desired caste, and some savages living like pueblo Indians, and the two cultures meeting and clashing.

There are some things he hits on the spot. Happy pills are perhaps early versions of soma. He thought consumerism needed to be induced on people by law. It did not. We are doing it voluntary and being grateful for it.

He has not foreseen the Internet, mobile communication or communication via radio broadcast from independent radio stations. He really thinks authorities would be able to keep people from knowing Shakespeare by forbidding it. As if that ever worked.

Then there is the way they receive Mr. John Savage in London. A bit
inconsistent. No xenophobia. But every time someone else breaks their
norms they freak out.

John's reaction to the city is just as weird. He can easily pick up the
phone and take a taxi to the hospital, he even thinks about asking for the
address on the phone. But his confused, mixed-up religion somehow makes sense. Today he would be considered a dangerous fundamentalist.

The most interesting thing is how they keep the delta and epsilon jobs
instead of automating it, because the deltas and epsilons - the two lowest castes - are not happy if they don't work. Perhaps we could learn something from that. And they could just stop producing epsilons if they wanted. We can't.