Showing posts with label usb. Show all posts
Showing posts with label usb. Show all posts

Monday, January 24, 2011

Windows 7 and external Sata drives

So tonight i finished the install of essential apps on Windows 7 and disconnected the old xp machine. Since all the work files are on the external western digital 1 terabyte external i thought it would be simple to unplug from xp and plug into windows7. All the other computers (mac/linux) have external e-sata drives (so much faster than slow USB), so what could go wrong.

Fire up windows 7 and it doesn't mount the external drive. Go into Administrative Tools, Drive Management and it still can't even find the drive. Weird. After wasting a lot of time poking around windows and looking on the internet it looks like lots of people have similar problems. This boggles the mind. Just to make sure i haul out a second e-sata hard drive, a LaCie this time. Same problem - not mounted. I booted windows with both drives just to be sure.

I goto western digital's site and they have a firmware update and some wd drive management software. Yikes, if i install the firmware what if it bricks the drive? Especially since the backup drives got cleaned and moved to the living room to connect to the Oppo BDP-93 (which btw had no problem mounting the drive, Steve Ballmer). Best to back up the course files.

So i plug the drive into the USB port (all my externals are 4 interface drives, usb/e-sata/fw400/fw800) and windows recognizes it and starts seaching it for music and other files. I put a stop to that right away. Now we start up the copy operation and wait and wait and wait and wait and wait...i said USB was slow, right?

Might as well go and see if the HDCD burning problem with Brasero is fixed....i suspect optical drive has gone bad...i see i/o errors in the log...

To Be Continued

Ok firmware update worked ok but drive still not recognized when plugged into e-sata
Next we install the WD drive manager setup software - installs but no menu item??? and it is not a control panel...

We decide on a low tech solution, grab and old firewire pci card from the box 'o parts and put that it.....OK windows recognizes the card. Let's shut down the external and plug in into there..ok it immediately installs the 'device driver software' and the stupid auto search for content comes up. Gee, in the days of mega terabyte externals maybe the default should be NO auto....

And the drive is there. So let's see - a modern e-sata interface that should be plug and play does not work in Windows 7 but an ancient technology going back to early macs works automatically. Lesson - don't discard your old firewire stuff yet...

PS

Multi-tasking in windows still sucks badly. Doing any kind of large scale file operations ties up the computer completely until the task is done. I am so not used to this. Linux and OSX are so much better at multi-tasking. People focus on whether the OS is 'faster' and forget about all the time you spend waiting for windows. The more time i spend in Windows 7 the less i like it. Sure it is prettier than XP and is not as absolutely annoying as Vista but in reality it is no big improvement.

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

Monday, April 19, 2010

Using LAMP for Course Assignments

We used USB sticks again this year for student projects. The advantage is they allow the student to work anywhere, anytime and to get experience in systems work - installing, maintaining, and troubleshooting. The disadvantages are:

  • some sticks are sloooooooow
  • some sticks are not very durable
  • some people do not make backups

You get what you pay for, so saving $4 on something that contains your term's work is not a good idea! Buy the best, biggest and fastest stick you can afford or even better yet - buy a USB external hard disk. Not necessarily too much faster but definitely more durable. Also, there are 2 kinds of people, those who make backups and those who wish they had...I believe they now call these things 'learning experiences'.

Actually, the whole thing worked ok - some difficulties with old, slow or unreliable sticks but overall not bad and we required nothing from the IT people. Students went away with a complete library system with MARC records and a custom dynamic web site - not a bad portfolio to show a prospective employer.

The dynamic web site project had been a stumbling block - how do you get them to turn in a database, some php files, a css file and some images so that you can run it and take a look? You could run a server but central IT takes a dim view of that. You could use a hosting service but then you are paying out of your pocket. The solution was simple:

Students installed xampp or xampplite or wamp on their computer or USB stick and then installed Joomla. They then developed their dynamic web site. When finished they burned the xampp, xampplite or wamp folder to a cd-rom or dvd-rom and handed it in. The student could even test if the burn was done correctly by copying the xampp or xampplite folder to their hard drive, starting the apache and mysql servers, and running a web browser (same procedure as i follow below).

All i had to do was to copy the xampp, xampplite or wamp folder to my c:\ drive and then run the xampp control panel to start the servers and goto http://localhost/joomla to view their creation. (the wamp control panel works as well). The only downside is that it takes a couple of minutes to copy the folder from optical disc to hard drive. But it works and you have a permanent record.

With USB 3.0 now becoming available, i am thinking we can make a requirement that students purchase an 8 gig stick for the course and install Ubuntu on it and then lamp and add Koha, Wordpress, Scriblio, mediawiki, joomla or drupal, phpBB etc and use this as their server throughout the term. The case could be they have been hired to replace the old static web site and ILS with with a new integrated library portal including porting of MARC records.