Wednesday, September 10, 2008

Moving

On the rare occasions that I post new content I will post it at my new home blogs.sun.com/jameslegg. I'm not migrating posts so this blog will stay indefinitely.

Monday, August 4, 2008

Wet Nokia E71 Reset for idiots

If like me you are an idiot and you decide that it is a good idea to take you brand new Nokia E71 phone on a very wet Motorcycle ride. You to will likely discover in the Cafe at the other end that you have an very wet phone that no longer turns on. If this sounds like the brain dead sort of thing you would do then try the following.

Step 1
Take the battery out and put the phone in the airing cupboard for a couple of days.

Step 2
Turn it on.

Step 3
If after this it says "Phone failed to Start up - Contact retailer" try holding down the green button the 3 and * button (don't bother holding down the Function button that you would normally use to get numbers) and turn the phone on with the power button. Keeping holding the buttons until the phone boots into the startup wizard. If you lucky you will be back at a blank phone.

Step 4
If your even more lucky you will have synced your contacts with another computer or server and can just re-sync them to get your numbers back.

Step 5
Don't be such a fool again.

Sunday, August 3, 2008

Synergy OpenSolaris

I've been a big fan of Synergy for years and getting it to compile on OpenSolaris is just a question of installing SUNWxorg-headers:

Grab the Synergy source and unpack then cd to the directory and install the SUNxorg-headers:
james@ickle:~/Download$ tar xf synergy-1.3.1.tar
james@ickle:~/Download$ cd synergy-1.3.1
james@ickle:~/Download/synergy-1.3.1$ pfexec pkg install SUNWxorg-headers


then it should compile as normal:
james@ickle:~/Download/synergy-1.3.1$ ./configure
james@ickle:~/Download/synergy-1.3.1$ make
james@ickle:~/Download/synergy-1.3.1$ pfexec make install


As an example here is my synergy config file:

james@frank:~$ cat /etc/synergy.conf
section: screens
ickle:
frank:
douglas:
meta = alt
end

section: links
ickle:
right = frank
frank:
left = ickle
right = douglas
douglas:
left = frank
end


The meta = alt line under douglas is to make synergy play nice with a Mac as a client.

The result is three machines with one keyboard and mouse.

x40 opensolaris

Have been playing with OpenSolaris on the laptop again and, have discovered that the although SpeedStep is not supported on my old Dothan Pentium M using the Solaris Speedstep drivers. The frkit seems to allow the acpi to combine with the Gnome CpuFreq to step my CPU successfully.

So now I have CPU speed stepping which stops my laptop toasting me to death when i use it under OpenSolaris.
Still waiting on 6644080 to be fixed in build 95 so I can see if suspend will work though.

Thursday, June 19, 2008

OpenSolaris 2008.05 Strategy Planning Meeting

I just listened in on the call for the OpenSolaris (Indiana) community strategy planning meeting to get a bit of an idea where the OS is going. It seems that the road map includes a number of nice bits for the planned 2008.11 release. Some much needed work on the performance of pkg and PackageManager, an update to Gnome and a move to more open development and rudimentary SPARC support.

The Development plan included things like a planned move to a Mercurial repository for the beginning of August from the current SCM. The plans have the goal of eventually having non Sun community members able to make putbacks.

The repository system was described in more detail including how pkg.sun.com and pkg.opensolaris.org related. From my (fairly limited!) understanding it appears that pkg.sun.com will be where the Sun supported releases will live as well as encumbered, paid and other resources that are not going to be generally available in the same way or under the same licences as OpenSolaris itself. pkg.opensolaris.org will continue to be where the bleeding edge stuff lives, and will have a quick release cycle to conincide roughly with SXCE (bi-weekly builds). There will also be a stable version availble from pkg.opensolaris.org and there was mention of a proposed /contrib repositery for Open Source software from the community - if this means community maitained projects like songbird, beta builds of software or others things is not clear to me at the moment. Slides for this talk given by Tim Cramer and Dan Roberts are hear.

Stephen Hahn went into further detail about the way IPS works and the slides he used includes some nice information on the clever bits of IPS like bandwidth efficiency (when updating packages only get individual files needed) and publication safety (packages with incomplete dependencies denied published state).

Dave Miner talked about the Automated Installation (with the some SPARC support) in preview form hopefully making an appearance in the 2008.11 release. Which should make deployment on a larger scale an easier task. Other features like Solaris 10 co-existence (without jumping through hoops) and proper Zones support in the BE management side of things is also due. More details in his slides.

There was some further discussion about hardware compatibility and the HCL list being out of date, at which point I discovered that the Device Driver Utility has the ability to upload your machines specifications to the bigadmin HCL list.

The use of Sun Ray was also mentioned, with OpenSolaris having a nicer desktop experience than Solaris 10 the ability to get Sun Ray working might help with the adoption of Sun Ray as it can provide a more modern environment to the end user. It looks like this work is underway though no time estimations where mentioned.

Overall I got the impression that the people behind OpenSolaris are trying hard to push both usage and adoption as well as trying to fix some of the shortcomings of Solaris to make it more attractive to the Web 2.0 companies, the hobbyists as well as the Enterprise users. It's not there yet but I can see it coming, exciting times to be rejoining Sun!

Transmission Bittorent Client OpenSolaris

Missing from the default OpenSolaris distribution install is a Bittorent client. While not in pkg.opensolaris.com a binary Svr4 package of Transmission is available from hear and seems to work ok once I had installed libcurl

pfexec pkg install SUNWcurl
gunzip SFEtransmission-1.21-sol11-i386.pkg.gz
pfexec pkgadd -d SFEtransmission-1.21-sol11-i386.pkg

Monday, May 5, 2008

OpenSolaris

With most of my Uni coursework completed I've had some time to devote to what I really enjoy doing - playing about with computers while not getting a lot done. Quite good timing as OpenSolaris the distribution of Solaris that is based on Nevada (Solaris 11) has just been released. Of course being a bit impatient I found a copy of RC2a to put onto my Thinkpad x40 a last week and today I just ran pkg refresh and pkg image-update to get the release version on the laptop. The IPS (Image Packet System) seems to be a fantastically nice addition to Solaris - my laptop is currently sucking down Open Office using the command pkg install openoffice. It uses a ZFS root file system to make a easy roll back from badly installed packages. Sticking ZFS and live upgrade style bits together with a package management system makes a huge amount of sense - I have hosed enough systems by ignoring warnings about incompatible packages now I can ignore the warnings and have a get out of jail free option In addition to the built in OpenSolaris IPS repository Blastwave.org and Sunfreeware both have IPS repos. A list of any more that pop up will hopefully be found on the new OpenSolaris.com (not .org) forums.

The RC2a install was a fairly painless procedure - though as this laptop also has Ubuntu and Windows on I had to make some use of Gparted to move partitions around so that the Solaris partition was the first primary this was to work around 6690194. Booting into Ubuntu to create the partition using Linux's fdisk and was enough to convince the OpenSolaris installer it could use the partition. Power Management for my Pentium M does not appear to work out of the box I'm not sure at the moment if this is because it is not supported or because OpenSolaris includes no power management utilities that I have located. This makes is a little less useful as a full time laptop OS than I would like Ubuntu for example will drop my 1.5Ghz CPU to 800Mhz when it is not in use - better for battery life and for my leg skin if the laptop happens to be sitting there. Suspend resume is not there yet. Compwiz fancy effects don't work on my puny graphics card either! (boo! Hiss!)

Since I started writing this post my network connection has flaked out and my OpenOffice download has failed (I appear to be connected to the Internet by a bit of wet string these days) .
The beadm utility that is used to manage ZFS boot environment allows you to view the snapshots that are taken before the upgrade was started - I misread this the first time and though that the snapshots where what was upgraded and stupidly unmounted and destroyed the snapshots thinking they where of no use now that the upgrade had failed. In fact they are a snapshot of the untouched system and would be useful if the upgrade failing left you with an unusable system - as I was just installing Open Office I hope I will be ok. But the lesson to take from that would be to re-read things before using any destroy commands!


I'm going to download todays OpenSolaris Live CD as well and stick it on my desktop to see what the experience is like adding it to a system that already has a Nevada install on - hopefully they can be persuaded to co-exist peacefully - at least until I am prepared to move the system entirely to OpenSolaris.



Wednesday, March 26, 2008

The VMs are taking over!


We have a slight issue with abuse of virtualization in this house.
Hosts you can't see as they don't advertise any services the Mac is aware off or are on other subnets include:

Under xVM on Solaris:
centy - cent OS 
fariycake - XP
cupcake - XP

Under VMware Fusion on the Mac:
debs - Debian

VirtualBox on the Mac:
MacBunty - Ubuntu 7.10
Haiku - BeOS clone

Parallels on the Mac
React -  ReactOS windows clone
Hank - XP 

What is more amazing is that I actually find a use for most of them at some point or other. Ok react OS and Haiku are more curiosity than anything else but because of the huge number of virtualization options I have they to can find a home for them. 

Now If I can just start to get rid of the boxes of obsolete hardware cluttering up the room I would be set.

Wednesday, February 27, 2008

CentOS 5 domU out of thin air

UPDATE: As Matt pointed out it's DomU not Dom0!

I finally got around to working out how to pull a CentOS install out of thin air without messing about with out of date images from jailtime.org and fiddling about trying to find xen aware kernels to boot (harder than it sounds when you only have one machine of each type of architecture/OS and don't want to dual boot)

root@frank xVM $ virt-install -n centy -r 512 --vcpus=1 --nographics --os-type=linux -p -f /dev/zvol/dsk/tank/xVM/centy -l http://www.mirrorservice.org/sites/mirror.centos.org/5.1/os/x86_64 -d

once its up it will drop you back to the shell prompt and tell you to reconnect for the domain console.

Just do

root@frank
xm console centy

to get a console connection and run through the normal install wizard from there.

run through install procedure as normal pulling everything down across the internet - it used to be much slower doing this when I used to install redhat across an ISDN connection - thank you broadband.

Solaris Server Setup Notes

Some notes from my solaris server setup - this has post has been sitting half drafted for a while while I tracked down an odd CIFS server and NFS speed issue on my network shares. Turned out to be due to cat5e cables getting trapped in my door and ending up at about Cat2.5 standard. (Don't run cat5 under/over three doors and expect to still be cat5 at the other end!) This weekend we might finally have to get round to running my network ports with trunking.

As I mentioned before I had hit memory remap issues with the mainboard I was using in my home server. Before Christmas I had ordered a new one (ASUS-P5B-VM) but never had the time to fit it. Yesterday I finally found the time and today I'm reinstalling the system - I've decided to just stick to the two 500GB sata drives I had in already but to loose the single 2.5 sata I was booting from.
First thing I had to do was enable the memory remap feature in the BIOS to allow the 64 bit OS to address all the memory.
I was going to use the gui to install but it didn't appear to give me enough control over reconfiguring my Solaris slices so I used a text console down the serial line.
As I mostly access the box down the serial line I also edited /boot/grub/menu.lst and uncommitted
serial --unit=0 --speed=9600
terminal serial
to allow me to select the boot options from grub on the serial line as well.

The new build detects my integrated network cards as an rge device which is nice as the old mainboard didn't. It's also a not a legacy driver so should be possible to be used with vlans or with xVM - which is nice as I now have three network cards in this machine.

bash-3.2# dladm show-link e1000g0 type: non-vlan mtu: 1500 device: e1000g0 rge0 type: non-vlan mtu: 1500 device: rge0 elxl0 type: legacy mtu: 1500 device: elxl0

All my storage was on my zfs file systems so I had to import using the -f flag like so:


bash-3.2# zpool import
pool: tank
id: 15184786189135037151
state: ONLINE
status: The pool was last accessed by another system. action:
The pool can be imported using its name or numeric identifier and
the '-f' flag. see: http://www.sun.com/msg/ZFS-8000-EY config:
tank ONLINE
mirror ONLINE c2d0s7 ONLINE c1d0s7 ONLINE

bash-3.2# zfs list
no datasets available

bash-3.2# zpool import -f 15184786189135037151


root@frank bin $ zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank 264G 177G 21K /tank
tank/fs 224G 177G 22K /tank/fs
tank/fs/downloads 195G 177G 195G /tank/fs/downloads
tank/fs/home 20.4G 177G 156M /export/home
tank/fs/home/burt 20.3G 177G 11.8G /export/home/burt
tank/fs/home/burt@16-oct-2007 8.44G - 8.61G -
tank/fs/home/burt/groupWork 11.6M 177G 7.25M /export/home/burt/groupWork
tank/fs/home/burt/groupWork@17-oct-2007 4.15M - 4.15M -
tank/fs/home/burt/groupWork@28-nov-2007 160K - 4.86M -
tank/fs/pushy 1.33G 177G 1.33G /tank/fs/pushy
tank/fs/xVM 7.19G 177G 7.19G /tank/fs/xVM
tank/xVM 40.1G 177G 18K /tank/xVM
tank/xVM/bunty 20G 197G 16K -
tank/xVM/cupcake 3.24G 194G 2.70G -
tank/xVM/cupcake@installed 545M - 2.67G -
tank/xVM/fairycake 140M 177G 2.67G -
root@frank bin $


and my home dir, media, xVM machines, uni groupwork, are all back including mountpoints - all sitting happily onto of the mirror.

recreate my group and user and set the passwd:
bash-3.2# groupadd -g 501 burt
bash-3.2# useradd -u 501 -g burt -m -d /export/home/burt burt
bash-3.2# passwd burt

I figure I may as well install blastwave now as I usually end up wanting something from there at some point.

bash-3.2# pkgadd -d http://www.blastwave.org/pkg_get.pkg

edit /opt/csw/etc/pkg-get.conf to add a local mirror then get wget

bash-3.2# /opt/csw/bin/pkg-get -i wget

at that point you can install things from blastwave.org, It's not as good as apt-get but it is still dam useful if your looking for lots of utils and don't want to have to compile all from source.
Packages are installed in /opt/csw/bin so your PATH will need editing to make use of them.

after that All I needed to do was edit /boot/grub/menu.lst to select my preferred boot option of an xVM xen hypervisor so I'm in a dom0 (I have a few domU virtulised domains running as well which I use for testing)

I'ts worth noting at this point that if you use live upgrade later the /boot/grub/menu.list file only exits on your first Boot Environment (BE).

root@frank bin $ lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
build80 yes no no yes -
build81 yes yes yes no -

root@frank bin $ ls /boot/grub/menu.lst
/boot/grub/menu.lst: No such file or directory

As you can see I'm booted into build81 at the moment but menu.lst is not where you would expect.
If I mount the BE named build80 then I will find menu.lst on that partition.

root@frank bin $ lumount build80
/.alt.build80

root@frank bin $ ls /.alt.build80/boot/grub/menu.lst
/.alt.build80/boot/grub/menu.lst

So if you install a second BE later and cant find /boot/grub/menu.lst to edit, use lumount to mount it and edit.

This is why you shouldn't mess with you boot order in the BIOS when using live upgrade, even if you are using multiple disks.

Sharing is easy.

root@frank bin $ zfs set sharesmb=on tank/fs/downloads

for cifs shares

root@frank bin $ zfs set sharenfs=on tank/fs/downloads

for nfs shares.

Thats a brief overview of my server it has other stuff running on it - I'm attempting to get the mediatomb upnp server compiled but so far can only get it to compile without libmagic and it fails to correctly identify video media files when run - making it fairly useless at the moment.




Friday, January 11, 2008

cheap mac mini

Been a while since I posted - I've been snowed under with course work and then christmas so haven't been near much more than my laptops - which I try not to break to much as I need them to work.

I stumbled across an unloved 1.66 Core Duo mac mini in the bargain bin of a PCworld. It was missing a power supply and remote and was a base spec with 512mb/70gb with a cdrw/dvd rom drive, it is also a bit yellow - but was going for £200. I immediately decided against buying it as I already have to many computers. A couple of days later I was back buying the thing - my self control is useless. A PSU cost me £30 from play.com and 2gb of ram cost £32 from crucial. Someone supplied me with a 1.83 CoreDuo so that got put in at the same time.

I installed the last licence of Leopard from my families 5 pack of leopard licences. Leopard comes with front row 2.0. A much improved Front Row interface with the added bonus of being able to use the Saphire plugin to make browsing media better. I installed Perian and flip4mac QuickTime components to allow Front Row to play video encoded with pretty much any codec.

Next I need to hook it up to my nfs shares on my Solaris box and it can browse all of my media.

The really nice thing about using front row 2 is that it can connect to other machines in the house to read from itunes collections (like an AppleTV does) means that I don't have to sync my itunes library to the Mini.

I have a script that I'm working on to automatically rip DVDs on insertion using handbrake cli but its still a bit rough round the edges.