Sunday, October 12, 2014

fb: conflicting fb hw usage inteldrmfb vs VESA VGA - removing generic driver



After upgrading to Ubuntu 14.04.1 the machine hung after s very short passage through an attempt to start the graphical interface.   With some luck, i pressed ctrl+alt+f1 to be on the terminal and avoided to use the graphics, hence avoided the crash.  But i would recommend you to just start with a live cd and mount the filesystem.

I found this in the /var/log/kern.log .

After googling and looking at a lot of suggestions, what worked for me was:

apt-get install nvidia-331
apt-get remove xserver-xorg-video-nouveau

vi /etc/modprobe.d/nvidia-graphics-drivers.conf

blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
alias nvidia nvidia-current

This will do it (or most likely should).  Then you may have issues with the desktop that do not starts.. but that may be another story.

Saturday, October 11, 2014

What to do when ubuntu support expired ?

Hi, when you try to do an apt-get update and get this message:

apt-get 404 Not Found Package


It has a fast solution to get rid of the issue and then take your time to think what to do.  For example, i know from here that Ubuntu 12.10 is not supported any more since May 2014.


 Get:1 http://dl.google.com stable Release.gpg [198 B]  
 Get:2 http://dl.google.com stable Release.gpg [198 B]               
 Get:3 http://dl.google.com stable Release [1,347 B]                
 Get:4 http://ppa.launchpad.net quantal Release.gpg [316 B]             
 Ign http://security.ubuntu.com quantal-security Release.gpg            
 Get:5 http://dl.google.com stable Release [1,347 B]                
 Ign http://us.archive.ubuntu.com quantal Release.gpg                
 Get:6 http://dl.google.com stable/main i386 Packages [1,227 B]           
 Get:7 http://ppa.launchpad.net quantal Release.gpg [316 B]             
 Ign http://security.ubuntu.com quantal-security Release              
 Ign http://us.archive.ubuntu.com quantal-updates Release.gpg       
 Get:8 http://ppa.launchpad.net quantal Release [11.9 kB]         
 Get:9 http://dl.google.com stable/main i386 Packages [710 B]            
 Ign http://us.archive.ubuntu.com quantal-backports Release.gpg           
 Get:10 http://ppa.launchpad.net quantal Release [11.9 kB]             
 Ign http://us.archive.ubuntu.com quantal-proposed Release.gpg           
 Get:11 http://ppa.launchpad.net quantal/main Sources [4,251 B]           
 Ign http://us.archive.ubuntu.com quantal Release                  
 Get:12 http://ppa.launchpad.net quantal/main i386 Packages [14.3 kB]        
 Ign http://us.archive.ubuntu.com quantal-updates Release              
 Ign http://us.archive.ubuntu.com quantal-backports Release             
 Ign http://us.archive.ubuntu.com quantal-proposed Release         
 Get:13 http://ppa.launchpad.net quantal/main Sources [16.7 kB]      
 Get:14 http://ppa.launchpad.net quantal/main i386 Packages [39.4 kB]        
 Ign http://dl.google.com stable/main Translation-en_US               
 Ign http://dl.google.com stable/main Translation-en                
 Ign http://dl.google.com stable/main Translation-en_US               
 Ign http://dl.google.com stable/main Translation-en            
 Ign http://ppa.launchpad.net quantal/main Translation-en_US        
 Ign http://ppa.launchpad.net quantal/main Translation-en              
 Ign http://ppa.launchpad.net quantal/main Translation-en_US            
 Ign http://ppa.launchpad.net quantal/main Translation-en              
 Err http://security.ubuntu.com quantal-security/main Sources            
  404 Not Found [IP: 91.189.92.201 80]  
 Err http://security.ubuntu.com quantal-security/restricted Sources  
  404 Not Found [IP: 91.189.92.201 80]  
 Err http://security.ubuntu.com quantal-security/universe Sources  
  404 Not Found [IP: 91.189.92.201 80]  
 Err http://security.ubuntu.com quantal-security/multiverse Sources  
  404 Not Found [IP: 91.189.92.201 80]  
 Err http://security.ubuntu.com quantal-security/main i386 Packages  
  404 Not Found [IP: 91.189.92.201 80]  
 Err http://security.ubuntu.com quantal-security/restricted i386 Packages  
  404 Not Found [IP: 91.189.92.201 80]  
 Err http://security.ubuntu.com quantal-security/universe i386 Packages  
  404 Not Found [IP: 91.189.92.201 80]  
 Err http://security.ubuntu.com quantal-security/multiverse i386 Packages  
  404 Not Found [IP: 91.189.92.201 80]  
 Ign http://security.ubuntu.com quantal-security/main Translation-en_US  
 Ign http://security.ubuntu.com quantal-security/main Translation-en  
 Ign http://security.ubuntu.com quantal-security/multiverse Translation-en_US  
 Ign http://security.ubuntu.com quantal-security/multiverse Translation-en  
 Ign http://security.ubuntu.com quantal-security/restricted Translation-en_US  
 Ign http://security.ubuntu.com quantal-security/restricted Translation-en  
 Ign http://security.ubuntu.com quantal-security/universe Translation-en_US  
 Ign http://security.ubuntu.com quantal-security/universe Translation-en  
 Err http://us.archive.ubuntu.com quantal/main Sources    
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal/restricted Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal/universe Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal/multiverse Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal/main i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal/restricted i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal/universe i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal/multiverse i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Ign http://us.archive.ubuntu.com quantal/main Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal/main Translation-en  
 Ign http://us.archive.ubuntu.com quantal/multiverse Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal/multiverse Translation-en  
 Ign http://us.archive.ubuntu.com quantal/restricted Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal/restricted Translation-en  
 Ign http://us.archive.ubuntu.com quantal/universe Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal/universe Translation-en  
 Err http://us.archive.ubuntu.com quantal-updates/main Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-updates/restricted Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-updates/universe Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-updates/multiverse Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-updates/main i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-updates/restricted i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-updates/universe i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-updates/multiverse i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Ign http://us.archive.ubuntu.com quantal-updates/main Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-updates/main Translation-en  
 Ign http://us.archive.ubuntu.com quantal-updates/multiverse Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-updates/multiverse Translation-en  
 Ign http://us.archive.ubuntu.com quantal-updates/restricted Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-updates/restricted Translation-en  
 Ign http://us.archive.ubuntu.com quantal-updates/universe Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-updates/universe Translation-en  
 Err http://us.archive.ubuntu.com quantal-backports/main Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-backports/restricted Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-backports/universe Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-backports/multiverse Sources  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-backports/main i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-backports/restricted i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-backports/universe i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-backports/multiverse i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Ign http://us.archive.ubuntu.com quantal-backports/main Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-backports/main Translation-en  
 Ign http://us.archive.ubuntu.com quantal-backports/multiverse Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-backports/multiverse Translation-en  
 Ign http://us.archive.ubuntu.com quantal-backports/restricted Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-backports/restricted Translation-en  
 Ign http://us.archive.ubuntu.com quantal-backports/universe Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-backports/universe Translation-en  
 Err http://us.archive.ubuntu.com quantal-proposed/restricted i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-proposed/main i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-proposed/multiverse i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Err http://us.archive.ubuntu.com quantal-proposed/universe i386 Packages  
  404 Not Found [IP: 91.189.91.14 80]  
 Ign http://us.archive.ubuntu.com quantal-proposed/main Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-proposed/main Translation-en  
 Ign http://us.archive.ubuntu.com quantal-proposed/multiverse Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-proposed/multiverse Translation-en  
 Ign http://us.archive.ubuntu.com quantal-proposed/restricted Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-proposed/restricted Translation-en  
 Ign http://us.archive.ubuntu.com quantal-proposed/universe Translation-en_US  
 Ign http://us.archive.ubuntu.com quantal-proposed/universe Translation-en  
 Fetched 104 kB in 1min 56s (892 B/s)  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/main/source/Sources 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/restricted/source/Sources 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/universe/source/Sources 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/multiverse/source/Sources 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/main/binary-i386/Packages 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/universe/binary-i386/Packages 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.92.201 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/main/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/restricted/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/universe/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/multiverse/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/main/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/universe/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/main/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/restricted/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/universe/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/multiverse/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/main/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/universe/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/main/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/restricted/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/universe/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/source/Sources 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/main/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/universe/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-proposed/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-proposed/main/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-proposed/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-proposed/universe/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]  
 E: Some index files failed to download. They have been ignored, or old ones used instead.  

