Difference between revisions of "Live GIS Disc Quick Start for USB"

From OSGeo
Jump to navigation Jump to search
(→‎Ubuntu: update for 6.5)
Line 52: Line 52:
 
The situation is much the same as the above, but the base system has grown to the point where persistence on a 4gb usb stick is not feasible, but should work out of the box on a 8gb usb stick. Actually there is 83mb available for one on a 4gb usb stick, but 150mb is automatically taken up soon after you first boot. It is possible to unpack the mini iso's squashfs as is done in the gisvm/build_chroot scripts and remove a few hundred MB of stuff by hand which you don't need, then repack as a new smaller iso, but that 150mb is still eaten, so you'll have to clear out more than you might think. The min persistence file limit has already been lowered to 256mb for you in this release, and it is not suggested to go any lower.
 
The situation is much the same as the above, but the base system has grown to the point where persistence on a 4gb usb stick is not feasible, but should work out of the box on a 8gb usb stick. Actually there is 83mb available for one on a 4gb usb stick, but 150mb is automatically taken up soon after you first boot. It is possible to unpack the mini iso's squashfs as is done in the gisvm/build_chroot scripts and remove a few hundred MB of stuff by hand which you don't need, then repack as a new smaller iso, but that 150mb is still eaten, so you'll have to clear out more than you might think. The min persistence file limit has already been lowered to 256mb for you in this release, and it is not suggested to go any lower.
  
To find out what that 150mb of first-time boot space is used by, you can mount the usb stick on another linux system, and then inside of it's root dir you'll see a file called "casper-rw" of the same size as the persistence file you created. That's actually an ext2 filesystem-in-a-file, so you can mount it to a dir with "-o loop" as you'd do for a cdrom iso. Inside you will see a file structure mimicing the main one, but only containing files that have changed since the original squash filesystem was made. Examining my first-boot 150mb I saw about 2mb taken up by /home, and the other 148mb taken up by /var. The filelight and 'du -sh' tools are nice for seeing who's the space hog.
+
To find out what that 150mb of first-time boot space is used by, you can mount the usb stick on another linux system, and then inside of it's root dir you'll see a file called "casper-rw" of the same size as the persistence file you created. That's actually an ext2 filesystem-in-a-file, so you can mount it to a dir with "-o loop" as you'd do for a cdrom iso. Inside you will see a file structure mimicking the main one, but only containing files that have changed since the original squash filesystem was made. Examining my first-boot 150mb I saw about 2mb taken up by /home, and the other 148mb taken up by /var. The filelight and 'du -sh' tools are nice for seeing who's the space hog.
  
 
Of the 148mb in /var, 48mb was taken by Postgresql (perhaps it would have paid to vacuum the databases during build time), 28mb by MySQL (created for ushahidi at first boot), and about 66mb by dpkg & apt caches after an 'apt-get upgrade'. The other 6mb or so is taken up by the /var/log files.
 
Of the 148mb in /var, 48mb was taken by Postgresql (perhaps it would have paid to vacuum the databases during build time), 28mb by MySQL (created for ushahidi at first boot), and about 66mb by dpkg & apt caches after an 'apt-get upgrade'. The other 6mb or so is taken up by the /var/log files.

Revision as of 23:19, 24 February 2013

OSGeo-Live can be installed on a USB drive. This will boot faster than the DVD.

Requirements

Build from OSGeo Live DVD or USB

  • Run an OSGeo-Live DVD
  • Download the mini iso to your computer's hard drive.
  • Insert USB
  • Start the Startup Disk Creator tool:
  • XFCE (e.g. OSGeo Live)
Applications → System → Startup Disk Creator
  • Browse to select the mini iso from your hard drive.
    • Alternate method to launch from command line and already select the target iso
usb-creator-gtk -i osgeo-live-mini-5.0.iso 
  • Then choose your USB drive from the list, select "Documents stored in extra space" and set the size slider to its maximum, and click "Make startup disk". This tool wants your USB drive to start with an empty FAT32 partition.
  • Restart your PC and set your BIOS or Boot Menu to boot from the USB device, save your changes and reboot

Setting the USB drive disk label

<PROCEED WITH CAUTION - IF YOU ARE NOT FAMILAIR WITH PARTITION TOOLS QUIT THIS NOW - YOU COULD DESTROY ALL THE DATA ON YOUR HARD DRIVE IF YOU PRESS THE WRONG BUTTONS>

This assumes that there is already an empty 4gb vfat (0C) partition on the USB drive. The System Disk Creator tool will do this for you if you click the "Erase Disk" button.

note: if doing it manually, the target vFAT partition must have the bootable flag set.

Open a terminal, type "mount" to show the mounted partitions. The USB drive might be mounted to a place like /dev/sdf1. Take note of this.

unmount the USB drive with

umount /media/1E1D-F5ED

(adjust the drive ID to suit)

Then start the Gparted tool from the Applications → Settings menu. From the pull down list of drives in the top right select the one noted above as the USB drive. In the main bar you should see 4000 MB total for a 4gb USB drive. Right click on the partition line and select the option for Label. Change it to "OSGeoLive60" (max 11 chars). Then click the check(tick) mark icon on the top toolbar.

Persistent install with a 4gb USB drive

OSGeo Live 6.0

