Feeds:
Posts
Comments

Archive for August, 2015

Clonezilla is a partition and disk cloning program. If you want to do one of the following, it can be very helpful:

  1. a full backup of your system including program files, master boot partition etc.
  2. backup of one partition of your disk
  3. clone your hard disk to a solid state drive (SSD) to improve the performance.
  4. replace hard disk or SSD of your laptop with a larger one.

My case was number four: I bought a used laptop which had a 256 GB SSD. I wanted to replace it with a 500 GB SSD.

I connected the new SSD to a USB3 gate via cable as seen below and booted the laptop with Clonezilla ISO image.

SATA 6GB/s connector with both USB 2 and USB 3 connections.

SATA 6GB/s connector with both USB 2 and USB 3 connections.

20150819_145657

The process was rather fast since both read and write was on SSD and the connection was via a USB3 gate.

Clonezilla copies partitions one by one. Here you see that it copies the main partition of the Windows 7 operating system.

Clonezilla copies partitions one by one. Here you see that it copies the main partition of the Windows 7 operating system.

So after copying was finished, I replaced the old SSD of the laptop with the new one and booted the system. It was identical to the previous system, nothing was changed at all !

so far so good. so it was time to format the extra space of the new SSD. But the partition on the new and large SSD was copied from the small SSD !!!! The system could not recognise that there are 250 GB more space on the disk !

After some googling, I realized that I can fix the partition using Fixpart.

So I booted the system via Debian 8 live CD and then downloaded the fixpart and installed that via dpkg command. Then I followed the instructions step by step and finally got an updated partition table. After that I installed gparted in the live environment of the Debian Jessie and it could recognise the unallocated memory as you can see in the following image:

Gparted could see the unallocated memory only after I fixed the partition table via Fixpart.

Gparted could see the unallocated memory only after I fixed the partition table via Fixpart.

The rest was easy, just a normal Linux installation which I explain in the next post !

Read Full Post »

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

# jessie-updates, previously known as ‘volatile’
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free

# jessie-backports, previously on backports.debian.org
deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free

# multimedia
deb http://www.deb-multimedia.org/ jessie main non-free
deb http://www.deb-multimedia.org/ jessie-backports main

Read Full Post »

Python 3 is gradually replacing Python 2 and is some of the newest Linux distributions like Fedora 23, it is installed as default.

So the question is if you have a library of python 2.x programs and you want to start learning python 3 and updating your codes, how can you install all the necessary packages like matplotlib, scipy, nompy, etc for both versions of python without messing up the system (since Linux desktops e.g. gnome, KDE, etc use python themselves).

Using Anaconda or Miniconda is one of the solutions. I tried miniconda since I do not want the whole Anaconda packages. According to its webpage, “Anaconda is a completely free Python distribution … It includes over 195 of the most popular Python packages for science, math, engineering, data analysis.” Both Anaconda and Miniconda are available for Linux, Mac OSX, and Windows. This way, you install a fresh version of python on your home directory, so doing anything to that does not affect your operating system.

Package installation using conda

Assume you have installed the package via your package manager. Now we have the command  “conda” available on command line. We can create two different environments for python 2 and python 3 packages:

$conda create -n mypy2 python=2 numpy

$conda create -n mypy3 python=3 numpy

and similarly you can install any other package, e.g. ipython, scipy, etc.

When the environment exist, you can use the normal “install’ command, like pip:

$ conda install numpy python=3

How to use it?

You can add something like the following to your .bashrc file:

export PATH=”/home/user_name/miniconda/bin:$PATH”

Then in the command line, you can activate the environment you want to work with:

$source activate mypy2

and you get an output in terminal like this:

discarding /home/user_name/miniconda/bin from PATH
prepending /home/user_name/miniconda/envs/mypy2/bin to PATH

When you are done, you can deactivate it:

$source deactivate

conda has easy options to install, update or remove a package or the whole environment.For instance, you can remove a whole environment at once:

$conda remove -n mypy2 –all

Typing “conda” in terminal, you get the help file:

$ conda
usage: conda [-h] [-V] [–debug] command …

conda is a tool for managing and deploying applications, environments and packages.

Options:

positional arguments:
command
info          Display information about current conda install.
help         Displays a list of available conda commands and their help strings.
list            List linked packages in a conda environment.
search     Search for packages and display their information. The input is a regular expression.To perform a search with a   search string that starts with a -, separate the search from the options with –, like ‘conda search — -h’. A * in the results means that package is installed in the current environment. A . means that package is not installed but is cached in the pkgs directory.
create       Create a new conda environment from a list of specified packages.
install         Install a list of packages into a specified conda environment.
update       Update conda packages to the current version.
remove      Remove a list of packages from a specified conda environment.
uninstall     Alias for conda remove. See conda remove –help.
run             Launches an application installed with conda. To include command line options in a command, separate the   command from the other options with –, like conda run — ipython –matplotlib
config        Modify configuration values in .condarc. This is modeled after the git config command. …
init             Initialize conda into a regular environment (when conda was installed as a Python package, e.g. using pip).
clean         Remove unused packages and caches….

Read Full Post »