Showing posts with label Koha. Show all posts
Showing posts with label Koha. Show all posts

Thursday, August 12, 2010

The Koha Laptop Project

The idea is to build a portable 'server' that i can take to class to demo stuff and to bring to small labs so students can use it like a server. How well the second idea works out remains to be seen. The first step was to find a laptop that works with Linux and is cheap but powerful enough.

First attempt involved an HP dv6000 but i could never get the wireless to work. So that went to the flea market. I was tempted to use the dell D400 in the kitchen but it is underpowered for a server, fine as a firefox platform. I checked dell's canadian site but couldn't find any with Ubuntu anymore so i looked at the list of dell machines known to run linux.

The flea market yielded a very cheap Dell Inspiron 6400. Cheap because there is no battery, the Vista OS wouldn't boot, and it was missing an ALT key but those are not needed.

The machine is decently powered with 2 gig ram, 120 gig hard drive and a P4 duo core cpu. The seller told me it had intel pro wireless so it seemed a good choice.

I installed 9 but the wireless (the dreaded broadcomm 43xx - the seller was wrong) did not work so i upgraded to version 10 and it was able to see my WAP's.

Next - setup Koha

Sunday, July 4, 2010

Koha on the HP 6000

This morning i decided as an experiment to change the old windows xp laptop, an hp 6000 into a dual-boot machine with one half being linux running the koha library system. The laptop sits in the corner unused 90% of the time anyway. I no longer have any interest in windows, xp is useful occasionally for legacy applications but using vista or vista 2, er windows 7 would be huge steps backward in functionality and usability from my macpro labtop or the ubunutu laptop.

The first step was to divide the hard drive into a windows NTFS partition and an Linux ext3 partition. There are commercial programs to do this, i used Partition Magic for years and found it a good, reliable application but it's not installed and the version i own is old. So we download a bootable Gparted cd image and boot it from the optical drive.

The Gparted live CD contains a ultra minimal Linux environment, complete with a sparse GUI. The gparted tool runs and shows you the existing hard drive(s) and their partitions. The first step is to shrink the existing NTFS partition to 60 gig. Plenty of space for XP as I'm not likely to add any new windows apps. Are there new windows apps? Name a 'killer' application that you would purchase windows for. No one buys a OS to run an OS, it's a platform to run applications that you use to do things. The OS is an enabler that should just work. I can't think of anything i want to run on windows besides the occasional use of Microsoft office for work.

Anything i used to do on windows i now do in Linux, at a lot less cost. I bought DOS 2.2, 3.0, 4, 5, 6.22 etc and Windows 2.11, 3.0, 3.11, 95,98,2000, xp, vista and many, many applications over the years. The only software purchases i've done lately are OSX 10.3, 10.4, 10.5, 10.6 that came with various macs, and iLife/iWork that did not (and some small online purchases from app store, and web sites like Tversity).

So now about 90% of the things i do are done in open source applications or on a mac. The last reason for using windows is that workplaces are still windows-centric. One would think Microsoft would concentrate on making those things work better (think Sharepoint) instead of trying to dominate the 'youth market' with zune, xin?, xbox etc. It's like your dad trying to be cool by growing a ponytail and wearing a Hawaiian shirt...let's face it, Windows is your Dad's operating system and Microsoft is the Dad 'n Lad brand of OS, and no stupid marketing campaign can change that fact so Microsoft - stop trying to be cool and accept you are a middle aged geezer in a white shirt and tie who works in big government and industry.


Anyway, now that i think about it why do i need a windows laptop anyway? The machine is too slow to run Vista (1.8 ghz dual core, 2 gig of ram) acceptably and there is no windows programs i really need on a laptop. So we decide to go the whole hog and boot up with the Koha Live CD and install, using the entire 120gig hd and wiping out Windows. Bye bye. We are now down to one lonely windows desktop which will probably go this year.

The install goes fine, and it picks up the wired connection and offers to install the proprietary drivers for the broadcom wireless and nvidia graphics. Next we want to upgrade from 9 to 10.4 but that does a fair bit of downloading so to save the internet bills we might hump the machine to school tomorrow. This would give us a fairly decent linux box with a fully functioning version of Koha. Sweet. There are a ton of apps on the dual xeon box so we want those too! But for now we grab the ubuntu-resticted-extras from the synaptic package manager. At a download rate of 1003kb/sec this does not take long.

Tuesday, June 1, 2010

USB to a Disk Image

