Differences between revisions 1 and 53 (spanning 52 versions)
Revision 1 as of 15:07:23 13-08-2012
Size: 18433
Comment: Local Merge - 'FslDev'
Revision 53 as of 13:55:51 13-10-2020
Size: 22140
Editor: PaulMcCarthy
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 3: Line 4:
We recommend using a UNIX-based computer (such as a Linux PC, Apple or Sun) for carrying out data analysis. However, if this is not available then you can use FSL on a Microsoft Windows computer by running the Linux version of FSL inside a "virtual Linux machine" (a VM), using a freely available program called 'VMware Player' by VMware. This is fairly easy to setup, and we provide basic installation instructions below, but please note that we cannot in general offer further help for the setup and maintenance of the virtual machine itself - we just offer support on the running of FSL within it.

= System Requirements =
 * Windows XP, Vista or 7 (32bit or 64bit)
 * Dual core CPU/ multiple CPU recommended
 * 2GB RAM minimum
 * Minimum 10GB, up to 30GB, of free disc space (VM image expands as necessary up to the 30GB limit)

= Dependencies =
The software package `VMware Player` emulates the core hardware of an x86 machine allowing you to run a second operating system 'in a window'. Virtualisation technology allows the programs running in this VM to achieve speeds approaching that of programs running natively in Windows, as the CPU instruction set doesn't need to be emulated.

The FSL VM (FSLvm) is configured with 1GB of RAM, a virtual hard disk that can grow to 30GB in size, shared (NAT) networking (ie it shares the network connection of your local computer), virtual sound hardware and virtual CD-ROM and floppy drives.

Before you can run the FSL virtual machine, you need to install a Virtual Machine player package. We support the use of version 3.x of VMware's free [[http://www.vmware.com/products/player/|VMware Player]] software. Download the software from VMware's site and install this package by following VMware's instructions. Once it is installed and your computer has been restarted, launch VMware Player to complete initial setup.
We recommend using a UNIX-based computer (such as a Linux PC or Apple OS X) for carrying out data analysis. However FSL can be used on Windows via the Windows Subsystem for Linux (WSL, Windows 10 only, recommended option) or by running the Linux version of FSL inside a "virtual Linux machine" (a VM).

= Windows Subsystem for Linux =
This is the recommended option for using FSL on a Windows computer. Note due to recent changes in WSL2, we have some provisional changes to the existing ( WSL1 ) instructions.