The USB System Disk Creator tool that comes with Ubuntu 12.04 has a minimum persistent disk size of 1024 megabytes. Since the OSGeo Live iso (mini) takes 3.2gb of the available 3.7gb vFAT partition on a 4gb USB drive, we only have 545 megabytes free and the "Select persistence size" slider remains greyed out. We will have to edit the hardcoded limit down to 256 mb. Note that the persistent space records any change to the base iso, and so fills up rather quickly (about 170mb will be used almost immediately). By only giving it half the recommended free space (545 instead of 1024 mb) you'll need to be judicious in your changes to the base system. For example, installing software updates may eat all the space you have. Note that due to the limitations of the vFAT partition format you are also limited to a maximum persistent size of 4GB. On a 8gb USB drive this will mean that there will be a few hundred MB free on the drive, you can use Applications → System → Gparted to create a new EXT3 or EXT4 partition in the free space to make it usable.

The fix:

edit /usr/lib/python2.7/dist-packages/usbcreator/misc.py and on line 22 change MIN_PERSISTENCE = 1024 to 256. You will have to be the super user to do this, so sudo is needed:
sudo nano /usr/lib/python2.7/dist-packages/usbcreator/misc.py

After that, you can install OSGeo Live 6.0 on a 4GB USB drive, with persistence. In the System Starup Disk tool make sure "Stored in reserved extra space" is selected and slide the slider as far as it will go to the right.

OSGeo Live 6.5

The situation is much the same as the above, but the base system has grown to the point where persistence on a 4gb usb stick is not feasible, but should work out of the box on a 8gb usb stick. Actually there is 83mb available for one on a 4gb usb stick, but 150mb is automatically taken up soon after you first boot. It is possible to unpack the mini iso's squashfs as is done in the gisvm/build_chroot scripts and remove a few hundred MB of stuff by hand which you don't need, then repack as a new smaller iso, but that 150mb is still eaten, so you'll have to clear out more than you might think. The min persistence file limit has already been lowered to 256mb for you in this release, and it is not suggested to go any lower.

To find out what that 150mb of first-time boot space is used by, you can mount the usb stick on another linux system, and then inside of it's root dir you'll see a file called "casper-rw" of the same size as the persistence file you created. That's actually an ext2 filesystem-in-a-file, so you can mount it to a dir with "-o loop" as you'd do for a cdrom iso. Inside you will see a file structure mimicking the main one, but only containing files that have changed since the original squash filesystem was made. Examining my first-boot 150mb I saw about 2mb taken up by /home, and the other 148mb taken up by /var. The filelight and 'du -sh' tools are nice for seeing who's the space hog.

Of the 148mb in /var, 48mb was taken by Postgresql (perhaps it would have paid to vacuum the databases during build time), 28mb by MySQL (created for ushahidi at first boot), and about 66mb by dpkg & apt caches after an 'apt-get upgrade'. The other 6mb or so is taken up by the /var/log files. The good news is that you can recover about half of the space by dropping the databases if you don't need them.

Stay tuned for further refinement in the next release..

Build OSGeo-Live USB from Windows

Either

  1. Boot from a OSGeo-Live or Ubuntu/Xubuntu DVD, and then build a USB using the ubuntu method.

or

Note: this method does not create a persistence space, so the live usb will 'forget' changes or settings you made.
  1. Download an OSGeo-Live ISO
  2. Run the Rufus formatter and bootable USB drive creator
  3. Select device and enable 'Create a bootable disk using:' and select the iso image downloaded above with the button on the right, click Start

Hint: Make sure the computer you want to boot the USB stick on has booting from the USB device enables. If not go into the BIOS change the boot settings, save your changes and reboot.

Note: We have previously had success building with the PenDriveLinux USB Installer, however as of OSGeo-Live 5.5, we have been unable to get it working.

Build OSGeo-Live USB from other Linux

Ubuntu

  • Use the same instructions as building from Live DVD or Live USB, adjustements noted below. Ubuntu version must be the same or newer than the one OSGeo-Live is built with.
    • For OSGeo Live 6.0/6.5 you need Ubuntu 12.04 or newer
    • For OSGeo Live 5.0/5.5 you need Ubuntu 11.04 or newer
    • For OSGeo Live 4.0/4.5 you need Ubuntu 10.04 or newer
  • Gnome: From the main Ubuntu menu select:
System → Administration → Startup Disk Creator
  • Unity: Use Dash to search for and launch Startup Disk Creator
  • Browse to select the mini iso from your hard drive.
    • Alternate method to launch from command line and already select the target iso
usb-creator-gtk -i osgeo-live-mini-5.0.iso 
  • KDE : ?
    • Alternate method to launch from command line and already select the target iso
usb-creator-kde -i osgeo-live-mini-5.0.iso

Debian

Fedora

Alternate method for Mac,Linux or Windows


Set BIOS boot order:

  • Most computers are not set to boot from USB by default.
  • To achieve this, boot your computer, and hit the appropriate key when prompted to go into the BIOS (usually by pressing the <Delete> key or a <Function Key> or similar).
  • Select to boot from the USB device.
  • Note, that for some computers you will need to have the USB inserted into the computer in order to select it.
  • Note also, the USB is often listed under hard drives rather than removable devices.

Run

  • Reboot computer with new BIOS boot order set.
  • You should boot up into an Xubuntu system, with Geospatial applications installed.
  • If you find yourself at a pretty login page simply press return or wait for the countdown to timeout.
  • Try the many applications from the "GeoSpatial" menu.

Known issues:

  • Mac computers will not boot from this USB, please use the LiveDVD

Mac Bootable USB

See Also

For further options, see PenDriveLinux.com