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

1 comment:

gnickers said...

While this works fine, because it is a CD image there is no persistence, changes are not preserved between sessions. Once you shut down the machine all changes are lost.