Everyone talks about burning a disk image to a USB but i want to make a disk image OF a USB. My first attempt was winimage portable but no joy. Next we download the latest version of winimage and install it on the HP laptop. Here are the steps we took

  1. Select Disk, Use Removable Disk E: which is our usb stick.
  2. Select, Disk, Creating Virtual Disk Image from physical drive
  3. The dialog box displays Disk 1: 7,831,552 kb Kingston DataTraveller 2.0
  4. Select the Kingston USB entry and choose the create Fixed Sized Virtual Hard Disk
  5. Click OK
  6. We choose a save location and name it koha_usb

The question now is what format - there is .VHD (virtual hard disk) which is a windows format, of little interest to us, and .IMA which is a generic image format, and .VDMK which is a VMware image. Since the lab computers have VMWARE player installed the VDMK may be useful. We had problems trying to use VMplayer several terms ago but maybe we give it a second chance. I'd like to have a format that can then be burned to a USB stick. MagicISO can convert ima files to ISO so we decide to make 2 images, an IMA to be converted to ISO and a VDMK. We start the VDMK imaging process, it takes about 7 minutes. Would be useful if it had a virtualbox image option.

Now that we have images we need to:

- test with VMware player (copy images to 9762 on S: and see if can run)
- convert IMA to ISO and burn ISO to USB and test booting the USB

We install and run MagicISO -the free version is limited to 300mb images so this is no good. Let's test it out anyway - it finds the koha_usb.ima image ok. but can't open it - complaining it is not an image file.

Let's try vmware - we download from their site after filling in one of those annoying marketing forms for registration (we select the first choice on all the menus so the data is garbage anyway)

Ok we got the download - let's install. We then run VMware player and select Open a Virtual Machine but it wants a .VMX file and does not see the VDMK image. We can't create a machine as it wants an ISO file.

Ok the other option is to make an ISO out of the libliveCD and then run the ISO as a virtual machine. Ok so now we have kohalivecd.iso on the S: drive in the 9762 folder. Virtualbox (v 3.16) is installed so we:

  1. Select start, programs, Sun Virtualbox, Virtualbox
  2. Click NEW, NEXT
  3. Enter KohaLive in the Name textbox
  4. Select Linux as the Operating System and Ubuntu as the version
  5. Click Next
  6. Set the Memory Size slider to 1024
  7. Click NEXT
  8. Untick the Boot Hard Disk checkbox
  9. Click NEXT, CONTINUE and FINISH

Now we have to start up the empty VM and let it know to use our ISO file.

  1. Click START and then click OK
  2. Click Devices, CD/DVD Devices, More CD/DVD Images
  3. Click ADD
  4. Browse to S:\local\courses\mlis\9762
  5. Select the KOHAliveCD.iso file and click OPEN
  6. Click SELECT
  7. Select Machine, Reset
  8. Click on the window and click CAPTURE

This positions your mouse and keyboard into the guest virtual machine operating system. To return to the windows host operating system press the right CTRL key.

Success! The liveCD boots ok. To shut down click the Ubuntu power icon and select shutdown. When you exit virtualbox be sure to SAVE the Machine State so that changes are preserved.

We did the following:

  1. Select System, Admin, Software Sources
  2. Select other Software
  3. Select karmic partner
  4. Select System, Administration, Synaptic
  5. Search for Restricted
  6. Mark - Select for Installation
  7. Click Apply
It was good the VM picked up the network adapter and USB devices automatically. Virtualbox has come a long way since the early days.

Now we need to shut down the virtual machine and SAVE it's state and then restart to see if our changes are preserved.

More 2morO

Sunday, April 25, 2010

Koha on USB Stick II

The goal here was to create a persistent bootable USB version of Ubuntu with Koha, dspace etc to use for class. Students would work on their stick each week in the lab, adding software and configuring services. There are some missing bits - like PHP so we have to do some work later to get a full lamp stack running so we can install Wordpress and Scriblio etc.

Format the USB device

  1. Boot with the CD (ubuntu 9.10)
  2. Insert your USB stick
  3. Select the stick and right-click
  4. Select Format from the menu
  5. Select Compatible with All Systems (FAT) from the Type: pulldown menu
  6. Type in your username, ie (mchau99) in the Name: text box
  7. Click FORMAT

This process erases everything on the USB stick and creates a FAT32 partition. The process can be done on a Windows computer in advance but we might as well do it here. We re-format the stick to ensure it is FAT32 and not FAT and to get rid of any proprietary software included by the manufacturer. Your name should be limited to 8 characters or less with no spaces or punctuation.

Install Ubuntu

  1. Select System, Administration, USB Startup Disk Creator
  2. Under Disk to Use select your USB stick
  3. Select the Stored in Reserved Extra Space option
  4. Adjust the How Much slider to 2 gig for a 4 gig stick and 4 gig for a larger stick
  5. Click MAKE STARTUP DISK
  6. Click QUIT when the Installation is Complete message is displayed

