Pocket ISR HOWTO

Hardware needed

  • USB flash drives have given us trouble with latency performance. In the future, performance may improve, but right now USB flash drives (the keychain kind) are not suitable for Pocket ISR. (The next generation of solid state hard drives should have this fixed.)
  • USB hard disk drives are larger and give us the kind of performance we expect from a disk.
  • Good quality high-performance USB drives are available from Pocketec, http://www.pocketec.net/
  • Obviously, this requires USB 2.0 support on the host computer. Make sure you're plugging into a USB 2.0 port and not into a slow hub (like those built into some monitors or keyboards)
  • In theory this image will work with devices sized 4GB and larger (if you're using a hard drive it is almost surely larger than 4GB). Also, ISR won't work well unless you have at least as much disk cache available needed to store a fully cached/hoarded parcel (so usually this means, at least 8GB free space is needed).

Installing the Pocket-ISR image onto your disk drive

(note: operations on /dev/sdb such as dd and gparted will most likely need root privileges, either in a root shell or with sudo)

  • fetch image pocket-isr-0.9.3-hardy.img from web and decompress it with unlzma
  • dd if=pocket-isr-0.9.2-hardy.img of=/dev/sdb bs=1M (replace sdb with the device for your USB drive -- all data on that drive will be lost)
    • note, be very careful when selecting the output device in of=..., make sure you aren't overwriting your internal hard drive or something else important!
  • resize with gparted:
    • the third partition (sdb3 if the device is sdb) is where ISR cache data is stored. On the image provided we have made that partition small, to reduce download size, and so that the partition can be expanded to fit the remainder of your disk (whether your disk is 10GB or 500GB, you'll want to maximize the size of this third partition.
    • to do this we'll use gparted, a very powerful GUI partition/filesystem manipulation program.
      • run gparted /dev/sdb (as usual replace sdb with your device)
      • select the third partition (sdb3, with mountpoint /mnt, with label "ISR data") and right-click
      • choose move/resize from the menu
      • click on the right-edge of the partition and drag it all the way to the end of your disk (this way we will adjust the image to fit nicely onto whatever size device you are using)
      • apply the changes (be advised that this will take a few minutes)
  • You're ready to go! Boot off of your new USB-bootable Pocket ISR system!
  • Optional: (after booting into the new system) set ISR username (if known) in ~/.openisrrc

Upgrading the version of ISR on the disk, and generating a new image for distribution

(note: once again, operations on /dev/sdb such as dd and gparted will most likely need root privileges, either in a root shell or with sudo)

  • boot pocket-ISR system
  • can wait for the ubuntu updater to present updates
    • or use apt-get update && apt-get install openisr
  • remove cache data from /media/disk/isr-data (we don't want to make the image larger)
  • shut down system and boot non-USB based linux system
  • run gparted /dev/sdb (excellent GUI partition software. CLI parted may or may not work correctly)
    • this is essentially the inverse from above, we will take the third "ISR data" partition and reduce it to a minimal size, to reduce the size of the image and so that it can be expanded to fit any device >=4GB.
    • so right click on the "ISR data" partition
    • resize it to the smallest it can be
    • apply the changes
  • now your /dev/sdb is ready to be 'imaged': dd if=/dev/sdb of=pocket-isr-0.x.y.img bs=1M count=3072 (set a version number in the filename)
  • now that image can be used with the instructions above to install Pocket ISR.

Notes

  • This was originally done with gparted 0.3.6. Older versions should work but may not work as well. (ext2 resizing isn't exactly new, but gparted has improved a lot since older versions)

Useful tips for future work

  • The .isr directory needs to be on an ext2 or ext3 filesystem. (Or, in other words, it cannot be on the "casper-rw" filesystem that the ubuntu live image uses, because it does some loop/unionfs type stuff which doesn't get along with nexus.) This is why we make a seperate partition for .isr data. (Also this is useful because that gives us something easy to resize to fit various sized devices)