== Installation Video ==
We have created an [[https://www.youtube.com/watch?v=QNp3lyP57rw|installation video]] which gives an overview of the installation procedure for the Windows Subsystem for Linux using Windows 10.

== System Requirements ==
 * Windows 10
 * The Windows Subsystem for Linux (WSL) can be installed by following [[https://docs.microsoft.com/en-us/windows/wsl/install-win10|these instructions]]. WSL build 17101 (February 2018) or newer is required.
 * Dual core CPU (recommended minmum)
 * 4GB RAM minimum (8GB+ recommended)
 * Minimum 10GB, up to 75GB, of free disk space

Note: installation progress may not update in the terminal. If this occurs please be patient, and do not abort the installation.

 1. Follow these steps to install the Ubuntu subsystem in Windows
  * enable WSL using windows PowerShell (need to run the PowerShell app as administrator). Paste this command in and press enter. Follow any prompts given.
  . {{{
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
}}}
  * Restart your computer
  * After restart, open the Microsoft Store and search for Ubuntu 18.04. Install Ubuntu and then Launch it.
  * Sep up a username and password for Ubuntu (only necessary the first time you launch it)

 1. In an Ubuntu shell window enter these commands:
 {{{
 sudo apt update; sudo apt -y upgrade; sudo apt-get install dc python mesa-utils gedit pulseaudio libquadmath0
}}}

 1. use any browser installed on your Windows 10 computer to get the installer script as normal ( from [[http://fsl.fmrib.ox.ac.uk/fsldownloads|here]] ). Download it to your downloads folder.

 1. Install Xming in order to use FSL user interfaces: http://www.straightrunning.com/XmingNotes/. You will need to have XMING running in windows, before the linux GUIs will work. For WSL2 instead use the [[#WSL_2_Changes_.28_provisional_.29|instructions below]].

{{{#!wiki note
When selecting the OS to install on the download page, it is important to choose Ubuntu ( the Linux version installed by WSL ) and ''not'' Windows, or you will be directed to the VM instead of the installer script.
}}}
 1. run downloaded script in Ubuntu shell via
 {{{
 python /mnt/c/Users/<WindowsUserName>/Downloads/fslinstaller.py
}}}
 Say yes to all default install options

 1. In ubuntu shell add
 {{{
 echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
}}}
 For WSL2 instead use the [[#WSL_2_Changes_.28_provisional_.29|instructions below]].
 1. try running fslmaths, fsl, fsleyes
 <<BR>> If fsleyes doesn't start, with a message referring to: `libgtk-x11-2.0.so.0`, then you will need to run:
 {{{
 sudo apt-get install libgtk2.0-0
}}}
 If fslmaths doesn't start, with a message referring to: `libquadmath.so.0`, then you will need to run (in case you didn't install it earlier):
 {{{
 sudo apt-get install libquadmath0
}}}

 1. It might be worth trying
 {{{
 sudo apt-get install firefox
}}}
 to get native browser support. However, you can always just use a web bowser from your windows machine (not within Ubuntu) to view FSL report.html files.

 1. If you want to mount other folders or drives ( e.g USB drives)
 {{{
 sudo mkdir /mnt/<usb>
}}}
 <usb> can be whatever you want to call this new link
 {{{
 sudo mount -t drvfs <Letter of USB drive in Windows or path to some other subfolder> /mnt/<usb>
}}}
 e.g. if your USB drive appears as drive E:
 {{{
 sudo mount -t drvfs E: /mnt/<usb>
}}}
 the mount command will need to be rerun each time you start a new WSL session: the mount is safely unmounted when the last window of a WSL is closed.

== WSL 2 Changes ( provisional ) ==
 1. We currently recommend installing [[https://sourceforge.net/projects/vcxsrv/files/latest/download|VcXsrv]] instead of Xming. When running XLaunch, it is '''critical''' to deselect `Native OpenGL` and select `Disable access control` in the `Extra Settings` panel. XLaunch will need to be running for graphical applications to work.

 1. The .bashrc changes should instead be:

{{{
export DISPLAY=$(ip route | awk '/default via / {print $3; exit}' 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
}}}
 . due to the quoting in the first line, it's easiest to make these changes via a text-editor.

= Virtual Machine =
The VM option requires a freely available program (free for non-commercial use only) called 'VMware Workstation Player' by VMware. This is fairly easy to setup, and we provide basic installation instructions below, but please note that we cannot in general offer further help for the setup and maintenance of the virtual machine itself - we just offer support on the running of FSL within it.

== System Requirements ==
 * Windows 7,8,10
 * Dual core CPU (recommended minmum)
 * 4GB RAM minimum (8GB+ recommended)
 * Minimum 10GB, up to 75GB, of free disk space (VM image expands as necessary up to the 75GB limit, if used)

The FSL VM (FSLvm) is configured with 2GB of RAM, a virtual hard disk that can grow to 75GB in size, shared (NAT) networking (ie it shares the network connection of your local computer), virtual sound hardware and virtual CD/DVD drive.

Before you can run the FSL virtual machine, you need to install a Virtual Machine player package. We support the use of version 12+ of VMware's free* [[http://www.vmware.com/products/player/playerpro-evaluation.html|VMware Workstation Player]] software. Download the software from VMware's site and install this package by following VMware's instructions (or you can look at videos on youtube if you get stuck). Once it is installed and your computer has been restarted, launch VMware Workstation Player to complete initial setup.

{{{#!wiki note
* Workstation Player is free for non-commercial use. Academic users' institution must be a member of the VMWare Academic program to use this software for free.
For details on the licensing arrangements see http://www.vmware.com/products/player/faqs.html
}}}
Line 19: Line 112:
Once VMware Player is installed, download FSLvm from below. The FSLvm is compatible with Windows XP and Windows Vista/7 and is available in two flavours, a 32 bit version for the majority of Windows installations and a 64 bit version for 64 bit Windows Vista/7.

To find out which version you require see this [[http://support.microsoft.com/default.aspx?scid=kb;en-us;827218|Microsoft document]]

||<tableclass="centred" tablestyle="text-align: center;" style="border: none;">[[http://www.fmrib.ox.ac.uk/fsldownloads/FSL_vm5_32.zip|FSLvm [32bit]]]||<style="border: none;">[[http://www.fmrib.ox.ac.uk/fsldownloads/FSL_vm5_64.zip|FSLvm [64bit]]]||
Once VMware Player is installed, download FSLvm from below. The FSLvm is compatible with Windows 7/8 and 10 and is 64 bit, so requires a 64 bit CPU. See http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003945 for information on how to check that your computer will be able to run the FSLvm.
||<tablestyle="&quot; &amp; quot; &amp; amp; quot; &amp; amp; amp; quot; &amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; amp; amp; quot;text-align:center; &amp; amp; amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; quot; &amp; amp; amp; quot; &amp; amp; quot; &amp; quot; &quot;" tableclass="&quot;&amp;quot;&amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;amp;amp;quot;centred&amp;amp;amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;quot;&amp;quot;&quot;"style="&quot; &amp; quot; &amp; amp; quot; &amp; amp; amp; quot; &amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; amp; amp; quot;border:none; &amp; amp; amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; amp; quot; &amp; amp; amp; amp; quot; &amp; amp; amp; quot; &amp; amp; quot; &amp; quot; &quot;">[[https://fsl.fmrib.ox.ac.uk/fsldownloads_registration/|Download FSLVm7_64]] ||


Line 26: Line 119:
To confirm that the FSLvm package has downloaded correctly, download the appropriate MD5 hash file below to the same folder you downloaded the FSLvm to and use [[http://www.md5summer.org/|MD5summer]] to check the files.

||<tableclass="centred" tablestyle="text-align: center;" style="border: none;">[[http://www.fmrib.ox.ac.uk/fsldownloads/md5sums/FSL_vm5_32.zip.md5|FSLvm [32bit] MD5 sum]]||<style="border: none;">[[http://www.fmrib.ox.ac.uk/fsldownloads/md5sums/FSL_vm5_64.zip.md5|FSLvm [64bit] MD5 sum]]||

=== Using MD5summer ===
Run md5summer once as an administrator and choose to associate the `.md5` extension with md5summer. Now double click on the downloaded md5 sum file and wait while md5summer checks the file, a green circle to the left of the file name confirms the file's integrity.
If you want to confirm that the FSLvm package has downloaded correctly please see [[FslInstallation/WindowsSHA|this page]].
Line 34: Line 122:
{{attachment:extract_all_files_vista.jpg|Extract all files|align="right"}}
FSLvm is a fairly minimal install of the CentOS 5 Linux distribution and is provided as a zip file. To install, decompress the downloaded FSLvm by double clicking on the zip file and clicking on `Extract all files` in the resulting Windows Explorer window.

The Windows zip expansion wizard will launch. Extract the files to an appropriate location; VMware Player creates a folder in your `Documents` folder called `Virtual Machines` (`My Virtual Machines` under Windows XP) when run for the first time, which is intended for this purpose. Under Windows XP, be sure to create a folder (eg `fsl_vm5_32` or `fsl_vm5_64` as appropriate) to contain the files if you have more than one VM as the Windows XP zip expansion wizard does not preserve the top level folder of the zip archive.

= VMware Player Usage and Configuration =
Detailed VMware Player application usage instructions are available from the VMware Player menu's `Help` entry.
FSLvm is a fairly minimal install of the CentOS 7 Linux distribution and is provided as a zip file. To install, decompress the downloaded FSLvm by double clicking on the zip file and clicking on `Extract` button in the Windows Explorer toolbar. Choose to extract all files, then choose a location to extract to. By default it will extract to a folder 'FSLVm7_64', remove this from the end of the expansion location so that an unnecessary 'FSLVm7_64' folder is not created.

{{attachment:ExtractVM_10.jpg|Extract all files|width="800"}}

= VMware Workstation Player Usage and Configuration =
Detailed VMware Workstation Player application usage instructions are available from the VMware Player menu's `Help` entry.
Line 42: Line 130:
{{attachment:vmx_file.jpg|VMX file icon|align="right"}}Now that the FSLvm is installed, launch VMware Player from the Start menu and click on the `Open` icon. In the `Open` dialogue, browse to the uncompressed FSLvm folder, `fsl_vm5_32` or `fsl_vm5_64` and double click on the `fsl_vm5_32` or `fsl_vm5_64` file within. {{{#!wiki note
The installation of the FSL package requires an internet connection. Please ensure your computer has a working connection before continuing with the setup procedure.
}}}
Now that the FSLvm is installed, launch VMware Workstation Player from the Start menu and click on the `Open` icon. In the `Open` dialogue, browse to the uncompressed FSLvm folder, `FSLVm7_64.vmware` and double click on the `FSLVm7_64` file within.

{{attachment:OpenVM_10.jpg|Extract all files|width="350"}}
Line 46: Line 139:
The first time FSLvm is started VMware Player will ask if the VM was moved or copied, choose `I copied it` (this sets up the network correctly).

Depending on your Windows computer's hardware, you may also receive additional messages like...
{{{
Cannot connect virtual device floppy0. No corresponding device is available on the host. Would you like an attempt to be made to connect the virtual device every time you power on the virtual machine?
}}}
This means that VMware Player cannot locate a floppy disc drive on your computer. Select `No` and you will not be informed of this again. If, instead, it warns you about device `IDE 1:0` then it is unable to find a CD ROM drive. Again choose `No` to dismiss this warning permanently.

The FSLvm will now boot, a process that will take several minutes, don't worry about the `Failed` messages that appear next to the following items (this is normal behaviour):
 * Mounting local filesystems
 * Mounting HGFS shares
 * Mounting other filesystems

Once the boot process has completed, you will be presented with a graphical login screen (initially a textual login screen will appear - wait a little longer for the desktop environment to start). Log in as the user:
{{{
fsl
}}}
with password
{{{
fsluser
}}}
After a few moments you will be presented with the Linux desktop environment.

{{attachment:linux_keyboard.png|Linux keyboard layout configuration|align="right"}}Before continuing, you should take a moment to verify that you have the correct keyboard layout. The FSLvm is configured with a British keyboard; users with a different keyboard layout can change by visiting `System` > `Preferences` > `Keyboard` from the menu at the top of the screen. This will open the keyboard configuration window. Switch to the `Layouts` tab and click the large `+` symbol to add a keyboard layout.

In the windows that appears choose an appropriate layout from the pane on the left (you can drag the divider to see the name of the layout better). Some layouts have alternatives which can be viewed by clicking on the disclosure triangle. However, in most cases the top-level layout will be appropriate. Then select the check box next to your new keyboard layout to make this the default. Finally, deselect `Separate group for each window`.

Once you have the correct keyboard layout, the first task you should undertake is to reset a few passwords to more secure values.

Right click on the desktop and choose `Open Terminal` from the menu. In the terminal window that opens, type the following:
{{{
passwd
}}}
When prompted, enter the current password
{{{
fsluser
}}}
and then enter a new password, twice - choose a secure password (see this [[http://en.wikipedia.org/wiki/Password_strength|Wikipedia]] entry for advice on password selection).

Next you will need to change the password of the `root` user in the FSLvm, do this by issuing the following commands in a terminal window:
{{{
/bin/su -
}}}
Enter the current root password,
{{{
fslroot
}}}
You are now the system Super User. To change this user's password type:
{{{
passwd
}}}
Again, when prompted, enter a new password twice - choose a different secure password.
{{{#!wiki important
'''Important'''

Do not forget these passwords, as you will lose access to FSLvm and all the files stored within it without them.
}}}
Now type:
{{{
exit
}}}
to return to the normal user account.

== Installing FSL ==
You can now install FSL, FSLvm requires the [[http://www.fmrib.ox.ac.uk/fsl/fsldownloads|Linux CentOS5 32bit or CentOS5 64bit]] version depending on whether you are running the 32 or 64 bit VM. See the [[FslInstallation/Linux|Linux installation instructions]] to continue with the installation of FSL. Note that as the FSLvm comes preconfigured for internet access, so the easiest way to continue the install is to follow these instructions with the Firefox web-browser inside the FSLvm.
During the launch of a VM you may be prompted to download and upgrade the VMware Tools (updates for these appear periodically).

{{attachment:InstallTools_10.png|Request to update tools}}

You should agree to this.

The first time FSLvm is started VMware Workstation Player will ask if the VM was moved or copied, choose `I copied it` (this sets up the network correctly).

{{attachment:Copied_10.png|I copied it|width="250"}}

Depending on your Windows computer's hardware, you may also receive additional messages about missing hardware. These can be dismissed.

The FSLvm will now boot, a process that may take several minutes.

Once the boot process has completed, you will be automatically logged into the account ''fsluser'' and the installation of FSL will begin. You will be prompted to choose a password for this account, make a note of this password as you will need it to use the 'sudo' command when you install FSL updates. Next FSL will be downloaded, installed and configured. Finally, the virtual machine will check for pending software updates, install them and reboot, please be patient this final step may take a while.

{{attachment:InstallFsl_10.png|System menu|width="900"}}

{{{#!wiki note
'''Recovering from a failed install'''
If your computer loses it's network connection during the download phase the installer will quit. To restart the installation process run the command:

'''''/usr/local/fsl_installer/fslinstaller.py'''''
You will be prompted for the account password you set during the initial phase of the install.
}}}
'''At this point the installation is complete.''' Read on if you want to find out how to modify the VM's settings to suit your keyboard layout, to enable file sharing and to increase the memory available to the VM.

----
----

== Further steps ==
The FSLvm is configured with a British keyboard; users with a different keyboard layout can change by clicking on the power symbol in the top right of the screen and clicking on the tools icon in the bottom left of the resulting window.

{{attachment:System_10.png|System menu|width="260"}}

Click on the ''Region & Language'' icon in the settings window.

{{attachment:Settings_10.png|Settings|width="500"}}

The ''Input Sources'' at the bottom of the window allow the addition of different keyboard layouts.

{{attachment:Keyboard_10.png|Region & Language Settings|width="550"}}
Line 114: Line 184:
Line 115: Line 186:
      The VMware Player application supports the dragging and dropping of files from Windows into the FSLvm. To transfer files select them in the Windows Explorer and then drag them into your FSLvm window and drop in the folder you would like it to reside in (or onto the Desktop).
 1. VMware Player file sharing
 {{attachment:sharingpane.jpg|Setting up file sharing|align="left"}}File sharing has been configured in the FSLvm to share the entire `C:` drive to the FSLvm. However, due to the potential security risk this poses, VMware Player disables this functionality by default.

 Before changing the sharing settings first create a folder to share. Put this folder somewhere appropriate in your home folder. To enable sharing and to point it to this new folder, start up the FSLvm and visit the VMware Player menu and open the `Shared Folders...` dialogue.

 To enable sharing permanently select the `Always Enabled` radio button. Now select the pre-configured share and click on the `Properties` button. This will open another dialogue box allowing you to change the name the share will appear as in Linux and to change the Windows file path for the shared folder. Click on the `Browse` button and locate the folder you created earlier.

 {{attachment:browseforfoldertoshare.jpg|Browse to the folder to share|align="right"}}Click on the `OK` buttons to dismiss the dialogues. You should now restart your FSLvm (only necessary the first time you enable sharing) by choosing `System` > `Shutdown` from the top menu bar in the Linux desktop and clicking on the `Reboot` button when prompted on what to do.

 You may now access files held within this shared folder through the path `/mnt/hgfs`. To navigate there through the graphical file browser, double click on `Computer` on the desktop and then, in the resulting window, double click on `Filesystem`. This will open a folder showing the folder `/` from where you can navigate to `mnt` and then `hgfs`. Within here will be the shared folder, named as specified in the `Shared Folders` dialogue.
  . The VMware Workstation Player application supports the dragging and dropping of files from Windows into the FSLvm. To transfer files select them in the Windows Explorer and then drag them into your FSLvm window and drop in the folder you would like it to reside in (or onto the Desktop). You may find that the first attempt to copy a file results in an error, click ''Retry'' which should complete. Subsequent drags/drops should then be fine.

 1. VMware Workstation Player file sharing
 {{attachment:SharedFolders_10.png|Setting up file sharing|width="330"}} Before changing the sharing settings first create a folder to share. Put this folder somewhere appropriate in your home folder. To enable sharing and to point it to this new folder, start up the FSLvm and visit the VMware Workstation Player menu and open the `Shared Folders...` wizard. To enable sharing permanently select the `Always Enabled` radio button. Now select the pre-configured share and click on the `Properties` button. This will open another dialogue box allowing you to change the name the share will appear as in Linux and to change the Windows file path for the shared folder. Click on the `Browse` button and locate the folder you created earlier. {{attachment:browseforfoldertoshare.jpg|Browse to the folder to share|align="right"}} Click on the `OK` buttons to dismiss the dialogues. You may now access files held within this shared folder through the path `/mnt/hgfs`. To navigate there through the graphical file browser, double click on `Home` on the desktop and then, in the resulting window, click on `Computer`. This will open a folder showing the folder `/` from where you can navigate to `mnt` and then `hgfs`. Within here will be the shared folder, named as specified in the `Shared Folders` dialogue. See [[#toolsupgrade|below]] for help if the shared folders function stops working.
Line 131: Line 195:
 1. Using external media:
If you connect a USB storage device whilst VMware Player is running and has the input focus it will allow Linux to see the storage device. In most cases it will automatically mount and an icon will appear on the Linux desktop. Linux has read-only support for NTFS, so you will need to create an ext3 (Linux support only) disk partition or use FAT32 format which can be read on both OSes.
 {{{#!wiki note
'''Note'''

FAT32 is not supported for storing files that you are acti
vely accessing with the FSL tools.
}}}

1. Using external media: If you connect a USB storage device whilst VMware Workstation Player is running and has the input focus it will allow Linux to see the storage device. In most cases it will automatically mount and an icon will appear on the Linux desktop. Linux has read-only support for NTFS, so you will need to create an ext4 (Linux support only) disk partition or use FAT32 format which can be read on both OSes.

== Accessing ExFAT USB drives from the VM ==
If you wish to use an ExFAT-formatted USB drive, you will need to install an ExFAT driver into the virtual machine. Open a terminal and run these commands:

{{{
sudo yum -y install epel-release
sudo rpm -U
vh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install exfat-utils fuse-exfat

}}}
Line 143: Line 210:
Line 149: Line 217:
Line 150: Line 219:
Under normal circumstances you should just close the FSLvm window, this will suspend the FSLvm to disk allowing quick restoration of your session at a later date. However, sometimes it may be necessary to shutdown the FSLvm entirely (say if you are moving it to a new computer). To do this, choose `System` > `Shutdown` from the Linux desktop menu. Once Linux has shut down VMware Player will exit. Under normal circumstances you should just close the FSLvm window, this will suspend the FSLvm to disk allowing quick restoration of your session at a later date. However, sometimes it may be necessary to shutdown the FSLvm entirely (say if you are moving it to a new computer). To do this, click on the power icon in the top right of the desktop menu bar, click on the power icon (bottom left) and choose ''Shutdown''. Once Linux has shut down VMware Workstation Player will exit.
Line 160: Line 229:
{{{#!wiki warning
'''Warning about kernel updates'''

Any updates listed as `kernel` updates change the core of the operating system, and will result in the accelerated drivers installed in the FSLvm to cease to function. To restore this functionality it is necessary to update the vmware-tools, as this driver package is termed. To do this, log in as the root user and open a terminal window. Within this window type:
<<Anchor(toolsupgrade)>>

== Updating VMware Tools ==
If you find that the shared folder functionality stops working then you will need to update the VMware tools, to do this follow these instructions.

To update the tools choose `Manage > Reinstall VMware Tools` from the VMware Workstation Player menu, wait 30 seconds then open a terminal window in the FSLvm. Within this window type:
Line 165: Line 237:
vmware-config-tools.pl
}}}
cd /tmp
tar xf /media/VMware\ Tools/VMwareTools-*.tar.gz
cd vmware-tools-distrib
sudo ./vmware-config-tools.pl
}}}
Enter your account password when requested.
Line 170: Line 247:
{{attachment:winxp_mem.png|Right click on My Computer and select Properties... Look here for your memory total|align="right"]]The default allocation of 1GB is only suitable for light use of the FSL software suite. For more demanding analyses you will need to increase the amount of available memory allocated to the virtual machine. Before you change this setting you should find out how much memory your computer has. Under Windows XP, open the `Start` menu and right click on `My Computer`. From the pop-up menu choose `Properties` and look in the `Computer information` area, note this value.

Under Vista/7, follow the [[http://windowshelp.microsoft.com/Windows/en-US/help/479a7531-57ad-43c1-91b1-3f46a0e1761e1033.mspx|instructions available on Microsoft's support site]] to find out your total memory capacity.
Right click on `My Computer` in the Start menu and select `Properties...` the window that opens will tell you how much your computer has. The default allocation of 2GB is only suitable for light use of the FSL software suite. For more demanding analyses you will need to increase the amount of available memory allocated to the virtual machine. Before you change this setting you should find out how much memory your computer has.
Line 175: Line 250:
||<tableclass='centred'>Windows XP||Take 1024MB off the value reported||
||Windows Vista||Take 2048MB off the value reported||

By way of example if you have a Windows 7 computer with 4GB of RAM you can safely increase the FSLvm memory allocation to 2GB.

To change the memory allocation of FSLvm, start the VM and then from the VMware Player menu, choose `Change Memory Allocation...` from the `Troubleshoot` sub-menu. In the dialogue that opens type the value you have calculated as being optimal into the memory total box. As indicated in this window once you have clicked `OK` you will need to restart the VM.
{{attachment:vmplayer_tsmenu.png|Opening the Change Memory Allocation dialoge Changing the memory allocation}}
{{attachment:changemem.png|Increasing the amount of disk space available to FSLvm}}

Increasing the size of the virtual disk is not possible with the free VMware Player application (it can be done with the commercially available VMware Workstation), so if you require additional disk space we would recommend adding an additional USB hard drive to your system and dedicating it's use to Linux. For correct FSL operation, the drive should be formatted with the Linux ext3 filesystem. Follow these steps to carry out this formatting process.
||Windows 7/8 ||Take 2048MB off the value reported ||
||Windows 10 ||Take 4096MB off the value reported ||




By way of example if you have a Windows 7 computer with 8GB of RAM you can safely increase the FSLvm memory allocation to 6GB.

To change the memory allocation of FSLvm, start the VM and then from the VMware Player menu, choose `Manage > Virtual Machine Settings...`. In the dialogue that opens type the value you have calculated as being optimal into the memory total box - the memory section will suggest some values for you. As indicated in this window once you have clicked `OK` you will need to restart the VM.

{{attachment:VMsettings.png|Changing the memory allocation}}

Increasing the size of the virtual disk is also possible, but not straightforward, so if you require additional disk space we would recommend adding an additional USB hard drive to your system and dedicating it's use to Linux. For correct FSL operation, the drive should be formatted with the Linux ext3 filesystem. Follow these steps to carry out this formatting process.
Line 188: Line 267:
 1. If the drive mounts and appears on your Linux desktop, right click and choose to un-mount it. Most probably you will have a drive formatted as NTFS, so you may see this warning that Linux Cannot mount volume - Click `OK`.
 Unfortunately, Centos won't let you format the device at this point, so you need to format via the command line.
 1. If the drive mounts and appears on your Linux desktop, right click and choose to un-mount it. Most probably you will have a drive formatted as NTFS, so you may see this warning that Linux Cannot mount volume - Click `OK`. Unfortunately, Centos won't let you format the device at this point, so you need to format via the command line.
Line 194: Line 273:
 (enter the root password when prompted)   . (enter the root password when prompted)
Line 200: Line 279:
Line 204: Line 284:
 You are now in an interactive partition editor.   . You are now in an interactive partition editor.
Line 206: Line 286:
 {{{   {{{
Line 210: Line 290:
 1.
{{{

1. {{{
Line 214: Line 294:
 (replace X with the letter you determined above)
 1.
{{{
  . (replace X with the letter you determined above)
 1. {{{
Line 219: Line 298:
 where Y is the partition number you noted. Repeat until you have deleted all the partitions on the disk
 1.
{{{
  . where Y is the partition number you noted. Repeat until you have deleted all the partitions on the disk
 1. {{{
Line 223: Line 301:
 }}}
 to confirm that they are all gone
 1.
{{{
}}}
  . to confirm that they are all gone
 1. {{{
Line 229: Line 306:
 where Z is the size of the disk in question (eg 250GB), hit return to any prompts
 1.
{{{
  . where Z is the size of the disk in question (eg 250GB), hit return to any prompts
 1. {{{
Line 234: Line 310:
Line 236: Line 313:
mkfs -t ext3 /dev/sdX
}}}
 (X as above)
mkfs -t ext4 /dev/sdX
}}}
  . (X as above)

Introduction

We recommend using a UNIX-based computer (such as a Linux PC or Apple OS X) for carrying out data analysis. However FSL can be used on Windows via the Windows Subsystem for Linux (WSL, Windows 10 only, recommended option) or by running the Linux version of FSL inside a "virtual Linux machine" (a VM).

Windows Subsystem for Linux

This is the recommended option for using FSL on a Windows computer. Note due to recent changes in WSL2, we have some provisional changes to the existing ( WSL1 ) instructions.

Installation Video

We have created an installation video which gives an overview of the installation procedure for the Windows Subsystem for Linux using Windows 10.

System Requirements

  • Windows 10
  • The Windows Subsystem for Linux (WSL) can be installed by following these instructions. WSL build 17101 (February 2018) or newer is required.

  • Dual core CPU (recommended minmum)
  • 4GB RAM minimum (8GB+ recommended)
  • Minimum 10GB, up to 75GB, of free disk space

Note: installation progress may not update in the terminal. If this occurs please be patient, and do not abort the installation.

  1. Follow these steps to install the Ubuntu subsystem in Windows
    • enable WSL using windows PowerShell (need to run the PowerShell app as administrator). Paste this command in and press enter. Follow any prompts given.

    • Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    • Restart your computer
    • After restart, open the Microsoft Store and search for Ubuntu 18.04. Install Ubuntu and then Launch it.
    • Sep up a username and password for Ubuntu (only necessary the first time you launch it)
  2. In an Ubuntu shell window enter these commands:
     sudo apt update; sudo apt -y upgrade; sudo apt-get install dc python mesa-utils gedit pulseaudio libquadmath0
  3. use any browser installed on your Windows 10 computer to get the installer script as normal ( from here ). Download it to your downloads folder.

  4. Install Xming in order to use FSL user interfaces: http://www.straightrunning.com/XmingNotes/. You will need to have XMING running in windows, before the linux GUIs will work. For WSL2 instead use the instructions below.

When selecting the OS to install on the download page, it is important to choose Ubuntu ( the Linux version installed by WSL ) and not Windows, or you will be directed to the VM instead of the installer script.

  1. run downloaded script in Ubuntu shell via
     python /mnt/c/Users/<WindowsUserName>/Downloads/fslinstaller.py
    Say yes to all default install options
  2. In ubuntu shell add
     echo "export DISPLAY=localhost:0.0" >> ~/.bashrc

    For WSL2 instead use the instructions below.

  3. try running fslmaths, fsl, fsleyes


    If fsleyes doesn't start, with a message referring to: libgtk-x11-2.0.so.0, then you will need to run:

     sudo apt-get install libgtk2.0-0

    If fslmaths doesn't start, with a message referring to: libquadmath.so.0, then you will need to run (in case you didn't install it earlier):

     sudo apt-get install libquadmath0
  4. It might be worth trying
     sudo apt-get install firefox
    to get native browser support. However, you can always just use a web bowser from your windows machine (not within Ubuntu) to view FSL report.html files.
  5. If you want to mount other folders or drives ( e.g USB drives)
     sudo mkdir /mnt/<usb>

    <usb> can be whatever you want to call this new link

     sudo mount -t drvfs <Letter of USB drive in Windows or path to some other subfolder> /mnt/<usb>
    e.g. if your USB drive appears as drive E:
     sudo mount -t drvfs E: /mnt/<usb>
    the mount command will need to be rerun each time you start a new WSL session: the mount is safely unmounted when the last window of a WSL is closed.

WSL 2 Changes ( provisional )

  1. We currently recommend installing VcXsrv instead of Xming. When running XLaunch, it is critical to deselect Native OpenGL and select Disable access control in the Extra Settings panel. XLaunch will need to be running for graphical applications to work.

  2. The .bashrc changes should instead be:

export DISPLAY=$(ip route | awk '/default via / {print $3; exit}' 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
  • due to the quoting in the first line, it's easiest to make these changes via a text-editor.

Virtual Machine

The VM option requires a freely available program (free for non-commercial use only) called 'VMware Workstation Player' by VMware. This is fairly easy to setup, and we provide basic installation instructions below, but please note that we cannot in general offer further help for the setup and maintenance of the virtual machine itself - we just offer support on the running of FSL within it.

System Requirements

  • Windows 7,8,10
  • Dual core CPU (recommended minmum)
  • 4GB RAM minimum (8GB+ recommended)
  • Minimum 10GB, up to 75GB, of free disk space (VM image expands as necessary up to the 75GB limit, if used)

The FSL VM (FSLvm) is configured with 2GB of RAM, a virtual hard disk that can grow to 75GB in size, shared (NAT) networking (ie it shares the network connection of your local computer), virtual sound hardware and virtual CD/DVD drive.

Before you can run the FSL virtual machine, you need to install a Virtual Machine player package. We support the use of version 12+ of VMware's free* VMware Workstation Player software. Download the software from VMware's site and install this package by following VMware's instructions (or you can look at videos on youtube if you get stuck). Once it is installed and your computer has been restarted, launch VMware Workstation Player to complete initial setup.

* Workstation Player is free for non-commercial use. Academic users' institution must be a member of the VMWare Academic program to use this software for free. For details on the licensing arrangements see http://www.vmware.com/products/player/faqs.html

The FSL Virtual Machine

Once VMware Player is installed, download FSLvm from below. The FSLvm is compatible with Windows 7/8 and 10 and is 64 bit, so requires a 64 bit CPU. See http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003945 for information on how to check that your computer will be able to run the FSLvm.

Download FSLVm7_64

Verifying the download

If you want to confirm that the FSLvm package has downloaded correctly please see this page.

FSLvm Installation

FSLvm is a fairly minimal install of the CentOS 7 Linux distribution and is provided as a zip file. To install, decompress the downloaded FSLvm by double clicking on the zip file and clicking on Extract button in the Windows Explorer toolbar. Choose to extract all files, then choose a location to extract to. By default it will extract to a folder 'FSLVm7_64', remove this from the end of the expansion location so that an unnecessary 'FSLVm7_64' folder is not created.

Extract all files

VMware Workstation Player Usage and Configuration

Detailed VMware Workstation Player application usage instructions are available from the VMware Player menu's Help entry.

Initial setup

The installation of the FSL package requires an internet connection. Please ensure your computer has a working connection before continuing with the setup procedure.

Now that the FSLvm is installed, launch VMware Workstation Player from the Start menu and click on the Open icon. In the Open dialogue, browse to the uncompressed FSLvm folder, FSLVm7_64.vmware and double click on the FSLVm7_64 file within.

Extract all files

Subsequent to the initial launch, the FSLvm will appear in the list of Recent Virtual Machines allowing quick launching.

During the launch of a VM you may be prompted to download and upgrade the VMware Tools (updates for these appear periodically).

Request to update tools

You should agree to this.

The first time FSLvm is started VMware Workstation Player will ask if the VM was moved or copied, choose I copied it (this sets up the network correctly).

I copied it

Depending on your Windows computer's hardware, you may also receive additional messages about missing hardware. These can be dismissed.

The FSLvm will now boot, a process that may take several minutes.

Once the boot process has completed, you will be automatically logged into the account fsluser and the installation of FSL will begin. You will be prompted to choose a password for this account, make a note of this password as you will need it to use the 'sudo' command when you install FSL updates. Next FSL will be downloaded, installed and configured. Finally, the virtual machine will check for pending software updates, install them and reboot, please be patient this final step may take a while.

System menu

Recovering from a failed install If your computer loses it's network connection during the download phase the installer will quit. To restart the installation process run the command:

/usr/local/fsl_installer/fslinstaller.py You will be prompted for the account password you set during the initial phase of the install.

At this point the installation is complete. Read on if you want to find out how to modify the VM's settings to suit your keyboard layout, to enable file sharing and to increase the memory available to the VM.



Further steps

The FSLvm is configured with a British keyboard; users with a different keyboard layout can change by clicking on the power symbol in the top right of the screen and clicking on the tools icon in the bottom left of the resulting window.

System menu

Click on the Region & Language icon in the settings window.

Settings

The Input Sources at the bottom of the window allow the addition of different keyboard layouts.

Region & Language Settings

Accessing your Windows files

There are four options for transferring/accessing files stored on your Windows disk into the FSLvm, presented in order of ease of use:

  1. Drag-and-drop
    • The VMware Workstation Player application supports the dragging and dropping of files from Windows into the FSLvm. To transfer files select them in the Windows Explorer and then drag them into your FSLvm window and drop in the folder you would like it to reside in (or onto the Desktop). You may find that the first attempt to copy a file results in an error, click Retry which should complete. Subsequent drags/drops should then be fine.

  2. VMware Workstation Player file sharing

    Setting up file sharing Before changing the sharing settings first create a folder to share. Put this folder somewhere appropriate in your home folder. To enable sharing and to point it to this new folder, start up the FSLvm and visit the VMware Workstation Player menu and open the Shared Folders... wizard. To enable sharing permanently select the Always Enabled radio button. Now select the pre-configured share and click on the Properties button. This will open another dialogue box allowing you to change the name the share will appear as in Linux and to change the Windows file path for the shared folder. Click on the Browse button and locate the folder you created earlier. Browse to the folder to share Click on the OK buttons to dismiss the dialogues. You may now access files held within this shared folder through the path /mnt/hgfs. To navigate there through the graphical file browser, double click on Home on the desktop and then, in the resulting window, click on Computer. This will open a folder showing the folder / from where you can navigate to mnt and then hgfs. Within here will be the shared folder, named as specified in the Shared Folders dialogue. See below for help if the shared folders function stops working.

    Warning

    Do not attempt to modify the same files in this shared folder in both operating systems at once - bad things will happen!

  3. Using external media: If you connect a USB storage device whilst VMware Workstation Player is running and has the input focus it will allow Linux to see the storage device. In most cases it will automatically mount and an icon will appear on the Linux desktop. Linux has read-only support for NTFS, so you will need to create an ext4 (Linux support only) disk partition or use FAT32 format which can be read on both OSes.

Accessing ExFAT USB drives from the VM

If you wish to use an ExFAT-formatted USB drive, you will need to install an ExFAT driver into the virtual machine. Open a terminal and run these commands:

sudo yum -y install epel-release
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install exfat-utils fuse-exfat

Network access

The FSLvm is configured to share your network connection, and so has full access to any networks that your Windows computer can see. You can also access your FSLvm from Windows over this internal network with tools like puTTY (a SSH terminal client).

To identify the IP address of the FSLvm, in a terminal in the FSLvm type:

/sbin/ifconfig | grep -C 1 'eth0'

You are looking for the dotted quartet printed after inet addr:.

Connection to the host is now possible using this address as the hostname to connect to within puTTY.

Shutting down

Under normal circumstances you should just close the FSLvm window, this will suspend the FSLvm to disk allowing quick restoration of your session at a later date. However, sometimes it may be necessary to shutdown the FSLvm entirely (say if you are moving it to a new computer). To do this, click on the power icon in the top right of the desktop menu bar, click on the power icon (bottom left) and choose Shutdown. Once Linux has shut down VMware Workstation Player will exit.

Resetting a hung FSLvm

If the FSLvm appears to have frozen, you can force a reset by selecting Reset from the Troubleshooting menu.

Updating the FSLvm

From time to time the Linux vendor will issue security updates which in general should be installed to keep the FSLvm secure.

When updates are available a message window will appear in the top right of the Linux desktop advising you of what updated packages are available. Clicking on the icon associated with this message will open the package update utility which can be used to update the system. You will be asked for the root password that you set when installing the FSLvm before being allowed to install these updates.

Updating VMware Tools

If you find that the shared folder functionality stops working then you will need to update the VMware tools, to do this follow these instructions.

To update the tools choose Manage > Reinstall VMware Tools from the VMware Workstation Player menu, wait 30 seconds then open a terminal window in the FSLvm. Within this window type:

cd /tmp
tar xf /media/VMware\ Tools/VMwareTools-*.tar.gz
cd vmware-tools-distrib
sudo ./vmware-config-tools.pl

Enter your account password when requested.

You will now be asked a series of questions. Hit return to accept the default to all of the questions. Once the installation is complete you should reboot the FSLvm to allow the changes to take effect.

Increasing the amount of memory available to FSLvm

Right click on My Computer in the Start menu and select Properties... the window that opens will tell you how much your computer has. The default allocation of 2GB is only suitable for light use of the FSL software suite. For more demanding analyses you will need to increase the amount of available memory allocated to the virtual machine. Before you change this setting you should find out how much memory your computer has.

With this in mind, you can calculate the amount of memory you can safely allocate to the FSLvm by following the advice below.

Windows 7/8

Take 2048MB off the value reported

Windows 10

Take 4096MB off the value reported

By way of example if you have a Windows 7 computer with 8GB of RAM you can safely increase the FSLvm memory allocation to 6GB.

To change the memory allocation of FSLvm, start the VM and then from the VMware Player menu, choose Manage > Virtual Machine Settings.... In the dialogue that opens type the value you have calculated as being optimal into the memory total box - the memory section will suggest some values for you. As indicated in this window once you have clicked OK you will need to restart the VM.

Changing the memory allocation

Increasing the size of the virtual disk is also possible, but not straightforward, so if you require additional disk space we would recommend adding an additional USB hard drive to your system and dedicating it's use to Linux. For correct FSL operation, the drive should be formatted with the Linux ext3 filesystem. Follow these steps to carry out this formatting process.

  1. Start with the drive disconnected
  2. Click inside the running VM window so that you are controlling Linux
  3. Connect the USB drive
  4. If the drive mounts and appears on your Linux desktop, right click and choose to un-mount it. Most probably you will have a drive formatted as NTFS, so you may see this warning that Linux Cannot mount volume - Click OK. Unfortunately, Centos won't let you format the device at this point, so you need to format via the command line.

  5. Open a terminal and become the root user:
    su -
    • (enter the root password when prompted)

    Potential for data loss

    The next step will destroy everything on the drive you specify, so make sure you are certain that this is the correct disk.

  6. Run the partitioning tool:
    parted
    • You are now in an interactive partition editor.
  7. Find your disk:
    print all

    Locate your external drive (look for the Model: entry that matches your disk) and note down the Disk field (/dev/sdX) (this will probably be /dev/sdb) and the numbers of any existing partition number(s)

  8. select /dev/sdX
    • (replace X with the letter you determined above)
  9. rm Y
    • where Y is the partition number you noted. Repeat until you have deleted all the partitions on the disk
  10. print
    • to confirm that they are all gone
  11. mkpart primary 1 ZGB
    • where Z is the size of the disk in question (eg 250GB), hit return to any prompts
  12. quit
  13. Make a file system on the partition
    mkfs -t ext4 /dev/sdX
    • (X as above)
  14. Disconnect the drive and reconnect it and it should automatically mount. Open Computer on your desktop and you should see the drive, and it can be accessed at /media/disk (or some variant on that).

 

FslInstallation/Windows (last edited 11:02:08 30-08-2023 by MatthewWebster)