Well, we are looking for a fast solution here. You can do this:
 
vi /etc/apt/sources.list
 
%s/us\.archive\.ubuntu/old-releases.ubuntu/g
%s/us\.security\.ubuntu/old-releases.ubuntu/g
 
These commands in vi. For a sed version you can find it here.  You may have to customize the command, if you are in Argentina it may be ar.archive and ar.security, so the first section of the regular expression should be that. In case of doubt, bring here your question, it is always welcome.

Friday, October 10, 2014

Protecting your privacy while browsing

This is the first post related to privacy concerns in the Web.  The Internet has changed a lot these years and i have the responsibility to share this little peace of wisdom.

The search engines and social networks are datamining all your movements, the reason, make money.  There are no naives in the world any more, we all can imagine how they make money: selling your data and analysing it in other countries.

Fighting for your privacy is something that nobody will do for you, if you do not protect yourself, nobody will.  I tell this from experience, i live in Argentina so i know what i am talking about.

Every webpage has today a facebook or a g+ or any kind of ad-ons, every web page you visit is reporting other private companies about your movements  / beheavior / interests and you may not want that.... but you have to know that it is happening.

I recommend you to use Firefox, with the adblock plugin, and then you can 
enable these resources: http://adversity.uk.to/

I tested it, and it blocks for example "google analytics", every webpage has it today, but its subproduct is your behavior.

