============================
YUBUNTU - Bootable usb image 
============================

This file should be part of a folder containing also image files (*.img)
of functional linux/ubuntu systems and the corresponding md5sum.
Below are the main steps to create a live usb of ubuntu with a functional installation of
yade and paraview, out of the box.

# Yubuntu130214 (deprecated) is based on ubuntu 14.04 with XFCE desktop environment
* USERNAME: yade-usb (the session should start automatically)
* PASSWORD: yade1404

# YKubuntu16 (recommended) is based on ubuntu 16.04 with both Plasma (KDE) and Unity desktop environments
Download and unzip to get a proper *.img.
* USERNAME: yubuntu16
* PASSWORD: yubuntu16

YKubuntu16 is also also available as virtual drives (*.vdi/vdmk/ova) to be mounted with e.g. VirtualBox
(tested on linux only, but should work on another OS)

Pay attention to keyboard layout indicator on the login screen (if you need to change it
while logged on, just log out, switch layout, and login again).

==================================
CREATING A LIVE USB FROM THE IMAGE
====
1. Download the *.img
====
2.WARNING, READ THIS TWICE: This step will at least erase everything on the USB, and if the sdX part
is wrong it can format your hard drive completely, leaving the computer in unfonctional state. Think
twice before hitting "return".
___ 
In linux:
#Command line:
run the following command to burn the image on a usb stick (minimum 6GB).
Replace [version] by the relevant number and
sdX by the the usb disk:
	 sudo dd if=/path/to/yubuntu[version].img of=/dev/sdX bs=64K

#Graphical tool:
'gnome-disks' can be used to "restore" the image onto a physical usb stick
__
In MS Windows:
A free graphical software can be used to create a bootable yubuntu usb-key under windows : Win32DiskImager (http://sourceforge.net/projects/win32diskimager/). Depending on your Windows version, you may need to launch it as system administrator (via right-clic on the executable file). Select the img file, the letter corresponding to your usb-key then press the "Write" button. WARNING : double check that the letter matches your usb-key, otherwise it will overwrite an other drive and you could expericence loss of data.
__
At this point the usb stick can be used. Depending on your computer brand, you will probably need to press a special key at your computer start-up to boot over the usb key (a list can be found at http://transformingexams.com/files/Wk-Common_One_Time_Boot_Keys_by_Manufacturer_for_Intel_Windows_Hardware.pdf). Power off your computer, plug the usb-key, power on and repeatedly press the boot-key. A xubuntu session should start as soon as the boot sequence is done appropriately.

====
3. WARNING(2): Again, using GParted is dangerous if you don't know what you are doing

There is only ~500MB of free space on the initial partition. You may want to increase it, using
the additional space left on the USB. This can be done with GParted.
Windows user will need a live CD/USB in order to use this tool (http://gparted.org).
-Plug the USB and start GParted (note, if the "dd" command above has just been executed, better unplug/replug
before starting GParted)
- If the USB has more than 8GB you may want to resize sdX1 first, extending it to include the unallocated space. 
- Increase the size of sdX5 to include the unallocated part of sdX1. 
==================================


==================================
REVERSE OPERATION (for the record)
====
Creating a new *.img file to clone the USB after some changes is possible
(NOTE: simple copy/paste will not work).
This is useful for distributing an updated version of yade or to include
additional softwares by default, typically.
The command is as follows:
	sudo dd if=/dev/sdX of=/path/to/yubuntu[NEW].img bs=1M count=5000 iflag=fullblock
where (bs x count) must contain at least the swap and the sdX1 partition. If sdX1 is large it can be first
shrinked to a reasonable value on the source /dev/sdX (with GParted for instance).

==================================
Original image and instructions by François Kneib, 2015 (francois.kneib|A|irtstea.fr)
Small updates by Bruno Chareyre (bruno.chareyre|A|grenoble.fr)