Be careful to select your stick and not the internal hard disk! Your USB Stick will be called something like /dev/sdb1/mchau99. This process is used to create a caspar-rw file which will be the 'persistence' file that stores changes between boots. The 4 gig limitation is not from Ubuntu but a constraint of the Windows FAT32 file system. If you were using a large portable hard disk and wanted a larger persistence file it can be done but it requires a manual installation.

Boot From the Stick

  1. Click the Ubuntu menu item in the top right corner
  2. Select Restart from the menu
  3. Remove the CD-ROM disc from the tray when it opens
  4. Press ENTER

The system is now booted from the USB Stick. You can test the persistence by installing something - i first installed the Google toolbar in Firefox and used the synaptic package manager to install Brasero, sbackup, filezilla, and the MySQL Query browser. The query browser was able to connect to the mySQL server running on localhost with a username of root and a password of library. I rebooted the system and the changes were there, so the persistence works!

Backup

So how will students back up their weekly or daily work? With the portable USB Sticks a backup program is included - you back up daily or weekly and if your stick is lost, damaged or just screwed up - you reinstall the portable app environment and restore from the backup. This also makes it possible to have multiple sticks in use.

With the Ubuntu stick it is not so easy - there is no backup option on a menu. You need to be able to create a backup than can be fully restored. I can think of several possibilities:

Option 1 - use sbackup to create a backup of files. Sbackup can backup to local drives or to remote hosts using ssh or sftp. The local host option worked well but then you need a second stick to backup to and until we test the restore we cannot guarantee everything (such as the koha changes) are backed up. The other problem is that although i was able to browse the windows shares and connect to some, i could not connect to //files3 or //files when the user's local files (U: drive) are stored, so you cannot backup to your space. I was able to connect to the personal web space on panther but since that is only 10mb it is quite useless. Backing up to a file storage site via ssh or sftp would be preferable.

So option 1 can work but has some questions.

Option 2

An easier option for the student would be the ability to make a complete image of the USB stick that could be re-created. For example an ISO file. While there are lots of utilities to burn disk images like ISO or dmg to a CD/USB/HD, it is hard to find any information on creating an ISO from a USB stick. In fact, programs like NERO that can create ISO's won't even list a USB stick in their source menu.

Next Steps:

Run the Koha Install and import some MARC records.
Copy the large MARC record files to the S:\local\mlis\courses\9762 for students to use
Test Restore from sbackup with koha changes

Thursday, February 11, 2010

Koha LiveCD

Writing this from Ubuntu running on a USB stick in the lab. Even better, it is running the Koha ILS (and Dspace, and OAI harvester and dbWiz - things i have wanted to use in class but could not because of the IT limitations).

Thanks to the great work of Dr. ARD Prasad (ard@drtc.isibang.ac.in) there is now a LiveCD of Koha 3.0 available. Goto http://sf.net/projects/liblivecd and download the .iso and burn the image to a CD.

You can run it from the CD and login to the Admin module or just use the OPAC (of course, until you set it up it has nothing...)

OPAC is http://localhost/opac
Admin is http://localhost/kohaadmin

the admin username is kohaadmin and the password is library. I was able to set up Koha in a few minutes and then use the built-in client to make a Z39.50 connection to the Library of Congress server and do some copy cataloging. With some books in the OPAC i was able to do some searching.

Since the OS is Ubuntu 9.10 i decided to make a bootable USB version, the idea being i could then save settings, tweak the install and add some more programs.

In Ubuntu select System, Admin, USB Startup and select your stick. I first tried a USB stick formatted with ext2 filesystem but it did not mount, so i had to reformat the stick as FAT32 so that it was detected. The Install to USB function asks how much space to reserve on the USB stick for persistent data, i select 512mb on a 2 gig stick. The Ubuntu image is about 670mb so i figured this would leave enough room.

The entire process takes about 4 minutes and when you restart the USB boots into Ubuntu from where you can setup and run Koha. Just launch Firefox all the information you need is displayed. Sweet! Many thanks to Mr. Prasad for this. I have some screenshots of the Koha setup but i need to work though it a couple of times to understand all the options and then write it up for the class lab.

There is another Koha Live CD done in Aug 2009 available from Mizstik projects at http://mizstik.com/projects/koha-livecd/ but i have not tried it. Maybe a comparison should be done. I notice the same site has a mod for Openbiblio called the Home Edition. Will have to take a look, wish someone would take over that project and get it going again...