Another good free plugin for firefox is https://www.ghostery.com/, seems effective.

Ubuntu 12.04 post install i would do

These are some steps i like to do after installing Ubuntu, these apply to 12.04 but if you analyze what they do you may use them in other releases.


1) I don't like to see the dnsmasq service doing a party with my resources:
vi /etc/NetworkManager/NetworkManager.conf


Comment this line "dns=dnsmasq"

sudo restart network-manager


2) I do not need any avahi-daemon doing things for me i do not need:
apt-get remove avahi-daemon


3) Setup some basic (but powerful) firewall rules:


4) Change unity

For 14.04
 apt-get remove unity unity-2d unity-2d-panel unity-2d-spread unity-asset-pool unity-services unity-lens-files unity-lens-music unity-lens-applications gir1.2-unity-5.0 unity-common indicator-sound indicator-power indicator-appmenu libindicator7 indicator-application indicator-datetime indicator-messages libnux-4.0-0 nux-tools libunity-misc4 unity-2d-common  
 apt-get install gnome-core   



One good post telling how to remove unity (shame that google do not indexes it properly) is this.


Tuesday, October 07, 2014

Ubuntu Matlab Post Install tips

After installing Matlab on a Linux machine, i recommend you to do this steps.  Please analyze each of them and the responsibility (as always) is on your fingers.

But this should cause any harm:

wget 'https://help.ubuntu.com/community/MATLAB?action=AttachFile&do=get&target=matlab-r2011a.desktop' -O /usr/share/applications/matlab.desktop


wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png   And you can modify the Desktop Icon and set it up to run as a terminal program and with this path:  /usr/local/MATLAB/R2013a/bin/matlab

Good luck!

Tuesday, September 16, 2014

chroot to the linux distribution filesystem

For recovery purposes, mostly, you may need to boot with the live cd and perform some maintenance.

mount /dev/ /mnt/
cd /mnt
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
chroot /mnt
 

Friday, July 18, 2014

ImportError: No module named pymeanshift

To install the pymeanshift module i did it easily like this:

1) Download the sources https://code.google.com/p/pymeanshift/downloads/list

(there is no binary at the time of writing this)


2) tar zxvf pymeanshift-0.2.1.tar.gz


