<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6215700327614463879</id><updated>2012-02-16T11:32:33.640-08:00</updated><category term='migrate physical linux to virtual'/><category term='BioRuby BioSQL Rails'/><category term='method get'/><category term='virtualbox'/><category term='form_remote_tag'/><category term='gparted'/><category term='partimage'/><category term='virtual image'/><category term='ubuntu ontologizer swt3.4'/><category term='ralis'/><title type='text'>Code Bugged</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codebugged.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codebugged.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>IlPuccio</name><uri>http://www.blogger.com/profile/05239393302633762257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos8.flickr.com/9246497_24c8abea6a_m.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6215700327614463879.post-8743129410769778431</id><published>2009-09-15T02:16:00.000-07:00</published><updated>2009-09-15T12:26:39.053-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtual image'/><category scheme='http://www.blogger.com/atom/ns#' term='partimage'/><category scheme='http://www.blogger.com/atom/ns#' term='gparted'/><category scheme='http://www.blogger.com/atom/ns#' term='migrate physical linux to virtual'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualbox'/><title type='text'>Migrate Physical Linux Box to Virtual Image</title><content type='html'>In these days I need to migrate my BioInformatics server from a physical machine to a virtuale one.&lt;div&gt;I don't want to reinstall everything so the cloning is the better solution from my point of view.&lt;/div&gt;&lt;div&gt;Resuming the steps:&lt;/div&gt;&lt;div&gt;0) Download and burn an image of &lt;a href="http://www.sysresccd.org/Main_Page"&gt;SystemRescueCd&lt;/a&gt;&lt;/div&gt;&lt;div&gt;1) Clone the original partitions using &lt;a href="http://www.partimage.org/Main_Page"&gt; Partimage&lt;/a&gt; booting from SystemRescueCd&lt;/div&gt;&lt;div&gt;2) Create a virtual machine -I'm using VirtualBox.&lt;/div&gt;&lt;div&gt;2.1) Create a virtual disk. You can use a remote disk, I did so cause I haven't space on my notebook.&lt;/div&gt;&lt;div&gt;2.2) Enable network, NAT is enought&lt;/div&gt;&lt;div&gt;3) Using Gparted recreate the original structure&lt;/div&gt;&lt;div&gt;4) Restore data using Partimage&lt;/div&gt;&lt;div&gt;5) Fix Grub and Network&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step by step:&lt;/div&gt;&lt;div&gt;0) None, download and burn is a very basic operation.&lt;/div&gt;&lt;div&gt;1) Cloning original partitions:&lt;/div&gt;&lt;div&gt;1.1) Boot using SystemRescueCd with these parameters:&lt;/div&gt;&lt;div&gt;rescuecd setkmap=it docache dodhcp&lt;/div&gt;&lt;div&gt;setkmap is for setting my italian keyboard&lt;/div&gt;&lt;div&gt;docache is used to load in memory the sysresc cd, it requires about 400 MB of RAM&lt;/div&gt;&lt;div&gt;dodhcp request an ip if you need to mount remote disk or partitions.&lt;/div&gt;&lt;div&gt;Note: in my case I saved the partition on a network disk using mount.cifs (samba), you can use nfs too&lt;/div&gt;&lt;div&gt;1.2) mount.cifs //remote_machine_ip_better/remote_exported_directory /mnt/backup -o user=your_remote_user&lt;/div&gt;&lt;div&gt;Insert the password and it's done.&lt;/div&gt;&lt;div&gt;1.3) partimage save /dev/sdaX /mnt/backup/backup-sdaX-pimg&lt;/div&gt;&lt;div&gt;substitute X with the number of the partition you are going to backup.&lt;/div&gt;&lt;div&gt;1.4) Coffe... and repeat the procedure for every partition.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) Creating a VirtualBox machine is very easy, create a dinamically virtual disk of appropriate max capacity.  Keep in mind that partimage saves only the occupied data an not the whole partition so you'll get a backup file which is proably smaller than you original paritition ( without considering compression obviously). However I suggest to oversize a littel bit the dinamically disk, acqually I don't know why the system gets problems with the exact size.&lt;/div&gt;&lt;div&gt;NB: you can create a virtual disk on a remote location without problem. I mounted the remote location from Windows.&lt;/div&gt;&lt;div&gt;2.1) Give enought memory to load the cd in cache, so al least 512 of ram, it's not mandatory (remove docache parameter at boot). &lt;/div&gt;&lt;div&gt;2.2) Boot SystemRescueCd in the same wey you did at (1.1)&lt;/div&gt;&lt;div&gt;rescuecd setkmap=it docache dodhcp&lt;/div&gt;&lt;div&gt;2.3) mount the backup disk, in my case a remote one.&lt;/div&gt;&lt;div&gt;&lt;div&gt;mount.cifs //remote_machine_ip_better/remote_exported_directory /mnt/backup -o user=your_remote_user&lt;/div&gt;&lt;div&gt;Insert the password and it's done.&lt;/div&gt;&lt;div&gt;3) type "wizard" in console and the graphic interface will start, I hope for you. &lt;/div&gt;&lt;div&gt;3.1) type "gparted" in the terminal and recreate the structure of the physical machine into the virtual disk.&lt;/div&gt;&lt;div&gt;4) then restore the images:&lt;/div&gt;&lt;div&gt;partimage restore /dev/sdaX /mnt/backup/backup-sdaX-pimg.000&lt;/div&gt;&lt;div&gt;4.1) Coffe...&lt;/div&gt;&lt;div&gt;5) at this point you need to create a startup partition on the virtual disk. I followed this guide &lt;/div&gt;&lt;span class="Apple-style-span"   style=" color: rgb(51, 51, 51);  line-height: 18px; font-family:Verdana;font-size:11px;"&gt;&lt;h2 class="post-title" style="font-family: Georgia, Arial, serif; font-weight: bold; letter-spacing: 1px; font-size: 1.3em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;a href="http://natonelbronx.wordpress.com/2008/03/03/ripristinare-grub-da-livecd-con-grub-install-e-altre-amenita/"&gt;Ripristinare Grub da LiveCD con grub-install (e altre amenità)&lt;/a&gt;&lt;/h2&gt;&lt;/span&gt;&lt;div&gt;mkdir /mnt/sda1&lt;/div&gt;&lt;div&gt;mount /dev/sda1 /mnt/sda1&lt;/div&gt;&lt;div&gt;mount --bind /dev/ /mnt/sda1/dev/&lt;/div&gt;&lt;div&gt;mount -t proc none /mnt/sda1/proc&lt;/div&gt;&lt;div&gt;chroot /mnt/sda1 /bin/bash&lt;/div&gt;&lt;div&gt;#check you grub configuration, if your distro uses UUID you need to update the menu.lst file and the device map too.&lt;/div&gt;&lt;div&gt;grub-install /dev/sda&lt;/div&gt;&lt;div&gt;6) shutdown the virtual machine, remove the booting from SystemRescueCd and restart the VirtualMachine.&lt;/div&gt;&lt;div&gt;7) If everything works, Beer. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: I got problems with the network in Ubuntu because it configures the macaddress in /etc/udev/rules.d/70-persistent-net.rules, I just deleted the content of the file and then rebooting the system can acquire the correct mac address assigned by VirtualBox. Actually I had this problem cloning a virtual machine using the above procedure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;EDIT: I have had seriuos problems handling data from remote -smb- filesystem. Don't know why.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6215700327614463879-8743129410769778431?l=codebugged.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codebugged.blogspot.com/feeds/8743129410769778431/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://codebugged.blogspot.com/2009/09/migrate-physical-linux-box-to-virtual.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/8743129410769778431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/8743129410769778431'/><link rel='alternate' type='text/html' href='http://codebugged.blogspot.com/2009/09/migrate-physical-linux-box-to-virtual.html' title='Migrate Physical Linux Box to Virtual Image'/><author><name>IlPuccio</name><uri>http://www.blogger.com/profile/05239393302633762257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos8.flickr.com/9246497_24c8abea6a_m.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6215700327614463879.post-4035401815861067043</id><published>2009-07-23T05:22:00.000-07:00</published><updated>2009-07-23T05:24:07.719-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu ontologizer swt3.4'/><title type='text'>[Solved] Ontologizer, ubuntu, swt 3.4</title><content type='html'>&lt;div&gt;aptitude install libswt-gtk-3.4-java&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;java -cp /usr/share/java/swt-gtk-3.4.jar:ontologizer.jar ontologizer.gui.swt.Ontologizer&lt;/div&gt;&lt;div&gt;Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-gtk-3448 or swt-gtk in swt.library.path, java.library.path or the jar file&lt;/div&gt;&lt;div&gt;        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:233)&lt;/div&gt;&lt;div&gt;        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)&lt;/div&gt;&lt;div&gt;        at org.eclipse.swt.internal.C.&lt;clinit&gt;(C.java:21)&lt;/div&gt;&lt;div&gt;        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)&lt;/div&gt;&lt;div&gt;        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)&lt;/div&gt;&lt;div&gt;        at org.eclipse.swt.widgets.Display.&lt;clinit&gt;(Display.java:130)&lt;/div&gt;&lt;div&gt;        at ontologizer.gui.swt.Ontologizer.main(Ontologizer.java:201)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Solved with :&lt;/div&gt;&lt;div&gt;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni java -cp /usr/share/java/swt-gtk-3.4.jar:ontologizer.jar ontologizer.gui.swt.Ontologizer&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6215700327614463879-4035401815861067043?l=codebugged.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codebugged.blogspot.com/feeds/4035401815861067043/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://codebugged.blogspot.com/2009/07/solved-ontologizer-ubuntu-swt-34.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/4035401815861067043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/4035401815861067043'/><link rel='alternate' type='text/html' href='http://codebugged.blogspot.com/2009/07/solved-ontologizer-ubuntu-swt-34.html' title='[Solved] Ontologizer, ubuntu, swt 3.4'/><author><name>IlPuccio</name><uri>http://www.blogger.com/profile/05239393302633762257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos8.flickr.com/9246497_24c8abea6a_m.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6215700327614463879.post-5691862143662857176</id><published>2009-05-31T01:00:00.000-07:00</published><updated>2009-05-31T01:13:27.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='form_remote_tag'/><category scheme='http://www.blogger.com/atom/ns#' term='ralis'/><category scheme='http://www.blogger.com/atom/ns#' term='method get'/><title type='text'>Rails, form_remote_tag, method GET</title><content type='html'>This is not a bug, just a reminder for me on HowTo set up a form_remote_tag with method GET on Rails, I'm using version 2.2.2&lt;div&gt;The only things bugged here is the documentation bevause is not very intuitive. There are a lot of examples but none about setting the method to GET. This snippet sets the ajax request and the html request to GET. Don't forget to set both to get, otherwise you'll have a for with an ajax get and a html post, POST is the DEFAULT.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;     form_remote_tag  :url =&gt; blasts_path,&lt;/div&gt;&lt;div&gt;                        :method =&gt; :get,&lt;/div&gt;&lt;div&gt;                        :html =&gt; {:method=&gt; :get},&lt;/div&gt;&lt;div&gt;                        :update =&gt; { :success =&gt; "succeed", :failure =&gt; "fail"} do &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;....YOUR CODE  HERE....&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;       select("sm","id", {"SeMe clusters"=&gt;"1", "All clusters"=&gt;"0"}) &lt;br /&gt;&lt;/div&gt;&lt;div&gt;       submit_tag "Search", :name =&gt; nil &lt;/div&gt;&lt;div&gt;    end &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;      &lt;br /&gt;&lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6215700327614463879-5691862143662857176?l=codebugged.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codebugged.blogspot.com/feeds/5691862143662857176/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://codebugged.blogspot.com/2009/05/rails-formremotetag-method-get.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/5691862143662857176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/5691862143662857176'/><link rel='alternate' type='text/html' href='http://codebugged.blogspot.com/2009/05/rails-formremotetag-method-get.html' title='Rails, form_remote_tag, method GET'/><author><name>IlPuccio</name><uri>http://www.blogger.com/profile/05239393302633762257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos8.flickr.com/9246497_24c8abea6a_m.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6215700327614463879.post-6014926604867965625</id><published>2009-05-20T12:41:00.000-07:00</published><updated>2009-05-20T12:53:39.779-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BioRuby BioSQL Rails'/><title type='text'>Rails and mixed models convetions</title><content type='html'>I wrote a library for BioRuby to store data into BioSQL.  Evertything is fine, I hope :-), using the lib inside the BioRuby world but going outside and meeting rails, there is a crash.&lt;div&gt;BioSQL' schema doesn't follow the Rails' rules, because ... long story but that's it. Active record needs to be tuned, removing pluralization and changing the primary key structure:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;self.pluralize_table_names = false&lt;/div&gt;&lt;div&gt;&lt;div&gt;self.primary_key_prefix_type = :table_name_with_underscore&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wow cool it's I can read my schema but ...&lt;/div&gt;&lt;div&gt;Using biosql into a rails app there is a problems, If you have tables which are referring/referred to/by  BioSQL schema you must specify the :class=&gt;"Bio::SQL::XXX".&lt;/div&gt;&lt;div&gt;Then your notBioSQL tables loose their active record default properties like default primary keys and name convention. I had to re-setup them in every new table/class model.&lt;/div&gt;&lt;div&gt;That is very strange; I can't find an explenation but after days of trouble I got it. &lt;/div&gt;&lt;div&gt;link_to method was my black doom.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6215700327614463879-6014926604867965625?l=codebugged.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codebugged.blogspot.com/feeds/6014926604867965625/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://codebugged.blogspot.com/2009/05/rails-and-mixed-models-convetions.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/6014926604867965625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/6014926604867965625'/><link rel='alternate' type='text/html' href='http://codebugged.blogspot.com/2009/05/rails-and-mixed-models-convetions.html' title='Rails and mixed models convetions'/><author><name>IlPuccio</name><uri>http://www.blogger.com/profile/05239393302633762257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos8.flickr.com/9246497_24c8abea6a_m.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6215700327614463879.post-5673877183263711371</id><published>2009-05-20T12:31:00.000-07:00</published><updated>2009-05-20T12:41:40.155-07:00</updated><title type='text'>When your Boss became a Parrot</title><content type='html'>There is always a bug and it's quite stressing when you find it, why ?&lt;div&gt;Usually happends when you have no time or your boss is over your shoulder wating for your answer. You are the Tree and he is the Parrot.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Discovering and resolve bugs is very interesting, keep your bain young and imply a lot of work for Google.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm working with a lot of technologies, Ruby, Rails, DB Postgresql and MySQL,  JEE, Hibernate, bioinformatic tools. &lt;/div&gt;&lt;div&gt;Everything is like a mine field. The Parrot in this case is flying over your head.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6215700327614463879-5673877183263711371?l=codebugged.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codebugged.blogspot.com/feeds/5673877183263711371/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://codebugged.blogspot.com/2009/05/when-your-boss-became-parrot.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/5673877183263711371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6215700327614463879/posts/default/5673877183263711371'/><link rel='alternate' type='text/html' href='http://codebugged.blogspot.com/2009/05/when-your-boss-became-parrot.html' title='When your Boss became a Parrot'/><author><name>IlPuccio</name><uri>http://www.blogger.com/profile/05239393302633762257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos8.flickr.com/9246497_24c8abea6a_m.jpg'/></author><thr:total>0</thr:total></entry></feed>