root@walter-Lenovo-Z480:~/pymeanshift-0.2.1# ./setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying pymeanshift.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_pymeanshift' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c ms.cpp -o build/temp.linux-x86_64-2.7/ms.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
ms.cpp: In member function ‘void MeanShift::generalLSearch(double*, double*)’:
ms.cpp:2171:26: warning: variable ‘lN’ set but not used [-Wunused-but-set-variable]
ms.cpp: In member function ‘void MeanShift::optGeneralLSearch(double*, double*)’:
ms.cpp:2327:37: warning: variable ‘lN’ set but not used [-Wunused-but-set-variable]
ms.cpp: In member function ‘void MeanShift::generalSearch(tree*, int, double*, double*)’:
ms.cpp:1818:5: warning: ‘diff’ may be used uninitialized in this function [-Wuninitialized]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c msImageProcessor.cpp -o build/temp.linux-x86_64-2.7/msImageProcessor.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
msImageProcessor.cpp: In member function ‘void msImageProcessor::TransitiveClosure()’:
msImageProcessor.cpp:2414:8: warning: variable ‘threshold’ set but not used [-Wunused-but-set-variable]
msImageProcessor.cpp:2563:6: warning: unused variable ‘oldRegionCount’ [-Wunused-variable]
msImageProcessor.cpp: In member function ‘void msImageProcessor::Prune(int)’:
msImageProcessor.cpp:2784:57: warning: variable ‘oldRegionCount’ set but not used [-Wunused-but-set-variable]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c rlist.cpp -o build/temp.linux-x86_64-2.7/rlist.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c RAList.cpp -o build/temp.linux-x86_64-2.7/RAList.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c pymeanshift.cpp -o build/temp.linux-x86_64-2.7/pymeanshift.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from pymeanshift.cpp:21:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/ms.o build/temp.linux-x86_64-2.7/msImageProcessor.o build/temp.linux-x86_64-2.7/rlist.o build/temp.linux-x86_64-2.7/RAList.o build/temp.linux-x86_64-2.7/pymeanshift.o -o build/lib.linux-x86_64-2.7/_pymeanshift.so
running install_lib
copying build/lib.linux-x86_64-2.7/_pymeanshift.so -> /usr/local/lib/python2.7/dist-packages
copying build/lib.linux-x86_64-2.7/pymeanshift.py -> /usr/local/lib/python2.7/dist-packages
byte-compiling /usr/local/lib/python2.7/dist-packages/pymeanshift.py to pymeanshift.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/pymeanshift-0.2.1.egg-info

-----

Monday, December 30, 2013

Expanding a disk with ubuntu and virtualbox

I have no more free space in my virtualbox disk.  And i created the disk as "static" which is an obstacle when you want to expand the disk:


 walter@walter-Lenovo-Z480:~/VirtualBox VMs/intraweb$ VBoxManage modifyhd Linux1.vdi --resize 20000  
 0%...  
 Progress state: VBOX_E_NOT_SUPPORTED  
 VBoxManage: error: Resize hard disk operation for this format is not implemented yet!  

The disk says "Format variant: fixed"


 walter@walter-Lenovo-Z480:~/VirtualBox VMs/intraweb$ VBoxManage showhdinfo Linux1.vdi  
 UUID:      3492e240-1589-479f-a6d7-f58586a7a671  
 Parent UUID:  base  
 State:     created  
 Type:      normal (base)  
 Location:    /home/walter/VirtualBox VMs/intraweb/Linux1.vdi  
 Storage format: VDI  
 Format variant: fixed default  
 Capacity:    4853 MBytes  
 Size on disk:  4854 MBytes  
 In use by VMs: intraweb (UUID: 76173fac-f9b3-4cf9-9daf-06e363eecd6d)  

The first thing you have to do, just clone the disk.  Once cloned, it will be dynamic:

 walter@walter-Lenovo-Z480:~/VirtualBox VMs/intraweb$ VBoxManage clonehd Linux1.vdi Linux1d.vdi  
 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%  
 Clone hard disk created in format 'VDI'. UUID: e8f06a57-805e-464f-8cbc-3e23d082a003  
 walter@walter-Lenovo-Z480:~/VirtualBox VMs/intraweb$ VBoxManage showhdinfo Linux1d.vdi  
 UUID:      e8f06a57-805e-464f-8cbc-3e23d082a003  
 Parent UUID:  base  
 State:     created  
 Type:      normal (base)  
 Location:    /home/walter/VirtualBox VMs/intraweb/Linux1d.vdi  
 Storage format: VDI  
 Format variant: dynamic default  
 Capacity:    4853 MBytes  
 Size on disk:  4475 MBytes  

Now, i changed the original disk with this new one in the Virtual Box GUI Management and everything was smooth.

Next, i just resized the disk to have 20 Gig instead of only 4 Gig
 walter@walter-Lenovo-Z480:~/VirtualBox VMs/intraweb$ VBoxManage modifyhd ~/VirtualBox\ VMs/intraweb/Linux1d.vdi --resize 20000  
 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%  

Now i started the ubuntu desktop to use gparted and resize the guest operating system:

Choose to "Try Ubuntu"

Make sure to choose the right disk, i can not take any responsibility if something of this goes wrong:


I was not able to move the swap disk, so i removed it with fdisk.

fdisk /dev/sda
d 5
d 2
w
And then i started gparted again. Now i was able to resize the partition.  Then, i rebooted the virtual machine and opened gparted again.  Added the swap partition and rebooted.