<?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:blogger='http://schemas.google.com/blogger/2008' 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-4419564480834914366</id><updated>2025-12-14T20:03:44.930-08:00</updated><category term="ubuntu"/><category term="DB"/><category term="adb"/><category term="administration"/><category term="android"/><category term="development"/><category term="linux"/><category term="Android Ubuntu SMS PC"/><category term="DG4ODBC"/><category term="Dell"/><category term="Drupal"/><category term="ESXi"/><category term="GPIO"/><category term="Lucid"/><category term="MS SQL Server"/><category term="MVCC"/><category term="Mint"/><category term="OS development"/><category term="Oracle"/><category term="Raspberry PI"/><category term="Sound"/><category term="VAIO"/><category term="VPCEB1S1E"/><category term="Virtual box"/><category term="XPS"/><category term="broadcom"/><category term="database"/><category term="disk"/><category term="drivers"/><category term="fix sound ubuntu VPCEB1S1E"/><category term="hr monitor"/><category term="intel"/><category term="nvidia"/><category term="polar"/><category term="rcx3"/><category term="serialization"/><category term="troubleshooting"/><category term="udev-rules"/><category term="virtualization"/><category term="vmware"/><category term="windows linux VAIO VPCEB1S1E fan PCG-71211M"/><title type='text'>Allinthemiddle</title><subtitle type='html'>In this blog I could post about anything IT.&#xa;Most of the posts will be some sort of mental notes which hopefully benefits others. Don&#39;t expect regular posts.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-7748903427273454209</id><published>2024-05-07T04:25:00.000-07:00</published><updated>2024-05-07T04:25:21.874-07:00</updated><title type='text'>Control network routes for specific processes on Linux</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;Intro&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;I wanted to control the flow of packets for specific processes on my Linux (Ubuntu 22.04) such that they won&#39;t go through a tunnel device which is setup for VPN connectivity. The VPN software is provided as is and I do not administer its configuration.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Please note that this post assumes you have understanding of network routing and are equiped to troubleshoot problems. If not you should first learn how networks work first. Each network setup has its own specifics. Appliance vendors come up with defaults and automation for the most common scenarios. Custom configuration can conflict with that and might isolate you from network access. All responsibilities remain those of the reader.&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;What worked&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Summary of the solution&lt;br /&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Use the network classifier cgroup (src: &lt;a href=&quot;https://docs.kernel.org/admin-guide/cgroup-v1/net_cls.html&quot; target=&quot;_blank&quot;&gt;docs.kernel.org&lt;/a&gt;) to tag network packets with a class identifier (classid) for a process and its subprocesses (src: &lt;a href=&quot;https://unix.stackexchange.com/questions/743436/how-to-mark-packets-by-program&quot;&gt;unix.stackexchange.com&lt;/a&gt;). Subsequently use iptables to mark packets which you can use from a custom routing table using policy-based routing (&lt;a href=&quot;https://serverfault.com/questions/345111/iptables-target-to-route-packet-to-specific-interface&quot;&gt;serverfault.com&lt;/a&gt;).&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Step by step for an example scenario&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Imagine that for certain tasks you need to use a VPN that is provided and configured by another team. The VPN software setups up a tunnel interface on your computer and configures a default route for this tunnel device. You still want to use a public service that provides a dedicated client but for which you don&#39;t want traffic to go over the VPN (e.g. an audio streaming service like Spotify).&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Step 1 : Create a novpn network class&lt;/h4&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo mkdir /sys/fs/cgroup/net_cls&lt;br /&gt;sudo mount -t cgroup -onet_cls net_cls /sys/fs/cgroup/net_cls&lt;br /&gt;sudo mkdir /sys/fs/cgroup/net_cls/novpn&lt;br /&gt;echo 0x100001 | sudo tee /sys/fs/cgroup/net_cls/novpn/net_cls.classid&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;You can see the upstream documentation on https://docs.kernel.org/admin-guide/cgroup-v1/net_cls.html . Important is the structure of the classid. You can freely chose it as long as it is unique for your system but if you chose another id make sure to check the id doing a cat on the file as it will be needed later:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cat&lt;/span&gt; &lt;span style=&quot;font-family: courier;&quot;&gt;/sys/fs/cgroup/net_cls/novnp/net_cls.classid&lt;br /&gt;&lt;/span&gt; &lt;span style=&quot;background-color: #fcff01; font-family: courier;&quot;&gt;1048577&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Step 2 : Create custom routing table&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In order to create the custom routing table the easiest way is to just &#39;clone&#39; the default route from your setup when the VPN is not up. You can easily get this using &lt;span style=&quot;font-family: courier;&quot;&gt;ip&lt;/span&gt;: &lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;ip route | grep default&lt;br /&gt;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;default via 192.168.0.1 dev wlp0s20f3 proto dhcp metric 600 &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;With that it is best to pick a route table number that is not in use such that there is a dedicated routing table. As per &lt;a href=&quot;https://serverfault.com/questions/618857/list-all-route-tables&quot;&gt;serverfault.com&lt;/a&gt; this can be done using&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ip route show table all | grep -Po &#39;table \K[^\s]+&#39; | sort -u&lt;br /&gt;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;local&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;The example output above would just mean there is no tables besides the reserved routing tables. In our case we want a dedicated route table for traffic that should not go through VPN so lets register it officially with a number not taken. I chose 3 and I can register it as follows:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;echo &quot;3\tnovpn&quot;&amp;nbsp; | sudo tee -a /etc/iproute2/rt_tables&lt;br /&gt;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; novpn&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;For me this file looks now like:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cat /etc/iproute2/rt_tables&lt;br /&gt;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;#&lt;br /&gt;# reserved values&lt;br /&gt;#&lt;br /&gt;255&amp;nbsp;&amp;nbsp; &amp;nbsp;local&lt;br /&gt;254&amp;nbsp;&amp;nbsp; &amp;nbsp;main&lt;br /&gt;253&amp;nbsp;&amp;nbsp; &amp;nbsp;default&lt;br /&gt;0&amp;nbsp;&amp;nbsp; &amp;nbsp;unspec&lt;br /&gt;#&lt;br /&gt;# local&lt;br /&gt;#&lt;br /&gt;#1&amp;nbsp;&amp;nbsp; &amp;nbsp;inr.ruhep&lt;br /&gt;3&amp;nbsp;&amp;nbsp; &amp;nbsp;novpn&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;So it shows the reserved values as well as the table id we chose and its logical name &#39;novpn&#39;. We should also pick a firewall mark to mark the packets. We can check all the iptables tables for marks:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;for table in raw security mangle nat filter; do echo &quot;===$table===&quot;;sudo /sbin/iptables -L -n --line-numbers --table $table -v; done | grep -o &quot;MARK set [0-9x]*&quot; &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;On my setup there were no firewall marks yet. I will therefore use mark 2 in this example. Now we have all the inputs to setup our route table&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;ip rule add fwmark 2 table 3&lt;br /&gt;ip route add default via 192.168.0.1 dev wlp0s20f3 proto dhcp metric 1 table 3&lt;br /&gt;ip route flush cache&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;With the first command we make sure the routing table is selected for packets with firewall mark 2. With the second command we add the default route to our routing table. And finally we clear cache to make sure new config is used.&lt;br /&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Step 3 : Configure the marking using iptables&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Since we already decided upon the mark and we have setup the cgroup and know its class id we have everything to configure iptables to mark pakkets as desired: &lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo iptables -t mangle -A OUTPUT -m cgroup --cgroup 1048577 -j MARK --set-mark 2&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Step 4: Start our process such that it has the cgroup class id&lt;/h4&gt;&lt;p&gt;It is important our processes get the cgroup class id. This can be done by registering their&amp;nbsp; process ID in &lt;span style=&quot;font-family: courier;&quot;&gt;/sys/fs/cgroup/net_cls/novpn/tasks&lt;/span&gt; . This could become quite tedious since a lot of programs spawn a lot of children. Luckily Linux keeps track of the parent child hierarchy and if we register a process all its children will also be added. So if you spawn a terminal window and register its pid and subsequently spawn the process than the process and all of its children will get associated with this novpn cgroup class.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;echo $$ | sudo tee /sys/fs/cgroup/net_cls/novpn/tasks&lt;br /&gt;spotify&lt;/span&gt;&lt;/blockquote&gt;Now this Spotify process will have all its packets adhere to routing table 3 which doesn&#39;t have a route for the VPN but rather goes as if there wasn&#39;t a VPN setup.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Final notes&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;I do not represent Spotify I just use their services and it felt to be a useful example (their client application spawns multiple processes and needs to be able to communicate with other OS entities which makes other solutions like using netns more tricky).&lt;/li&gt;&lt;li&gt;When using the terminal approach, one should take care not to use the terminal for actions that require VPN connectivity as per-design those wouldn&#39;t work in that terminal.&lt;/li&gt;&lt;li&gt;This is a rather static solution if you move your computer and end up on a new network then likely you need a different network configuration (other default route in the custom table)&lt;/li&gt;&lt;li&gt;Verify the marking of packets of a cgroup is working. An easy trick to verify the tagging is working is by changing the iptables rule to drop the packages rather than to mark them. Then you can easily verify that Spotify works when launched outside the &quot;novpn&quot;&amp;nbsp; terminal but that it cannot connect to any network when launched inside the &quot;novpn&quot;&amp;nbsp; terminal.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/7748903427273454209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2024/05/control-network-routes-for-specific.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7748903427273454209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7748903427273454209'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2024/05/control-network-routes-for-specific.html' title='Control network routes for specific processes on Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-5133378656900221211</id><published>2023-11-25T07:12:00.000-08:00</published><updated>2023-11-25T07:12:59.722-08:00</updated><title type='text'>Podman pitfalls</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;Fedora docs are your friend&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;https://docs.fedoraproject.org/en-US/fedora-coreos/ &lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;SELinux might be on&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;If you are having permission denied errors watch out for SELinux. Check your podman VM and verify /etc/selinux/config . You can consider switching to permissive mode + reboot&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Certificate errors&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;MITM &lt;br /&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Some company like to or must inspect their users traffic. Generally this is done by having a transparent proxy which terminates SSL/TLS and uses a self-signed certificate that is owned by the company and can be considered trusted. The default podman VM won´t trust this certificate. You can try the following:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;COPY the PEM file to /etc/pki/ca-trust/source/anchors/ and then update the trust:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;update-ca-trust force-enable &amp;amp;&amp;amp; update-ca-trust extract&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Time drift&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;If the podman VM has time drift this can also break SSL/TLS certificate verification. Just update the time of your VM.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Allow docker in podman&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo rpm-ostree install podman-docker &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/5133378656900221211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2023/11/podman-pitfalls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5133378656900221211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5133378656900221211'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2023/11/podman-pitfalls.html' title='Podman pitfalls'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-5894166069813867051</id><published>2023-11-25T07:00:00.000-08:00</published><updated>2024-05-14T23:21:54.501-07:00</updated><title type='text'>Kubernetes cheat sheet</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;Just some commands that had value at some time or another. &lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Debugging&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Sometimes debugging is hard because you are using an optimized images without troubleshooting tools or even a shell. Ephemeral containers come to the rescue there with some useful kubectl debug commands but if you need to see the attached volumes these tools fall short and while it is possible to do it manually it is tedious. Make sure you are aware of kubectl-superdebug :&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot; https://medium.com/datamindedbe/debugging-running-pods-on-kubernetes-2ba160c47ef5 &quot;&gt;https://medium.com/datamindedbe/debugging-running-pods-on-kubernetes-2ba160c47ef5 &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Resources&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;All resources in a namespace&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Just iterate over the resource type and look for them:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;for i in `kubectl api-resources --verbs list --namespaced -o name`; do kubectl get --sho-kind --ignore-not-found $i; done&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Which pods still have persistent volume claim&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl get pods --all-namespaces -o=json | jq -c &#39;.items[] | {name: .metadata.name, namespace: .metadata.namespace, claimName:.spec.volumes[] | select (has (&quot;persistentVolumeClaim&quot;) ).persistentVolumeClaim.claimName }&#39;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Networking&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Jump portals&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In order to do this you&#39;d need to be able to exec into pods and make sure socat is available on the pod. When that is possible it is possible to tunnel via the pod towards a target.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;On the pod setup a tunnel to remote endpoint:&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;socat tcp-l:&amp;lt;local-port&amp;gt;,fork,reuseaddr tcp:&amp;lt;target-host&amp;gt;:&amp;lt;target-port&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl port-forward pod/&amp;lt;jump-pod&amp;gt; &amp;lt;local-port&amp;gt;:&amp;lt;target-port&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;resources:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;- socat commad list: https://exploit-notes.hdks.org/exploit/network/port-forwarding/port-forwarding-with-socat/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;- k8s port-forward docs: https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/ &lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/5894166069813867051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2023/11/kubernetes-cheat-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5894166069813867051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5894166069813867051'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2023/11/kubernetes-cheat-sheet.html' title='Kubernetes cheat sheet'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-3332049517791952972</id><published>2022-09-01T12:24:00.001-07:00</published><updated>2022-09-01T12:32:31.115-07:00</updated><title type='text'>OAuth 2.0 notes</title><content type='html'>&lt;p&gt;&amp;nbsp;This post is by no means meant to be original just some notes to persist info acquired while digesting oauth2.0/openid connect articles. Use at your own risk. An attempt was made at keeping pointers to the sources.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;rfc6749&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;source: &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc6749&quot;&gt;https://www.rfc-editor.org/rfc/rfc6749&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre class=&quot;newpage&quot;&gt;The authorization code grant type is used to obtain both access
   tokens and refresh tokens and is optimized for confidential clients.
   Since this is a redirection-based flow, the client must be capable of
   interacting with the resource owner&#39;s user-agent (typically a web
   browser) and capable of receiving incoming requests (via redirection)
   from the authorization server.

     +----------+
     | Resource |
     |   Owner  |
     |          |
     +----------+
          ^
          |
         (B)
     +----|-----+          Client Identifier      +---------------+
     |         -+----(A)-- &amp;amp; Redirection URI ----&amp;gt;|               |
     |  User-   |                                 | Authorization |
     |  Agent  -+----(B)-- User authenticates ---&amp;gt;|     Server    |
     |          |                                 |               |
     |         -+----(C)-- Authorization Code ---&amp;lt;|               |
     +-|----|---+                                 +---------------+
       |    |                                         ^      v
      (A)  (C)                                        |      |
       |    |                                         |      |
       ^    v                                         |      |
     +---------+                                      |      |
     |         |&amp;gt;---(D)-- Authorization Code ---------&#39;      |
     |  Client |          &amp;amp; Redirection URI                  |
     |         |                                             |
     |         |&amp;lt;---(E)----- Access Token -------------------&#39;
     +---------+       (w/ Optional Refresh Token)&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc6749#section-4.1&quot;&gt;https://www.rfc-editor.org/rfc/rfc6749#section-4.1&lt;/a&gt;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h2 class=&quot;newpage&quot; style=&quot;text-align: left;&quot;&gt;AWS Cognito&#39;s authorization code grant:&lt;/h2&gt;&lt;pre class=&quot;newpage&quot;&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/&quot;&gt;https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/&lt;/a&gt;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;Cognito comes by default with an auth app which gets hosted on an URI with a chosen domain name:&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;https://&amp;lt;domain-name&amp;gt;&lt;b data-reactid=&quot;.0.2.0.1.0.1.0.0.0.0.9.3.0.0.2.0.0&quot;&gt;.auth.&amp;lt;region&amp;gt;.amazoncognito.com&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;In there you have the different endpoints for your authn/authz flows which are documented on&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;&lt;a href=&quot;https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-userpools-server-contract-reference.html&quot;&gt;https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-userpools-server-contract-reference.html&lt;/a&gt;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;h1 class=&quot;newpage&quot; style=&quot;text-align: left;&quot;&gt;Verification of JWT tokens from Cognito&lt;/h1&gt;&lt;pre class=&quot;newpage&quot;&gt;The key information for verification depends on the user pool and can be retrieved from:&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;https://cognito-idp.&lt;code class=&quot;replaceable&quot;&gt;Region&lt;/code&gt;.amazonaws.com/&lt;code class=&quot;replaceable&quot;&gt;your_user_pool_ID&lt;/code&gt;/.well-known/jwks.json&amp;nbsp;. For details&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;see the knowledge-center article &lt;a href=&quot;https://aws.amazon.com/premiumsupport/knowledge-center/decode-verify-cognito-json-token/&quot;&gt;https://aws.amazon.com/premiumsupport/knowledge-center/decode-verify-cognito-json-token/&lt;/a&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;h2 class=&quot;newpage&quot; style=&quot;text-align: left;&quot;&gt;ALB authn/authz&lt;/h2&gt;&lt;pre class=&quot;newpage&quot;&gt;&lt;a href=&quot;https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html&quot;&gt;https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html&lt;/a&gt;&lt;/pre&gt;&lt;pre class=&quot;newpage&quot;&gt;The loadbalancer sets the following headers:
&lt;/pre&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;term&quot;&gt;&lt;code class=&quot;code&quot;&gt;x-amzn-oidc-accesstoken&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;dl&gt;&lt;dd&gt;
                        &lt;p&gt;The access token from the token endpoint, in plain text.&lt;/p&gt;
                    &lt;/dd&gt;&lt;/dl&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;term&quot;&gt;&lt;code class=&quot;code&quot;&gt;x-amzn-oidc-identity&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;dl&gt;&lt;dd&gt;
                        &lt;p&gt;The subject field (&lt;code class=&quot;code&quot;&gt;sub&lt;/code&gt;) from the user info endpoint, in
                            plain text.&lt;/p&gt;
                    &lt;/dd&gt;&lt;/dl&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;term&quot;&gt;&lt;code class=&quot;code&quot;&gt;x-amzn-oidc-data&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;dl&gt;&lt;dd&gt;
                        &lt;p&gt;The user claims, in JSON web tokens (JWT) format.&lt;/p&gt;
                    &lt;/dd&gt;&lt;/dl&gt;&lt;pre class=&quot;newpage&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;h2 class=&quot;newpage&quot; style=&quot;text-align: left;&quot;&gt;Miscellaneous notes &lt;br /&gt;&lt;/h2&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;div class=&quot;newpage&quot; style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;newpage&quot; style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;redirect_uri&#39;s have to match&lt;br /&gt;&lt;/li&gt;&lt;li&gt;state is also used to avoid cross-side request forgery attacks &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;pre class=&quot;newpage&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/3332049517791952972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2022/09/oauth-20-notes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3332049517791952972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3332049517791952972'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2022/09/oauth-20-notes.html' title='OAuth 2.0 notes'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-3543303458754430447</id><published>2022-01-23T08:17:00.003-08:00</published><updated>2022-01-23T12:21:25.002-08:00</updated><title type='text'>Authentication via Belgian eID card with Mozilla Firefox on Linux</title><content type='html'>&lt;p&gt;Since 2003 the Belgian government issues electronic identity cards called &quot;eID&quot; cards. These cards have cryptographic keys on them that allow digital signatures. This enables you to authenticate to government e-services using a smart card reader, your eID and pin (which you have to set when you receive your eID card). While setting up the software on Windows is straight forward I found the process for Linux less trivial hence I like to documented it.&lt;/p&gt;&lt;p&gt;So if you want to use your eID card to login to Belgian governmental services on Linux you can use this as a guide. My setup is a Linux Mind 20.3 &quot;Una&quot; which was not considered a support OS at time of writing (20.2 &quot;Uma&quot; was) so these instructions should not be limited to supported OS-es. &lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;The well documented part&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In order to be able to authenticate using an eID you need some middleware on your computer. This middleware provides the interface between your browser plugin and your eID in the smartcard reader. This section describes the installation of this middleware.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;This piece of software is available via &lt;a href=&quot;https://eid.belgium.be&quot;&gt;https://eid.belgium.be&lt;/a&gt; and at time of writing the Linux version can be found at &lt;a href=&quot;https://eid.belgium.be/en/linux-eid-software-installatie&quot;&gt;https://eid.belgium.be/en/linux-eid-software-installatie&lt;/a&gt; . I do appreciate that they have tried to support a variety popular Linux distributions but what I respect most is their decision to have it available as opensource. In my case I used a newer release of Mint and therefore I downloaded the tarbal from the link under &quot;Downloads for unsupported distributions&quot;. Surprisingly they don&#39;t mention their github repo which has a better README.md. So I&#39;d advise to start there: &lt;a href=&quot;https://github.com/Fedict/eid-mw&quot;&gt;https://github.com/Fedict/eid-mw&lt;/a&gt; or either just check out the instructions and use it to install the code packaged in the tarbal.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;The github page details the pre-requisites. For my distribution I was able to install them using:&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;code&gt;sudo apt-get install libtool autoconf automake libassuan-dev autoconf-archive libpcsclite-dev libgtk-3-dev libcurl4-openssl-dev libproxy-dev libxml2 libp11-kit-dev openssl&lt;/code&gt; &lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Once you have the pre-requisites installed you can just use the commands from the github README.md to install the middleware:&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;code&gt;autoreconf -i&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;code&gt;./configure 
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;make&lt;/code&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;sudo make install&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt; &lt;/code&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;After this the middleware is installed. It comes with a binary application which you can run via the command `eid-viewer` and use to verify it is working correctly.&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;No card reader found&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;At this stage the application opened but the status bar at the bottom stated &quot;No cardreader found&quot; even when my cardreader was connected. Generally when a card reader is connected but no eID is inserted it should read &quot;Ready to read identity card&quot; but when testing just make sure to insert an eID card because the card reader might require this. In my case however I was stuck at &quot;no cardreader found&quot;.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;The most likely explanation was that Linux didn&#39;t know how to communicate with my card reader and that it requires a device driver. Since it is a card reader that has many years I didn&#39;t have the documentation that came with it and the device itself only has a label &quot;Digipass by vasco&quot; which is too little to get a specific driver.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Fortunately Linux can help here. Since my smart cardreader is a USB device I can list all the USB devices and get there VendorId and ProductId using lsusb:&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;code&gt;lsusb&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;...&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;Bus 003 Device 006: ID &lt;span style=&quot;color: red;&quot;&gt;1a44&lt;/span&gt;:&lt;span style=&quot;color: #2b00fe;&quot;&gt;0001&lt;/span&gt; VASCO Data Security International Digipass&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;...&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;&lt;p&gt;When you Google this you arrive at the useful linux-hardware.org website (specifically &lt;a href=&quot;https://linux-hardware.org/?id=usb:1a44-0001&quot;&gt;https://linux-hardware.org/?id=usb:1a44-0001&lt;/a&gt;). There they link to &lt;a href=&quot;https://salsa.debian.org/rousseau/CCID&quot;&gt;https://salsa.debian.org/rousseau/CCID&lt;/a&gt; which is a driver that works with quite a lot of models. This time I found the instructions on the website more useful: (i.e. &lt;a href=&quot;https://ccid.apdu.fr/&quot;&gt;https://ccid.apdu.fr/&lt;/a&gt; ). It also seems that you can do a `sudo apt-get install libccid` but I only saw this package afterwards. In my case I have compiled from source.&lt;/p&gt;&lt;p&gt;If at this stage you still aren&#39;t able to check your card via `eid-viewer` then make sure to install `pcscd` which is a daemon that allows access to a smart card. You&#39;ll need it anyway at a later point. After installing you can also start the corresponding service:&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;code&gt;sudo apt-get install pcscd&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;sudo service pcscd start&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Hopefully at this stage you can open `eid-viewer` and see your card details.&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Now make it work on firefox&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;There is an official extension for firefox to make it work with firefox which is available at &lt;a href=&quot;https://addons.mozilla.org/nl/firefox/addon/belgium-eid/&quot;&gt;https://addons.mozilla.org/nl/firefox/addon/belgium-eid/&lt;/a&gt; .&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;However for me it always would notify me at startup with &quot;A recent enough version of the Belgian electronic identity card software could not be found. Is the eID software installed and up-to-date?&quot;.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;I know the software is up-to-date since I have installed the latest version. This part required a bit more research so I&#39;ll split up in 2 sections; the explanation and the solution so you can skip to the solution if you are only interesting in getting yours working. If the solution doesn&#39;t work for you the explanation can give insights in how it works to aid troubleshooting on your end.&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;The explanation&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Whenever you get stuck you need to troubleshoot. One tool for troubleshooting is debugging. Recent versions of Firefox allows to debug extensions out of the box. If you browse to &quot;about:debugging&quot; then you get a debugging screen for Firefox, when you select &quot;This Firefox&quot;then you can see all the extensions that are currently installed. When you click the &quot;inspect&quot; button for the &quot;eID Belgium&quot; plugin you&#39;ll get a screen (if you&#39;ve used developer tools from Firefox or Chrome this looks very familiar). There is a debugger tab in which you can find the main thread which runs &quot;background-script.js&quot;. This allows you to see what the plugin actually does.&amp;nbsp; In this particular case it tries to install a pkcs11 security module. When that fails it shows the notification we saw earlier.&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Since automatic installation doesn&#39;t work I thought let&#39;s do it manually and I followed instruction from &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/PKCS11/Module_Installation&quot;&gt;https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/PKCS11/Module_Installation&lt;/a&gt; and after I added the module I could see in security devices that Firefox can even see the attached card reader. Full of optimism I try a test login via &lt;a href=&quot;https://iamapps.belgium.be/tma/?lang=en&quot;&gt;https://iamapps.belgium.be/tma/?lang=en&lt;/a&gt; leading to a disappointing failed login.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;The Firefox window to manage security devices gives very little configuration options but the issue at hand here is that the Firefox extension &quot;eID Belgium&quot; is not allowed to use the pkcs11 module that I imported manually. If you&#39;ve tried creating this security module manually you&#39;d want to delete it again because although it shows the cardreader it won&#39;t be usable and it will give rise to name conflict as you can only have one module named &quot;beidpkcs11&quot;.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;The proper way to go about it is via a native manifest: &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location&quot;&gt;https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location&lt;/a&gt; . This manifest was actually built but it was put on /usr/local/lib/mozilla/pkcs11-modules/beidpkcs11.json which seems not checked by Firefox (perhaps in the past it was . There is also an alternate version that acts as a fallback /usr/local/lib/mozilla/pkcs11-modules/beidpkcs11_alt.json . This fallback uses p11-kit but in my case the first version works perfectly.&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;The solution&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Put the generated manifest on the location where Firefox expects it:&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;code&gt;sudo mkdir -p /usr/lib/mozilla/pkcs11-modules/&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&amp;nbsp;sudo ln -s /usr/local/lib/mozilla/pkcs11-modules/beidpkcs11.json /usr/lib/mozilla/pkcs11-modules/beidpkcs11.json&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Restart firefox and you should no longer see the notification pop-up and ideally the lights of your card reader are even blinking.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Note according to&amp;nbsp; &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location&quot; target=&quot;_blank&quot;&gt;the docs&lt;/a&gt; the following 3 locations should be valid:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;code&gt;/usr/lib/mozilla/pkcs11-modules/beidpkcs11.json&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;&lt;code&gt;/usr/lib64/mozilla/pkcs11-modules/beidpkcs11.json&lt;/code&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;&lt;code&gt;&amp;nbsp;~/.mozilla/pkcs11-modules/beidpkcs11.json&amp;nbsp; &lt;br /&gt;&lt;/code&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;text-align: left;&quot;&gt;For me option 2 didn&#39;t work even though I&#39;m on Firefox 96.0.1 (64-bit). Option 1 &amp;amp; 3 both worked. So use 1 if you want it to be system-wide or option 3 if you only want it to be available for a specific user.&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;The final test&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Now go to &lt;a href=&quot;https://iamapps.belgium.be/tma/?lang=en&quot;&gt;https://iamapps.belgium.be/tma/?lang=en&lt;/a&gt; and you should be able to authenticate successfully!&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Finally you can start the fun part; the filing of your taxes! Or whatever you wanted to do.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Edit: I wanted to create a PR to add the native manifest but it seems somebody has beaten me to it &lt;a href=&quot;https://github.com/Fedict/eid-mw/commit/3ba426974e1b66d54b00b73cbe66137799ca80f3&quot; target=&quot;_blank&quot;&gt;(with this change)&lt;/a&gt;. So likely the next version will be easier to install.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/3543303458754430447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2022/01/authentication-via-belgian-eid-card.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3543303458754430447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3543303458754430447'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2022/01/authentication-via-belgian-eid-card.html' title='Authentication via Belgian eID card with Mozilla Firefox on Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-3624145236955932027</id><published>2021-12-03T16:04:00.001-08:00</published><updated>2021-12-04T04:33:35.643-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="administration"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="DB"/><category scheme="http://www.blogger.com/atom/ns#" term="development"/><category scheme="http://www.blogger.com/atom/ns#" term="MVCC"/><category scheme="http://www.blogger.com/atom/ns#" term="serialization"/><title type='text'>Serialization Anomily when using MVCC (The good, the bad &amp; the ugly)</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;Intro&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;When working in-depth with databases sooner or later you will encounter transaction isolation levels. If you are new to transaction isolation check out the &lt;a href=&quot;https://www.postgresql.org/docs/9.5/transaction-iso.html&quot; target=&quot;_blank&quot;&gt;Postgress transaction isolation documentation&lt;/a&gt; because that documentation team did an amazing job!&amp;nbsp; In this post I&#39;d like to go into more depth on one issue mentioned on that page the serialization anomaly.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Real life example&lt;/h2&gt;&lt;p&gt;A picture says more than a thousands words so let&#39;s try to create a mental picture by talking about a real-life scenario. For this assume we are creating an application that has to manage financial accounts.&lt;br /&gt;&lt;br /&gt;Let&#39;s take as a starting point 3 accounts with the following balances:&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Account A: €20&lt;/li&gt;&lt;li&gt;Account B: €30&lt;/li&gt;&lt;li&gt;Account C: €40&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Now consider 2 transaction:&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;tx1: transfers money (€10) from account A to a account B&lt;/li&gt;&lt;li&gt;tx2: transfers money (€10) from account A to C&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In order to perform these transactions against our database engine it is required to read the balance of the sender from the balances table , subtract the amount sent and write the new balance. Subsequently it needs to read the balance of the receiver, add the amount and write the receiver&#39;s new balance.&lt;br /&gt;&lt;br /&gt;When these transactions happen in a non-overlapping mode performing these changes to your data is almost trivial. We can detail the steps as follows: &lt;b&gt;Transaction 1 is in bold&lt;/b&gt; and &lt;i&gt;transaction 2 in italics&lt;/i&gt;. Then the statements look like:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Begin&lt;/b&gt; - &lt;b&gt;RA&lt;/b&gt; - &lt;b&gt;WA&lt;/b&gt; - &lt;b&gt;RB&lt;/b&gt; - &lt;b&gt;WB&lt;/b&gt; - &lt;b&gt;end&lt;/b&gt; - &lt;i&gt;begin&lt;/i&gt; - &lt;i&gt;RA&lt;/i&gt; - &lt;i&gt;WA&lt;/i&gt; - &lt;i&gt;RC&lt;/i&gt; - &lt;i&gt;WC&lt;/i&gt; - &lt;i&gt;end&lt;/i&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So in detail:&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;begin&lt;/b&gt;: begins the first transaction&lt;/li&gt;&lt;li&gt;&lt;b&gt;RA&lt;/b&gt;: reads balance for account A 20 euro&lt;/li&gt;&lt;li&gt;&lt;b&gt;WA:&lt;/b&gt; write the new balance of 10 Euro for account A&lt;/li&gt;&lt;li&gt;&lt;b&gt;RB&lt;/b&gt;: reads balance for account B 30 euro&lt;/li&gt;&lt;li&gt;&lt;b&gt;WB&lt;/b&gt;: write new balance of 40 euro for account B&lt;/li&gt;&lt;li&gt;&lt;b&gt;end&lt;/b&gt;: ends the first transaction&lt;/li&gt;&lt;li&gt;&lt;i&gt;begin&lt;/i&gt;: begins the second transaction&lt;/li&gt;&lt;li&gt;&lt;i&gt;RA&lt;/i&gt;: reads balance for account A 10 euro (since previous change is committed)&lt;/li&gt;&lt;li&gt;&lt;i&gt;WA&lt;/i&gt;: writes the new balance of 0 euro for account A&lt;/li&gt;&lt;li&gt;&lt;i&gt;RC&lt;/i&gt;: reads balance for account C 40 euro&lt;/li&gt;&lt;li&gt;&lt;i&gt;WC&lt;/i&gt;: writes the new balance of 50 euro for account C&lt;/li&gt;&lt;li&gt;&lt;i&gt;end&lt;/i&gt;: ends the second transaction&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These steps should be intuitive and feel familiar as it is the behavior we expect when performing financial transactions in real life.&lt;/p&gt;&lt;p&gt;The reason why this is easy is because concurrency in this example always 1, a single transaction is in the system, so no overlap is taking place.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;The interesting world of concurrency&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;&amp;nbsp;Just like a puzzle becomes more interesting when getting to more than 1 piece concurrency becomes interesting when having multiple concurrent actors.&lt;/p&gt;&lt;p&gt;A modern database however will have a few tricks up its sleeves to manage concurrency. Locking is probably the best-known mechanism to deal with concurrency. It can for example avoid data corruption due to multiple processes writing the same record at the same time. Locking is very powerful but is generally not the first choice to deal with concurrency because it causes contention which lowers the throughput of your database system. Which brings us to another database trick; &lt;a href=&quot;https://www.postgresql.org/docs/9.5/mvcc-intro.html&quot; target=&quot;_blank&quot;&gt;Multiversion Concurrency Control&lt;/a&gt;, MVCC in short.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;acronym class=&quot;ACRONYM&quot;&gt;MVCC is an implementation where&lt;/acronym&gt; each transaction will get a snapshot of the database state at transaction start. This allows the DB engine to be able to read data without risking a dirty read. So it avoids reading of uncommitted data even when that data is changed by another concurrent process. It also enables 
repeatable reads. It can however cause Serialization anomalies which 
would make scenario&#39;s possible that don&#39;t make sense in real life. In order to understand why this is a problem let&#39;s revisit our 2 example transactions. Let&#39;s start with our system initialized again on the starting point detailed earlier but this time let&#39;s have the transactions executed concurrently such that the different statements within them are interleaved. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Assume the order:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Begin&lt;/b&gt; - &lt;b&gt;RA&lt;/b&gt; - &lt;i&gt;begin&lt;/i&gt; - &lt;i&gt;RA&lt;/i&gt; - &lt;b&gt;WA&lt;/b&gt; - &lt;b&gt;RB&lt;/b&gt; - &lt;b&gt;WB&lt;/b&gt; - &lt;b&gt;end&lt;/b&gt; - &lt;i&gt;WA&lt;/i&gt; - &lt;i&gt;RC&lt;/i&gt; - &lt;i&gt;WC&lt;/i&gt; - &lt;i&gt;end&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;So in detail:&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;begin&lt;/b&gt;: begins the first transaction&lt;/li&gt;&lt;li&gt;&lt;b&gt;RA&lt;/b&gt;: reads balance for account A 20 euro&lt;/li&gt;&lt;li&gt;&lt;i&gt;begin&lt;/i&gt;: begins the second transaction&lt;/li&gt;&lt;li&gt;&lt;i&gt;RA&lt;/i&gt;: reads balance for account A 20 euro (since previous change is not committed and when transaction started the snapshot of the database had still the original balance of 20 euro for account A)&lt;/li&gt;&lt;li&gt;&lt;b&gt;WA&lt;/b&gt;: write the new balance of 10 Euro for account A&lt;/li&gt;&lt;li&gt;&lt;b&gt;RB&lt;/b&gt;: reads balance for account B 30 euro&lt;/li&gt;&lt;li&gt;&lt;b&gt;WB&lt;/b&gt;: write new balance of 40 euro for account B&lt;/li&gt;&lt;li&gt;&lt;b&gt;end&lt;/b&gt;: ends the first transaction&lt;/li&gt;&lt;li&gt;&lt;i&gt;WA&lt;/i&gt;: writes the new balance of 10 euro for account A (since this transaction also read the 20 euro starting balance due to MVCC and subtracted 10 from it)&lt;/li&gt;&lt;li&gt;&lt;i&gt;RC&lt;/i&gt;: reads balance for account C 40 euro&lt;/li&gt;&lt;li&gt;&lt;i&gt;WC&lt;/i&gt;: writes the new balance of 50 euro for account C&lt;/li&gt;&lt;li&gt;&lt;i&gt;end&lt;/i&gt;: ends the second transaction&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;This is a serialization anomaly and this example hopefully illustrated why this is a problem. If it is unclear imagine you are a bank managing these accounts.&amp;nbsp; Your system has just generated money for your customer who could withdraw or use that money! The above scenario is well possible if you picture an account with multiple users. Two different users could easily wire money to different accounts concurrently around the same time. So for these type of workloads it is important to avoid serialization anomalies.&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Serializable isolation to the Rescue&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;It is possible to avoid serialization anomalies in database engines that allow running with the strictest transaction isolation level; serializable isolation. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Serializable isolation states that in order for a concurrent execution of transactions to be valid a serial ordering of transactions has to exist such that each statement execution has the same results as in the concurrent execution.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So if we start from our concurrent execution in our example. Since there are 2 transactions we have 2 possible orderings:&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Tx1 followed by Tx2&lt;/li&gt;&lt;li&gt;Tx2 followed by Tx1&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Or in our per statement illustration:&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;begin&lt;/b&gt; - &lt;b&gt;RA&lt;/b&gt; - &lt;b&gt;WA&lt;/b&gt; - &lt;b&gt;RB&lt;/b&gt; - &lt;b&gt;WB&lt;/b&gt; - &lt;b&gt;end&lt;/b&gt; - &lt;i&gt;begin&lt;/i&gt; -&amp;nbsp; &lt;i&gt;RA&lt;/i&gt; - &lt;i&gt;WA&lt;/i&gt; - &lt;i&gt;RC&lt;/i&gt; -&amp;nbsp; &lt;i&gt;WC&lt;/i&gt; - &lt;i&gt;end&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;begin&lt;/i&gt; -&amp;nbsp; &lt;i&gt;RA&lt;/i&gt; -&amp;nbsp; &lt;i&gt;WA&lt;/i&gt; - &lt;i&gt;RC&lt;/i&gt; - &lt;i&gt;WC&lt;/i&gt; -&amp;nbsp; &lt;i&gt;end -&lt;/i&gt;&lt;/i&gt;&lt;b&gt;&lt;i&gt;&lt;i&gt; &lt;/i&gt;&lt;/i&gt;begin&lt;/b&gt; - &lt;b&gt;RA&lt;/b&gt; - &lt;b&gt;WA&lt;/b&gt; - &lt;b&gt;RB&lt;/b&gt; - &lt;b&gt;WB&lt;/b&gt; - &lt;b&gt;end&lt;/b&gt;&lt;/i&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: left;&quot;&gt;I leave it to the reader to detail the outcomes of the second ordering. You should arrive to the conclusion that account A will always have a balance of 0 after both transactions finish no matter how you order these 2 transactions (serially). Therefore if you have a database engine running in transaction level serializable isolation and you try to do the concurrent execution then that engine will give an error. This does not mean there is an issue in the Database engine but rather that there is a problem with your workload. If it occurs rarely it&#39;s possible to just have your application catch these exceptions and retry. Because when this error is thrown generally the database engine will rollback 1 of the transactions, often the transaction that submitted the statement that would give rise to the anomaly.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h2&gt;How can the DB know?&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;There is no such thing as magic (not even in the database world) so the engine must have some clever way of detecting that a statement would cause a serialization anomaly. Working backwards from the behavior of serially ordered transactions you could come op with 2 rules:&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;If data is read in a transaction TX that was written by another transaction&amp;nbsp; TC which was committed before the start of Tx then in a sequential ordering Tx must follow TC (order: TC -&amp;gt; TX)&lt;/li&gt;&lt;li&gt;If data is read in a transaction TY that is written by another transaction that overlaps but wasn&#39;t committed when TY started then Ty must precede TU (order TY -&amp;gt; TU)&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&amp;nbsp;Note that &lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Data read and written within the same transaction doesn&#39;t impose ordering&lt;/li&gt;&lt;li&gt;2 Reads from different transactions also don&#39;t impose an ordering&lt;/li&gt;&lt;li&gt;Since more than 2 transactions can overlap a read-only transaction could still give rise to a serialization anomaly!&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In concurrent executions that are a serialization anomaly you will get ordering rules that will be in conflict. For our example:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Begin&lt;/b&gt; - &lt;b&gt;RA&lt;/b&gt; - &lt;i&gt;begin&lt;/i&gt; - &lt;i&gt;RA&lt;/i&gt; - &lt;b&gt;WA&lt;/b&gt; - &lt;b&gt;RB&lt;/b&gt; - &lt;b&gt;WB&lt;/b&gt; - &lt;b&gt;end&lt;/b&gt; - &lt;i&gt;WA&lt;/i&gt; - &lt;i&gt;RC&lt;/i&gt; - &lt;i&gt;WC&lt;/i&gt; - &lt;i&gt;end&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;begin&lt;/b&gt;: begins the first transaction&lt;/li&gt;&lt;li&gt;&lt;b&gt;RA&lt;/b&gt;: reads balance for account A&lt;/li&gt;&lt;li&gt;&lt;i&gt;begin&lt;/i&gt;: begins the second transaction&lt;/li&gt;&lt;li&gt;&lt;i&gt;RA&lt;/i&gt;:
 reads balance for account A&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;2 reads don&#39;t impose ordering between each other&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;WA&lt;/b&gt;: write the new balance of account A&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;At this point the DB knows that &lt;i&gt;T2&lt;/i&gt; reads data written to by an overlapping transaction &lt;b&gt;T1&lt;/b&gt; which is uncommitted so &lt;i&gt;T2&lt;/i&gt; must precede &lt;b&gt;T1&lt;/b&gt; (&lt;i&gt;T2&lt;/i&gt; -&amp;gt; &lt;b&gt;T1&lt;/b&gt; )&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;RB&lt;/b&gt;: reads balance for account B&lt;/li&gt;&lt;li&gt;&lt;b&gt;WB&lt;/b&gt;: write new balance for account B&lt;/li&gt;&lt;li&gt;&lt;b&gt;end&lt;/b&gt;: ends the first transaction&lt;/li&gt;&lt;li&gt;&lt;i&gt;WA&lt;/i&gt;:
 writes the new balance for account A&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Now the DB knows that &lt;b&gt;T1&lt;/b&gt; reads data written by &lt;i&gt;T2&lt;/i&gt; which was not committed at starttime of T1 so &lt;b&gt;T1&lt;/b&gt; has to precede T2 (&lt;b&gt;T1&lt;/b&gt; -&amp;gt; T2)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;At this stage the DB engine can throw an exception as no matter what happens further with T2 (except for a transaction rollback) it will yield a serialization anomaly. Therefore it is best to rollback the transaction immediately and don&#39;t allow further statements as their results shouldn&#39;t be relied upon anyway.&lt;/p&gt;&lt;p&gt;The advantage of the arrow notation is that you can chain them together and as soon as you encounter a transaction for a second time you know there is a violation. So if we chain them in the order we found them:&lt;/p&gt;&lt;p&gt; (&lt;i&gt;T2&lt;/i&gt; -&amp;gt; &lt;b&gt;T1&lt;/b&gt; ) || (&lt;b&gt;T1&lt;/b&gt; -&amp;gt; T2) =&amp;gt; (&lt;i&gt;T2&lt;/i&gt; -&amp;gt; &lt;b&gt;T1&lt;/b&gt;&amp;nbsp; -&amp;gt; &lt;span style=&quot;color: red;&quot;&gt;T2&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;&amp;nbsp;A directed graph would be a useful way of tracking these orderings discovered by applying the rules. Cycles would in this case indicate a serialization anomaly so we can use a directed acyclic graph (DAG).&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;In summary&lt;/h2&gt;&lt;p&gt;Transactions should see the database as if they were running alone on the system, not being impacted by other running transactions. This is important because we don&#39;t know what will happen to these transactions, they could be aborted and in that case relying on the data written by them would cause an anomaly in itself. Ironically it is the measures we put in place to protect against these anomalies that could give rise to a serialization anomaly where results from
statements of overlapping transactions wouldn&#39;t be retrievable if the 
transactions had happened serially. This post showcases that for MVCC and aims at providing intuition into why these serialization anomalies are problematic and give basic insights in what a database can do to protect you from it. That is if you chose to run with a transaction level of serializable isolation.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Final Notes:&lt;/h2&gt;&lt;p&gt;I haven&#39;t gone into much detail about locking. Locking can be used to avoid serializable isolation anomalies but it requires aggressive locks (e.g. exclusive locks) that would enforce serial access to the underlying resource. The example is chosen in such a way that the concurrent execution would be possible even with table level locking. For example where during normal database execution writes would block other writes. This is because locks follow the lifetime of a transaction and &lt;b&gt;T1&lt;/b&gt; ended before a write in &lt;i&gt;T2&lt;/i&gt; could give rise to contention on a lock.&lt;/p&gt;&lt;p&gt;I have tried to give a simple explanation for the tracking mechanism above. Note that my example covered only rule 2. Rule 2 is easiest to track as you only need to take into account open transactions. Rule 1 on the other hand uses committed transactions which is troublesome to track since their amount grows with the uptime of your database. You can stop keeping track of committed transactions from the moment they no longer have (direct or indirect) overlap with open transactions. This overlap could disappear because transactions can close (by commit or rollback). But a lot of database instances have a continuous workload which could block this type of cleanup since there always remains overlap with open transactions. The good news is that research exists which investigates use of heuristics to efficiently avoid serialization anomalies. A nice and freely available paper on such a heuristic is &quot;&lt;a href=&quot;https://arxiv.org/abs/1605.04292&quot; target=&quot;_blank&quot;&gt;Efficiently making (almost) any concurrency control mechanism serializable&lt;/a&gt;&quot;.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/3624145236955932027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2021/12/serialization-anomily-when-using-mvcc.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3624145236955932027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3624145236955932027'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2021/12/serialization-anomily-when-using-mvcc.html' title='Serialization Anomily when using MVCC (The good, the bad &amp; the ugly)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-1901864860095467134</id><published>2018-12-23T02:58:00.000-08:00</published><updated>2018-12-23T02:58:45.229-08:00</updated><title type='text'>Setting up Pyhon 3.7 with SSL support</title><content type='html'>&lt;h2&gt;
Intro&lt;/h2&gt;
If you are lucky enough to have Python 3.7 in your OS repositories then you can skip this post if not you might find a hard time setting up Python 3.7 with SSL support.&amp;nbsp; Python 3.7 requires a recent version of openssl but even when that one has been installed in my case it would not find it so I&#39;m documenting the steps on how I got it to work.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
1) Get a recent openssl installation&lt;/h2&gt;
In my case I went for 1.1.1a as that one should be working with Python 3.7. &lt;br /&gt;
&lt;pre&gt;cd /usr/src/
sudo wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gz
sudo tar -xvzf OpenSSL_1_1_1a.tar.gz
cd openssl-OpenSSL_1_1_1a/
export CFLAGS=-fPIC&amp;nbsp; # Make sure we build shared libraries
./config shared --prefix /usr/local/openssl111a --openssldir=/usr/local/ssl  # Make sure we build shared libraries
sudo make
sudo make install
&lt;/pre&gt;
&lt;h2&gt;
&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;
2) Get and install Python&lt;/h2&gt;
It is possible to follow instuctions of https://tecadmin.net/install-python-3-7-on-ubuntu-linuxmint/ with the following changes:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Before doing any configure make symbolic links to the openssl libraries.&amp;nbsp; I tried adding the openssl lib folder to LD_LIBRARY_PATH but for some reason I would still always error out with &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;*** WARNING: renaming &quot;_ssl&quot; since importing it failed: libssl.so.1.1: cannot open shared object file: No such file or directory&#39;&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;Creating symbolic links in a default library path did strangely enough work:&lt;br /&gt;
&lt;pre&gt;cd /usr/lib
sudo ln -s /opt/openssl/lib/libcrypto.so.1.1
sudo ln -s /opt/openssl/lib/libssl.so.1.1

&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;When doing the configure specify additional details&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;sudo LDFLAGS=&quot;-L/opt/openssl/lib&quot; ./configure --enable-optimizations --with-openssl=/opt/openssl &amp;gt; /tmp/configure_output&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;When doing the make if you redirect stdout you will only see the warnings if they don&#39;t show:&lt;/li&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;*** WARNING: renaming &quot;_ssl&quot; since importing it failed: libssl.so.1.1: cannot open shared object file: No such file or directory&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;*** WARNING: renaming &quot;_hashlib&quot; since importing it failed: libssl.so.1.1: cannot open shared object file: No such file or directory&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;then you are good to go.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;You can validate by importing the python ssl lib:&lt;br /&gt;
&lt;pre&gt;$ /usr/local/bin/python3.7
Python 3.7.0 (default, Dec 23 2018, 10:35:52) 
[GCC 6.4.0] on linux
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&amp;gt;&amp;gt;&amp;gt; import ssl
&amp;gt;&amp;gt;&amp;gt;
&lt;/pre&gt;
&lt;/li&gt;
No error means you should be good to go.
</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/1901864860095467134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2018/12/setting-up-pyhon-37-with-ssl-support.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/1901864860095467134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/1901864860095467134'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2018/12/setting-up-pyhon-37-with-ssl-support.html' title='Setting up Pyhon 3.7 with SSL support'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-7226267336491189463</id><published>2016-08-30T13:25:00.000-07:00</published><updated>2016-08-30T13:25:21.138-07:00</updated><title type='text'>My attempt to the AWS Solution Architect professional exam sample questions.</title><content type='html'>For this practice exam the correct answers are given on the Japanese version of the practice exam which can be found &lt;a href=&quot;http://media.amazonwebservices.com/jp/certification/AWS_certified_solutions_architect_professional_examsample0701_08_final.pdf&quot;&gt;here&lt;/a&gt;. &amp;nbsp;The English practice exam is available from &lt;a href=&quot;https://aws.amazon.com/certification/certified-solutions-architect-professional/&quot;&gt;here&lt;/a&gt;. &amp;nbsp;And in this post I like to provide my reasoning in why the given answers are the correct ones. &amp;nbsp;I have done similarly for the DevOps professional exam &lt;a href=&quot;http://ubuntu42.blogspot.ie/2016/08/my-attempt-to-aws-devops-engineer.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 1: Best RTO for on-premise Content Management System&lt;/h2&gt;
&amp;nbsp;- Answer A will and is the best of the provided options because storage gateway is already used and it&#39;s volumes can be converted to EBS volumes. &amp;nbsp;RMAN backups in S3 also allow restoration into EC2&lt;br /&gt;
&amp;nbsp;- Answer B is not acceptable since Glacier storage takes recovery times &amp;gt;= 3 hours&lt;br /&gt;
&amp;nbsp;- Answer C: There is no need to attach a AWS Storage gateway to the EC2 instance, better to use an EBS volume&lt;br /&gt;
&amp;nbsp;- Answer D: AWS Storage Gateway-VTL is for tapes so no need here as you had a storage gateway volume&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 2: ERP application in multiple AZs&lt;/h2&gt;
&amp;nbsp;- Answer C is valid and allows to restore data up until 5 minutes from the issue (so RPO of 15 minutes is met). &amp;nbsp;Since you have hourly backups as well in S3 you can quickly restore these and you only need to replay transaction logs for max 1 hour. Furthermore S3 provides excellent data retention.&lt;br /&gt;
&amp;nbsp;- Answer A is not acceptable since Glacier recoveries take too much time &amp;gt; 3 hours&lt;br /&gt;
&amp;nbsp;- Answer B is not good for this scenario as it is unknown how the data corruption occurred. &amp;nbsp;Probably data corruption is introduced by a logical error rather than issues on storage level. &amp;nbsp;Since synchronous replication only makes sure you write the changes on a 2nd system as part of your transactions it doesn&#39;t allow to recover to earlier time to protect for these corruption errors.&lt;br /&gt;
&amp;nbsp;- Answer D is unacceptable because even though instance store volumes might allow to take quicker backups they are volatile and should not be relied upon for database backups (they are also only accessible from 1 instance and therefore data is only in 1 AZ)&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 3: Random acts of kindness&lt;/h2&gt;
&amp;nbsp;- Answer B is good as it is a cheap way that allows you to operate without maintaining infrastructure&lt;br /&gt;
&amp;nbsp;- Answer A is not good as IAM users should be internal users of your organizations. &amp;nbsp;You should not use these identities for &#39;web&#39; users. &amp;nbsp;One reason would be because the amount of users would be limited. &amp;nbsp;Even if you would map them to a single &#39;application&#39; user it would not be a good practice to do so.&lt;br /&gt;
&amp;nbsp;- Answer C is not good again because of IAM user usage as well as introducing additional unnecessary infrastructure (incurring costs)&lt;br /&gt;
&amp;nbsp;- Answer D introduces unneeded infrastructure incurring unneeded costs.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 4: Protecting SSL&lt;/h2&gt;
&amp;nbsp;- Answer D is the best. CloudHSM is hardened to make sure SSL certificates cannot leave the device. &amp;nbsp;Furthermore its design and external certification certify that Amazon employees won&#39;t have access to them either. &amp;nbsp;Since Amazon employees also don&#39;t have access inside your EC2 instance it is good to store your logs on an ephemeral volume using a randomly generated AES key. &amp;nbsp;This means that you will lose your logs upon stop/start or when you experience a hardware failure but there were no retention requirements mentioned for the log files. &amp;nbsp;Since the volumes use this random key when mounting you grant your users access by granting them access to the instance. &amp;nbsp;The encryption makes sure that data is encrypted at rest and that physical access does not compromise your data.&lt;br /&gt;
&amp;nbsp;- Answer A is generally a good solution but since in this case security is the main concern it is not the best solution. &amp;nbsp;By offloading SSL at your Load balancing tier you have the traffic flowing in plain text from ELB to web servers.&lt;br /&gt;
&amp;nbsp;- Answer B is not good as there is no way of protecting your private key in the Amazon S3 bucket. &amp;nbsp;Since your instances need access to the S3 bucket to retrieve the key, employees could do the same and therefore compromise the key.&lt;br /&gt;
&amp;nbsp;- Answer C is good but it does not really protect your logs as you cannot write them straight into S3. &amp;nbsp;S3 is an object store and cannot be used reliably as a block device.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 5: Fat client application&amp;nbsp;&lt;/h2&gt;
&amp;nbsp;- Answer D is the best. &amp;nbsp;Using the SSL VPN client the users can securely connect to the VPC and have access to the private subnets. &amp;nbsp;The fat client can then connect over the VPN tunnel to the application servers which are safely in the private subnet.&lt;br /&gt;
&amp;nbsp;- Answer A does not make sense, AWS Direct Connect is to allow a &#39;private&#39; line from your data center into AWS and therefore does not come into play for this scenario&lt;br /&gt;
&amp;nbsp;- Answer B is not valid as you don&#39;t want to publish the application on the internet therefore an ELB by itself won&#39;t help&lt;br /&gt;
&amp;nbsp;- Answer C is not valid as you still place your application servers in the public subnet. &amp;nbsp;Having the IPsec VPN connection is meant to avoid this need.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 6: Legacy engineering application migration&lt;/h2&gt;
&amp;nbsp;- Answer B is indeed the way to go an initial sync followed by incremental syncs to make sure you get all the data in the latest state within the time frame. &amp;nbsp;If needed you could perform multiple incremental syncs (note that these would incur additional cost as you would be consuming more bandwidth)&lt;br /&gt;
&amp;nbsp;- Answer A is not valid as it does not provide a solution to time needed to transfer the 900 GB of data&lt;br /&gt;
&amp;nbsp;- Answer C is not valid as AWS Import/Export is not to migrate data within 48 hours&lt;br /&gt;
&amp;nbsp;- Answer D is not valid because it says to copy the data on Friday which again does not provide enough time to transfer all the data.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/7226267336491189463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2016/08/my-attempt-to-aws-solution-architect.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7226267336491189463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7226267336491189463'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2016/08/my-attempt-to-aws-solution-architect.html' title='My attempt to the AWS Solution Architect professional exam sample questions.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-918432896097103654</id><published>2016-08-30T13:16:00.001-07:00</published><updated>2019-08-06T13:40:42.112-07:00</updated><title type='text'>My attempt to the AWS DevOps Engineer professional exam sample questions.</title><content type='html'>This is just a blogpost to try out the sample questions of the &lt;a href=&quot;https://d1.awsstatic.com/training-and-certification/docs/AWS_certified_DevOps_Engineer_Professional_SampleExam.pdf&quot;&gt;AWS Devops Engineer professional exam&lt;/a&gt;. &amp;nbsp;So keep in mind that these are by no means official answers they are just my attempt to solving the example questions. &amp;nbsp;I did a similar attempt for the &lt;a href=&quot;http://ubuntu42.blogspot.ie/2016/08/my-attempt-to-aws-solution-architect.html&quot;&gt;Solutions Architect professional exam&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 1 automated data backup solution:&lt;/h2&gt;
&amp;nbsp; - Answer C: ec2-create-snapshot API results in a snapshot from your EBS volume which is stored in S3 (=distributed data store without single point of failure). &amp;nbsp;Use the tags to manage metadata and be able to cleanup old snapshots to limit costs.&lt;br /&gt;
&amp;nbsp;- &amp;nbsp;Answer A is not valid because ec2-create-volume creates an empty volume or one initiated from a snapshot. &amp;nbsp;Even if copy backup data means to this volume than it would be sub optimal as you will have worse retention compared to answer C and you will have higher costs (every volume you create will take up full space whereas S3 snapshot will be incremental)&lt;br /&gt;
- Answer B is not valid because recovering your data from Glacier won&#39;t be possible within 1 hour&lt;br /&gt;
- Answer D is not valid because ec2-copy-snapshot can only operate on snapshots not on EBS volumes&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 2: Going from M3 instances to C3 instances when using CloudFormation and AutoScaling Groups&lt;/h2&gt;
&amp;nbsp;- Answer D is correct:&lt;br /&gt;
&amp;nbsp;- &amp;nbsp;Answer A is not sufficient as the Auto Scaling group won&#39;t automatically replace your existing instances.&lt;br /&gt;
&amp;nbsp; - Answer B &amp;amp; C are not valid since you cannot update a launch configuration. &amp;nbsp;As stated in the &lt;a href=&quot;http://docs.aws.amazon.com/autoscaling/latest/userguide/LaunchConfiguration.html&quot;&gt;documentation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 3: &amp;nbsp;CloudFormation for complex systems&amp;nbsp;&lt;/h2&gt;
&amp;nbsp;- Answer B is my preferred answer as multiple separate templates are &lt;a href=&quot;https://blogs.aws.amazon.com/application-management/post/Tx1T9JYQOS8AB9I/Use-Nested-Stacks-to-Create-Reusable-Templates-and-Support-Role-Specialization&quot;&gt;easier to maintain and allow re-use&lt;/a&gt;.&lt;br /&gt;
&amp;nbsp;- Answer A is not good because maintaining a single template does not scale (it won&#39;t allow re-use)&lt;br /&gt;
&amp;nbsp;- Answer C is not good as orchestrating the process from an EC2 instance introduces a single point of failure. &amp;nbsp;It is also not cost efficient as it will require additional work to implement and a running instance.&lt;br /&gt;
&amp;nbsp;- Answer D is not good because you wanted to version-control your infrastructure which encompasses networking and thus VPC&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 4: Automated deployment - reduce launch time&lt;/h2&gt;
- Answer B is correct as it fulfills the requirements&lt;br /&gt;
- Answer A is incorrect because of the timing requirements it would take more than 3 minutes given the timings of the operations&lt;br /&gt;
- Answer C is incorrect because of timing (artifacts 4 min + deploy app code 1 min) &amp;gt; 3 min&lt;br /&gt;
- Answer D is incorrect because you still need to perform all the steps and thus require &amp;gt; 3 minutes, also the polling is not needed as User Data can be used to initialize the EC2&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 5: I/O load performance test&lt;/h2&gt;
&amp;nbsp;- Answer B is correct. &amp;nbsp;This operation is needed to avoid the first touch penalty and&lt;a href=&quot;http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html&quot;&gt; to make sure you check the performance of a warm Volume&lt;/a&gt; (at least if the volume is restored from snapshot, nowadays you don&#39;t need to prewarm new empty volumes).&lt;br /&gt;
- Answer A is incorrect because you would use the block size which is applicable for your application and won&#39;t change it upon deployment&lt;br /&gt;
- Answer C is incorrect as you just use the volumes to test so no need to back them up, having a backup also does not influence performance&lt;br /&gt;
- Answer D is incorrect as encrypted volumes won&#39;t boost performance&lt;br /&gt;
- Answer E is incorrect as creating a snapshot does not read every block in the volume but only touches the blocks that have data (or changed data if the volume itself was created from a snapshot)&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 6: social media marketing application&lt;/h2&gt;
- Answer B is a possible way to do this. &amp;nbsp;DynamoDB is a persistent store that stores data in multiple AZs.&lt;br /&gt;
- Answer A is not correct because Kinesis is for streaming data, &lt;a href=&quot;http://docs.aws.amazon.com/streams/latest/dev/service-sizes-and-limits.html&quot;&gt;it won&#39;t allow you to keep historical data as it only can keep data records for 1-7 days&lt;/a&gt;.&lt;br /&gt;
- Answer C is not correct because Glacier is for archiving data that you rarely want to retrieve. &amp;nbsp;Also if you want to publish your data into Redshift using DataPipeline you need to have your data in a source that can be used by Redshift (e.g regular S3 (not Glacier!), DynamoDB, EC2 (via SSH), EMR (via SSH) )&lt;br /&gt;
- Answer D is not correct because Amazon CloudWatch is not for analytics. &amp;nbsp;Also Cloudwatch only retains data for 14 days.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 7: bill increase&lt;/h2&gt;
- Answer C is correct: wording is a bit weird as it looks sub optimal to send an SNS to your application which would then query DynamoDB. &amp;nbsp;It is good to have the data in Dynamo DB to have it there persistently but it would be more efficient to have a lambda function putting the data into Dynamo DB and that this lambda function also updates the cache with the new entry such that at this time DynamoDB does not need to be queried.&lt;br /&gt;
- Answer A is incorrect because S3 bucket life cycles are to change storage type of an object it does not allow you to push a list of objects to another bucket&lt;br /&gt;
- Answer B would be feasible but only if you have a very controlled process over the uploads that can be done in your bucket it is not as practical as C.&lt;br /&gt;
- Answer D is incorrect because there is no such thing as SQS lifecycles that move objects into S3&lt;br /&gt;
- Answer E is incorrect because ElastiCache is a key-value cache service which does not allow you to push files into Amazon S3&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 8: AWS Elastic Beanstalk + continuous deployment (zero downtime)&lt;/h2&gt;
- Answer B is correct because the swap of DNS name allows you to rollback almost immediately (ignoring clients that don&#39;t implement DNS and TTLs correctly)&lt;br /&gt;
- Answer A is incorrect because depending on the deploy time rollback won&#39;t be almost immediately&lt;br /&gt;
- Answer C is incorrect doesn&#39;t have a rollback scenario&lt;br /&gt;
- Answer D is incorrect because I don&#39;t think you can configure a beanstalk environment to send HTTP 301 response codes. &amp;nbsp;Also because 301 HTTP response code is a permanent redirect and therefore will cause clients to cache this redirect so rollback will still keep impacted clients on the new environment&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 9: Log analysis application&lt;/h2&gt;
- Answer A seems possible as CoudWatch Logs can filter your logs and keep track of login actions&lt;br /&gt;
- Answer B is incorrect as it won&#39;t be real time&lt;br /&gt;
- Answer C is incorrect because it has no auto-scaling&lt;br /&gt;
- Answer D is incorrect as it won&#39;t be real time&lt;br /&gt;
- Answer E is incorrect as you cannot use map reduce job on data that is in your RDS MySQL. &amp;nbsp;You would need to export the data which won&#39;t be real time either&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Question 10: orders processing&lt;/h2&gt;
- Answer B is correct because &lt;a href=&quot;http://docs.aws.amazon.com/autoscaling/latest/userguide/as-maintain-instance-levels.html&quot;&gt;it will automatically replace an instance if it is stopped/terminated or fails (HW failure)&lt;/a&gt;.&lt;br /&gt;
- Answer E is correct because &lt;a href=&quot;http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html&quot;&gt;it allows to detect that the application is no longer running correctly and will stop the instance automatically&lt;/a&gt;.&lt;br /&gt;
- Answer A is incorrect as a 2nd watchdog instance costs money&lt;br /&gt;
- Answer C is incorrect as no need for scaling was expressed and having a minimum of 2 already makes it more expensive&lt;br /&gt;
- Answer D is incorrect as you need to pay for the ELB so it is not the most cost-effective way&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/918432896097103654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2016/08/my-attempt-to-aws-devops-engineer.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/918432896097103654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/918432896097103654'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2016/08/my-attempt-to-aws-devops-engineer.html' title='My attempt to the AWS DevOps Engineer professional exam sample questions.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-3184730814159192996</id><published>2015-08-27T13:05:00.001-07:00</published><updated>2015-08-31T14:02:15.642-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="broadcom"/><category scheme="http://www.blogger.com/atom/ns#" term="Dell"/><category scheme="http://www.blogger.com/atom/ns#" term="drivers"/><category scheme="http://www.blogger.com/atom/ns#" term="intel"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mint"/><category scheme="http://www.blogger.com/atom/ns#" term="nvidia"/><category scheme="http://www.blogger.com/atom/ns#" term="XPS"/><title type='text'>Setup Linux Mint 17.2 on Dell XPS 15 (2015 edition)</title><content type='html'>This blog post will describe a possible setup for Linux Mint 17.2 on a Dell XPS 15 (built year 2015 with 4K Ultra-HD touch screen).  It will focus on the pre-installation steps (how to boot your Linux Live USB) and post-installation steps (fixing driver issues).  It is expected that the reader already knows how to perform a Linux install.&lt;br /&gt;
&lt;h1&gt;
Installation of Linux on a Dell XPS 15&lt;/h1&gt;
Download Linux Mint 17.2 Cinnamon and create a bootable USB. &lt;br /&gt;
&lt;h2&gt;
 Disable fast boot from Windows &lt;/h2&gt;
Boot into Windows and disable fast boot (Instructions at http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html)&lt;br /&gt;
&lt;h2&gt;
 Disable Secure boot and change boot order &lt;/h2&gt;
Go into the Bios (Reboot notebook and press F2 on splash screen (bios keys are mentioned in bottom right corner).  After this your BIOS screens should look like:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-TRSZ8TQ1AUc/VeNFZSL4A-I/AAAAAAAAEMA/8FnZqriEV88/s1600/IMG_20150718_105947.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://1.bp.blogspot.com/-TRSZ8TQ1AUc/VeNFZSL4A-I/AAAAAAAAEMA/8FnZqriEV88/s320/IMG_20150718_105947.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxE0Q0w7UV5bgs8a5B3hZaauNcgaF2MFMUeRceXfmx9fi_f-l4c5B5_zLuBmFoLabP1GANPAWXvQhyphenhyphenBk20Bbq2u2dn2DWKLrbPD5PTYQJtNvYoaf4r0RUePGqMlKnaJpBTCQr8t6eGiDg/s1600/Bios_advanced_tab.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxE0Q0w7UV5bgs8a5B3hZaauNcgaF2MFMUeRceXfmx9fi_f-l4c5B5_zLuBmFoLabP1GANPAWXvQhyphenhyphenBk20Bbq2u2dn2DWKLrbPD5PTYQJtNvYoaf4r0RUePGqMlKnaJpBTCQr8t6eGiDg/s320/Bios_advanced_tab.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Boot from the USB into Linux.  Once there use gparted (if needed install using `sudo apt-get install gparted` to resize the Windows partitions and to free up space for your Linux installation.  Next perform the Linux installation to your preference (for me that means a separate partition for /home).&lt;br /&gt;
&lt;h1&gt;
 Driver issues + fixes &lt;/h1&gt;
&lt;h2&gt;
 Wi-Fi &lt;/h2&gt;
This is one is available in the restricted drivers area of Mint.  Before launching it however it is best to get your repository data up-to-date and to install all updates:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade &lt;/pre&gt;
&lt;br /&gt;
Next go to the restricted drivers wizard using the menu:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjLTTJ3Cbuc2v8hAh0mEbDsW-HJwCsZiA7t8ZTB7Sn5STJJJ_gHAD3hCeeEt_btOmEqT3Uk3XYXHcN5W6bkDw1Sf-uugKSRHNe456hGxT7R-15z4fHSTuWw-t7ZeFLB_f4aTq5EVjlqC8/s1600/driver_manager.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjLTTJ3Cbuc2v8hAh0mEbDsW-HJwCsZiA7t8ZTB7Sn5STJJJ_gHAD3hCeeEt_btOmEqT3Uk3XYXHcN5W6bkDw1Sf-uugKSRHNe456hGxT7R-15z4fHSTuWw-t7ZeFLB_f4aTq5EVjlqC8/s320/driver_manager.png&quot; width=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In this window only consider the area on the wireless drivers (broadcom drivers):&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD8gqYFjWBZ64lIORkcPSguYGYMfmMb__UjQtVkwk2kB43n_5JWh_1Kw5H8Rtu2OUJvHfALTCK5d3kxwcg0EoDIC7WszYK14Zxwdy6RbJiRmsKn1u9ijvu3Ok04bvYc9E3xuBPxQqnn4s/s1600/broadcom-driver.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;96&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD8gqYFjWBZ64lIORkcPSguYGYMfmMb__UjQtVkwk2kB43n_5JWh_1Kw5H8Rtu2OUJvHfALTCK5d3kxwcg0EoDIC7WszYK14Zxwdy6RbJiRmsKn1u9ijvu3Ok04bvYc9E3xuBPxQqnn4s/s320/broadcom-driver.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Select bcmwl-kernel-source and click apply changes, this should do all the necessary configuration to get Wi-Fi working. &amp;nbsp;Next you can connect to a wireless network using network manager.&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
 How to get internet-access on this notebook without Wi-Fi? &lt;/h3&gt;
I have bought the 4-in-1 connector for the PC that will go from USB3.0 to USB2.0, ethernet, VGA &amp;amp; HDMI ports.  For the USB and the ethernet ports this adapter is plug&amp;amp;play.  So handy when you need to install updates when your wireless is not yet working.&lt;br /&gt;
&lt;h2&gt;
 Nvidia &lt;/h2&gt;
&lt;h3&gt;
Bumblebee Installation instructions&lt;/h3&gt;
Using instructions from https://wiki.ubuntu.com/Bumblebee&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo apt-get update
sudo apt-get upgrade
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
&lt;/pre&gt;
&lt;br /&gt;
Which gives the following output:&lt;br /&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;Dellx log # sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  bbswitch-dkms lib32gcc1 libc6-i386 linux-headers-3.13.0-62
  linux-headers-3.13.0-62-generic nvidia-304 nvidia-current primus-libs socat
Recommended packages:
  nvidia-settings libcuda1-304 nvidia-opencl-icd-304 primus-libs-ia32
The following packages will be REMOVED:
  linux-kernel-generic
The following NEW packages will be installed:
  bbswitch-dkms bumblebee bumblebee-nvidia lib32gcc1 libc6-i386
  linux-headers-3.13.0-62 linux-headers-3.13.0-62-generic
  linux-headers-generic nvidia-304 nvidia-current primus primus-libs socat
0 upgraded, 13 newly installed, 1 to remove and 0 not upgraded.
Need to get 47,8 MB of archives.
After this operation, 260 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
&lt;/pre&gt;
&lt;h3&gt;
 Install newest nvidia drivers &lt;/h3&gt;
These are present in the driver manager.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8fTRV1mtT5cp05ZlaNd1-I2uspe_zjMNUWC09htwDJFE1OvA-tviSmU42yvMGBm05z3CN7f-yLXa7C3dJzAzyqozoLSOu3x72soECEbmlqzzQYz76rbC96h0aMPMZ9hBj60z990CaSxI/s1600/driver_manager.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8fTRV1mtT5cp05ZlaNd1-I2uspe_zjMNUWC09htwDJFE1OvA-tviSmU42yvMGBm05z3CN7f-yLXa7C3dJzAzyqozoLSOu3x72soECEbmlqzzQYz76rbC96h0aMPMZ9hBj60z990CaSxI/s320/driver_manager.png&quot; width=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Select the latest driver&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmJSB8SJK18jkeuDyR19MModwluZxdWNlojkc8N7m1G_XcP3iq29gf-0RPCcydTQjnPVSXTNs_JFBnXz4HaETzf-fVubyXUVDgtU8YFXRO36nwaFW3F1CpB0IesLho2EYQBFm0cHz0878/s1600/nvidia-xxx-updates-driver.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmJSB8SJK18jkeuDyR19MModwluZxdWNlojkc8N7m1G_XcP3iq29gf-0RPCcydTQjnPVSXTNs_JFBnXz4HaETzf-fVubyXUVDgtU8YFXRO36nwaFW3F1CpB0IesLho2EYQBFm0cHz0878/s320/nvidia-xxx-updates-driver.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Click apply and afterwards it should show that an additional proprietary driver is in use.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivIY-N6D-8IDojpejPyYSDdH4OWJi2B1FKaN5CHm5fHZXOHxd34IZ51JstbQnBZC_RdbKRSKUxFAstV0QEqVTvlfpcaj9vQL6vhUXytdTktEHZb8xnhUriXz1GcL-wIiNFeYJOHym_T6E/s1600/After_nvidia_install.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivIY-N6D-8IDojpejPyYSDdH4OWJi2B1FKaN5CHm5fHZXOHxd34IZ51JstbQnBZC_RdbKRSKUxFAstV0QEqVTvlfpcaj9vQL6vhUXytdTktEHZb8xnhUriXz1GcL-wIiNFeYJOHym_T6E/s320/After_nvidia_install.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
 Configure Bumblebee to use these new drivers &lt;/h3&gt;
Changes the following four lines using your favorite editor in /etc/bumblebee/bumblebee.conf (using sudo, e.g. sudo gedit /etc/bumblebee/bumblebee.conf):
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Driver=nvidia
KernelDriver=nvidia
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-346-updates:/usr/lib32/nvidia-346-updates
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-346-updates/xorg,/usr/lib/xorg/modules
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Note that paths are once colon-separated and once comma-separated.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
After a reboot the bumblebee daemon should be running. &lt;br /&gt;
&lt;pre&gt;peter@Dellx ~ $ /etc/init.d/bumblebeed status
 * bumblebeed is running
&lt;/pre&gt;
&lt;h3&gt;
Why would I install these proprietary drivers?&lt;/h3&gt;
&lt;div&gt;
You don&#39;t need to install them but they can boost performance our lower your power consumption:&lt;/div&gt;
&lt;h4&gt;
Performance&lt;/h4&gt;
&lt;h5&gt;
3D Performance before setup&lt;/h5&gt;
&lt;pre&gt;peter@Dellx ~ $ glxgears 
Xlib:  extension &quot;NV-GLX&quot; missing on display &quot;:0&quot;.
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
348 frames in 5.3 seconds = 65.786 FPS
300 frames in 5.0 seconds = 59.997 FPS
300 frames in 5.0 seconds = 59.995 FPS
300 frames in 5.0 seconds = 59.996 FPS
&lt;/pre&gt;
&lt;h5&gt;
3D performance after setup&lt;/h5&gt;
&lt;pre&gt;peter@Dellx ~ $ glxgears 
30157 frames in 5.0 seconds = 6031.306 FPS
31302 frames in 5.0 seconds = 6260.384 FPS
32086 frames in 5.0 seconds = 6415.288 FPS
30959 frames in 5.0 seconds = 6191.375 FPS
&lt;/pre&gt;
&lt;h4&gt;
 Battery saving mode&lt;/h4&gt;
This performance gain comes however with a penalty for the autonomy of your notebook (higher battery drain).  In your panel with status and notification icons an Icon should be present that either holds the nvidia logo or the intel logo:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFXdoqSYiuF4HnSm8k3iv7VU56kSDRCtBgY3q94qPztutgEGjxdX3HShHZHUgSwTMrLcKypnWoCuZPnYsSP1_19bSNmGi75i5GT-NKtNripR-PHtLO09TFmYEMsX-0tAYphSJhcYj0b0w/s1600/nvidia-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFXdoqSYiuF4HnSm8k3iv7VU56kSDRCtBgY3q94qPztutgEGjxdX3HShHZHUgSwTMrLcKypnWoCuZPnYsSP1_19bSNmGi75i5GT-NKtNripR-PHtLO09TFmYEMsX-0tAYphSJhcYj0b0w/s1600/nvidia-logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you click the logo you will get the Nvidia configuration screen that allows you to switch between the modes.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhivGWmt6qzglmdfhaICRhvbG4AGcptjnb808s8H5vNWBJa9rxX9OIhCM0-heftFU2o-rh6L1V1t9gfZGLDdKJetRfPkL3ejFzayUfR7YME1GbkYp0d2_GaJ20FAV80vZsz89QFX-dbKsU/s1600/Change-mode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhivGWmt6qzglmdfhaICRhvbG4AGcptjnb808s8H5vNWBJa9rxX9OIhCM0-heftFU2o-rh6L1V1t9gfZGLDdKJetRfPkL3ejFzayUfR7YME1GbkYp0d2_GaJ20FAV80vZsz89QFX-dbKsU/s320/Change-mode.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
When selecting a mode you&#39;ll need to provide a password because privileges are required (only possible if your user is allowed to perform privileged actions (sudo rights)).&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq6Ex7aQ8K5wEEky70IGIZeFKd-qDmSDta3kzI_uMvIS3YzyvMDXZftEcutVS4GMcU2YEUWY6kGz9xmsPdkOJtVh_8k5eEv0pcMkIqexd50kXrFm-yGgLP4A8W1V7dET3XV0XgvTyswaw/s1600/privileges-required.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;117&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq6Ex7aQ8K5wEEky70IGIZeFKd-qDmSDta3kzI_uMvIS3YzyvMDXZftEcutVS4GMcU2YEUWY6kGz9xmsPdkOJtVh_8k5eEv0pcMkIqexd50kXrFm-yGgLP4A8W1V7dET3XV0XgvTyswaw/s320/privileges-required.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to activate the changes you need to re-login.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0NWsBSbJwuN9G73X4eQbgNW5Lo2BG61f8cuvnsgow8SA3y1DJlszuBDVeM3vKu8yz18eoa7xxCg-eHu-N_zRdmHmKH_Zl_SqA-afrmeU4Uum3J7wKel_qpv9-Mz2pJrO0Y1hz5sAG7V0/s1600/Re-login-required.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0NWsBSbJwuN9G73X4eQbgNW5Lo2BG61f8cuvnsgow8SA3y1DJlszuBDVeM3vKu8yz18eoa7xxCg-eHu-N_zRdmHmKH_Zl_SqA-afrmeU4Uum3J7wKel_qpv9-Mz2pJrO0Y1hz5sAG7V0/s320/Re-login-required.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
After a re-login you&#39;ll see the intel logo.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQobpq4jZ5Dvq66lfzaIxkl2yQv7x8OSnN4iB8pn_h4D15vJDde21niC3O8nkMiOrumKYSEpAdr8vOwBTr2gO9PU8zRHOdESt__MlqbHLgBIWYbys6fvJvfJbBnkwjdS_QvJcqH11IwuQ/s1600/intel-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQobpq4jZ5Dvq66lfzaIxkl2yQv7x8OSnN4iB8pn_h4D15vJDde21niC3O8nkMiOrumKYSEpAdr8vOwBTr2gO9PU8zRHOdESt__MlqbHLgBIWYbys6fvJvfJbBnkwjdS_QvJcqH11IwuQ/s1600/intel-logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
To investigate&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;How to get the 4-in-1 adapter working for external displays. &amp;nbsp;Low priority as I currently don&#39;t have a secondary display.&lt;/li&gt;
&lt;li&gt;Quite frequently text gets pasted while typing or mouse jumps. &amp;nbsp;This is likely caused by the touchpad which is quite broad and easily touched by accident. &amp;nbsp;Currently I don&#39;t have an external mouse but will likely look into buying one in the near future and will then check howto best disable the touchpad when mouse is connected and re-activate it when mouse is disconnected. &amp;nbsp;(e.g. using udev)&lt;/li&gt;
&lt;li&gt;In syslog CPU stacktraces show up from time to time&lt;/li&gt;
&lt;li&gt;Touchscreen: This seems to be a weak point for Linux. &amp;nbsp;The &#39;chromium-browser&#39; however seems to do support gestures like pinching and two-finger scrolling. &amp;nbsp;Can be handy for Google Maps although I dislike greasy fingers on my screen.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/3184730814159192996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2015/08/linux-mint-172-on-dell-xps-15-2015.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3184730814159192996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/3184730814159192996'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2015/08/linux-mint-172-on-dell-xps-15-2015.html' title='Setup Linux Mint 17.2 on Dell XPS 15 (2015 edition)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-TRSZ8TQ1AUc/VeNFZSL4A-I/AAAAAAAAEMA/8FnZqriEV88/s72-c/IMG_20150718_105947.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-8031057266084696057</id><published>2014-08-02T10:09:00.002-07:00</published><updated>2014-08-02T10:09:52.161-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hr monitor"/><category scheme="http://www.blogger.com/atom/ns#" term="polar"/><category scheme="http://www.blogger.com/atom/ns#" term="rcx3"/><title type='text'>&quot;to modify zones, delete program in service&quot; on polar watch</title><content type='html'>&lt;p&gt;In this post I&#39;ll explain how to setup your heart rate zones manually on a polar watch when you get the message &quot;to modify zones, delete program in service&quot;.  I have the polar rcx3 but probably for other polar watches the same logic will apply.&lt;/p&gt;

&lt;h2&gt; Personal introduction (can be skipped without a problem) &lt;/h2&gt;
&lt;p&gt;A few months ago I started running and to track my progress I want to monitor my heart rate.  For this I bought the Polar RCX3 run watch which comes with heart rate monitor and stride sensor s3+.  I wanted to configure my heart rate zones manually as I had a physical examination from a physician who determined my training zones.  Since he also provided a training program based on my heart rate zones it seems most appropriate to use the zones that are mentioned in his program.  The zones that were proposed by the watch are not completely different but there are some differences.  When I wanted to change the heart rate I received the vague error message: &quot;to modify zones, delete program in service&quot;.  As it took a while to find the problem I&#39;ll put it here for other people their convenience. &lt;/p&gt;

&lt;h2&gt;Setting heart rate zones manually on polar rcx3 &lt;/h2&gt;
&lt;p&gt; This can be done easily by going to.&lt;/p&gt;
&lt;pre&gt; Settings -&gt; Heart rate settings -&gt; Sport zones &lt;/pre&gt;
&lt;p&gt;There you can select any of the 5 zones and select its limits.  In some cases however you can have an error.  I have seen the following errors:&lt;/p&gt;
&lt;h3&gt;&#39;To modify zones, first set ZoneOptimizer off&#39;&lt;/h3&gt;
&lt;p&gt;This is a clear error message and can be easily solved.  Just disable the Heart rate Zone optimizer of your polar watch.  This can be done in the following menu entry:&lt;/p&gt;
&lt;pre&gt; Settings -&gt; Heart rate settings -&gt; ZoneOptimizer &lt;/pre&gt;
&lt;p&gt; Set it to &#39;OFF&#39; and retry setting your heart rate zones manually. &lt;/p&gt;

&lt;h3&gt;&#39;To modify zones, delete program in service&#39;&lt;/h3&gt;
&lt;p&gt;This however is a rather cryptic error message imho.  Google is your friend but this time I only found the advise to reset the watch by pressing all the buttons simultaneously for 2 seconds.  &lt;b&gt;Don&#39;t do this as it will just reset your watch settings but won&#39;t fix the problem!&lt;/b&gt; This error is shown because you cannot change your heart rate zones as long as you have training programs from www.polarpersonaltrainer.com on your watch.  As I already uploaded some training plans to my watch my heart rate zones were blocked.  I guess the training program calculates heartrate zones based on your maximal heart rate and than locks the heart rate zones so that changing them doesn&#39;t modify the training program completely.&lt;/p&gt;
&lt;p&gt; Unfortunately this means that the only solution I know is to go to www.polarpersonaltrainer.com, delete your trainingsprogram and then sync with your watch.  Then you can again try to set your heart rate zones manually. &lt;/p&gt;

&lt;h2&gt;Personal Conclusion/remark&lt;/h2&gt;
&lt;p&gt;It is not to hard to set your manual heart rate zones as long as you know to remove training programs but it is a pitty that they need to be removed.  I guess it is necessary due to to the implementation of heart rate zone programs but it is a pity.  Since I only wanted to start the program from polarpersonaltrainer in a few months I&#39;ll first continue with my tailored training programs and then I might switch back to the calculated heart rate zones.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/8031057266084696057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2014/08/to-modify-zones-delete-program-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/8031057266084696057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/8031057266084696057'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2014/08/to-modify-zones-delete-program-in.html' title='&quot;to modify zones, delete program in service&quot; on polar watch'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-7415392713839400809</id><published>2014-01-05T23:08:00.001-08:00</published><updated>2023-11-25T08:52:00.189-08:00</updated><title type='text'>Setting up a vagrant basebox for Oracle Linux by using veewee</title><content type='html'>&lt;h1&gt; Introduction &lt;/h1&gt;
&lt;p&gt; Note: Due to my professional life I use Oracle Linux a lot (Which is a distro that tracks Red Hat so it is very similar to RH and CentOS) therefore I will use Oracle Linux for the VM&amp;apos;s in this blogpost as well.  Don&amp;apos;t worry about a possible price tag; Oracle Linux is free and you can get free updates from their &lt;a href=&quot;http://public-yum.oracle.com/&quot;&gt;Oracle public yum servers&lt;/a&gt;. I am no Oracle employee, so if you want their vision: https://linux.oracle.com.&lt;/p&gt;
&lt;p&gt;Another reason why I use Oracle linux is because vagrant boxes were not easy to find for this distro.  At least not for usage with libvirt.  This makes it more interesting topic for a blog post.&lt;/p&gt;
&lt;p&gt;For home usage I really like mint.  So the building of the basebox is done on my home PC which runs mint (which is Ubuntu based and thus a Debian derivative).&lt;/p&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;In order to build a vagrant basebox we will need to go through the following steps &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt; Install Ruby version manager (rvm)
	&lt;li&gt; Install bundler gem
	&lt;li&gt; Install veewee as a gemset in rvm
	&lt;li&gt; Installing kvm support for your system.
	&lt;li&gt; Installing ruby-libvirt gem
	&lt;li&gt; Create a storage pool
	&lt;li&gt; Create a basebox
	&lt;li&gt; Install a compatible Vagrant with libvirt
	&lt;li&gt; Create a vagrant config and test.
&lt;/ul&gt;
&lt;p&gt; The remaining of this blogpost will have sections corresponding with these steps. The reader can skip steps that are of no interest to him/her.&lt;/p&gt;

&lt;h2&gt;Installing rvm&lt;/h2&gt;
&lt;p&gt; &lt;a href=&quot;http://rvm.io&quot;&gt;RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.&lt;/a&gt; For this blogpost we use its feature to manage sets of gems.  I only use it to avoid corrupting your default ruby environment but it is not perse necessary for building a vagrant basebox.&lt;/p&gt;
&lt;h2&gt;Install the pre-requisites&lt;/h2&gt;
&lt;pre&gt;sudo apt-get install libxslt1-dev libxml2-dev zlib1g-dev curl&lt;/pre&gt;
&lt;h2&gt;Install rvm&lt;/h2&gt;
&lt;pre&gt;\curl -sSL https://get.rvm.io | bash&lt;/pre&gt;
&lt;p&gt;Ruby works by sourcing a script.  By sourcing this script rvm gets &amp;apos;activated&amp;apos;.&lt;/p&gt;
&lt;pre&gt;source /home/$USER/.rvm/scripts/rvm&lt;/pre&gt;
&lt;p&gt;Once rvm is ready for setup we will install ruby 1.9.2 in it since this is the version we will use to run veewee&lt;/p&gt;
&lt;pre&gt;rvm install 1.9.2&lt;/pre&gt;
&lt;p&gt;Additional remark regarding rvm:  rvm will be a function but in order for this to be initialized correclty you need to use a loginshell (if this is chinese to you and you wish to translate do a &amp;apos;man bash&amp;apos; and start reading the &amp;apos;INVOCATION&amp;apos; section).  Since I was using guake (a dropdown terminal) this was not done automatically when opening a new terminal.  Luckily there is a checkbox &amp;apos;Run command as a login shell&amp;apos; in the guake preferences, after selecting this box rvm was loaded automaticlly in every new guake shell.&lt;/p&gt;


&lt;h1&gt;Install  veewee as a gemset&lt;/h1&gt;
&lt;p&gt; Now that rvm is installed and a ruby 1.9.2 is available we can install veewee.  We will get the latest version by cloning the github repository of the original creator.&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ cd
$USER@$HOST ~ $ git clone https://github.com/jedi4ever/veewee.git
Cloning into &#39;veewee&#39;...
remote: Reusing existing pack: 13273, done.
remote: Total 13273 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (13273/13273), 4.13 MiB | 1.86 MiB/s, done.
Resolving deltas: 100% (8370/8370), done.
Checking connectivity... done
$USER@$HOST ~ $ cd veewee/
You are using &#39;.rvmrc&#39;, it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to &#39;.ruby-version&#39; using &#39;rvm rvmrc to [.]ruby-version&#39;
or ignore this warning with &#39;rvm rvmrc warning ignore /home/$USER/veewee/.rvmrc&#39;,
&#39;.rvmrc&#39; will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run &#39;rvm rvmrc warning ignore all.rvmrcs&#39;.

********************************************************************************************************************
* NOTICE                                                                                                           *
********************************************************************************************************************
* RVM has encountered a new or modified .rvmrc file in the current directory, this is a shell script and           *
* therefore may contain any shell commands.                                                                        *
*                                                                                                                  *
* Examine the contents of this file carefully to be sure the contents are safe before trusting it!                 *
* Do you wish to trust &#39;/home/$USER/veewee/.rvmrc&#39;?                                                                *
* Choose v[iew] below to view the contents                                                                         *
********************************************************************************************************************
y[es], n[o], v[iew], c[ancel]&gt; v
********************************************************************************************************************
* The contents of the .rvmrc file will now be displayed.                                                           *
* After reading the file, you will be prompted again for &#39;yes or no&#39; to set the trust level for this particular    *
* version of the file.                                                                                             *
*                                                                                                                  *
* Note: You will be re-prompted each time the .rvmrc file&#39;s contents change                                        *
* changes, and may change the trust setting manually at any time.                                                  *
********************************************************************************************************************
(( press a key to review the .rvmrc file ))
rvm use ruby-1.9.2@veewee --create
#rvm use ruby-1.8.7@veewee --create

alias veewee=&quot;bundle exec veewee&quot;
alias irb=&quot;bundle exec irb&quot;
#alias vagrant=&quot;bundle exec vagrant&quot;
********************************************************************************************************************
* Viewing of /home/$USER/veewee/.rvmrc complete.                                                                   *
********************************************************************************************************************
* Trusting an .rvmrc file means that whenever you cd into this directory, RVM will run this .rvmrc shell script.   *
* Note that if the contents of the file change, you will be re-prompted to review the file and adjust its trust    *
* settings. You may also change the trust settings manually at any time with the &#39;rvm rvmrc&#39; command.              *
********************************************************************************************************************
y[es], n[o], v[iew], c[ancel]&gt; y
gemset veewee is not existing, creating.
ruby-1.9.2-p320 - #gemset created /home/$USER/.rvm/gems/ruby-1.9.2-p320@veewee
ruby-1.9.2-p320 - #generating veewee wrappers.
Using /home/$USER/.rvm/gems/ruby-1.9.2-p320 with gemset veewee
&lt;/pre&gt;
&lt;p&gt;A lot has happened in the previous code block.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt; We descended into the home folder of the current user (you can install veewee somewhere else if you want).
	&lt;li&gt; There we cloned the github repository.
	&lt;li&gt; Next we descended into the cloned directory.  This activated rvm since it contained a .rvmrc file.  Which is a project configuration file for rvm.  More info on this can be found &lt;a href=&quot;https://rvm.io/workflow/rvmrc&quot;&gt;here&lt;/a&gt;.
&lt;/ul&gt;
&lt;p&gt;By looking at the .rvmrc file we see that this script creates an environment ruby-1.9.2@veewee.  This means a named gemset called veewee for ruby-1.9.2.  It also sets up an alias which allows the linux users to just call veewee.&lt;/p&gt; 

&lt;pre&gt;
&lt;h1&gt;Install bundler gem&lt;/h1&gt;
&lt;p&gt;For this make sure that rvm is in the correct environment. You can check the current environment with:&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ rvm current
ruby-1.9.2-p320
&lt;/pre&gt;
&lt;p&gt;To change to the veewee environment you can execute:&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ rvm use ruby-1.9.2-p320@veewee
Using /home/$USER/.rvm/gems/ruby-1.9.2-p320 with gemset veewee
&lt;/pre&gt;
&lt;p&gt;A safety check doesn&amp;apos;t hurt&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ rvm current
ruby-1.9.2-p320@veewee
&lt;/pre&gt;
&lt;p&gt;Now we can install the gem &lt;/p&gt;
&lt;pre&gt;gem install bundler&lt;/pre&gt;


&lt;h1&gt;Finally install veewee&lt;/h1&gt;
&lt;p&gt;We have got the veewee source code in $HOME/veewee thanks to the clone of the github repository.  We will descend into this directory and install veewee as a gem by executing bundle install. (As in previous section it is important that the ruby-1.9.2-p320@veewee environment is active).&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~/veewee $ bundle install
Fetching https://github.com/hh/em-winrm.git
remote: Counting objects: 144, done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 144 (delta 67), reused 144 (delta 67)
Receiving objects: 100% (144/144), 24.26 KiB | 0 bytes/s, done.
Resolving deltas: 100% (67/67), done.
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake (10.1.1) 
Installing libxml-ruby (2.7.0) 
Installing CFPropertyList (2.0.17) 
Installing Platform (0.4.0) 
Installing builder (3.2.2) 
Installing gyoku (1.1.0) 
Installing mini_portile (0.5.2) 
Installing nokogiri (1.6.1) 
Installing akami (1.2.0) 
Installing ansi (1.3.0) 
Using bundler (1.3.5) 
Installing ffi (1.9.3) 
Installing childprocess (0.3.9) 
Installing diff-lcs (1.2.5) 
Installing eventmachine (1.0.0.beta.3) 
Installing mixlib-log (1.6.0) 
Installing uuidtools (2.1.4) 
Installing gssapi (1.0.3) 
Installing httpclient (2.3.4.1) 
Installing little-plugger (1.1.3) 
Installing multi_json (1.8.2) 
Installing logging (1.8.1) 
Installing rubyntlm (0.1.1) 
Installing rack (1.5.2) 
Installing httpi (0.9.7) 
Installing nori (1.1.5) 
Installing wasabi (1.0.0) 
Installing savon (0.9.5) 
Installing winrm (1.1.3) 
Using em-winrm (0.5.4.rc.1) from https://github.com/hh/em-winrm.git (at 3174560) 
Installing excon (0.31.0) 
Installing fission (0.4.0) 
Installing formatador (0.2.4) 
Installing mime-types (1.25.1) 
Installing net-ssh (2.7.0) 
Installing net-scp (1.1.2) 
Installing ruby-hmac (0.4.0) 
Installing fog (1.19.0) 
Installing posix-spawn (0.3.8) 
Installing grit (2.5.0) 
Installing highline (1.6.20) 
Installing i18n (0.6.9) 
Installing json (1.8.1) 
Installing log4r (1.1.10) 
Installing open4 (1.3.0) 
Installing os (0.9.6) 
Installing popen4 (0.1.2) 
Installing progressbar (0.21.0) 
Installing rspec-core (2.14.7) 
Installing rspec-expectations (2.14.4) 
Installing rspec-mocks (2.14.4) 
Installing rspec (2.14.1) 
Installing ruby-vnc (1.0.1) 
Installing thor (0.18.1) 
Using veewee (0.3.12) from source at /home/$USER/veewee 
Your bundle is complete!
Gems in the group kvm were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
&lt;/pre&gt;

&lt;h1&gt; Installing kvm support &lt;/h1&gt;
&lt;p&gt; This is based on the serverguide from ubuntu: https://help.ubuntu.com/lts/serverguide/libvirt.html &lt;/p&gt;
&lt;h2&gt; Install the packages&lt;/h2&gt;
&lt;pre&gt;sudo apt-get install kvm libvirt-bin libvirt-dev cpu-checker&lt;/pre&gt;
&lt;h2&gt; Add the current user to the libvirtd group &lt;/h2&gt;
&lt;p&gt; With current user I mean the user which will be administrating the VM&amp;apos;s&lt;/p&gt;
&lt;pre&gt;sudo adduser $USER libvirtd&lt;/pre&gt;
&lt;p&gt;To activate this change it is best to logout and login again.  In order to avoid strang problems in the future, it is best to do the logout now :-). &lt;/p&gt;
&lt;h2&gt; Check whether kvm is an option for your processor&lt;/h2&gt;
&lt;pre&gt;
USRE@HOST ~ $ kvm-ok 
INFO: /dev/kvm exists
KVM acceleration can be used
&lt;/pre&gt;
&lt;h1&gt; Installing the ruby-libvirt gem&lt;/h1&gt;
&lt;p&gt; As before make sure we are in the correct rvm environment&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ rvm current
ruby-1.9.2-p320@veewee
&lt;/pre&gt;
&lt;p&gt;Install the gem&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~/veewee $ gem install ruby-libvirt
Building native extensions.  This could take a while...
Successfully installed ruby-libvirt-0.5.1
Installing ri documentation for ruby-libvirt-0.5.1
Done installing documentation for ruby-libvirt after 0 seconds
1 gem installed
&lt;/pre&gt;
&lt;p&gt;Make sure the new gem is in the context of your bundle &lt;/p&gt;
&lt;pre&gt;bundle install --without restrictions&lt;/pre&gt;
&lt;p&gt; Logout and login before building kvms (otherwise you might get a permission denied like:) &lt;/p&gt;
&lt;pre&gt; 
There was a problem opening a connection to libvirt: Error making a connection to libvirt URI qemu:///system:
Call to virConnectOpen failed: Failed to connect socket to &#39;/var/run/libvirt/libvirt-sock&#39;: Permission denied
&lt;/pre&gt;
&lt;p&gt; This error is a permission error.  Possibly because the user executing the command is not in the libvirtd group. &lt;/p&gt;

&lt;h1&gt;Create a libvirt storage pool&lt;/h1&gt;
&lt;p&gt; The following ruby script can be used to create a storage pool.  A storage pool is necessary as there the disks will be placed.  For libvirt one of the possiblities is to set a directory as a repository.  Since this is an easy solution we go for these approach.  The following script is borrowed from http://libvirt.org/ruby/examples/storage.rb.  It is just adapted in order to only create the storage pool and no volumes. Make sure you change the path (it has the dummy value USER in it). &lt;/p&gt;
&lt;pre&gt;
# http://libvirt.org/ruby/examples/storage.rb
# this program demonstrates the use of the libvirt storage APIs.  In particular
# it demonstrates directory pool creation, volume creation, and teardown.
# libvirt supports many other kinds of storage pools, including iSCSI, NFS,
# etc.  See http://libvirt.org/formatstorage.html for more details

require &#39;libvirt&#39;

# a directory storage pool.  
storage_pool_xml = &lt;&lt;EOF
&lt;pool type=&quot;dir&quot;&gt;
  &lt;name&gt;libvirt-pool&lt;/name&gt;
  &lt;target&gt;
    &lt;path&gt;/home/$USER/libvirt-pool&lt;/path&gt;
  &lt;/target&gt;
&lt;/pool&gt;
EOF

# open up the connection to libvirt
conn = Libvirt::open(&#39;qemu:///system&#39;)

# print out how many storage pools are currently active
puts &quot;Number of storage pools: #{conn.num_of_storage_pools}&quot;

# create our new storage pool
pool = conn.define_storage_pool_xml(storage_pool_xml)

# build the storage pool.  The operation that this performs is pool-specific;
# in the case of a directory pool, it does the equivalent of mkdir to create
# the directory
pool.build

# start up the pool
pool.create

# print out how many active storage pools are now there; this should be one
# more than before
puts &quot;Number of storage pools: #{conn.num_of_storage_pools}&quot;

# print out some information about the pool.  Note that allocation can be
# much less than capacity; see the discussion for the storage volume XML for
# more details
puts &quot;Storage Pool:&quot;
puts &quot; Name: #{pool.name}&quot;
puts &quot; UUID: #{pool.uuid}&quot;
puts &quot; Autostart?: #{pool.autostart?}&quot;


conn.close
&lt;/pre&gt;
&lt;p&gt; Run this in your rvm environment (ruby-1.9.2-p320@veewee) and with ruby &lt;/p&gt;
&lt;pre&gt; 
$USER@$HOST ~/libvirt $ ruby storage.rb 
Number of storage pools: 0
Number of storage pools: 1
Storage Pool:
 Name: libvirt-pool
 UUID: fdaada6f-7d0d-484f-9434-fc43e25bd43e
 Autostart?: false
&lt;/pre&gt;

&lt;h1&gt; Create a basebox using veewee &lt;/h1&gt;
&lt;p&gt;Now we are ready to create our basebox.  We will create a basebox for Oracle Linux 6.5.  Veewee make use of template directories describing VMs out of which it builds the baseboxes.  In the version that I cloned from github there was no template for Oracle Linux 6.5 yet.  Since the differences between Oracle Linux 6.4 and 6.5 do not impose big changes on the installation procedure we can create a new template directory based on the template of Oracle Linux 6.&lt;/p&gt;
&lt;pre&gt;
cd ~/veewee
cp -R templates/OracleLinux-6.4-x86_64-DVD templates/OracleLinux-6.4-x86_65-DVD
&lt;/pre&gt;
&lt;p&gt;In the definition.rb the VM is defined.  Here it explains how the VM will be build.  We need to use a different iso but other than that we will keep the same definition.  Change the iso details:&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~/veewee $ diff templates/OracleLinux-6.5-x86_64-DVD/definition.rb templates/OracleLinux-6.4-x86_64-DVD/definition.rb 
8,10c8,10
&lt;   :iso_file =&gt; &quot;OracleLinux-R6-U5-Server-x86_64-dvd.iso&quot;,
&lt;   :iso_src =&gt; &quot;http://mirrors.dotsrc.org/oracle-linux/OL6/U5/x86_64/OracleLinux-R6-U5-Server-x86_64-dvd.iso&quot;,
&lt;   :iso_md5 =&gt; &quot;774fb999e4ed43341dcdf5ebc0d48f42&quot;,
---
&gt;   :iso_file =&gt; &quot;OracleLinux-R6-U4-Server-x86_64-dvd.iso&quot;,
&gt;   :iso_src =&gt; &quot;http://mirrors.dotsrc.org/oracle-linux/OL6/U4/x86_64/OracleLinux-R6-U4-Server-x86_64-dvd.iso&quot;,
&gt;   :iso_md5 =&gt; &quot;744fc1663519b4d54da1345669fcee52&quot;,
&lt;/pre&gt;
&lt;p&gt; Next we can create a definition for a kvm VM out of the template, we call it oel65_kvm. A definition is like a working copy of a template.  It alows you to create definitions for servers with different software installed on them.  For this first example we keep the definition the same as the template:&lt;p&gt;

&lt;pre&gt;
$USER@$HOST ~/veewee $ veewee kvm define &#39;oel65_kvm&#39; &#39;OracleLinux-6.5-x86_64-DVD&#39; --workdir=/home/$USER/veewee
The basebox &#39;oel65_kvm&#39; has been successfully created from the template &#39;OracleLinux-6.5-x86_64-DVD&#39;
You can now edit the definition files stored in /home/$USER/veewee/definitions/oel65_kvm or build the box with:
veewee kvm build &#39;oel65_kvm&#39; --workdir=/home/$USER/veewee
&lt;/pre&gt;
&lt;p&gt;Since we won&#39;t change this definition we will directly build the box: &lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~/veewee $ veewee kvm build &#39;oel65_kvm&#39; --workdir=/home/$USER/veewee
Building Box oel65_kvm with Definition oel65_kvm:
- debug : false
- cwd : /home/$USER/veewee
- force : false
- nogui : false
- auto : false
- checksum : false
- postinstall_include : []
- postinstall_exclude : []
- use_emulation : false
- network_name : default

The isofile OracleLinux-R6-U5-Server-x86_64-dvd.iso already exists.
Waiting 10 seconds for the machine to boot
Finding unused TCP port in range: 7122 - 7199
Selected TCP port 7122
Sending keystrokes to VNC port :0 - TCP port: 5900
Starting a webserver :7122
Typing:[1]: &lt;Tab&gt; text ks=http://192.168.75.18:7122/ks.cfg&lt;Enter&gt;
Done typing.

Serving file /home/$USER/veewee/definitions/oel65_kvm/ks.cfg
Shutting down for /home/$USER/veewee/definitions/oel65_kvm/ks.cfg
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.........................................................................
Transferring /tmp/.veewee_version20131228-7059-18zzcu6 to .veewee_version 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /tmp/.veewee_params20131228-7059-e1ql2d to .veewee_params 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/proxy.sh to proxy.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;proxy.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/base.sh to base.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;base.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/chef.sh to chef.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;chef.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/puppet.sh to puppet.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;puppet.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/vagrant.sh to vagrant.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;vagrant.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/virtualbox.sh to virtualbox.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;virtualbox.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/cleanup.sh to cleanup.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;cleanup.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Transferring /home/$USER/veewee/definitions/oel65_kvm/zerodisk.sh to zerodisk.sh 
..
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: chmod +x &quot;zerodisk.sh&quot;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./proxy.sh&#39;
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./base.sh&#39;
--2013-12-28 10:56:33--  https://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 2.22.55.98, 2.22.55.123
Connecting to public-yum.oracle.com|2.22.55.98|:443... connected.
ERROR: certificate common name “a248.e.akamai.net” doesn’t match requested host name “public-yum.oracle.com”.
To connect to public-yum.oracle.com insecurely, use ‘--no-check-certificate’.
Loaded plugins: security
public_ol6_UEKR3_latest                                  | 1.2 kB     00:00     
public_ol6_UEKR3_latest/primary                          | 2.3 MB     00:00     
public_ol6_UEKR3_latest                                                   77/77
public_ol6_latest                                        | 1.4 kB     00:00     
public_ol6_latest/primary                                |  35 MB     00:16     
public_ol6_latest                                                   24509/24509
Setting up Update Process
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package ca-certificates.noarch 0:2013.1.94-65.0.el6 will be updated
---&gt; Package ca-certificates.noarch 0:2013.1.95-65.1.el6_5 will be an update
---&gt; Package dmidecode.x86_64 1:2.11-2.el6 will be updated
---&gt; Package dmidecode.x86_64 1:2.11-2.el6_1 will be an update
---&gt; Package dracut.noarch 0:004-335.0.1.el6 will be updated
---&gt; Package dracut.noarch 0:004-336.0.1.el6_5.2 will be an update
---&gt; Package dracut-kernel.noarch 0:004-335.0.1.el6 will be updated
---&gt; Package dracut-kernel.noarch 0:004-336.0.1.el6_5.2 will be an update
---&gt; Package kernel.x86_64 0:2.6.32-431.1.2.el6 will be installed
---&gt; Package kernel-firmware.noarch 0:2.6.32-431.el6 will be updated
---&gt; Package kernel-firmware.noarch 0:2.6.32-431.1.2.el6 will be an update
---&gt; Package kernel-uek.x86_64 0:3.8.13-16.3.1.el6uek will be installed
---&gt; Package kernel-uek-firmware.noarch 0:3.8.13-16.3.1.el6uek will be installed
---&gt; Package libjpeg-turbo.x86_64 0:1.2.1-1.el6 will be updated
---&gt; Package libjpeg-turbo.x86_64 0:1.2.1-3.el6_5 will be an update
---&gt; Package nspr.x86_64 0:4.10.0-1.el6 will be updated
---&gt; Package nspr.x86_64 0:4.10.2-1.el6_5 will be an update
---&gt; Package nss.x86_64 0:3.15.1-15.0.1.el6 will be updated
---&gt; Package nss.x86_64 0:3.15.3-3.0.1.el6_5 will be an update
---&gt; Package nss-sysinit.x86_64 0:3.15.1-15.0.1.el6 will be updated
---&gt; Package nss-sysinit.x86_64 0:3.15.3-3.0.1.el6_5 will be an update
---&gt; Package nss-tools.x86_64 0:3.15.1-15.0.1.el6 will be updated
---&gt; Package nss-tools.x86_64 0:3.15.3-3.0.1.el6_5 will be an update
---&gt; Package nss-util.x86_64 0:3.15.1-3.el6 will be updated
---&gt; Package nss-util.x86_64 0:3.15.3-1.el6_5 will be an update
---&gt; Package openssl.x86_64 0:1.0.1e-15.el6 will be updated
---&gt; Package openssl.x86_64 0:1.0.1e-16.el6_5.1 will be an update
---&gt; Package pixman.x86_64 0:0.26.2-5.el6_4 will be updated
---&gt; Package pixman.x86_64 0:0.26.2-5.1.el6_5 will be an update
---&gt; Package system-config-network-tui.noarch 0:1.6.0.el6.2-1.0.3.el6 will be updated
---&gt; Package system-config-network-tui.noarch 0:1.6.0.el6.3-1.0.1.el6 will be an update
---&gt; Package systemtap-runtime.x86_64 0:2.3-3.0.1.el6 will be updated
---&gt; Package systemtap-runtime.x86_64 0:2.3-4.0.1.el6_5 will be an update
---&gt; Package tzdata.noarch 0:2013g-1.el6 will be updated
---&gt; Package tzdata.noarch 0:2013i-1.el6 will be an update
---&gt; Package yum.noarch 0:3.2.29-40.0.1.el6 will be updated
---&gt; Package yum.noarch 0:3.2.29-43.0.1.el6_5 will be an update
--&gt; Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch   Version               Repository               Size
================================================================================
Installing:
 kernel              x86_64 2.6.32-431.1.2.el6    public_ol6_latest        28 M
 kernel-uek          x86_64 3.8.13-16.3.1.el6uek  public_ol6_UEKR3_latest  41 M
 kernel-uek-firmware noarch 3.8.13-16.3.1.el6uek  public_ol6_UEKR3_latest 1.6 M
Updating:
 ca-certificates     noarch 2013.1.95-65.1.el6_5  public_ol6_latest       1.1 M
 dmidecode           x86_64 1:2.11-2.el6_1        public_ol6_latest        71 k
 dracut              noarch 004-336.0.1.el6_5.2   public_ol6_latest       122 k
 dracut-kernel       noarch 004-336.0.1.el6_5.2   public_ol6_latest        24 k
 kernel-firmware     noarch 2.6.32-431.1.2.el6    public_ol6_latest        13 M
 libjpeg-turbo       x86_64 1.2.1-3.el6_5         public_ol6_latest       174 k
 nspr                x86_64 4.10.2-1.el6_5        public_ol6_latest       112 k
 nss                 x86_64 3.15.3-3.0.1.el6_5    public_ol6_latest       821 k
 nss-sysinit         x86_64 3.15.3-3.0.1.el6_5    public_ol6_latest        39 k
 nss-tools           x86_64 3.15.3-3.0.1.el6_5    public_ol6_latest       358 k
 nss-util            x86_64 3.15.3-1.el6_5        public_ol6_latest        64 k
 openssl             x86_64 1.0.1e-16.el6_5.1     public_ol6_latest       1.5 M
 pixman              x86_64 0.26.2-5.1.el6_5      public_ol6_latest       200 k
 system-config-network-tui
                     noarch 1.6.0.el6.3-1.0.1.el6 public_ol6_latest       818 k
 systemtap-runtime   x86_64 2.3-4.0.1.el6_5       public_ol6_latest       188 k
 tzdata              noarch 2013i-1.el6           public_ol6_latest       447 k
 yum                 noarch 3.2.29-43.0.1.el6_5   public_ol6_latest       996 k

Transaction Summary
================================================================================
Install       3 Package(s)
Upgrade      17 Package(s)

Total download size: 91 M
Downloading Packages:
(1/20): ca-certificates-2013.1.95-65.1.el6_5.noarch.rpm  | 1.1 MB     00:00     
(2/20): dmidecode-2.11-2.el6_1.x86_64.rpm                |  71 kB     00:00     
(3/20): dracut-004-336.0.1.el6_5.2.noarch.rpm            | 122 kB     00:00     
(4/20): dracut-kernel-004-336.0.1.el6_5.2.noarch.rpm     |  24 kB     00:00     
(5/20): kernel-2.6.32-431.1.2.el6.x86_64.rpm             |  28 MB     00:08     
(6/20): kernel-firmware-2.6.32-431.1.2.el6.noarch.rpm    |  13 MB     00:03     
(7/20): kernel-uek-3.8.13-16.3.1.el6uek.x86_64.rpm       |  41 MB     00:12     
(8/20): kernel-uek-firmware-3.8.13-16.3.1.el6uek.noarch. | 1.6 MB     00:00     
(9/20): libjpeg-turbo-1.2.1-3.el6_5.x86_64.rpm           | 174 kB     00:00     
(10/20): nspr-4.10.2-1.el6_5.x86_64.rpm                  | 112 kB     00:00     
(11/20): nss-3.15.3-3.0.1.el6_5.x86_64.rpm               | 821 kB     00:00     
(12/20): nss-sysinit-3.15.3-3.0.1.el6_5.x86_64.rpm       |  39 kB     00:00     
(13/20): nss-tools-3.15.3-3.0.1.el6_5.x86_64.rpm         | 358 kB     00:00     
(14/20): nss-util-3.15.3-1.el6_5.x86_64.rpm              |  64 kB     00:00     
(15/20): openssl-1.0.1e-16.el6_5.1.x86_64.rpm            | 1.5 MB     00:00     
(16/20): pixman-0.26.2-5.1.el6_5.x86_64.rpm              | 200 kB     00:00     
(17/20): system-config-network-tui-1.6.0.el6.3-1.0.1.el6 | 818 kB     00:00     
(18/20): systemtap-runtime-2.3-4.0.1.el6_5.x86_64.rpm    | 188 kB     00:00     
(19/20): tzdata-2013i-1.el6.noarch.rpm                   | 447 kB     00:00     
(20/20): yum-3.2.29-43.0.1.el6_5.noarch.rpm              | 996 kB     00:00     
--------------------------------------------------------------------------------
Total                                           3.2 MB/s |  91 MB     00:28     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Importing GPG key 0xEC551F03:
 Userid: &quot;Oracle OSS group (Open Source Software group) &lt;build@oss.oracle.com&gt;&quot;
 From  : http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : nspr-4.10.2-1.el6_5.x86_64                                  1/37 
  Updating   : nss-util-3.15.3-1.el6_5.x86_64                              2/37 
  Updating   : nss-3.15.3-3.0.1.el6_5.x86_64                               3/37 
  Updating   : nss-sysinit-3.15.3-3.0.1.el6_5.x86_64                       4/37 
  Installing : kernel-uek-firmware-3.8.13-16.3.1.el6uek.noarch             5/37 
  Updating   : dracut-004-336.0.1.el6_5.2.noarch                           6/37 
  Updating   : dracut-kernel-004-336.0.1.el6_5.2.noarch                    7/37 
  Updating   : ca-certificates-2013.1.95-65.1.el6_5.noarch                 8/37 
  Updating   : kernel-firmware-2.6.32-431.1.2.el6.noarch                   9/37 
  Installing : kernel-2.6.32-431.1.2.el6.x86_64                           10/37 
  Updating   : systemtap-runtime-2.3-4.0.1.el6_5.x86_64                   11/37 
  Updating   : openssl-1.0.1e-16.el6_5.1.x86_64                           12/37 
  Installing : kernel-uek-3.8.13-16.3.1.el6uek.x86_64                     13/37 
  Updating   : nss-tools-3.15.3-3.0.1.el6_5.x86_64                        14/37 
  Updating   : yum-3.2.29-43.0.1.el6_5.noarch                             15/37 
  Updating   : 1:dmidecode-2.11-2.el6_1.x86_64                            16/37 
  Updating   : libjpeg-turbo-1.2.1-3.el6_5.x86_64                         17/37 
  Updating   : system-config-network-tui-1.6.0.el6.3-1.0.1.el6.noarch     18/37 
  Updating   : tzdata-2013i-1.el6.noarch                                  19/37 
  Updating   : pixman-0.26.2-5.1.el6_5.x86_64                             20/37 
  Cleanup    : dracut-kernel-004-335.0.1.el6.noarch                       21/37 
  Cleanup    : dracut-004-335.0.1.el6.noarch                              22/37 
  Cleanup    : yum-3.2.29-40.0.1.el6.noarch                               23/37 
  Cleanup    : kernel-firmware-2.6.32-431.el6.noarch                      24/37 
  Cleanup    : system-config-network-tui-1.6.0.el6.2-1.0.3.el6.noarch     25/37 
  Cleanup    : tzdata-2013g-1.el6.noarch                                  26/37 
  Cleanup    : systemtap-runtime-2.3-3.0.1.el6.x86_64                     27/37 
  Cleanup    : nss-tools-3.15.1-15.0.1.el6.x86_64                         28/37 
  Cleanup    : nss-3.15.1-15.0.1.el6.x86_64                               29/37 
  Cleanup    : nss-sysinit-3.15.1-15.0.1.el6.x86_64                       30/37 
  Cleanup    : nss-util-3.15.1-3.el6.x86_64                               31/37 
  Cleanup    : openssl-1.0.1e-15.el6.x86_64                               32/37 
  Cleanup    : ca-certificates-2013.1.94-65.0.el6.noarch                  33/37 
  Cleanup    : nspr-4.10.0-1.el6.x86_64                                   34/37 
  Cleanup    : 1:dmidecode-2.11-2.el6.x86_64                              35/37 
  Cleanup    : libjpeg-turbo-1.2.1-1.el6.x86_64                           36/37 
  Cleanup    : pixman-0.26.2-5.el6_4.x86_64                               37/37 
  Verifying  : pixman-0.26.2-5.1.el6_5.x86_64                              1/37 
  Verifying  : kernel-2.6.32-431.1.2.el6.x86_64                            2/37 
  Verifying  : tzdata-2013i-1.el6.noarch                                   3/37 
  Verifying  : openssl-1.0.1e-16.el6_5.1.x86_64                            4/37 
  Verifying  : kernel-uek-3.8.13-16.3.1.el6uek.x86_64                      5/37 
  Verifying  : system-config-network-tui-1.6.0.el6.3-1.0.1.el6.noarch      6/37 
  Verifying  : dracut-kernel-004-336.0.1.el6_5.2.noarch                    7/37 
  Verifying  : nss-sysinit-3.15.3-3.0.1.el6_5.x86_64                       8/37 
  Verifying  : nspr-4.10.2-1.el6_5.x86_64                                  9/37 
  Verifying  : kernel-firmware-2.6.32-431.1.2.el6.noarch                  10/37 
  Verifying  : ca-certificates-2013.1.95-65.1.el6_5.noarch                11/37 
  Verifying  : libjpeg-turbo-1.2.1-3.el6_5.x86_64                         12/37 
  Verifying  : 1:dmidecode-2.11-2.el6_1.x86_64                            13/37 
  Verifying  : nss-tools-3.15.3-3.0.1.el6_5.x86_64                        14/37 
  Verifying  : dracut-004-336.0.1.el6_5.2.noarch                          15/37 
  Verifying  : nss-3.15.3-3.0.1.el6_5.x86_64                              16/37 
  Verifying  : systemtap-runtime-2.3-4.0.1.el6_5.x86_64                   17/37 
  Verifying  : yum-3.2.29-43.0.1.el6_5.noarch                             18/37 
  Verifying  : kernel-uek-firmware-3.8.13-16.3.1.el6uek.noarch            19/37 
  Verifying  : nss-util-3.15.3-1.el6_5.x86_64                             20/37 
  Verifying  : libjpeg-turbo-1.2.1-1.el6.x86_64                           21/37 
  Verifying  : openssl-1.0.1e-15.el6.x86_64                               22/37 
  Verifying  : kernel-firmware-2.6.32-431.el6.noarch                      23/37 
  Verifying  : nss-3.15.1-15.0.1.el6.x86_64                               24/37 
  Verifying  : tzdata-2013g-1.el6.noarch                                  25/37 
  Verifying  : nss-tools-3.15.1-15.0.1.el6.x86_64                         26/37 
  Verifying  : dracut-kernel-004-335.0.1.el6.noarch                       27/37 
  Verifying  : ca-certificates-2013.1.94-65.0.el6.noarch                  28/37 
  Verifying  : nspr-4.10.0-1.el6.x86_64                                   29/37 
  Verifying  : yum-3.2.29-40.0.1.el6.noarch                               30/37 
  Verifying  : system-config-network-tui-1.6.0.el6.2-1.0.3.el6.noarch     31/37 
  Verifying  : nss-sysinit-3.15.1-15.0.1.el6.x86_64                       32/37 
  Verifying  : dracut-004-335.0.1.el6.noarch                              33/37 
  Verifying  : nss-util-3.15.1-3.el6.x86_64                               34/37 
  Verifying  : pixman-0.26.2-5.el6_4.x86_64                               35/37 
  Verifying  : 1:dmidecode-2.11-2.el6.x86_64                              36/37 
  Verifying  : systemtap-runtime-2.3-3.0.1.el6.x86_64                     37/37 

Installed:
  kernel.x86_64 0:2.6.32-431.1.2.el6                                            
  kernel-uek.x86_64 0:3.8.13-16.3.1.el6uek                                      
  kernel-uek-firmware.noarch 0:3.8.13-16.3.1.el6uek                             

Updated:
  ca-certificates.noarch 0:2013.1.95-65.1.el6_5                                 
  dmidecode.x86_64 1:2.11-2.el6_1                                               
  dracut.noarch 0:004-336.0.1.el6_5.2                                           
  dracut-kernel.noarch 0:004-336.0.1.el6_5.2                                    
  kernel-firmware.noarch 0:2.6.32-431.1.2.el6                                   
  libjpeg-turbo.x86_64 0:1.2.1-3.el6_5                                          
  nspr.x86_64 0:4.10.2-1.el6_5                                                  
  nss.x86_64 0:3.15.3-3.0.1.el6_5                                               
  nss-sysinit.x86_64 0:3.15.3-3.0.1.el6_5                                       
  nss-tools.x86_64 0:3.15.3-3.0.1.el6_5                                         
  nss-util.x86_64 0:3.15.3-1.el6_5                                              
  openssl.x86_64 0:1.0.1e-16.el6_5.1                                            
  pixman.x86_64 0:0.26.2-5.1.el6_5                                              
  system-config-network-tui.noarch 0:1.6.0.el6.3-1.0.1.el6                      
  systemtap-runtime.x86_64 0:2.3-4.0.1.el6_5                                    
  tzdata.noarch 0:2013i-1.el6                                                   
  yum.noarch 0:3.2.29-43.0.1.el6_5                                              

Complete!
--2013-12-28 10:59:55--  http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Resolving download.fedoraproject.org... 209.132.181.16, 80.239.156.215, 85.236.55.6, ...
Connecting to download.fedoraproject.org|209.132.181.16|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: http://fedora.cu.be/epel/6/x86_64/epel-release-6-8.noarch.rpm [following]
--2013-12-28 10:59:56--  http://fedora.cu.be/epel/6/x86_64/epel-release-6-8.noarch.rpm
Resolving fedora.cu.be... 194.50.97.11, 2001:67c:314::feed:cafe
Connecting to fedora.cu.be|194.50.97.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14540 (14K) [application/octet-stream]
Saving to: “epel-release-6-8.noarch.rpm”

100%[======================================&gt;] 14,540      --.-K/s   in 0.03s   

2013-12-28 10:59:56 (447 KB/s) - “epel-release-6-8.noarch.rpm” saved [14540/14540]

warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
Loaded plugins: security
epel/metalink                                            |  23 kB     00:00     
epel                                                     | 4.2 kB     00:00     
epel/primary_db                                          | 5.8 MB     00:07     
Setting up Install Process
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
No package kernel-devel-3.8.13-16.2.1.el6uek.x86_64 available.
Package 4:perl-5.10.1-136.el6.x86_64 already installed and latest version
Package wget-1.12-1.8.el6.x86_64 already installed and latest version
Package curl-7.19.7-37.el6_4.x86_64 already installed and latest version
Package bzip2-1.0.5-7.el6_0.x86_64 already installed and latest version
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package dkms.noarch 0:2.2.0.3-20.el6 will be installed
--&gt; Processing Dependency: kernel-devel for package: dkms-2.2.0.3-20.el6.noarch
---&gt; Package gcc.x86_64 0:4.4.7-4.el6 will be installed
--&gt; Processing Dependency: libgomp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64
--&gt; Processing Dependency: cpp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64
--&gt; Processing Dependency: cloog-ppl &gt;= 0.15 for package: gcc-4.4.7-4.el6.x86_64
--&gt; Processing Dependency: glibc-devel &gt;= 2.2.90-12 for package: gcc-4.4.7-4.el6.x86_64
--&gt; Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.4.7-4.el6.x86_64
---&gt; Package gcc-c++.x86_64 0:4.4.7-4.el6 will be installed
--&gt; Processing Dependency: libstdc++-devel = 4.4.7-4.el6 for package: gcc-c++-4.4.7-4.el6.x86_64
--&gt; Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.7-4.el6.x86_64
---&gt; Package kernel-uek-devel.x86_64 0:3.8.13-16.2.1.el6uek will be installed
--&gt; Processing Dependency: libdtrace-ctf for package: kernel-uek-devel-3.8.13-16.2.1.el6uek.x86_64
---&gt; Package openssl-devel.x86_64 0:1.0.1e-16.el6_5.1 will be installed
--&gt; Processing Dependency: krb5-devel for package: openssl-devel-1.0.1e-16.el6_5.1.x86_64
---&gt; Package readline-devel.x86_64 0:6.0-4.el6 will be installed
--&gt; Processing Dependency: ncurses-devel for package: readline-devel-6.0-4.el6.x86_64
---&gt; Package sqlite-devel.x86_64 0:3.6.20-1.el6 will be installed
---&gt; Package zlib-devel.x86_64 0:1.2.3-29.el6 will be installed
--&gt; Running transaction check
---&gt; Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--&gt; Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--&gt; Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---&gt; Package cpp.x86_64 0:4.4.7-4.el6 will be installed
---&gt; Package glibc-devel.x86_64 0:2.12-1.132.el6 will be installed
--&gt; Processing Dependency: glibc-headers = 2.12-1.132.el6 for package: glibc-devel-2.12-1.132.el6.x86_64
--&gt; Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.132.el6.x86_64
---&gt; Package kernel-devel.x86_64 0:2.6.32-431.1.2.el6 will be installed
---&gt; Package krb5-devel.x86_64 0:1.10.3-10.el6_4.6 will be installed
--&gt; Processing Dependency: libselinux-devel for package: krb5-devel-1.10.3-10.el6_4.6.x86_64
--&gt; Processing Dependency: libcom_err-devel for package: krb5-devel-1.10.3-10.el6_4.6.x86_64
--&gt; Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.10.3-10.el6_4.6.x86_64
---&gt; Package libdtrace-ctf.x86_64 0:0.4.0-1 will be installed
---&gt; Package libgomp.x86_64 0:4.4.7-4.el6 will be installed
---&gt; Package libstdc++-devel.x86_64 0:4.4.7-4.el6 will be installed
---&gt; Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
---&gt; Package ncurses-devel.x86_64 0:5.7-3.20090208.el6 will be installed
--&gt; Running transaction check
---&gt; Package glibc-headers.x86_64 0:2.12-1.132.el6 will be installed
--&gt; Processing Dependency: kernel-headers &gt;= 2.2.1 for package: glibc-headers-2.12-1.132.el6.x86_64
--&gt; Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.132.el6.x86_64
---&gt; Package keyutils-libs-devel.x86_64 0:1.4-4.el6 will be installed
---&gt; Package libcom_err-devel.x86_64 0:1.42.8-1.0.1.el6 will be installed
---&gt; Package libselinux-devel.x86_64 0:2.0.94-5.3.el6_4.1 will be installed
--&gt; Processing Dependency: libsepol-devel &gt;= 2.0.32-1 for package: libselinux-devel-2.0.94-5.3.el6_4.1.x86_64
--&gt; Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-5.3.el6_4.1.x86_64
---&gt; Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--&gt; Running transaction check
---&gt; Package kernel-uek-headers.x86_64 0:3.8.13-16.3.1.el6uek will be installed
---&gt; Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
--&gt; Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch   Version               Repository               Size
================================================================================
Installing:
 dkms                noarch 2.2.0.3-20.el6        epel                     75 k
 gcc                 x86_64 4.4.7-4.el6           public_ol6_latest        10 M
 gcc-c++             x86_64 4.4.7-4.el6           public_ol6_latest       4.7 M
 kernel-uek-devel    x86_64 3.8.13-16.2.1.el6uek  public_ol6_UEKR3_latest 8.8 M
 openssl-devel       x86_64 1.0.1e-16.el6_5.1     public_ol6_latest       1.2 M
 readline-devel      x86_64 6.0-4.el6             public_ol6_latest       134 k
 sqlite-devel        x86_64 3.6.20-1.el6          public_ol6_latest        80 k
 zlib-devel          x86_64 1.2.3-29.el6          public_ol6_latest        43 k
Installing for dependencies:
 cloog-ppl           x86_64 0.15.7-1.2.el6        public_ol6_latest        93 k
 cpp                 x86_64 4.4.7-4.el6           public_ol6_latest       3.7 M
 glibc-devel         x86_64 2.12-1.132.el6        public_ol6_latest       977 k
 glibc-headers       x86_64 2.12-1.132.el6        public_ol6_latest       608 k
 kernel-devel        x86_64 2.6.32-431.1.2.el6    public_ol6_latest       8.8 M
 kernel-uek-headers  x86_64 3.8.13-16.3.1.el6uek  public_ol6_UEKR3_latest 912 k
 keyutils-libs-devel x86_64 1.4-4.el6             public_ol6_latest        28 k
 krb5-devel          x86_64 1.10.3-10.el6_4.6     public_ol6_latest       494 k
 libcom_err-devel    x86_64 1.42.8-1.0.1.el6      public_ol6_latest        32 k
 libdtrace-ctf       x86_64 0.4.0-1               public_ol6_UEKR3_latest  27 k
 libgomp             x86_64 4.4.7-4.el6           public_ol6_latest       118 k
 libselinux-devel    x86_64 2.0.94-5.3.el6_4.1    public_ol6_latest       135 k
 libsepol-devel      x86_64 2.0.41-4.el6          public_ol6_latest        63 k
 libstdc++-devel     x86_64 4.4.7-4.el6           public_ol6_latest       1.6 M
 mpfr                x86_64 2.4.1-6.el6           public_ol6_latest       156 k
 ncurses-devel       x86_64 5.7-3.20090208.el6    public_ol6_latest       643 k
 ppl                 x86_64 0.10.2-11.el6         public_ol6_latest       1.3 M

Transaction Summary
================================================================================
Install      25 Package(s)

Total download size: 45 M
Installed size: 122 M
Downloading Packages:
(1/25): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm              |  93 kB     00:00     
(2/25): cpp-4.4.7-4.el6.x86_64.rpm                       | 3.7 MB     00:01     
(3/25): dkms-2.2.0.3-20.el6.noarch.rpm                   |  75 kB     00:00     
(4/25): gcc-4.4.7-4.el6.x86_64.rpm                       |  10 MB     00:03     
(5/25): gcc-c++-4.4.7-4.el6.x86_64.rpm                   | 4.7 MB     00:01     
(6/25): glibc-devel-2.12-1.132.el6.x86_64.rpm            | 977 kB     00:00     
(7/25): glibc-headers-2.12-1.132.el6.x86_64.rpm          | 608 kB     00:00     
(8/25): kernel-devel-2.6.32-431.1.2.el6.x86_64.rpm       | 8.8 MB     00:03     
(9/25): kernel-uek-devel-3.8.13-16.2.1.el6uek.x86_64.rpm | 8.8 MB     00:09     
(10/25): kernel-uek-headers-3.8.13-16.3.1.el6uek.x86_64. | 912 kB     00:00     
(11/25): keyutils-libs-devel-1.4-4.el6.x86_64.rpm        |  28 kB     00:00     
(12/25): krb5-devel-1.10.3-10.el6_4.6.x86_64.rpm         | 494 kB     00:00     
(13/25): libcom_err-devel-1.42.8-1.0.1.el6.x86_64.rpm    |  32 kB     00:00     
(14/25): libdtrace-ctf-0.4.0-1.x86_64.rpm                |  27 kB     00:00     
(15/25): libgomp-4.4.7-4.el6.x86_64.rpm                  | 118 kB     00:00     
(16/25): libselinux-devel-2.0.94-5.3.el6_4.1.x86_64.rpm  | 135 kB     00:00     
(17/25): libsepol-devel-2.0.41-4.el6.x86_64.rpm          |  63 kB     00:00     
(18/25): libstdc++-devel-4.4.7-4.el6.x86_64.rpm          | 1.6 MB     00:00     
(19/25): mpfr-2.4.1-6.el6.x86_64.rpm                     | 156 kB     00:00     
(20/25): ncurses-devel-5.7-3.20090208.el6.x86_64.rpm     | 643 kB     00:00     
(21/25): openssl-devel-1.0.1e-16.el6_5.1.x86_64.rpm      | 1.2 MB     00:00     
(22/25): ppl-0.10.2-11.el6.x86_64.rpm                    | 1.3 MB     00:01     
(23/25): readline-devel-6.0-4.el6.x86_64.rpm             | 134 kB     00:00     
(24/25): sqlite-devel-3.6.20-1.el6.x86_64.rpm            |  80 kB     00:00     
(25/25): zlib-devel-1.2.3-29.el6.x86_64.rpm              |  43 kB     00:00     
--------------------------------------------------------------------------------
Total                                           1.6 MB/s |  45 MB     00:27     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) &lt;epel@fedoraproject.org&gt;
 Package: epel-release-6-8.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : mpfr-2.4.1-6.el6.x86_64                                     1/25 
  Installing : cpp-4.4.7-4.el6.x86_64                                      2/25 
  Installing : libsepol-devel-2.0.41-4.el6.x86_64                          3/25 
  Installing : libselinux-devel-2.0.94-5.3.el6_4.1.x86_64                  4/25 
  Installing : ppl-0.10.2-11.el6.x86_64                                    5/25 
  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                             6/25 
  Installing : libgomp-4.4.7-4.el6.x86_64                                  7/25 
  Installing : libcom_err-devel-1.42.8-1.0.1.el6.x86_64                    8/25 
  Installing : kernel-uek-headers-3.8.13-16.3.1.el6uek.x86_64              9/25 
  Installing : glibc-headers-2.12-1.132.el6.x86_64                        10/25 
  Installing : glibc-devel-2.12-1.132.el6.x86_64                          11/25 
  Installing : gcc-4.4.7-4.el6.x86_64                                     12/25 
  Installing : libdtrace-ctf-0.4.0-1.x86_64                               13/25 
  Installing : zlib-devel-1.2.3-29.el6.x86_64                             14/25 
  Installing : ncurses-devel-5.7-3.20090208.el6.x86_64                    15/25 
  Installing : keyutils-libs-devel-1.4-4.el6.x86_64                       16/25 
  Installing : krb5-devel-1.10.3-10.el6_4.6.x86_64                        17/25 
  Installing : libstdc++-devel-4.4.7-4.el6.x86_64                         18/25 
  Installing : kernel-devel-2.6.32-431.1.2.el6.x86_64                     19/25 
  Installing : dkms-2.2.0.3-20.el6.noarch                                 20/25 
  Installing : gcc-c++-4.4.7-4.el6.x86_64                                 21/25 
  Installing : openssl-devel-1.0.1e-16.el6_5.1.x86_64                     22/25 
  Installing : readline-devel-6.0-4.el6.x86_64                            23/25 
  Installing : kernel-uek-devel-3.8.13-16.2.1.el6uek.x86_64               24/25 
  Installing : sqlite-devel-3.6.20-1.el6.x86_64                           25/25 
  Verifying  : readline-devel-6.0-4.el6.x86_64                             1/25 
  Verifying  : glibc-devel-2.12-1.132.el6.x86_64                           2/25 
  Verifying  : libselinux-devel-2.0.94-5.3.el6_4.1.x86_64                  3/25 
  Verifying  : openssl-devel-1.0.1e-16.el6_5.1.x86_64                      4/25 
  Verifying  : glibc-headers-2.12-1.132.el6.x86_64                         5/25 
  Verifying  : kernel-devel-2.6.32-431.1.2.el6.x86_64                      6/25 
  Verifying  : libstdc++-devel-4.4.7-4.el6.x86_64                          7/25 
  Verifying  : keyutils-libs-devel-1.4-4.el6.x86_64                        8/25 
  Verifying  : cpp-4.4.7-4.el6.x86_64                                      9/25 
  Verifying  : ncurses-devel-5.7-3.20090208.el6.x86_64                    10/25 
  Verifying  : libdtrace-ctf-0.4.0-1.x86_64                               11/25 
  Verifying  : mpfr-2.4.1-6.el6.x86_64                                    12/25 
  Verifying  : kernel-uek-devel-3.8.13-16.2.1.el6uek.x86_64               13/25 
  Verifying  : zlib-devel-1.2.3-29.el6.x86_64                             14/25 
  Verifying  : gcc-c++-4.4.7-4.el6.x86_64                                 15/25 
  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                            16/25 
  Verifying  : kernel-uek-headers-3.8.13-16.3.1.el6uek.x86_64             17/25 
  Verifying  : libcom_err-devel-1.42.8-1.0.1.el6.x86_64                   18/25 
  Verifying  : libgomp-4.4.7-4.el6.x86_64                                 19/25 
  Verifying  : gcc-4.4.7-4.el6.x86_64                                     20/25 
  Verifying  : dkms-2.2.0.3-20.el6.noarch                                 21/25 
  Verifying  : ppl-0.10.2-11.el6.x86_64                                   22/25 
  Verifying  : libsepol-devel-2.0.41-4.el6.x86_64                         23/25 
  Verifying  : sqlite-devel-3.6.20-1.el6.x86_64                           24/25 
  Verifying  : krb5-devel-1.10.3-10.el6_4.6.x86_64                        25/25 

Installed:
  dkms.noarch 0:2.2.0.3-20.el6                                                  
  gcc.x86_64 0:4.4.7-4.el6                                                      
  gcc-c++.x86_64 0:4.4.7-4.el6                                                  
  kernel-uek-devel.x86_64 0:3.8.13-16.2.1.el6uek                                
  openssl-devel.x86_64 0:1.0.1e-16.el6_5.1                                      
  readline-devel.x86_64 0:6.0-4.el6                                             
  sqlite-devel.x86_64 0:3.6.20-1.el6                                            
  zlib-devel.x86_64 0:1.2.3-29.el6                                              

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6                                             
  cpp.x86_64 0:4.4.7-4.el6                                                      
  glibc-devel.x86_64 0:2.12-1.132.el6                                           
  glibc-headers.x86_64 0:2.12-1.132.el6                                         
  kernel-devel.x86_64 0:2.6.32-431.1.2.el6                                      
  kernel-uek-headers.x86_64 0:3.8.13-16.3.1.el6uek                              
  keyutils-libs-devel.x86_64 0:1.4-4.el6                                        
  krb5-devel.x86_64 0:1.10.3-10.el6_4.6                                         
  libcom_err-devel.x86_64 0:1.42.8-1.0.1.el6                                    
  libdtrace-ctf.x86_64 0:0.4.0-1                                                
  libgomp.x86_64 0:4.4.7-4.el6                                                  
  libselinux-devel.x86_64 0:2.0.94-5.3.el6_4.1                                  
  libsepol-devel.x86_64 0:2.0.41-4.el6                                          
  libstdc++-devel.x86_64 0:4.4.7-4.el6                                          
  mpfr.x86_64 0:2.4.1-6.el6                                                     
  ncurses-devel.x86_64 0:5.7-3.20090208.el6                                     
  ppl.x86_64 0:0.10.2-11.el6                                                    

Complete!
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./chef.sh&#39;
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14101  100 14101    0     0  13933      0  0:00:01  0:00:01 --:--:-- 48126
Downloading Chef  for el...
downloading https://www.opscode.com/chef/metadata?v=&amp;prerelease=false&amp;p=el&amp;pv=6&amp;m=x86_64
  to file /tmp/install.sh.21115/metadata.txt
trying wget...
url	https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-11.8.2-1.el6.x86_64.rpm
md5	10f3d0da82efa973fe91cc24a6a74549
sha256	044558f38d25bbf75dbd5790ccce892a38e5e9f2a091ed55367ab914fbd1cfed
downloaded metadata file looks valid...
downloading https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-11.8.2-1.el6.x86_64.rpm
  to file /tmp/install.sh.21115/chef-.x86_64.rpm
trying wget...
Checksum compare with sha256sum succeeded.
Installing Chef 
installing with rpm...
warning: /tmp/install.sh.21115/chef-.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
Preparing...                ########################################### [100%]
   1:chef                   ########################################### [100%]
Thank you for installing Chef!
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./puppet.sh&#39;
--2013-12-28 11:01:24--  https://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm
Resolving yum.puppetlabs.com... 198.58.114.168, 2600:3c00::f03c:91ff:fe69:6bf0
Connecting to yum.puppetlabs.com|198.58.114.168|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5712 (5.6K) [application/x-redhat-package-manager]
Saving to: “puppetlabs-release-6-7.noarch.rpm”

100%[======================================&gt;] 5,712       --.-K/s   in 0s      

2013-12-28 11:01:25 (55.8 MB/s) - “puppetlabs-release-6-7.noarch.rpm” saved [5712/5712]

warning: puppetlabs-release-6-7.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 4bd6ec30: NOKEY
Preparing...                ########################################### [100%]
   1:puppetlabs-release     ########################################### [100%]
Loaded plugins: security
puppetlabs-deps                                          | 1.9 kB     00:00     
puppetlabs-deps/primary_db                               |  21 kB     00:00     
puppetlabs-products                                      | 1.9 kB     00:00     
puppetlabs-products/primary_db                           | 101 kB     00:00     
Setting up Install Process
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package facter.x86_64 1:1.7.4-1.el6 will be installed
--&gt; Processing Dependency: ruby &gt;= 1.8.5 for package: 1:facter-1.7.4-1.el6.x86_64
--&gt; Processing Dependency: /usr/bin/ruby for package: 1:facter-1.7.4-1.el6.x86_64
---&gt; Package puppet.noarch 0:3.4.1-1.el6 will be installed
--&gt; Processing Dependency: ruby-rgen &gt;= 0.6.5 for package: puppet-3.4.1-1.el6.noarch
--&gt; Processing Dependency: hiera &gt;= 1.0.0 for package: puppet-3.4.1-1.el6.noarch
--&gt; Processing Dependency: ruby-augeas for package: puppet-3.4.1-1.el6.noarch
--&gt; Processing Dependency: ruby-shadow for package: puppet-3.4.1-1.el6.noarch
--&gt; Processing Dependency: ruby(selinux) for package: puppet-3.4.1-1.el6.noarch
--&gt; Running transaction check
---&gt; Package hiera.noarch 0:1.3.0-1.el6 will be installed
--&gt; Processing Dependency: rubygem-json for package: hiera-1.3.0-1.el6.noarch
---&gt; Package libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1 will be installed
---&gt; Package ruby.x86_64 0:1.8.7.352-13.el6 will be installed
--&gt; Processing Dependency: ruby-libs = 1.8.7.352-13.el6 for package: ruby-1.8.7.352-13.el6.x86_64
--&gt; Processing Dependency: libruby.so.1.8()(64bit) for package: ruby-1.8.7.352-13.el6.x86_64
---&gt; Package ruby-augeas.x86_64 0:0.4.1-1.el6 will be installed
--&gt; Processing Dependency: augeas-libs &gt;= 0.8.0 for package: ruby-augeas-0.4.1-1.el6.x86_64
--&gt; Processing Dependency: libaugeas.so.0(AUGEAS_0.8.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--&gt; Processing Dependency: libaugeas.so.0(AUGEAS_0.12.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--&gt; Processing Dependency: libaugeas.so.0(AUGEAS_0.11.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--&gt; Processing Dependency: libaugeas.so.0(AUGEAS_0.10.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--&gt; Processing Dependency: libaugeas.so.0(AUGEAS_0.1.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--&gt; Processing Dependency: libaugeas.so.0()(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
---&gt; Package ruby-rgen.noarch 0:0.6.5-1.el6 will be installed
---&gt; Package ruby-shadow.x86_64 0:1.4.1-13.el6 will be installed
--&gt; Running transaction check
---&gt; Package augeas-libs.x86_64 0:1.0.0-5.el6 will be installed
---&gt; Package ruby-libs.x86_64 0:1.8.7.352-13.el6 will be installed
--&gt; Processing Dependency: libreadline.so.5()(64bit) for package: ruby-libs-1.8.7.352-13.el6.x86_64
---&gt; Package rubygem-json.x86_64 0:1.5.5-1.el6 will be installed
--&gt; Processing Dependency: rubygems for package: rubygem-json-1.5.5-1.el6.x86_64
--&gt; Running transaction check
---&gt; Package compat-readline5.x86_64 0:5.2-17.1.el6 will be installed
---&gt; Package rubygems.noarch 0:1.3.7-5.el6 will be installed
--&gt; Processing Dependency: ruby-rdoc for package: rubygems-1.3.7-5.el6.noarch
--&gt; Running transaction check
---&gt; Package ruby-rdoc.x86_64 0:1.8.7.352-13.el6 will be installed
--&gt; Processing Dependency: ruby-irb = 1.8.7.352-13.el6 for package: ruby-rdoc-1.8.7.352-13.el6.x86_64
--&gt; Running transaction check
---&gt; Package ruby-irb.x86_64 0:1.8.7.352-13.el6 will be installed
--&gt; Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch     Version                Repository             Size
================================================================================
Installing:
 facter             x86_64   1:1.7.4-1.el6          puppetlabs-products    87 k
 puppet             noarch   3.4.1-1.el6            puppetlabs-products   1.1 M
Installing for dependencies:
 augeas-libs        x86_64   1.0.0-5.el6            public_ol6_latest     308 k
 compat-readline5   x86_64   5.2-17.1.el6           public_ol6_latest     129 k
 hiera              noarch   1.3.0-1.el6            puppetlabs-products    23 k
 libselinux-ruby    x86_64   2.0.94-5.3.el6_4.1     public_ol6_latest      98 k
 ruby               x86_64   1.8.7.352-13.el6       public_ol6_latest     534 k
 ruby-augeas        x86_64   0.4.1-1.el6            epel                   21 k
 ruby-irb           x86_64   1.8.7.352-13.el6       public_ol6_latest     313 k
 ruby-libs          x86_64   1.8.7.352-13.el6       public_ol6_latest     1.6 M
 ruby-rdoc          x86_64   1.8.7.352-13.el6       public_ol6_latest     376 k
 ruby-rgen          noarch   0.6.5-1.el6            puppetlabs-deps        87 k
 ruby-shadow        x86_64   1.4.1-13.el6           epel                   11 k
 rubygem-json       x86_64   1.5.5-1.el6            puppetlabs-deps       763 k
 rubygems           noarch   1.3.7-5.el6            public_ol6_latest     206 k

Transaction Summary
================================================================================
Install      15 Package(s)

Total download size: 5.7 M
Installed size: 17 M
Downloading Packages:
(1/15): augeas-libs-1.0.0-5.el6.x86_64.rpm               | 308 kB     00:00     
(2/15): compat-readline5-5.2-17.1.el6.x86_64.rpm         | 129 kB     00:00     
(3/15): facter-1.7.4-1.el6.x86_64.rpm                    |  87 kB     00:00     
(4/15): hiera-1.3.0-1.el6.noarch.rpm                     |  23 kB     00:00     
(5/15): libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64.rpm    |  98 kB     00:00     
(6/15): puppet-3.4.1-1.el6.noarch.rpm                    | 1.1 MB     00:01     
(7/15): ruby-1.8.7.352-13.el6.x86_64.rpm                 | 534 kB     00:00     
(8/15): ruby-augeas-0.4.1-1.el6.x86_64.rpm               |  21 kB     00:00     
(9/15): ruby-irb-1.8.7.352-13.el6.x86_64.rpm             | 313 kB     00:00     
(10/15): ruby-libs-1.8.7.352-13.el6.x86_64.rpm           | 1.6 MB     00:00     
(11/15): ruby-rdoc-1.8.7.352-13.el6.x86_64.rpm           | 376 kB     00:00     
(12/15): ruby-rgen-0.6.5-1.el6.noarch.rpm                |  87 kB     00:00     
(13/15): ruby-shadow-1.4.1-13.el6.x86_64.rpm             |  11 kB     00:00     
(14/15): rubygem-json-1.5.5-1.el6.x86_64.rpm             | 763 kB     00:01     
(15/15): rubygems-1.3.7-5.el6.noarch.rpm                 | 206 kB     00:00     
--------------------------------------------------------------------------------
Total                                           753 kB/s | 5.7 MB     00:07     
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA512 Signature, key ID 4bd6ec30: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
Importing GPG key 0x4BD6EC30:
 Userid : Puppet Labs Release Key (Puppet Labs Release Key) &lt;info@puppetlabs.com&gt;
 Package: puppetlabs-release-6-7.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : augeas-libs-1.0.0-5.el6.x86_64                              1/15 
  Installing : compat-readline5-5.2-17.1.el6.x86_64                        2/15 
  Installing : ruby-libs-1.8.7.352-13.el6.x86_64                           3/15 
  Installing : ruby-1.8.7.352-13.el6.x86_64                                4/15 
  Installing : ruby-rgen-0.6.5-1.el6.noarch                                5/15 
  Installing : ruby-irb-1.8.7.352-13.el6.x86_64                            6/15 
  Installing : ruby-rdoc-1.8.7.352-13.el6.x86_64                           7/15 
  Installing : rubygems-1.3.7-5.el6.noarch                                 8/15 
  Installing : rubygem-json-1.5.5-1.el6.x86_64                             9/15 
  Installing : hiera-1.3.0-1.el6.noarch                                   10/15 
  Installing : 1:facter-1.7.4-1.el6.x86_64                                11/15 
  Installing : ruby-augeas-0.4.1-1.el6.x86_64                             12/15 
  Installing : ruby-shadow-1.4.1-13.el6.x86_64                            13/15 
  Installing : libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64                  14/15 
  Installing : puppet-3.4.1-1.el6.noarch                                  15/15 
  Verifying  : hiera-1.3.0-1.el6.noarch                                    1/15 
  Verifying  : libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64                   2/15 
  Verifying  : ruby-augeas-0.4.1-1.el6.x86_64                              3/15 
  Verifying  : ruby-1.8.7.352-13.el6.x86_64                                4/15 
  Verifying  : compat-readline5-5.2-17.1.el6.x86_64                        5/15 
  Verifying  : ruby-rgen-0.6.5-1.el6.noarch                                6/15 
  Verifying  : ruby-rdoc-1.8.7.352-13.el6.x86_64                           7/15 
  Verifying  : puppet-3.4.1-1.el6.noarch                                   8/15 
  Verifying  : ruby-irb-1.8.7.352-13.el6.x86_64                            9/15 
  Verifying  : 1:facter-1.7.4-1.el6.x86_64                                10/15 
  Verifying  : rubygems-1.3.7-5.el6.noarch                                11/15 
  Verifying  : ruby-libs-1.8.7.352-13.el6.x86_64                          12/15 
  Verifying  : rubygem-json-1.5.5-1.el6.x86_64                            13/15 
  Verifying  : augeas-libs-1.0.0-5.el6.x86_64                             14/15 
  Verifying  : ruby-shadow-1.4.1-13.el6.x86_64                            15/15 

Installed:
  facter.x86_64 1:1.7.4-1.el6            puppet.noarch 0:3.4.1-1.el6           

Dependency Installed:
  augeas-libs.x86_64 0:1.0.0-5.el6                                              
  compat-readline5.x86_64 0:5.2-17.1.el6                                        
  hiera.noarch 0:1.3.0-1.el6                                                    
  libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1                                   
  ruby.x86_64 0:1.8.7.352-13.el6                                                
  ruby-augeas.x86_64 0:0.4.1-1.el6                                              
  ruby-irb.x86_64 0:1.8.7.352-13.el6                                            
  ruby-libs.x86_64 0:1.8.7.352-13.el6                                           
  ruby-rdoc.x86_64 0:1.8.7.352-13.el6                                           
  ruby-rgen.noarch 0:0.6.5-1.el6                                                
  ruby-shadow.x86_64 0:1.4.1-13.el6                                             
  rubygem-json.x86_64 0:1.5.5-1.el6                                             
  rubygems.noarch 0:1.3.7-5.el6                                                 

Complete!

Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./vagrant.sh&#39;
Changing password for user vagrant.
passwd: all authentication tokens updated successfully.
--2013-12-28 11:01:50--  https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub
Resolving raw.github.com... 185.31.16.133
Connecting to raw.github.com|185.31.16.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 409 [text/plain]
Saving to: “/home/vagrant/.ssh/authorized_keys”

100%[======================================&gt;] 409         --.-K/s   in 0s      

2013-12-28 11:01:50 (3.05 MB/s) - “/home/vagrant/.ssh/authorized_keys” saved [409/409]

Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./virtualbox.sh&#39;
cat: /home/veewee/.vbox_version: No such file or directory
/home/veewee/VBoxGuestAdditions_.iso: No such file or directory
sh: /mnt/VBoxLinuxAdditions.run: No such file or directory
umount: /mnt: not mounted
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./cleanup.sh&#39;
Loaded plugins: security
Setting up Remove Process
No Match for argument: avahi
Package(s) avahi available, but not installed.
No Match for argument: bitstream-vera-fonts
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package freetype.x86_64 0:2.3.11-14.el6_3.1 will be erased
--&gt; Processing Dependency: libfreetype.so.6()(64bit) for package: libXft-2.3.1-2.el6.x86_64
--&gt; Processing Dependency: libfreetype.so.6()(64bit) for package: cairo-1.8.8-3.1.el6.x86_64
--&gt; Processing Dependency: libfreetype.so.6()(64bit) for package: pango-1.28.1-7.0.1.el6_3.x86_64
--&gt; Processing Dependency: libfreetype.so.6()(64bit) for package: fontconfig-2.8.0-3.el6.x86_64
--&gt; Processing Dependency: freetype &gt;= 2.1.3-3 for package: pango-1.28.1-7.0.1.el6_3.x86_64
--&gt; Processing Dependency: freetype &gt;= 2.1.3-3 for package: pango-1.28.1-7.0.1.el6_3.x86_64
--&gt; Processing Dependency: freetype &gt;= 2.1.4 for package: fontconfig-2.8.0-3.el6.x86_64
---&gt; Package gtk2.x86_64 0:2.20.1-4.el6 will be erased
--&gt; Processing Dependency: libgdk_pixbuf-2.0.so.0()(64bit) for package: libfprint-0.1.0-19.pre2.el6.x86_64
---&gt; Package hicolor-icon-theme.noarch 0:0.11-1.1.el6 will be erased
---&gt; Package libX11.x86_64 0:1.5.0-4.el6 will be erased
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXi-1.6.1-3.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXrender-0.9.7-2.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXcomposite-0.4.3-4.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXfixes-5.0-3.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXcursor-1.1.13-6.20130524git8f677eaea.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXdamage-1.1.3-4.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXinerama-1.1.2-2.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXext-1.3.1-2.el6.x86_64
--&gt; Processing Dependency: libX11.so.6()(64bit) for package: libXrandr-1.4.0-1.el6.x86_64
--&gt; Processing Dependency: libX11 &gt;= 1.4.99.1 for package: libXi-1.6.1-3.el6.x86_64
--&gt; Running transaction check
---&gt; Package cairo.x86_64 0:1.8.8-3.1.el6 will be erased
---&gt; Package fontconfig.x86_64 0:2.8.0-3.el6 will be erased
---&gt; Package libXcomposite.x86_64 0:0.4.3-4.el6 will be erased
---&gt; Package libXcursor.x86_64 0:1.1.13-6.20130524git8f677eaea.el6 will be erased
---&gt; Package libXdamage.x86_64 0:1.1.3-4.el6 will be erased
---&gt; Package libXext.x86_64 0:1.3.1-2.el6 will be erased
---&gt; Package libXfixes.x86_64 0:5.0-3.el6 will be erased
---&gt; Package libXft.x86_64 0:2.3.1-2.el6 will be erased
---&gt; Package libXi.x86_64 0:1.6.1-3.el6 will be erased
---&gt; Package libXinerama.x86_64 0:1.1.2-2.el6 will be erased
---&gt; Package libXrandr.x86_64 0:1.4.0-1.el6 will be erased
---&gt; Package libXrender.x86_64 0:0.9.7-2.el6 will be erased
---&gt; Package libfprint.x86_64 0:0.1.0-19.pre2.el6 will be erased
--&gt; Processing Dependency: libfprint.so.0()(64bit) for package: fprintd-0.1-21.git04fd09cfa.el6.x86_64
---&gt; Package pango.x86_64 0:1.28.1-7.0.1.el6_3 will be erased
--&gt; Running transaction check
---&gt; Package fprintd.x86_64 0:0.1-21.git04fd09cfa.el6 will be erased
--&gt; Processing Dependency: fprintd = 0.1-21.git04fd09cfa.el6 for package: fprintd-pam-0.1-21.git04fd09cfa.el6.x86_64
--&gt; Running transaction check
---&gt; Package fprintd-pam.x86_64 0:0.1-21.git04fd09cfa.el6 will be erased
--&gt; Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package     Arch   Version
                      Repository                                           Size
================================================================================
Removing:
 freetype    x86_64 2.3.11-14.el6_3.1
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 816 k
 gtk2        x86_64 2.20.1-4.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  13 M
 hicolor-icon-theme
             noarch 0.11-1.1.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  44 k
 libX11      x86_64 1.5.0-4.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 1.2 M
Removing for dependencies:
 cairo       x86_64 1.8.8-3.1.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 779 k
 fontconfig  x86_64 2.8.0-3.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 440 k
 fprintd     x86_64 0.1-21.git04fd09cfa.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 106 k
 fprintd-pam x86_64 0.1-21.git04fd09cfa.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  17 k
 libXcomposite
             x86_64 0.4.3-4.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  31 k
 libXcursor  x86_64 1.1.13-6.20130524git8f677eaea.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  41 k
 libXdamage  x86_64 1.1.3-4.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  24 k
 libXext     x86_64 1.3.1-2.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  80 k
 libXfixes   x86_64 5.0-3.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  40 k
 libXft      x86_64 2.3.1-2.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 116 k
 libXi       x86_64 1.6.1-3.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  63 k
 libXinerama x86_64 1.1.2-2.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  32 k
 libXrandr   x86_64 1.4.0-1.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  79 k
 libXrender  x86_64 0.9.7-2.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5  56 k
 libfprint   x86_64 0.1.0-19.pre2.el6
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 261 k
 pango       x86_64 1.28.1-7.0.1.el6_3
                      @anaconda-OracleLinuxServer-201311252058.x86_64/6.5 1.0 M

Transaction Summary
================================================================================
Remove       20 Package(s)

Installed size: 18 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : fprintd-pam-0.1-21.git04fd09cfa.el6.x86_64                  1/20 
  Erasing    : fprintd-0.1-21.git04fd09cfa.el6.x86_64                      2/20 
  Erasing    : libfprint-0.1.0-19.pre2.el6.x86_64                          3/20 
  Erasing    : gtk2-2.20.1-4.el6.x86_64                                    4/20 
  Erasing    : pango-1.28.1-7.0.1.el6_3.x86_64                             5/20 
  Erasing    : libXft-2.3.1-2.el6.x86_64                                   6/20 
  Erasing    : cairo-1.8.8-3.1.el6.x86_64                                  7/20 
  Erasing    : libXcursor-1.1.13-6.20130524git8f677eaea.el6.x86_64         8/20 
  Erasing    : libXrandr-1.4.0-1.el6.x86_64                                9/20 
  Erasing    : libXdamage-1.1.3-4.el6.x86_64                              10/20 
  Erasing    : libXi-1.6.1-3.el6.x86_64                                   11/20 
  Erasing    : libXinerama-1.1.2-2.el6.x86_64                             12/20 
  Erasing    : libXext-1.3.1-2.el6.x86_64                                 13/20 
  Erasing    : libXfixes-5.0-3.el6.x86_64                                 14/20 
  Erasing    : libXrender-0.9.7-2.el6.x86_64                              15/20 
  Erasing    : fontconfig-2.8.0-3.el6.x86_64                              16/20 
  Erasing    : libXcomposite-0.4.3-4.el6.x86_64                           17/20 
  Erasing    : hicolor-icon-theme-0.11-1.1.el6.noarch                     18/20 
  Erasing    : libX11-1.5.0-4.el6.x86_64                                  19/20 
  Erasing    : freetype-2.3.11-14.el6_3.1.x86_64                          20/20 
  Verifying  : libXinerama-1.1.2-2.el6.x86_64                              1/20 
  Verifying  : libXrandr-1.4.0-1.el6.x86_64                                2/20 
  Verifying  : libXfixes-5.0-3.el6.x86_64                                  3/20 
  Verifying  : libXrender-0.9.7-2.el6.x86_64                               4/20 
  Verifying  : pango-1.28.1-7.0.1.el6_3.x86_64                             5/20 
  Verifying  : hicolor-icon-theme-0.11-1.1.el6.noarch                      6/20 
  Verifying  : cairo-1.8.8-3.1.el6.x86_64                                  7/20 
  Verifying  : fprintd-0.1-21.git04fd09cfa.el6.x86_64                      8/20 
  Verifying  : libXext-1.3.1-2.el6.x86_64                                  9/20 
  Verifying  : freetype-2.3.11-14.el6_3.1.x86_64                          10/20 
  Verifying  : libfprint-0.1.0-19.pre2.el6.x86_64                         11/20 
  Verifying  : libXi-1.6.1-3.el6.x86_64                                   12/20 
  Verifying  : libXcursor-1.1.13-6.20130524git8f677eaea.el6.x86_64        13/20 
  Verifying  : fprintd-pam-0.1-21.git04fd09cfa.el6.x86_64                 14/20 
  Verifying  : libX11-1.5.0-4.el6.x86_64                                  15/20 
  Verifying  : libXcomposite-0.4.3-4.el6.x86_64                           16/20 
  Verifying  : fontconfig-2.8.0-3.el6.x86_64                              17/20 
  Verifying  : libXdamage-1.1.3-4.el6.x86_64                              18/20 
  Verifying  : gtk2-2.20.1-4.el6.x86_64                                   19/20 
  Verifying  : libXft-2.3.1-2.el6.x86_64                                  20/20 

Removed:
  freetype.x86_64 0:2.3.11-14.el6_3.1           gtk2.x86_64 0:2.20.1-4.el6      
  hicolor-icon-theme.noarch 0:0.11-1.1.el6      libX11.x86_64 0:1.5.0-4.el6     

Dependency Removed:
  cairo.x86_64 0:1.8.8-3.1.el6                                                  
  fontconfig.x86_64 0:2.8.0-3.el6                                               
  fprintd.x86_64 0:0.1-21.git04fd09cfa.el6                                      
  fprintd-pam.x86_64 0:0.1-21.git04fd09cfa.el6                                  
  libXcomposite.x86_64 0:0.4.3-4.el6                                            
  libXcursor.x86_64 0:1.1.13-6.20130524git8f677eaea.el6                         
  libXdamage.x86_64 0:1.1.3-4.el6                                               
  libXext.x86_64 0:1.3.1-2.el6                                                  
  libXfixes.x86_64 0:5.0-3.el6                                                  
  libXft.x86_64 0:2.3.1-2.el6                                                   
  libXi.x86_64 0:1.6.1-3.el6                                                    
  libXinerama.x86_64 0:1.1.2-2.el6                                              
  libXrandr.x86_64 0:1.4.0-1.el6                                                
  libXrender.x86_64 0:0.9.7-2.el6                                               
  libfprint.x86_64 0:0.1.0-19.pre2.el6                                          
  pango.x86_64 0:1.28.1-7.0.1.el6_3                                             

Complete!
Loaded plugins: security
Cleaning repos: epel public_ol6_UEKR3_latest public_ol6_latest puppetlabs-deps
              : puppetlabs-products
Cleaning up Everything
Waiting for ssh login on 192.168.122.162 with user veewee to sshd on port =&gt; 22 to work, timeout=10000 sec
.
Executing command: echo &#39;veewee&#39;|sudo -S sh &#39;./zerodisk.sh&#39;
dd: writing `/EMPTY&#39;: No space left on device
6808+0 records in
6807+0 records out
7138480128 bytes (7.1 GB) copied, 84.4773 s, 84.5 MB/s
The box oel65_kvm was built successfully!
You can now login to the box with:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22 -l veewee 192.168.122.162
&lt;/pre&gt;
&lt;p&gt; Now your box is ready.  You can login (username and password are both veewee) to it over ssh to do some checkups but I trust the build and I will just shut down the VM. &lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~/veewee $ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22 -l veewee 192.168.122.162
Warning: Permanently added &#39;192.168.122.162&#39; (RSA) to the list of known hosts.
veewee@192.168.122.162&#39;s password: 
Last login: Sat Dec 28 11:05:36 2013 from 192.168.122.1
Welcome to Veewee built Vagrant Base Box.
[veewee@localhost ~]$ sudo /sbin/shutdown -h now

Broadcast message from veewee@localhost.localdomain
	(/dev/pts/0) at 11:07 ...

The system is going down for halt NOW!
[veewee@localhost ~]$ Connection to 192.168.122.162 closed by remote host.
Connection to 192.168.122.162 closed.
&lt;/pre&gt;

&lt;h1&gt; Export to Vagrant format &lt;/h1&gt;
&lt;pre&gt; 
$USER@$HOST ~/veewee $ veewee kvm export oel65_kvm
Creating a temporary directory for export
Adding additional files
Creating Vagrantfile
Copying the box volume
Packaging the box
Cleaning up temporary directory

To import it into vagrant type:
vagrant box add &#39;oel65_kvm&#39; &#39;/home/$USER/veewee/oel65_kvm.box&#39;

To use it:
vagrant init &#39;oel65_kvm&#39;
vagrant up --provider=libvirt
vagrant ssh

&lt;h1&gt;Installing a compatible vagrant&lt;/h1&gt;
&lt;p&gt;At the time I was testing this there was no libvirt provider for vagrant 1.4.  Therefore I installed an older version (1.3.5) which was already compatible with the provider.&lt;/p&gt;
&lt;h2&gt; Install vagrant 1.3.5&lt;/h2&gt;
&lt;p&gt;Download vagrant from the official web site (&lt;a href=&quot;http://downloads.vagrantup.com/tags/v1.3.5&quot;&gt;here&lt;/a&gt;) and install the package&lt;/p&gt;
&lt;pre&gt;sudo dpkg -i vagrant_1.3.5_x86_64.deb&lt;/pre&gt;
&lt;h2&gt; Install vagrant-libvirt &lt;/h2&gt;
&lt;pre&gt;vagrant plugin install vagrant-libvirt &lt;/pre&gt;
&lt;p&gt; My first try looked like: &lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ vagrant plugin install vagrant-libvirt
Installing the &#39;vagrant-libvirt&#39; plugin. This can take a few minutes...
/usr/lib/ruby/1.9.1/rubygems/installer.rb:556:in `rescue in block in build_extensions&#39;: ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require&#39;: cannot load such file -- mkmf (LoadError)
	from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require&#39;
	from extconf.rb:5:in `&lt;main&gt;&#39;


Gem files will remain installed in /home/$USER/.vagrant.d/gems/gems/nokogiri-1.5.10 for inspection.
Results logged to /home/$USER/.vagrant.d/gems/gems/nokogiri-1.5.10/ext/nokogiri/gem_make.out
	from /usr/lib/ruby/1.9.1/rubygems/installer.rb:534:in `block in build_extensions&#39;
	from /usr/lib/ruby/1.9.1/rubygems/installer.rb:509:in `each&#39;
	from /usr/lib/ruby/1.9.1/rubygems/installer.rb:509:in `build_extensions&#39;
	from /usr/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install&#39;
	from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install&#39;
	from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each&#39;
	from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index&#39;
	from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install&#39;
	from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:38:in `block in call&#39;
	from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment&#39;
	from /usr/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui&#39;
	from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:41:in `with_environment&#39;
	from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:28:in `call&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call&#39;
	from /usr/share/vagrant/plugins/commands/plugin/action/bundler_check.rb:20:in `call&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:61:in `block in run&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:61:in `run&#39;
	from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:17:in `action&#39;
	from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:44:in `execute&#39;
	from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:47:in `execute&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:46:in `execute&#39;
	from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:467:in `cli&#39;
	from /usr/bin/vagrant:84:in `&lt;main&gt;&#39;

&lt;/pre&gt;
&lt;p&gt;Apparently ruby-devel is needed and as we don&#39;t run vagrant in rvm we can install it using the OS package manager.&lt;/p&gt;
&lt;pre&gt;sudo apt-get install ruby-dev&lt;/pre&gt;
&lt;p&gt;Retry the plugin installation:&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ vagrant plugin install vagrant-libvirt
Installing the &#39;vagrant-libvirt&#39; plugin. This can take a few minutes...
Installed the plugin &#39;vagrant-libvirt (0.0.13)&#39;!
&lt;/pre&gt;

&lt;h1&gt;Testing the box using vagrant&lt;/h1&gt;
&lt;p&gt;We create a directory for the vagrant file and there we init a vagrant box based on box &amp;apos;oel65_kvm&amp;apos;.&lt;/p&gt;
&lt;pre&gt;
cd
mkdir oel65_kvm_vagrantbox
cd oel65_kvm_vagrantbox
vagrant init &#39;oel65_kvm&#39;
vagrant up --provider=libvirt
&lt;/pre&gt;
&lt;p&gt;At this time something goes wrong, vagrant seems to initialize just fine until:&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~/oel65_kvm_vagrantbox $ vagrant up --provider=libvirt
Bringing machine &#39;default&#39; up with &#39;libvirt&#39; provider...
[default] Creating image (snapshot of base box volume).
[default] Creating domain with the following settings...
[default]  -- Name:          oel65_kvm_vagrantbox_default
[default]  -- Domain type:   kvm
[default]  -- Cpus:          1
[default]  -- Memory:        512M
[default]  -- Base box:      oel65_kvm
[default]  -- Storage pool:  default
[default]  -- Image:         /var/lib/libvirt/images/oel65_kvm_vagrantbox_default.img
[default]  -- Volume Cache:  default
[default] Creating shared folders metadata...
[default] Starting domain.
[default] Waiting for domain to get an IP address...
&lt;/pre&gt;
&lt;p&gt;But then it seems to be hanging.  If you wait long enough the following will be added:&lt;/p&gt;
&lt;pre&gt;
[default] Removing domain...
An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.

An unexpected error ocurred when executing the action on the
&#39;default&#39; machine. Please report this as a bug:

The specified wait_for timeout (2 seconds) was exceeded

/home/$USER/.vagrant.d/gems/gems/fog-1.15.0/lib/fog/core/wait_for.rb:10:in `wait_for&#39;
/home/$USER/.vagrant.d/gems/gems/fog-1.15.0/lib/fog/core/model.rb:64:in `wait_for&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/wait_till_up.rb:38:in `block (2 levels) in call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/retryable.rb:17:in `retryable&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/wait_till_up.rb:33:in `block in call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/util/timer.rb:9:in `time&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/wait_till_up.rb:31:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/start_domain.rb:26:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/set_hostname.rb:16:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/share_folders.rb:20:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/prepare_nfs_settings.rb:12:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/nfs.rb:30:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/create_network_interfaces.rb:96:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/create_networks.rb:83:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/provision.rb:54:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/create_domain.rb:62:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/create_domain_volume.rb:51:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/handle_box_image.rb:38:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/handle_box_url.rb:24:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/handle_storage_pool.rb:42:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/set_name_of_domain.rb:26:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/call.rb:51:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/home/$USER/.vagrant.d/gems/gems/vagrant-libvirt-0.0.13/lib/vagrant-libvirt/action/connect_libvirt.rb:88:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:116:in `call&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/machine.rb:147:in `action&#39;
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run&#39;
&lt;/pre&gt;
&lt;p&gt; So it seems that the VM doesn&#39;t get a valid IP.  Or at least Vagrant doesn&#39;t receive it.  Since the VM is a kvm we can have a look to it using the vnc protocol.  For this we will use virsh. &lt;/p&gt;
&lt;p&gt; We need the domain to be running so if it was stopped already execute vagrant up again: &lt;/p&gt;
&lt;pre&gt;
vagrant up --provider=libvirt
&lt;/pre&gt;
&lt;p&gt; Open a new shell and using virsh look if a kvm is available: &lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ virsh list
 Id    Name                           State
----------------------------------------------------
 4     oel65_kvm_vagrantbox_default   running
&lt;/pre&gt;
&lt;p&gt; A new kvm is available and it has the name we expected.  It has Id 4 and is in state running.  Now we need to have the vnc details to connect to it: &lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ virsh domdisplay 4
vnc://127.0.0.1:0
&lt;/pre&gt;
&lt;p&gt;Here 4 is the Id of the domain we want to connect to. When you now launch vncviewer on this adres you will be connected to the VM:&lt;/p&gt;
&lt;pre&gt;
$USER@$HOST ~ $ vncviewer 127.0.0.1:0

VNC Viewer Free Edition 4.1.1 for X - built Jan 14 2013 22:25:00
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Sat Dec 28 13:17:46 2013
 CConn:       connected to host 127.0.0.1 port 5900
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 6 (8bpp) rgb222
 CConn:       Using ZRLE encoding
&lt;/pre&gt;
&lt;p&gt;A console windows will show and you can login (veewee/veewee). Once logged in you can look at /etc/udev/rules.d/70-persistent-net.rules.  It will look like:&lt;/p&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;p&gt;So udev finds an e1000 interface which is bound to eth0 but the interface is not available.  So it will never come up.  There is as well a interface which gets number eth1.  But for eth1 there is no valid configuration present (/etc/sysconfig/network-scripts/ifcfg-eth1).&lt;/p&gt;
&lt;p&gt;Change the file so only the entry for virtio-pci is still present.  For that entry change NAME eth0 to eth1 &lt;/p&gt;
&lt;pre&gt;
# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;52:54:00:9b:86:96&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;
&lt;/pre&gt;
&lt;p&gt;The mac address here should correspond to the mac address mentioned in the kvm config when you execute:&lt;/p&gt;
&lt;pre&gt;virsh dumpxml 4&lt;/pre&gt;

&lt;p&gt;If you perform these steps the vagrant up command will continue and the total output will look like:&lt;/p&gt;
&lt;pre&gt;
Bringing machine &#39;default&#39; up with &#39;libvirt&#39; provider...
[default] Creating image (snapshot of base box volume).
[default] Creating domain with the following settings...
[default]  -- Name:          oel65_kvm_vagrantbox_default
[default]  -- Domain type:   kvm
[default]  -- Cpus:          1
[default]  -- Memory:        512M
[default]  -- Base box:      oel65_kvm
[default]  -- Storage pool:  default
[default]  -- Image:         /var/lib/libvirt/images/oel65_kvm_vagrantbox_default.img
[default]  -- Volume Cache:  default
[default] Creating shared folders metadata...
[default] Starting domain.
[default] Waiting for domain to get an IP address...
[default] Waiting for SSH to become available...
[default] Rsyncing folder: /home/$USER/oel65_kvm_vagrantbox/ =&gt; /vagrant
[default] Configuring and enabling network interfaces...
&lt;/pre&gt;
&lt;p&gt;Now you should be able to easily connect to the box using:&lt;/p&gt;
&lt;pre&gt;vagrant ssh&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/7415392713839400809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2014/01/setting-up-vagrant-basebox-for-oracle.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7415392713839400809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7415392713839400809'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2014/01/setting-up-vagrant-basebox-for-oracle.html' title='Setting up a vagrant basebox for Oracle Linux by using veewee'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-4375546038450392670</id><published>2013-08-24T09:56:00.001-07:00</published><updated>2013-09-21T02:35:40.745-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="administration"/><category scheme="http://www.blogger.com/atom/ns#" term="disk"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="troubleshooting"/><title type='text'>Troubleshooting &amp; Solving Linux disk space problems</title><content type='html'>&lt;p&gt;&lt;i&gt;In this blogpost I want to explain how you can troubleshoot diskspace problems.&lt;/i&gt;&lt;/p&gt;

&lt;h1&gt; Find out which files are using all the disk space. &lt;/h1&gt;
&lt;h2&gt; Graphical desktop&lt;/h2&gt;
&lt;p&gt; When you have a graphical desktop at hand you should really consider installing Baobab (also known as disk usage analyzer for Ubuntu users).  This application is rather straightforward.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw49vbRAHNqz2Jiv9txqfvB1zvaIex9R5jqSBSdctECeUI4aajetxTmecgiUgoBkR6OG0Vby-DvLeCCvGkTAeg7LA2h2p50OGEeisFYpEQ6pVNnUq6RW8mpvvDiLbQBCXrKiMcIMamIZs/s1600/baobab.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw49vbRAHNqz2Jiv9txqfvB1zvaIex9R5jqSBSdctECeUI4aajetxTmecgiUgoBkR6OG0Vby-DvLeCCvGkTAeg7LA2h2p50OGEeisFYpEQ6pVNnUq6RW8mpvvDiLbQBCXrKiMcIMamIZs/s320/baobab.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;You can click on &#39;Scan home&#39; to verify the disk usage in your home directory.  You can also click the button with the Harddisk symbol to start the analysis at your root directory.  The graph on the right shows the usage per folder, this is handy to quickly identify greedy disk space consumers.&lt;/p&gt;


&lt;h2&gt; Command line &lt;/h2&gt;
&lt;p&gt; When you don&#39;t have a graphical desktop at hand, you must help yourself with the &lt;b&gt;df&lt;/b&gt; and &lt;b&gt;du&lt;/b&gt; commands.&lt;p&gt;
&lt;h3&gt;df&lt;/h3&gt;
&lt;p&gt;The df tool will show you a table that reports the file system disk space usage. It takes a &lt;b&gt;-h&lt;/b&gt; flag to write the output in human readable format.  A table (constructed by &lt;b&gt;df -h&lt;/b&gt;) looks like the following:&lt;/p&gt;

&lt;table&gt;
&lt;tr&gt;&lt;td&gt;Filesystem&lt;/td&gt;&lt;td&gt;Size&lt;/td&gt;&lt;td&gt;Used&lt;/td&gt;&lt;td&gt;Avail&lt;/td&gt;&lt;td&gt;Use%&lt;/td&gt;&lt;td&gt;Mounted&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;/dev/sda5&lt;/td&gt;&lt;td&gt;28G&lt;/td&gt;&lt;td&gt;12G&lt;/td&gt;&lt;td&gt;16G&lt;/td&gt;&lt;td&gt;43%&lt;/td&gt;&lt;td&gt;/&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;udev&lt;/td&gt;&lt;td&gt;3.9G&lt;/td&gt;&lt;td&gt;4.0K&lt;/td&gt;&lt;td&gt;3.9G&lt;/td&gt;&lt;td&gt;1%&lt;/td&gt;&lt;td&gt;/dev&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;tmpfs&lt;/td&gt;&lt;td&gt;1.6G&lt;/td&gt;&lt;td&gt;1.1M&lt;/td&gt;&lt;td&gt;1.6G&lt;/td&gt;&lt;td&gt;1%&lt;/td&gt;&lt;td&gt;/run&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;none&lt;/td&gt;&lt;td&gt;5.0M&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;5.0M&lt;/td&gt;&lt;td&gt;0%&lt;/td&gt;&lt;td&gt;/run/lock&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;none&lt;/td&gt;&lt;td&gt;3.9G&lt;/td&gt;&lt;td&gt;520K&lt;/td&gt;&lt;td&gt;3.9G&lt;/td&gt;&lt;td&gt;1%&lt;/td&gt;&lt;td&gt;/run/shm&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;/dev/sda7&lt;/td&gt;&lt;td&gt;193G&lt;/td&gt;&lt;td&gt;135G&lt;/td&gt;&lt;td&gt;48G&lt;/td&gt;&lt;td&gt;74%&lt;/td&gt;&lt;td&gt;/home&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;/dev/sda8&lt;/td&gt;&lt;td&gt;121G&lt;/td&gt;&lt;td&gt;120G&lt;/td&gt;&lt;td&gt;1G&lt;/td&gt;&lt;td&gt;99%&lt;/td&gt;&lt;td&gt;/tmp&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;
As you can see it is a handy tool to quickly see the state of your filesystems. A good first indication to see if problems are at hand.
&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;The du tool will estimate the disk space usage. It takes 2 very handy flags which I cannot live without anymore.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;-h            -&gt; Human readable  &lt;/li&gt;
&lt;li&gt;--max-depth=N -&gt; Make a summary of directories up till the Nth level  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The human readable flag will convert the numerical output from bytes (B) to more readable units like KB, MB, GB. This is the same behavior as with the &lt;b&gt;df&lt;/b&gt; command.&lt;/p&gt;

&lt;p&gt;Let&#39;s illustrated the du command with an example::
&lt;/p&gt;
&lt;pre&gt;
ow@D ~/Desktop $ du -h --max-depth=1 /tmp
du: cannot read directory `/tmp/vmware-root&#39;: Permission denied
4.0K /tmp/vmware-root
8.0K /tmp/pulse-O0P9w3N0W4t6
120G /tmp/img
8.0K /tmp/mintUpdate
du: cannot read directory `/tmp/cvcd&#39;: Permission denied
4.0K /tmp/cvcd
4.0K /tmp/ssh-fyPBrSQD2054
4.0K /tmp/orbit-peter
8.0K /tmp/sni-qt_skype_2251-QXMSXq
4.0K /tmp/.ICE-unix
4.0K /tmp/VMwareDnD
8.0K /tmp/matecorba-peter
4.0K /tmp/.X11-unix
4.0K /tmp/.com.google.Chrome.XybSSu
4.0K /tmp/hsperfdata_peter
4.0K /tmp/jna
4.0K /tmp/keyring-GJe9xq
du: cannot read directory `/tmp/pulse-PKdhtXMmr18n&#39;: Permission denied
4.0K /tmp/pulse-PKdhtXMmr18n
164K /tmp

&lt;/pre&gt;

&lt;p&gt;
This example shows some typical output lines. 
&lt;/p&gt;&lt;p&gt;
Each line represents a directory and the first column shows the size of the content of the directory.
&lt;/p&gt;&lt;p&gt;
The last line is a summary line and shows the total size of the content of /tmp (or at least an estimate of it taking into account the files/directories that the user can read).
&lt;/p&gt;&lt;p&gt;
The lines ending with permission denied illustrated that the du tool couldn&#39;t descend in these directories.  This is because the user that launched the du command didn&#39;t have the rights to descend into that directory.
&lt;/p&gt;
&lt;p&gt;
This usage can be used to track down the big disk space consumers.  I prefer to start examining the disk usage with max-depth=1 from the root directory and go down the directories to find the files that consume too much disk space.  E.g. Using df I notice that my filesystem mounted at /tmp is reaching it&#39;s limit (it has only 121GB of disk space and it consumes more then 120GB). Therefore I launch the du command from above and I get the output from the example above.  Then I know that the disk space is used inside /tmp/img so I could launch &lt;b&gt;du --max-depth=1 -h /tmp/img&lt;/b&gt; to drill down further.  These steps can be repeated until you find the consuming files.
&lt;/p&gt;
&lt;h2&gt;Mismatch between du &amp; df. &lt;/h2&gt;
&lt;p&gt;There can be a mismatch between the outputs of du and df.  This is because df really shows the diskspace that is free and du calculates the disk usage based on the file attributes.  It can however be that a file you have deleted isn&#39;t really gone yet and thus takes up space.  Eventhough it isn&#39;t completely gone, it doesn&#39;t show up in the directory listing and thus du won&#39;t take it into account.  &lt;/p&gt;
&lt;p&gt;An example of a situation where such a mismatch might occur is when you have an application that logs to a file.  When you delete the file it can be that the application still had a handle to the file.  The file won&#39;t show up in the directory listing anymore but the filespace is not freed up until the file handle is released.  If this was a log file from an application that has high availability restrictions, this can be problematic since you cannot shut it down whenever you  want.  It is possible to force Linux to give away the space but it involves actions with /proc.  This is something I might post about on a later time.&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/4375546038450392670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2013/08/troubleshooting-solving-linux-disk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/4375546038450392670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/4375546038450392670'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2013/08/troubleshooting-solving-linux-disk.html' title='Troubleshooting &amp; Solving Linux disk space problems'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw49vbRAHNqz2Jiv9txqfvB1zvaIex9R5jqSBSdctECeUI4aajetxTmecgiUgoBkR6OG0Vby-DvLeCCvGkTAeg7LA2h2p50OGEeisFYpEQ6pVNnUq6RW8mpvvDiLbQBCXrKiMcIMamIZs/s72-c/baobab.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-2957576064472314167</id><published>2013-02-08T12:51:00.001-08:00</published><updated>2013-02-08T13:07:56.128-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DB"/><category scheme="http://www.blogger.com/atom/ns#" term="DG4ODBC"/><category scheme="http://www.blogger.com/atom/ns#" term="MS SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Use Oracle Database Gateway for ODBC to query MSSQL Server from an Oracle Database.</title><content type='html'>&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;In this blogpost I will explain how you can setup Oracle Database Gateway for ODBC (=DG4ODBC) on a linux host to connect from an Oracle Database to a Microsoft SQL Server.  To achieve this we will setup the unixODBC driver manager and use the freetds driver.&lt;/p&gt;

&lt;h1&gt;Overview of the solution.&lt;/h1&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNbFmdkJ9h1dCutEV_kNNzJkIF2CkcyvgGye1yta4hRZRqaxToex35j8koHmUuhZU1wq3vVHSKWmWELV91ZSaeZL7Vpqy5GdQuYwDZaah2o0cvwiDJ2xWLovHzxM1J0oSpXcPx6uMHS4E/s1600/dblink_overview.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;102&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNbFmdkJ9h1dCutEV_kNNzJkIF2CkcyvgGye1yta4hRZRqaxToex35j8koHmUuhZU1wq3vVHSKWmWELV91ZSaeZL7Vpqy5GdQuYwDZaah2o0cvwiDJ2xWLovHzxM1J0oSpXcPx6uMHS4E/s400/dblink_overview.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h1&gt;The solution&lt;/h1&gt;
&lt;h2&gt;Pre-requisites&lt;/h2&gt;
&lt;h3&gt; Working databases&lt;/h3&gt;
&lt;p&gt;It is not the purpose of this blogpost to tell you how to install an Oracle or MS SQL Database.  We will therefore only explain the setup of the DG4ODBC.&lt;/p&gt;
&lt;h3&gt;A (virtual) machine on which you can install DG4ODBC.&lt;/h3&gt;
&lt;p&gt;A (virtual) machine with a linux OS and a 64 bit architecture is required.  I used an Oracle Linux 6.3 (64-bit) OS but any Red Hat (derivative) should suffice.  The installation of the OS is rather basic.  On the hard disk I only created 1 EXT4 partition and 1 swap partion.  I chose 1 CPU with 2 cores and 2GiB of RAM.&lt;/p&gt;
&lt;h4&gt;Installed packages&lt;/h4&gt;
&lt;p&gt;I just did a server installation (no desktop environment). After the installation I installed the oracle-rdbms-server-11gR2-preinstall package (see &lt;a href=&quot;https://blogs.oracle.com/linux/entry/oracle_rdbms_server_11gr2_pre&quot;&gt;https://blogs.oracle.com/linux/entry/oracle_rdbms_server_11gr2_pre&lt;/a&gt; for more information).  This package is installed because I use this VM as a template to create test machines.  It is not a requirement for the setup.&lt;/p&gt;
&lt;p&gt;Actually if you want to install the package you can execute the yum statement below.  Besides installing the packages the package also sets OS parameter to tune the OS for running a database.&lt;/p&gt;
&lt;pre&gt;yum install cloog-ppl compat-libcap1 compat-libstdc++-33 cpp gcc gcc-c++ glibc-devel glibc-headers
 kernel-uek-headers ksh libXmu libXxf86dga libXxf86misc libaio-devel libdmx libstdc++-devel mpfr ppl
 xorg-x11-utils xorg-x11-xauth glibc glibc-common&lt;/pre&gt;
&lt;h4&gt;disable selinux&lt;/h4&gt;
&lt;p&gt; Just to be sure that selinux doesn&#39;t spoil the fun. I will disable it:&lt;/p&gt;
&lt;pre&gt;
[root@gwexample ~]# cat /etc/sysconfig/selinux 
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
&lt;/pre&gt;

&lt;h2&gt;Step 1: Make it possible to connect to MS SQL server from Linux&lt;/h2&gt;
&lt;h3&gt;Install the unixODBC Driver manager.&lt;/h3&gt;
&lt;p&gt;As unixODBC is provided in the &lt;a href=&quot;http://public-yum.oracle.com/&quot;&gt;public-yum repositories of Oracle&lt;/a&gt; we can make our life easy and install the software from the repo.&lt;/p&gt;
&lt;pre&gt;yum install unixODBC unixODBC-devel&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Do not forget the devel package, it contains files like sql.h which are necessary to compile freetds with support for unixODBC!&lt;/b&gt;&lt;/p&gt;


&lt;h3&gt;Installation of freetds&lt;/h3&gt;
&lt;h4&gt;Download freetds&lt;/h4&gt;
&lt;p&gt;Download the latest version of freetds.  I downloaded the &lt;a href=&quot;ftp://ftp.astron.com/pub/freetds/stable/freetds-stable.tgz&quot;&gt;freetds-stable.tgz&lt;/a&gt;.  We will copy this to /tmp/freetds-stable.tgz. Execute the following to extract it and move it to /home/oracle.&lt;/p&gt;


&lt;pre&gt;
#As user oracle
cd /tmp
gunzip -c freetds-stable.tgz | tar -xvf -
mv freetds-0.91/ /home/oracle/
&lt;/pre&gt;
&lt;h4&gt;Configure and build freetds&lt;/h4&gt;
Now we need to configure it:
&lt;/p&gt;
&lt;pre&gt;
#As user oracle
cd /home/oracle/freetds-0.91
./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --with-unixodbc=/usr
&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;
If you get an error about missing sql.h. It is most likely because unixODBC is installed on a different location. Do a search for the file (either `locate sql.h` or if locate is not available `find / -name &quot;sql.h&quot;`). If the location is /aa/bbb/c/include/sql.h the configure argument should be --with-unixodbc=/aa/bbb/c .  So for my setup it was /usr/include/sql.h&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;Next build the source&lt;/p&gt;

&lt;pre&gt;
#as user oracle
make
&lt;/pre&gt;

&lt;h4&gt;And finally install it&lt;/h4&gt;
&lt;pre&gt;
#as root
make install
&lt;/pre&gt;
&lt;h3&gt; Configuring unixODBC driver manager &lt;/h3&gt;
&lt;p&gt;Setup the content of &lt;b&gt;/etc/odbc.ini&lt;/b&gt;&lt;/p&gt;

&lt;pre&gt;
[ODBC Data Sources]
#I do not think this line is really necessary but it does no harm :-)
MSSQLVM=FreeTDS
 
#The name between square brackets should correspond to the DB name of your SQL server.
#From now on it will be referred to as DSN !!
[MSSQLVM]
Driver = /usr/local/freetds/lib/libtdsodbc.so
#Do not use Driver = /usr/lib64/libodbc.so
#Location of the MS SQL Server (ip or hostname)
Server = 172.16.58.130
#Port where MS SQL Server is listening
Port = 1433
TDS_Version = 8.0
TraceFile = /tmp/odbc.trace
DEBUG = 1
Trace = Yes
dump file = /tmp/freetds.log
&lt;/pre&gt;

&lt;p&gt;The following should be checked:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;You should check if the file /usr/local/freetds/lib/libtdsodbc.so exists, because without it it won&#39;t work!&lt;/b&gt; &lt;/li&gt;
&lt;li&gt; If you use a hostname to locate the server, make sure it is resolvable. Try to do `ping &lt;hostname&gt;` and see if you can reach the server. (If not try `ping &lt;i&gt;ip&lt;/i&gt;` , if that doesn&#39;t work ICMP might be disabled).  As I use a simple setup with VMs and no DNS server I use /etc/hosts file of linux to use the hostname.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Verify if freetds can be used via odbc
&lt;pre&gt;
isql  -v &lt;DSN&gt; &lt;username&gt; &lt;password&gt;
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL&gt; 
&lt;/pre&gt;
&lt;p&gt;
 For example isql -v MSSQLVM test Welcome1
&lt;/p&gt;

&lt;h2&gt;Setup Oracle DB gateway for ODBC&lt;/h2&gt;
&lt;h3&gt;Download software&lt;/h3&gt;
&lt;p&gt;The Oracle DB gateway for ODBC can be downloaded separately if you have got an &lt;a href=&quot;https://support.oracle.com&quot;&gt;Oracle Support&lt;/a&gt; Account.  Instructions are available at &lt;a href=&quot;https://updates.oracle.com/Orion/Services/download?type=readme&amp;aru=14125322#CHDIHDIB&quot;&gt;https://updates.oracle.com/Orion/Services/download?type=readme&amp;aru=14125322#CHDIHDIB&lt;/a&gt; .  (you need to get Oracle Gateways) &lt;/p&gt;

&lt;h3&gt;Install software&lt;/h3&gt;
&lt;p&gt;Unzip the downloaded zip.  And run the installer gateways/runInstaller

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYesS-ZQNXug5Ky0msTCW8x8uzgPAX90ED2h6DfFW3JrzbOGw3KB89CGOkWTwPyEhoW_L4N2VFKYIsXgamPOxD8kfX5Qu4lWjZWzaaERjADP4mgcDe46zpa20PBJQKsPCF8z2WKlO3Ss4/s1600/gw_install-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYesS-ZQNXug5Ky0msTCW8x8uzgPAX90ED2h6DfFW3JrzbOGw3KB89CGOkWTwPyEhoW_L4N2VFKYIsXgamPOxD8kfX5Qu4lWjZWzaaERjADP4mgcDe46zpa20PBJQKsPCF8z2WKlO3Ss4/s400/gw_install-1.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In splash screen click next.&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLpBgp0XLA0t4n2rEr0JV1YMCz1KsCDljuv7bZ_W-HDZpd1vdljmoXFcIVe_cX3knXf91C-3tgTK1L-szgvPswHv51825uZ8napUSljGU6kYvKleyh006h-rtTtKWaoBQzTzE4pydwCDM/s1600/gw_install-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;314&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLpBgp0XLA0t4n2rEr0JV1YMCz1KsCDljuv7bZ_W-HDZpd1vdljmoXFcIVe_cX3knXf91C-3tgTK1L-szgvPswHv51825uZ8napUSljGU6kYvKleyh006h-rtTtKWaoBQzTzE4pydwCDM/s400/gw_install-2.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;We leave the default values for location and name.&lt;/div&gt;


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB19kPbrKk1Zdhlx8qL2j3WJTxogvmtd8uEfB1bEWAzkdoQ30Fa8II7vUk_jGKcNB7BEeSGcrmD6bWhMGRF505tyId88OKwPo5Wd0LIR7g9M89BTkBVmKMImaSvQdIMo6ljH_21m8qb7Q/s1600/gw_install-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;313&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB19kPbrKk1Zdhlx8qL2j3WJTxogvmtd8uEfB1bEWAzkdoQ30Fa8II7vUk_jGKcNB7BEeSGcrmD6bWhMGRF505tyId88OKwPo5Wd0LIR7g9M89BTkBVmKMImaSvQdIMo6ljH_21m8qb7Q/s400/gw_install-3.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;No incompatibilities were found -&gt; Next.&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmDOoUGxyxBrhmQYdBGrt0UaI-vksoNS-rMC26vg2Uz8Im_LENwnAHt0yRLCaqB8P7rikN2EAWtEH-XKVaJl1bcAIeHMyHYqMwsSNiSZ4Q7rfST3smWbBjtgvE_N2LiLy1AmWARreKU-g/s1600/gw_install-4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmDOoUGxyxBrhmQYdBGrt0UaI-vksoNS-rMC26vg2Uz8Im_LENwnAHt0yRLCaqB8P7rikN2EAWtEH-XKVaJl1bcAIeHMyHYqMwsSNiSZ4Q7rfST3smWbBjtgvE_N2LiLy1AmWARreKU-g/s400/gw_install-4.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Select Oracle Database Gateway for ODBC 11.2.0.3.0 -&gt; Next&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV-P0tBMhpfSSOlEuUxT-9LOiAIACoWnFCIN_T9LiJmnNFlTUsZQEU53wrx2cqfDIiMOwl_PBD7SxZoKaXgdCsBQgmrKs6iCJrRGIyWqFe3t2_gPOlc13W3XZXJ-C4VOJ0EgEpiT7kH2I/s1600/gw_install-5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;314&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV-P0tBMhpfSSOlEuUxT-9LOiAIACoWnFCIN_T9LiJmnNFlTUsZQEU53wrx2cqfDIiMOwl_PBD7SxZoKaXgdCsBQgmrKs6iCJrRGIyWqFe3t2_gPOlc13W3XZXJ-C4VOJ0EgEpiT7kH2I/s400/gw_install-5.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Click the Install button to install the software.&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8qB1sIS-ETeW722_LFyPc59XDBiDjGuk2VhzCaVwNGPWTW895xYVOf9RP8BMRnapO5R_QHNsv-e6Zl99wNwyIAPqKHCtWY87vXLcHeK7E9IhsDEXFxjD-0G0w43mVo3MVqw6h4clvy6w/s1600/gw_install-6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8qB1sIS-ETeW722_LFyPc59XDBiDjGuk2VhzCaVwNGPWTW895xYVOf9RP8BMRnapO5R_QHNsv-e6Zl99wNwyIAPqKHCtWY87vXLcHeK7E9IhsDEXFxjD-0G0w43mVo3MVqw6h4clvy6w/s400/gw_install-6.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt; Execute the 1 or 2 scripts mentioned in the dialog screen &lt;b&gt;AS ROOT&lt;/b&gt;.&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ6PDX16asZYVtqQUdtmw1Wml-PWOndGbJg00pTU7z0m3um_tWMrAQmHcKB52gIQ7ufbAHaDWT7LL2GG3ikYnEyhL_ksZFyUAQ0xdE07MfuaHeXyu65s0fK0CC8dTeBF3TmR6WytGvYoo/s1600/gw_install-7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;269&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ6PDX16asZYVtqQUdtmw1Wml-PWOndGbJg00pTU7z0m3um_tWMrAQmHcKB52gIQ7ufbAHaDWT7LL2GG3ikYnEyhL_ksZFyUAQ0xdE07MfuaHeXyu65s0fK0CC8dTeBF3TmR6WytGvYoo/s400/gw_install-7.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;select &lt;i&gt;Perform typical configuration&lt;/i&gt; and click Next.&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdHeILjkeInjLSqOPCTFuhL_mIfBRp_FIMLUheR-fF9dQdD-kaZntnVI0ZJFK_oiFHCI-LageIsaccV3G-tRo0Uj4SuYDoJQQUCWN3u9P2eCtDu7A3ZVep5u4qaUff4a7MypuOWlaLHds/s1600/error_msg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdHeILjkeInjLSqOPCTFuhL_mIfBRp_FIMLUheR-fF9dQdD-kaZntnVI0ZJFK_oiFHCI-LageIsaccV3G-tRo0Uj4SuYDoJQQUCWN3u9P2eCtDu7A3ZVep5u4qaUff4a7MypuOWlaLHds/s400/error_msg.png&quot; /&gt;&lt;/a&gt; &lt;br /&gt; An error might popup. Just click OK&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9q9KQem1vBbeW2uMqGB0fgj7ZYcRcRfvGCla52-jqf-Ui406B24iQbaI-xYxsmywsWaPFJOxnIwSVtT0WubuaRBtdz-8ftdiqcLxjRQR6UT-WUe4UA9_7dX1A4w90QXEtsGBFlPt0St0/s1600/retry.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;302&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9q9KQem1vBbeW2uMqGB0fgj7ZYcRcRfvGCla52-jqf-Ui406B24iQbaI-xYxsmywsWaPFJOxnIwSVtT0WubuaRBtdz-8ftdiqcLxjRQR6UT-WUe4UA9_7dX1A4w90QXEtsGBFlPt0St0/s400/retry.png&quot; /&gt;&lt;/a&gt; &lt;br /&gt; The error has been noted.  Click retry to try again.&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0gZ5WT1EcG0FTKr4T4cO9OXv4UpaX2zdLlZYtGUBrkCzscI_ZTHO0o6ejMsjcJc3APcFJG3kxwXAqSYDf3jwPjkiIDzeVprvoTdv_KprY1fCZ54Y7XaRUrF7_r7LuhG84If7QOea_oE0/s1600/retry2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0gZ5WT1EcG0FTKr4T4cO9OXv4UpaX2zdLlZYtGUBrkCzscI_ZTHO0o6ejMsjcJc3APcFJG3kxwXAqSYDf3jwPjkiIDzeVprvoTdv_KprY1fCZ54Y7XaRUrF7_r7LuhG84If7QOea_oE0/s400/retry2.png&quot; /&gt;&lt;/a&gt; &lt;br /&gt; If we do exactly the same will it work now?&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPXDE1VvBsT6sKV7ztouUKUGo68rxamAwZlR-7wdLANWrwv_Cy-PCOiGwg_PdfKGdmhsrxD2w3L1F1qAVpC37svWiftcan3EOjk3_QiswcSRifz8r_-imL7iwINHtJq2QOjiJytX-TzAE/s1600/gw_install-9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;313&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPXDE1VvBsT6sKV7ztouUKUGo68rxamAwZlR-7wdLANWrwv_Cy-PCOiGwg_PdfKGdmhsrxD2w3L1F1qAVpC37svWiftcan3EOjk3_QiswcSRifz8r_-imL7iwINHtJq2QOjiJytX-TzAE/s400/gw_install-9.png&quot; /&gt;&lt;/a&gt; &lt;br /&gt; Apparently yes :-).&lt;/div&gt;


&lt;h3&gt;Verify if the software works&lt;/h3&gt;

&lt;pre&gt;
#as user oracle
 export ORACLE_HOME=/home/oracle/product/11.2.0/tg_1
./dg4odbc

Oracle Corporation --- WEDNESDAY FEB 06 2013 21:02:11.918
Heterogeneous Agent Release 11.2.0.3.0 - 64bit Production Built with
Oracle Database Gateway for ODBC
&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Everytime you start dg4odbc make sure ORACLE_HOME is set!&lt;/b&gt;&lt;/p&gt;

&lt;h3&gt;Configure the listener &lt;/h3&gt;
 This must be done on the host ware DG4ODBC is installed.  Because this listener will be your entry point to the MS SQL SERVER.

 Listener config file is situated at $ORACLE_HOME/network/admin/listener.ora
&lt;pre&gt;
SID_LIST_LISTENER=
   (SID_LIST=
      (SID_DESC =
         (SID_NAME = MSSQLVM)
         (ORACLE_HOME = /home/oracle/product/11.2.0/tg_1)
         (ENVS=&quot;LD_LIBRARY_PATH=/usr/lib64:/usr/local/freetds/lib:/home/oracle/product/11.2.0/tg_1/lib&quot;)
         (PROGRAM = dg4odbc)
       )
 
   )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
       (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = gwexample)(PORT = 1511)) 
       )
    )
  )
ADR_BASE_LISTENER = /home/oracle/product/11.2.0/tg_1
&lt;/pre&gt;

&lt;p&gt;Important notes with listener config:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;ENVS is not a typo, it should be ENVS&lt;/li&gt;
 &lt;li&gt;SID_NAME should correspond to DSN from /etc/odbc.ini&lt;/li&gt;
 &lt;li&gt;Each occurence of &#39;/home/oracle/product/11.2.0/tg_1&#39; should be replaced by the oracle home of dg4odbc but you cannot use the variable $ORACLE_HOME&lt;/li&gt;
 &lt;li&gt;HOST should be set to hostname or IP of the machine that hosts the dg4odbc. (if hostname is used it is best to have it in /etc/hosts of this machine)&lt;/li&gt;
 &lt;li&gt;PORT should be set to any free port&lt;/li&gt;
 &lt;li&gt;Firewall should be configured to allow connections to the PORT selected above -&gt; do this now because you will forget about it!&lt;/li&gt;
 &lt;li&gt;ADR_BASE_LISTENER might not be necessary but I set it to the oracle home of dg4odbc and that does work&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Configure tnsnames.ora&lt;/h3&gt;
&lt;p&gt; This file should be available at each machine that has an Oracle Database that wants to connect to the MS SQL server using the DG4ODBC.  It is used to resolve the listener!&lt;/p&gt;

&lt;p&gt; tnsnames config file is situated at $ORACLE_HOME/network/admin/tnsnames.ora&lt;/p&gt;
&lt;pre&gt;
MSSQLVM =
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=gwexample)(PORT=1511))
    (CONNECT_DATA=(SID=MSSQLVM))
    (HS=OK)
  )
&lt;/pre&gt;


&lt;p&gt;Important notes with tnsnames.ora config&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;The name at the start is chosen to be the same as the DSN for convenience&lt;/li&gt;
 &lt;li&gt;The value for HOST does not have to be the ip/hostname of the DB server but must be the ip/hostname of the machine where dg4odbc is installed (this can be the same as the DB server)&lt;/li&gt;
 &lt;li&gt;The value after the SID must be the DSN&lt;/li&gt;
 &lt;li&gt;The line (HS=OK) must be present!&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;Configure dg4odbc&lt;/h3&gt;
&lt;p&gt;Configuration of this is done in $ORACLE_HOME/hs/admin/init&lt;DSN&gt;.ora&lt;/p&gt;
&lt;pre&gt;
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = MSSQLVM
HS_FDS_TRACE_LEVEL = 255
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
HS_FDS_SUPPORT_STATISTICS = FALSE
HS_LANGUAGE=american_america.we8iso8859P1

#
# ODBC specific environment variables
#
set ODBCINI=/etc/odbc.ini

#
# Environment variables required for the non-Oracle system
#
#set &lt;envvar&gt;=&lt;value&gt;
&lt;/pre&gt;


&lt;p&gt;Important notes with dg4odbc config&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;HS_FDS_CONNECT_INFO must be set equal to the DSN&lt;/li&gt;
 &lt;li&gt;&lt;b&gt;HS_FDS_TRACE_LEVEL must be set to 0 after setup is working! It should only be set to 255 to do troubleshooting at the beginning.&lt;/b&gt;&lt;/li&gt;
 &lt;li&gt;HS_FDS_SHAREABLE_NAME should point to the ODBC library (i.e. the one of the ODBC driver manager)&lt;/li&gt;
 &lt;li&gt;HS_LANGUAGE should be set to american_america.we8iso8859P1&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt; Reload the listener&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;This should be done for each change of listener.ora (on dg4odbc machine) and tnsnames.ora (on DB machine)&lt;/b&gt;&lt;/p&gt;

&lt;pre&gt;
#as user oracle
#Make sure if ORACLE_HOME is set correctly and if DB SID
lsnrctl reload
&lt;/pre&gt; 


&lt;h3&gt;Test if dg4odbc can be reached from the DB server&lt;/h3&gt;
&lt;pre&gt;
#as user oracle
#if not set, set oracle environment using . oraenv
[oracle@dbserver ~]$ tnsping MSSQLVM
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 05-FEB-2013 10:09:48
Copyright (c) 1997, 2011, Oracle.  All rights reserved.
Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=gwexample)(PORT=1511)) (CONNECT_DATA=(SID=MSSQLVM)) (HS=OK))
OK (0 msec)
&lt;/pre&gt;


&lt;h3&gt;Creat DB link&lt;/h3&gt;
&lt;pre&gt;
#in the Oracle DB execute:
create database link db_link connect to &quot;test&quot; identified by &quot;Welcome1&quot; using &#39;MSSQLVM&#39;;
SELECT * FROM dbo.table@db_link;
&lt;/pre&gt;

&lt;p&gt;Important notes:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;db_link is the name of the database link. It can be used after an @-sign&lt;/li&gt;
  &lt;li&gt;In the create database link statement BOTH the username and password should be surrounded by double quotes.&lt;/li&gt;
  &lt;li&gt;After using comes the DSN, surrounded by single quotes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Troubleshooting&lt;/h1&gt;
&lt;h2&gt;Handy files&lt;/h2&gt;
&lt;ul&gt;
 &lt;li&gt;/tmp/sql.log&lt;/li&gt;
 &lt;li&gt;$ORACLE_HOME/hs/log directory contains traces&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Error messages + solution&lt;/h2&gt;
&lt;h3&gt;Strange output -&gt; language issue (we only speak americano)&lt;/h3&gt;

&lt;h4&gt;sqlplus output &lt;/h4&gt;
&lt;pre&gt;
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[

ORA-02063: preceding 2 lines from link_name
&lt;/pre&gt;

&lt;h4&gt; Sqldeveloper ouput &lt;/h4&gt;
&lt;p&gt;For Sqldeveloper is the output a bit clearer:&lt;/p&gt;
&lt;pre&gt;
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[ u n i x O D B C ) ( D r i v e r M a n a g e r ] D a t a s o u r c e n a m e ...

&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt6Dmzmy6w_C13e-biBoKTMGobSzI8lnQ4P9EQgEKgutb1PNnp4paVfhJIHzP2ole5D053iUiZfuKQLHOzTB8prVaJUAQneeFkMNW1bvZYVLBft9nEiu8mVVQpDDgJOFV4aT-uTQxPOqs/s1600/gibberish_output_public.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;80&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt6Dmzmy6w_C13e-biBoKTMGobSzI8lnQ4P9EQgEKgutb1PNnp4paVfhJIHzP2ole5D053iUiZfuKQLHOzTB8prVaJUAQneeFkMNW1bvZYVLBft9nEiu8mVVQpDDgJOFV4aT-uTQxPOqs/s400/gibberish_output_public.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Strange output comes due to incorrect language settings.  Please verify that HS_LANGUAGE=american_america.we8iso8859P1 is set in init&lt;DSN&gt;.ora !!&lt;/p&gt;

&lt;h4&gt;Corrupt link&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPC2EKeeFghz3dyIfj8BysndSOIiD_w0If08Ki1tAen2i0FXXve_CFDHY5jR4gdY0y_6F4AVe0PkzKavscNlIeQshubQPa41_AYROoXXnLx2UvQLnpi2awCEWu9k_kYsJCs2lsDCE1uuo/s1600/link_invalid_public.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;73&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPC2EKeeFghz3dyIfj8BysndSOIiD_w0If08Ki1tAen2i0FXXve_CFDHY5jR4gdY0y_6F4AVe0PkzKavscNlIeQshubQPa41_AYROoXXnLx2UvQLnpi2awCEWu9k_kYsJCs2lsDCE1uuo/s400/link_invalid_public.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt; This time no error message is displayed at all. &lt;/p&gt;
&lt;pre&gt;
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding 2 lines from link_name
 (and ORA-28500) are caused by invalid 
&lt;/pre&gt;

&lt;p&gt;If the listener is restarted with a new config your link in the database might have become invalid.  Drop it and recreate it:&lt;/p&gt;

&lt;pre&gt;
DROP DATABASE LINK db_link;
create database link db_link connect to &quot;test&quot; identified by &quot;Welcome1&quot; using &#39;MSSQLVM&#39;;
&lt;/pre&gt;

&lt;h4&gt;Nonexistent table or view&lt;/h4&gt;

&lt;pre&gt;
ORA-00942: table or view does not exist
[FreeTDS][SQL Server]Invalid object name &#39;your.table&#39; . {42S02,NativeErr = 208}[FreeTDS][SQL Server]Statement(s) could not be 
ORA-02063: preceding 2 lines from link_name
00942. 00000 - &quot;table or view does not exist&quot;
&lt;/pre&gt;

&lt;p&gt;This can happen if there are quotes surrounding the table name -&gt; Remove surrounding quotes!&lt;/p&gt;


&lt;h1&gt; References &lt;/h1&gt;
&lt;p&gt;Some of the contents is based on http://gotodba.weebly.com/install-and-configure-db-link-to-sql-server-database-in-linux.html.&lt;/p&gt;
&lt;p&gt;De freetds website http://freetds.schemamania.org/&lt;/p&gt;
&lt;p&gt;https://forums.oracle.com/forums/thread.jspa?messageID=4351081 . Thank you kgronau for the answer on setting HS_LANGUAGE!</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/2957576064472314167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2013/02/use-oracle-database-gateway-for-odbc-to.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/2957576064472314167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/2957576064472314167'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2013/02/use-oracle-database-gateway-for-odbc-to.html' title='Use Oracle Database Gateway for ODBC to query MSSQL Server from an Oracle Database.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNbFmdkJ9h1dCutEV_kNNzJkIF2CkcyvgGye1yta4hRZRqaxToex35j8koHmUuhZU1wq3vVHSKWmWELV91ZSaeZL7Vpqy5GdQuYwDZaah2o0cvwiDJ2xWLovHzxM1J0oSpXcPx6uMHS4E/s72-c/dblink_overview.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-11079290888731757</id><published>2012-12-28T15:55:00.001-08:00</published><updated>2012-12-29T04:45:12.191-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ESXi"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualization"/><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>Downgrade VMDK from HW version 8  to HW version 7 (Workstation 8 to ESXi 4.1 ) </title><content type='html'>&lt;h1&gt; Introduction &lt;/h1&gt;
&lt;p&gt;
When you create a VM using VMWare workstation, which you want to deploy on a ESXi server at a later moment, you should plan in advance which Version you will use for your Virtual machine (and thus your vmx config file). If you don&#39;t, your ESXi-server can complain about a unsupported version.  But don&#39;t panic just yet, it might be fixable.&lt;/p&gt;

&lt;h1&gt; Which version to use? &lt;/h1&gt;
&lt;p&gt;
When you still need to create a new VM in workstation you should think before choosing a version.  The wizard to create a VM provides you with all the necessary information you need.  But to choose the correct version it is easier to have a table with an overview.  For this reason I present it to you:
&lt;/p&gt;
&lt;table border=1&gt;
&lt;tr&gt;
&lt;td&gt;
Workstation version
&lt;/td&gt;
&lt;td&gt;
Compatible products
&lt;/td&gt;
&lt;td&gt;
Limitations
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Workstation 8.0
&lt;/td&gt;
&lt;td&gt;
ESX 5.0 &lt;br /&gt;
Fusion 4.0 &lt;br /&gt;
Workstation 8.0
&lt;/td&gt;
&lt;td&gt;
64GB memory limit&lt;br /&gt;
8 processor limit&lt;br /&gt;
10 network adapter limit&lt;br /&gt;
2 TB disk size limit&lt;br /&gt;
No HD Audio &lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
Workstation 6.5-7.x
&lt;/td&gt;
&lt;td&gt;
ACE 2.5 - 2.7 &lt;br /&gt;
ESX 4.x &lt;br /&gt;
ESX 5.0 &lt;br /&gt;
Fusion 2.x &lt;br /&gt;
Fusion 3.x &lt;br /&gt;
Fusion 4.0 &lt;br /&gt;
Server 2.x &lt;br /&gt;
Workstation 6.5 &lt;br /&gt;
Workstation 7.x &lt;br /&gt;
Workstation 8.0
&lt;/td&gt;
&lt;td&gt;
32GB memory limit&lt;br /&gt;
8 processor limit&lt;br /&gt;
10 network adapter limit&lt;br /&gt;
2 TB disk size limit&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
Workstation 6.0
&lt;/td&gt;
&lt;td&gt;
ACE 2.0 &lt;br /&gt;
ACE 2.5 up to 2.7 &lt;br /&gt;
ESX 4.x &lt;br /&gt;
ESX 5.0 &lt;br /&gt;
Fusion 1.1 &lt;br /&gt;
Fusion 2.x &lt;br /&gt;
Fusion 3.x &lt;br /&gt;
Fusion 4.0 &lt;br /&gt;
Server 2.x &lt;br /&gt;
Workstation 6.x &lt;br /&gt;
Workstation 6.5 &lt;br /&gt;
Workstation 7.x &lt;br /&gt;
Workstation 8.0 &lt;br /&gt;
&lt;/td&gt;
&lt;td&gt;
8 GB memory limit &lt;br /&gt;
2 processor limit &lt;br /&gt;
10 network adapter limit &lt;br /&gt;
950 GB disk size limit &lt;br /&gt;
No HD Audio &lt;br /&gt;
No CPU hot plug &lt;br /&gt;
No device hot plug &lt;br /&gt;
No memory hot plug &lt;br /&gt;
No LSI Logic SAS SCSI controller &lt;br /&gt;
No printer support
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Workstation 5.x
&lt;/td&gt;
&lt;td&gt;
ACE 2.0 &lt;br /&gt;
ACE 2.5 up to 2.7 &lt;br /&gt;
ESX 4.x &lt;br /&gt;
ESX 5.0 &lt;br /&gt;
Fusion 1.1 &lt;br /&gt;
Fusion 2.x &lt;br /&gt;
Fusion 3.x &lt;br /&gt;
Fusion 4.0 &lt;br /&gt;
Server 2.x &lt;br /&gt;
Workstation 5.x &lt;br /&gt;
Workstation 6.0 &lt;br /&gt;
Workstation 6.5 &lt;br /&gt;
Workstation 7.x &lt;br /&gt;
Workstation 8.0 &lt;br /&gt;
&lt;/td&gt;
&lt;td&gt;
3.5 GB memory limit &lt;br /&gt;
2 processor limit &lt;br /&gt;
4 network adapter limit &lt;br /&gt;
950 GB disk size limit &lt;br /&gt;
No HD Audio &lt;br /&gt;
No USB 2.0 &lt;br /&gt;
No multiple monitor display &lt;br /&gt;
No battery status &lt;br /&gt;
No CPU hot plug &lt;br /&gt;
No device hot plug &lt;br /&gt;
No memory hot plug &lt;br /&gt;
No LSI Logic SAS SCSI controller &lt;br /&gt;
No VMCI support &lt;br /&gt;
No printer support
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Workstation 4.x
&lt;/td&gt;
&lt;td&gt;
ACE 1.0 &lt;br /&gt;
ACE 2.0 &lt;br /&gt;
ACE 2.5 up to 2.7 &lt;br /&gt;
ESX 4.x &lt;br /&gt;
ESX 5.0 &lt;br /&gt;
Fusion 1.1 &lt;br /&gt;
Fusion 2.x &lt;br /&gt;
Fusion 3.x &lt;br /&gt;
Fusion 4.0 &lt;br /&gt;
GSX Server 3.x &lt;br /&gt;
Server 1.x &lt;br /&gt;
Server 2.x &lt;br /&gt;
Workstation 4.x &lt;br /&gt;
Workstation 5.x &lt;br /&gt;
Workstation 6.0 &lt;br /&gt;
Workstation 6.5 &lt;br /&gt;
Workstation 7.x &lt;br /&gt;
Workstation 8.0 &lt;br /&gt;
&lt;/td&gt;
&lt;td&gt;
3.5 GB memory limit &lt;br /&gt;
1 processor limit &lt;br /&gt;
4 network adapter limit &lt;br /&gt;
128 GB IDE disk size limit &lt;br /&gt;
256 GB SCSI disk size limit &lt;br /&gt;
No HD Audio &lt;br /&gt;
No USB 2.0 &lt;br /&gt;
No multiple monitor display &lt;br /&gt;
No battery status &lt;br /&gt;
No 64-bit guests &lt;br /&gt;
No 3D graphics acceleration &lt;br /&gt;
No CPU hot plug &lt;br /&gt;
No device hot plug &lt;br /&gt;
No memory hot plug &lt;br /&gt;
No LSI Logic SAS SCSI controller &lt;br /&gt;
No VMCI support &lt;br /&gt;
No printer support &lt;br /&gt;
No clone support
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;
So prior to selecting a version you should determine which features you need (think long-term for this!).  Next you need to find a version for which your product (e.g. ESXi server) is in the compatibility list.  If it has limitations that conflict with your features, you will need to upgrade.  
&lt;/p&gt;
&lt;h1&gt; How to downgrade a version? &lt;/h1&gt;
&lt;p&gt;Suppose you have a version 8 how do you downgrade to a version 7.  I didn&#39;t find an official way but as long as you don&#39;t have features that are not supported by the version you wish to go to.  Then you can just change the version numbers in the vmx file.  For example if you want to go from version &quot;8&quot; to version &quot;7&quot; you can open it in your favorite editor and search for &quot;8&quot; and replace it with &quot;7&quot;. (For your search replace, make sure you use the double quotes!) &lt;/p&gt;
&lt;h2&gt; Does it work? &lt;/h2&gt;
&lt;p&gt;
I cannot give any promises if it works for you but I tried it on a VM with an Application server and an Oracle DB and it worked!  After you change the file you can just create an OVF of it and deploy it on an ESXi 4.1 server.  Which is not possible if you would create it from the original VM.
&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/11079290888731757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2012/12/downgrade-vmdk-from-hw-version-8-to-hw.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/11079290888731757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/11079290888731757'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2012/12/downgrade-vmdk-from-hw-version-8-to-hw.html' title='Downgrade VMDK from HW version 8  to HW version 7 (Workstation 8 to ESXi 4.1 ) '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-7608549129302573434</id><published>2012-09-23T11:15:00.001-07:00</published><updated>2024-05-07T04:43:14.187-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GPIO"/><category scheme="http://www.blogger.com/atom/ns#" term="OS development"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry PI"/><title type='text'>How to set GPIO on Raspberry PI in assembly</title><content type='html'>&lt;h1&gt;How to set GPIO on Raspberry PI in assembly.&lt;/h1&gt;
&lt;p&gt;
While reading the nice free courses &lt;a href=&quot;http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os&quot;&gt;&#39;Baking Pi: Operating Systems Development by Alex Chadwick&#39;&lt;/a&gt; that explain how to write your own OS for your raspberry Pi, I couldn&#39;t figure out how the setup of the GPIO pins was done.  I was able to copy the code from the lesson and thus to make it work on my raspberry PI but I wanted to understand what I was doing.  For the people who also want a better understanding of how you can use the GPIO pins on the raspberry PI I&#39;ll share my findings.
&lt;/p&gt;
&lt;p&gt;
As explained in the &lt;a href=&quot;http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/ok01.html&quot;&gt;OK1 course&lt;/a&gt; the GPIO pins our grouped by 10 and there are 3 bits per GPIO pin to select its function.  On page 90 of the &lt;a href=&quot;http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/downloads/SoC-Peripherals.pdf&quot;&gt;Soc_pheripherals manual&lt;/a&gt; you can see what these 3 bits do:
&lt;/p&gt;
&lt;pre&gt;
000 = GPIO Pin 9 is an input 
001 = GPIO Pin 9 is an output 
100 = GPIO Pin 9 takes alternate function 0 
101 = GPIO Pin 9 takes alternate function 1 
110 = GPIO Pin 9 takes alternate function 2 
111 = GPIO Pin 9 takes alternate function 3 
011 = GPIO Pin 9 takes alternate function 4 
010 = GPIO Pin 9 takes alternate function 5

(This is a small extract of the BCM2835 ARM Peripherals manual.  Copyright is property of Broadcom corporation). 
&lt;/pre&gt;
&lt;p&gt;
In the course we want to set the 16th pin to an output pin so we need to write 001 to the 3 bits corresponding with the 16th pin.  
&lt;/p&gt;
&lt;p&gt;
When we make a drawing of the bits (starting from the GPIO address, so our bit 0 is address 0x20200000 in the tutorial). We get the following layout: 
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil0fl0X3HYnWP3fkl7dqMNtdtGD8v11zR5NWqdUC4zGdDczGTkmlhn2P5pg-2QHdl-ut5K8sAKYhM1U0KmyPLpx15nRUGRhN_8NWyTLiLFgu2mNoFG9SH-URO9WbGw_eHSn7VzDoz3uck/s1600/pinlayout.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;44&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil0fl0X3HYnWP3fkl7dqMNtdtGD8v11zR5NWqdUC4zGdDczGTkmlhn2P5pg-2QHdl-ut5K8sAKYhM1U0KmyPLpx15nRUGRhN_8NWyTLiLFgu2mNoFG9SH-URO9WbGw_eHSn7VzDoz3uck/s400/pinlayout.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;/p&gt;
&lt;p&gt;
The upper row denotes the bit numbers.  The second row will number the bytes and in the 3th row we mark the pin that corresponds with the bits.  As explained in the course lesson, there corresponds 10 pins with 4 bytes.  
&lt;/p&gt;
&lt;p&gt;
The 4th row illustrates what happens if we write value one to 0x20200000.  
&lt;/p&gt;
&lt;pre&gt;
ldr r0,=0x20200000
mov r1,#1
str r1,[r0]
&lt;/pre&gt; 
&lt;p&gt;
The 5th row illustrates what happens if we write the shifted register to  0x20200000
&lt;/p&gt;
&lt;pre&gt;
ldr r0,=0x20200000
mov r1,#1
lsl r1,#18
str r1,[r0]
&lt;/pre&gt; 
&lt;p&gt;
The 6th row shows the  bits that are written when we write to [r0+4].  Because ARM uses a byte aligned layout the word will be written to bytes 4-7.  So the full code part from the course lesson will give the result shown in row 7.  The code fragment from the lesson was:
&lt;/p&gt; 
&lt;pre&gt;
ldr r0,=0x20200000
mov r1,#1
lsl r1,#18
str r1,[r0,#4]
&lt;/pre&gt; 
&lt;p&gt;
Next we need to now how to set the pin on (LED OFF) and how to set it off (LED ON).  
&lt;/p&gt;
&lt;p&gt;
The pin is cleared by writing a 1 to the relevant bit
This is done using address 0x 7E20 0028 [GPCLR0] ( see Soc-Peripherals page 90). This word will be used for setting pins 0-31 , the next word will be for pins 32-54. 
&lt;/p&gt;
&lt;p&gt;
As denoted in the course we need to set the pin to 0 to set voltage high (led ON).  We write a 1&lt;&lt;16 to the address 0x7E200028.  But 0x28 = 40 so this gives the following to activate the LED:
&lt;/p&gt;
&lt;pre&gt;
mov r1,#1
lsl r1,#16
str r1,[r0,#40]
&lt;/pre&gt;
&lt;p&gt;
GPIO Pin Output set Register to set the pin on (LED OFF).
This is done using address 0x 7E20 001C [GPSET0] ( see Soc-Peripherals page 90). This word will be used for setting pins 0-31 , the next word will be for pins 32-54.
&lt;/p&gt;
&lt;p&gt;
Now we will set the 16th bit for the address with offset 0x1C = 28.  This results in the code
&lt;/p&gt;
&lt;pre&gt;
mov r1,#1
lsl r1,#16
str r1,[r0,#28]
&lt;/pre&gt;

&lt;p&gt;  So now that you know this, you should head back to http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os and continue the courses.  I think they are very good and it is good that the authors are so generous to share them for free with the rest of the world!</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/7608549129302573434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2012/09/how-to-set-gpio-on-raspberry-pi-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7608549129302573434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7608549129302573434'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2012/09/how-to-set-gpio-on-raspberry-pi-in.html' title='How to set GPIO on Raspberry PI in assembly'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil0fl0X3HYnWP3fkl7dqMNtdtGD8v11zR5NWqdUC4zGdDczGTkmlhn2P5pg-2QHdl-ut5K8sAKYhM1U0KmyPLpx15nRUGRhN_8NWyTLiLFgu2mNoFG9SH-URO9WbGw_eHSn7VzDoz3uck/s72-c/pinlayout.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-2349890161596348344</id><published>2012-06-15T10:34:00.000-07:00</published><updated>2012-06-15T10:39:34.695-07:00</updated><title type='text'>Shutdown an internal server using php (apache) in a more efficient matter.</title><content type='html'>&lt;p&gt;
In a previous post I explained a possible way to shutdown a server with a php page. &lt;a href=&quot;http://ubuntu42.blogspot.be/2012/04/shutdown-internal-server-with-php-page.html&quot;&gt;(here)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
Now I will provide a more efficient way using a cgi-script.&lt;/p&gt;
&lt;h1&gt;Pre-requisites for apache&lt;/h1&gt;
&lt;p&gt;In order for the code to work you&#39;ll have to make sure that the correct modules are loaded.  We need the following to modules:&lt;/p&gt;
&lt;pre&gt;
 LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
 LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
 LoadModule suexec_module /usr/lib/apache2/modules/mod_suexec.so
&lt;/pre&gt;
&lt;p&gt;When that is done we need to add a directory where we want to place our shutdown-script. e.g. /var/www/bin&lt;/p&gt;
&lt;pre&gt;
 ScriptAlias /bin/ /var/www/bin/
&lt;/pre&gt;
&lt;p&gt;We also need to define a user with whom we want to execute the script.  This must not be a system user (i.e. it must be possible to login as the user account and uid must be greater then 500.)&lt;/p&gt;
&lt;pre&gt;
 SuexecUserGroup username groupname
&lt;/pre&gt;
&lt;p&gt;This will be all for the Apache configuration.&lt;/p&gt;

&lt;h1&gt;The script&lt;/h1&gt;
&lt;p&gt; First we create the directory and we make sure that the directory is owned by the same user as whom is going to execute the script.&lt;/p&gt;
&lt;pre&gt;
 sudo mkdir /var/www/bin
 sudo chown username.groupname /var/www/bin
&lt;/pre&gt;
&lt;p&gt;Within the script we just call the shutdown command. So create a script /var/www/bin/shutdown.cgi with contents: &lt;/p&gt;
&lt;pre&gt;
 #!/bin/bash
 echo -e &quot;Content-type: text/html\n&quot; 
 # ^ Necessary HTTP header, needs to be finished with an empty line
 sudo /sbin/shutdown -h now
&lt;/pre&gt;
&lt;p&gt;Give the script execute permissions:&lt;/p&gt;
&lt;pre&gt; chmod +x /var/www/bin/shutdown.cgi &lt;/pre&gt;

&lt;h1&gt;Sudo without a password&lt;/h1&gt;
&lt;p&gt; If you were paying attention when reading the previous script you have noticed that we used sudo.  The first time you use sudo you will be prompted for a password.  But our command is executed in a script and we don&#39;t have a shell to enter the password!  Luckily it is possible to setup sudo so no password is needed. Launch visudo to edit the configuration of sudo (If you have a favorite command-line editor you can set it temporary by executing  &#39;export EDITOR=&lt;editor name&gt;&#39; before you start visudo.  (You have to use -E argument for sudo to make sure you preserve the environmental variables) e.g.: 
&lt;pre&gt;
 export EDITOR=vi
 sudo -E /usr/sbin/visudo
&lt;/pre&gt;
&lt;p&gt;
Now add the following config rule to the configuration file:
&lt;/p&gt;
&lt;pre&gt; username   ALL=(ALL:ALL) NOPASSWD: /sbin/shutdown&lt;/pre&gt;
&lt;p&gt; This rule let you execute the /sbin/shutdown command on ALL hosts which are OWNED by ALL (=anyone) and part of group ALL (any group) and this without a password.&lt;/p&gt;
&lt;h1&gt;Test it&lt;/h1&gt;
&lt;p&gt; Make sure you restart apache and then test it! &lt;/p&gt;
&lt;pre&gt; /etc/init.d/httpd restart
or
 /etc/init.d/apache2 restart
&lt;/pre&gt;
&lt;p&gt; if you get an warning &#39;Warning: SuexecUserGroup directive requires SUEXEC wrapper.&#39; then install the extra package for suexec &#39;sudo apt-get install apache2-suexec&#39; and try to restart apache again.&lt;/p&gt;
&lt;p&gt;
When the server is restarted you an browse to http://&lt;ip-of-your-machine&gt;/bin/shutdown.cgi and your system will shutdown immediatly.  (No need for a cronjob anymore :-P).
&lt;/p&gt;


&lt;h1&gt; Complete configuration file for apache: &lt;/h1&gt;
Place it in a .conf file in the folder /etc/apache2/conf.d/ or /etc/httpd/conf.d/ (depending on your installation). For example shutdown.conf:
&lt;pre&gt;
 &lt;IfModule !cgi_module&gt;
 LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
 &lt;/IfModule&gt;
 &lt;IfModule !alias_module&gt;
 LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
 &lt;/IfModule&gt;

 &lt;IfModule !suexec_module&gt;
 LoadModule suexec_module /usr/lib/apache2/modules/mod_suexec.so
 &lt;/IfModule&gt;
 ScriptAlias /bin/ /var/www/bin/
 SuexecUserGroup username groupname
&lt;/pre&gt;

&lt;h1&gt;References&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.2/howto/cgi.html&quot;&gt;Howto for cgi.&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_suexec.html&quot;&gt;Info about mod_suexec&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;http://foxlx.acmesystems.it/?id=165&quot;&gt;Info on creating cgi scripts&lt;/a&gt;
&lt;li&gt;&lt;a href=http://linuxtoolkit.blogspot.be/2009/11/changing-default-editor-for-visudo.html&quot;&gt;Change editor for visudo&lt;/a&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/2349890161596348344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2012/06/shutdown-internal-server-in-more.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/2349890161596348344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/2349890161596348344'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2012/06/shutdown-internal-server-in-more.html' title='Shutdown an internal server using php (apache) in a more efficient matter.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-796679869790863239</id><published>2012-04-08T13:43:00.002-07:00</published><updated>2012-06-15T10:38:26.668-07:00</updated><title type='text'>Shutdown an internal server with a php page.</title><content type='html'>A more efficient way is posted on &lt;a href=&quot;http://ubuntu42.blogspot.be/2012/06/shutdown-internal-server-in-more.html&quot;&gt; my more recent post &lt;/a&gt;.
&lt;br /&gt;&lt;br /&gt;

For some reason, don&#39;t ask me why, it was very useful to me to shutdown a server using a http-request.  This way I didn&#39;t have to go to the server to shut him down which is handy if it is locked away.  Only for boot up I have to access the machine.&lt;br /&gt;&lt;br /&gt;Pre-requisite is off course that a webserver is running on the machine, as there are plenty of tutorials to setup an Apache server I am not going to address that here.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Concept of the solution&lt;/h1&gt;&lt;br /&gt;In my solution I will be running a simple script every minute to check if a file exists.  I the file exists, the script will remove the file and will shutdown the server, if not the script will do nothing.  The reason I chose this solution is because it doesn&#39;t require much work :-).&lt;br /&gt;&lt;br /&gt;&lt;h1&gt; The script&lt;/h1&gt;&lt;br /&gt;The content of the script is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;if [ -f /tmp/shutdown ]&lt;br /&gt;then&lt;br /&gt; echo &quot;HttpServerShutdown script called&quot; &gt;&gt; /var/log/syslog&lt;br /&gt; /bin/rm /tmp/shutdown&lt;br /&gt; /sbin/shutdown -h now&lt;br /&gt;fi&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This script is saved as /var/remoteShutdown.sh. &lt;b&gt; It is important to use the full path to the commands.  If you use just the command it is probably not part of the path and it will not execute properly.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt; Trigger the script every minute. &lt;/h1&gt;&lt;br /&gt;We want to execute the script every minute.  Luckily Linux has something like cronjobs.  Because we use the shutdown command which should be executed with appropriate privileges, we will set cronjobs with sudo.  To do this execute:&lt;br /&gt;&lt;pre&gt; sudo crontab -e &lt;/pre&gt;  If you have never added a cronjob, you can chose an editor to use.  As I am a vi fan I use vi but if you don&#39;t know via chose another one :-).  Nano is rather straightforward.  Using the text editor append a line with the following content:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; * * * * * /var/remoteShutdown.sh&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Make sure you save the crontab file.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;PHP-page&lt;/h1&gt;&lt;br /&gt;As I have a default installation of Apache, my PHP pages are kept in /var/www.  Create a file called shutdown.php with the following contents:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?&lt;br /&gt;echo &quot;shutdown&quot;;&lt;br /&gt;$file=fopen(&quot;/tmp/shutdown&quot;,&#39;w&#39;);&lt;br /&gt;fwrite($file,&quot;pretty please&quot;);&lt;br /&gt;fclose($file);&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That&#39;s it.  Now you can browse to http://&amp;lt;serverIP&amp;gt;/shutdown.php and your server will shutdown.</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/796679869790863239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2012/04/shutdown-internal-server-with-php-page.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/796679869790863239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/796679869790863239'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2012/04/shutdown-internal-server-with-php-page.html' title='Shutdown an internal server with a php page.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-6544053995397863327</id><published>2011-11-19T05:03:00.000-08:00</published><updated>2025-07-31T06:26:42.609-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="development"/><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="Virtual box"/><title type='text'>Drupal development, a more pleasant way.</title><content type='html'>&lt;h2&gt;Why this post&lt;/h2&gt;&lt;br /&gt;In my spare time I am making a website for a youth movement using Drupal.  Drupal is a very nice CMS that is quite powerful.  You can use a lot of code (modules) that are provided by the Drupal community but if it goes wrong it might be hard to find out why.  In the beginning I was just making my changes in the Drupal files and when I wanted to test them I uploaded the files to my hosting provider.  It seems that it is hard to find a worse way of Drupal development :-).  This week I noticed one of the major disadvantages of my approach.  After uploading some code my site reported a 500 error message (server error).  Since I don&#39;t have access to the server itself I couldn&#39;t check if it was indeed the server that was erroneous or that it was something I have done.  The next day I still got the same error so it was likely that my code was at fault.  Finding the fault was quite hard because the only hint I got was (500 server error).  Then I realised that it was my own fault.  If you want to do some development you should always invest some time in setting up a proper development environment.  I knew this when I started the website project but I was too lazy to do it. Now I found out that is was plain stupid since it is very easy to setup a nice Drupal development!&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;How to quickly setup a good Drupal development environment.&lt;/h2&gt;&lt;br /&gt;Thanks to some Drupal enthousiasts setting up a Drupal development is easier than ever.  There is a &lt;span style=&quot;font-style: italic;&quot;&gt;Drupal Quickstart&lt;/span&gt; project that provides a virtual machine that contains an Ubuntu OS that is configured for some serious Drupal development.  You can find the project at http://drupal.org/project/quickstart.  Just follow the steps explained on that website to set up the environment.&lt;br /&gt;&lt;br /&gt;The Ubuntu OS contains a Drupal 6 and a Drupal 7 example and also has some nice scripts to setup new Drupal installations.  Unfortunately I already had started development and I didn&#39;t want to lose my previous work.  &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Importing an existing Drupal project in you development environment&lt;/h2&gt;&lt;br /&gt;I had my Drupal files on a USB stick so I could easily import them into the Virtual Machine.  I also had a backup of the Drupal tables from my database that I made using phpmyadmin (It is wise to use a prefix like &#39;Drupal_&#39; or a separate database when performing a Drupal installation). &lt;br /&gt;&lt;br /&gt;&lt;h3&gt; Setting up the database &lt;/h3&gt;&lt;br /&gt;In the Virtual Machine (Quickstart) you launch firefox.  In the toolbar there will be a link to PHPMyAdmin.  You browse to PHPMyAdmin and login using the root as username and quickstart as password.  Without selecting a database you click on SQL on the left pane.  &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Mznbtfmb8Qs96ZUn84SpH9u1TyBkSNbcj0REjzlAIJ3W7iimIkFl9UnfnlOuC5-AmHIaCPT5RBl1D3pX05leGsUmsIfX6O0nJhV1ScRyDqW8VKiMH4v-glsNpn3wt2ReXYemxAK48vw/s1600/SQL.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5676702638786689490&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Mznbtfmb8Qs96ZUn84SpH9u1TyBkSNbcj0REjzlAIJ3W7iimIkFl9UnfnlOuC5-AmHIaCPT5RBl1D3pX05leGsUmsIfX6O0nJhV1ScRyDqW8VKiMH4v-glsNpn3wt2ReXYemxAK48vw/s320/SQL.png&quot; style=&quot;cursor: pointer; display: block; height: 160px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This will give you a window where you can enter MySQL statements.  Make a user that has the same name as you used when making your Drupal installation and give him the same password.  &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;CREATE USER &#39;YOUR_USERNAME&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;YOUR_PASSWORD_IN_PLAIN_TEXT&#39;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;  After typing this statement you click &#39;Go&#39;.  Next you&#39;ll have to make the table that you used when making your Drupal installation.  &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;CREATE TABLE TABLE_NAME_FROM_YOUR_DRUPAL_INSTALL;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now you&#39;ll have to make sure that your user has the appropriate rights on your table.  Because this is a development environment it won&#39;t hurt to grant him all rights. &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;GRANT ALL PRIVILEGES ON TABLE_NAME_FROM_YOUR_DRUPAL_INSTALL.* TO &#39;YOUR_USERNAME&#39;@&#39;localhost&#39;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Logout of PHPMyAdmin and log back in using YOUR_USERNAME and YOUR_PASSWORD_IN_PLAIN_TEXT.  Now select the table of your Drupal Install which is still empty.  Now you can click on import tab on the right pane.  There you can select your SQL backup file (click browse) and confirm it (click go).  Now your Drupal tables will be imported.  I had my files gzipped and I got a strange error.  Trying the unzipped SQL-file worked for me.  Congratulations your database is setup!&lt;br /&gt;&lt;br /&gt;&lt;h3&gt; Placing the Drupal files. &lt;/h3&gt;&lt;br /&gt;For consistency I thought it would be best to place the Drupal files in the websites folder which is located in the home folder of the Quickstart user.  Just make a new dir that identifies your drupal installation (e.g. drupal_42) and place the files of your Drupal project there.  &lt;span style=&quot;font-weight: bold;&quot;&gt;See to it that you also copy the .htacces file.&lt;/span&gt;  Files starting with a dot are hidden in Linux.  You can make them visible in nautilus by pressing ctrl+h or by using the menu: View-&amp;gt; Show hidden files. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Making it work&lt;/h3&gt;&lt;br /&gt;All the contents of your Drupal project are in place but how can you view your website?  For this you need to do some additional setup.  Notice that in the websites folder (/home/quickstart/websites) there is a config folder.  This folder contains (links to) all the necessary configuration files that you&#39;ll need.  Will split the changes per file.&lt;br /&gt;&lt;h4&gt;hosts&lt;/h4&gt;&lt;br /&gt;Here you can set aliases that point to IP-addresses.  As your localhost (your Virtual machine) will generate your site you will need to setup the name (URL) of your website to point to your localhost.  This can be done by adding a rule at the end of the file.   You can see that there are already URLs pointing to the localhost, these are the example Drupal installations that are pre-installed.  Just add a rule with a URL you like.  &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX87K0UUeSGy3a7HiOVFwK7RIfMP_gHl4BusNSr64MNHI_r11VZOOuBKWHhY4nytzbgMHLPAS8iA_exNwR73-AJ85-VzmbTjc-HXLIP6LVI7Zzjsn3s3N9x0mT1Ks8SddhGp5itv36d2Q/s1600/hosts.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5676707817912860882&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX87K0UUeSGy3a7HiOVFwK7RIfMP_gHl4BusNSr64MNHI_r11VZOOuBKWHhY4nytzbgMHLPAS8iA_exNwR73-AJ85-VzmbTjc-HXLIP6LVI7Zzjsn3s3N9x0mT1Ks8SddhGp5itv36d2Q/s320/hosts.png&quot; style=&quot;cursor: pointer; display: block; height: 172px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Then save your file and close it.&lt;br /&gt;&lt;h4&gt;Apache&lt;/h4&gt;&lt;br /&gt;Next you&#39;ll have to configure Apache.  Apache is the server which will generate the HTML using the PHP files.  Your site needs to be registered to Apache so it knows that is should process the necessary files.  The configuration files of Apache can be found by following apache-sites-available link in /home/quickstart/websites/config.  There you see the config files of the other pre-installed Drupal sites.  As I wanted to get my installation working without too much trouble, I made a copy of &lt;span style=&quot;font-weight: bold;&quot;&gt;example.dev&lt;/span&gt; named &lt;span style=&quot;font-weight: bold;&quot;&gt;drupal42.dev&lt;/span&gt;.  Then I changed the content to reflect my project.  It is rather straightforward.  Just change &lt;span style=&quot;font-weight: bold;&quot;&gt;example.dev&lt;/span&gt; into &lt;span style=&quot;font-weight: bold;&quot;&gt;drupal42.dev&lt;/span&gt;.  And where you see a path pointing to the &lt;span style=&quot;font-weight: bold;&quot;&gt;example.dev&lt;/span&gt; folder, you change it to the folder where you copied your Drupal project files.  Save your changes and all the configuration is done.  It might be necessary to restart Apache to notice the configurationfiles.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;sudo /etc/init.d/apache2 restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; The result &lt;/h2&gt;&lt;br /&gt;To view the result open up firefox and browse to your URL (e.g. http://drupal42.dev/).  And you should see your website.  If you get a permission denied error you should check the permissions of your files from your drupal installation.  The owner should be quickstart and the group should be www-data.  (browse to root folder using a command shell and execute &lt;span style=&quot;font-weight: bold;&quot;&gt;sudo chown -R quickstart:www-data .&lt;/span&gt; , including the dot!).  If it still doesn&#39;t work make sure group permissions are set correctly (they should be able to read and execute files).  &lt;span style=&quot;font-weight: bold;&quot;&gt;sudo chmod -R 755 *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; It works, now what?&lt;/h2&gt;&lt;br /&gt;Now you have got a server which you can configure yourself.  The default is actually good already for development.  Warnings and errors are shown in the browser so you can get more debug information than on a production server.  There are also IDEs installed on the Virtual machine.  Eclipse and Netbeans.  I have setup Netbeans but you can use Eclipse also.&lt;br /&gt;&lt;h3&gt;Netbeans&lt;/h3&gt;&lt;br /&gt;Launch netbeans from your desktop or from the upper gnome panel.  Click File-&amp;gt;New Project... Then in the new window select PHP project with existing sources.  Click Next.  Then you can select your source folder using the browse button and give the project an appropriate name.  You can also select a PHP version that you want to use.  Click next again and look at the run configuration.  Make sure that the project URL is correct.  This is the URL where you browse to see your website in your development environment.  The default is http://localhost/drupal42.dev/ so you probably have to change this to http://drupal42.dev/.  When you click finish your project will be imported into the IDE.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why should you use an IDE for development?  There are multiple reasons actually.  You have good syntax highlighting.  You have tools for Version control that are integrated into the IDE.  You can do real debugging (Setting breakpoints, stepping through code, examining content of variables,...).  If you don&#39;t know Netbeans or Eclipse it might be interesting to learn how to work with one of them.  They are both pretty nice.  There are sometimes plugins which configure the IDE for you for Drupal development.  I think Eclipse can generate code for Drupal hooks.  (Yes it does &lt;a href=&quot;http://drupal.org/node/75242#templates&quot;&gt;http://drupal.org/node/75242#templates&lt;/a&gt; and for netbeans &lt;a href=&quot;http://drupal.org/project/nb_templates&quot;&gt;http://drupal.org/project/nb_templates&lt;/a&gt;).    Don&#39;t you love open source community software :-).&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;And what was the error?&lt;/h2&gt;&lt;br /&gt;I had a typo in the code for my own custom module.  After my function there was one } too much.  Again, plain stupid.</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/6544053995397863327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2011/11/drupal-development-more-pleasant-way.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/6544053995397863327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/6544053995397863327'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2011/11/drupal-development-more-pleasant-way.html' title='Drupal development, a more pleasant way.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Mznbtfmb8Qs96ZUn84SpH9u1TyBkSNbcj0REjzlAIJ3W7iimIkFl9UnfnlOuC5-AmHIaCPT5RBl1D3pX05leGsUmsIfX6O0nJhV1ScRyDqW8VKiMH4v-glsNpn3wt2ReXYemxAK48vw/s72-c/SQL.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-6649810707380477785</id><published>2011-11-04T09:20:00.000-07:00</published><updated>2011-11-04T10:17:43.203-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adb"/><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Android Recover Mail password</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;It&#39;s probably necessary that your device is rooted in order to be able to do this.  I&#39;m not sure though. This blog post is for people willing to recover there OWN password, do not misuse this information.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; Prerequisites &lt;/h2&gt;&lt;br /&gt;&lt;p&gt;Before you can start, it is necessary that the tools of the Android SDK are installed and ready to be used.  How to install these tools is explained &lt;a href=&quot;http://forum.xda-developers.com/showthread.php?p=11823740&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt; The story &lt;/h2&gt;&lt;br /&gt;We want to recover the password of our e-mail account.  Because android needs this password to download your e-mail, it will store the password on your phone.  The data of applications is stored in /data/data.  At that location there are directories for the different applications.  The directory for mail is &lt;span style=&quot;font-style:italic;&quot;&gt;com.android.email&lt;/span&gt;. There we have to find the password.  The password is located in 1 of the databases that is in the com.android.email folder.  The databases are SQLite databases, so the easiest way to recover the password is by browsing the databases using an appropriate tool.&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;The recovery steps&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;First you need to get the contents of com.android.email.  (You don&#39;t need it all but this way you can inspect the other contents also.)  This is done by executing the following command in the shell of your ubuntu installation: &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;adb pull /data/data/com.android.email ~/email_of_phone&lt;/span&gt; &lt;br /&gt;&lt;br /&gt; This will place the contents in a folder named &quot;email_of_phone&quot; in your home directory.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Next you&#39;ll need to install a tool to explore the databasefiles.  I have used SQLitebrowser which is in the repositories.  Just install it by using the command:&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;font-weight:bold;&quot;&gt;sudo apt-get install sqlitebrowser&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  When this is done you&#39;ll have to launch the SQLitebrowser. Just use shell:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;sqlitebrowser&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  The people who are no shell-enthousiasts can be happy, from now on everything is by GUI.  The GUI is very straightforward.  Click the Folder icon (with the arrow).  This opens up a dialog window where you can select your database.  The database will be 1 of the databases in ~/email_of_phone/databases.  For me it was the EmailProvider.db so you should try that one first :-).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;When the databases is opened you can see that there is a table called HostAuth.  This might be interesting to find out our authentication credentials.  So we click the + sign to the left of it.  &lt;/p&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQBE2-DbpdWlZF5k5d-TWCvrB2WTukO53nv7_AEqVrCUBpFQK0Tee87uQdQEwGdwWs3dSqCurDja1bZ_5pYptynKTLmirh_xrxOo0rX6luBzLZ3VCbYbpMyDZKfMXd0o0V3eINruBCpw0/s1600/HostAuth_plussign.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 264px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQBE2-DbpdWlZF5k5d-TWCvrB2WTukO53nv7_AEqVrCUBpFQK0Tee87uQdQEwGdwWs3dSqCurDja1bZ_5pYptynKTLmirh_xrxOo0rX6luBzLZ3VCbYbpMyDZKfMXd0o0V3eINruBCpw0/s320/HostAuth_plussign.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5671186661711084290&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;Then we can see that it has indeed a password field!&lt;/p&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIhTj8M55khRNakFdKu6CV_si5YXH8-h3NdF_o9jo-NGvIIjI0F38RH08th8XFauk-nrVsrlsQ-4yNuuLqRaHKEbKy9YuhdP-fATg8KTp7V-K007ligTsm6DoWK17bkExg7XH0wAaVxPs/s1600/Password_field.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 264px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIhTj8M55khRNakFdKu6CV_si5YXH8-h3NdF_o9jo-NGvIIjI0F38RH08th8XFauk-nrVsrlsQ-4yNuuLqRaHKEbKy9YuhdP-fATg8KTp7V-K007ligTsm6DoWK17bkExg7XH0wAaVxPs/s320/Password_field.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5671186901537555538&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;But we are not interested in the table layout.  We want the content of the table.  So click the &quot;Browse Data&quot; tab.&lt;/p&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2r3BME3fHM5SgN77YldxroT-M7AHNuvSGZKmQ6oGnzwvt-0HFsYFaaNUaCxfHw374nQ8ImY7g-MwxoOLJRqP_MDFj-GDxWCu3cQCXyZpdIeyYQ4BDHh0bzRSdUwy_RnM4O7Mo3XjimEY/s1600/Browse_data.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 265px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2r3BME3fHM5SgN77YldxroT-M7AHNuvSGZKmQ6oGnzwvt-0HFsYFaaNUaCxfHw374nQ8ImY7g-MwxoOLJRqP_MDFj-GDxWCu3cQCXyZpdIeyYQ4BDHh0bzRSdUwy_RnM4O7Mo3XjimEY/s320/Browse_data.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5671187212986092274&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;The last step is changing the table that is shown to HostAuth.&lt;/p&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZRwt1WrkQbiVSj3m_ReJf7qvAJ_stmJShGTj2JYKNQtxHDavstgTSSktc_NLygZmGoYrzdHc4WHbqvRzBF8QfhgXM8haEN-l1nVkWv7_CmWNz3xq9rhpyXiVdBLKQtCb5Y8cjhd2_AEY/s1600/Change_table_to_HostAuth.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 265px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZRwt1WrkQbiVSj3m_ReJf7qvAJ_stmJShGTj2JYKNQtxHDavstgTSSktc_NLygZmGoYrzdHc4WHbqvRzBF8QfhgXM8haEN-l1nVkWv7_CmWNz3xq9rhpyXiVdBLKQtCb5Y8cjhd2_AEY/s320/Change_table_to_HostAuth.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5671187493139649410&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally you can read the content of the table.  In the Password field, you can read the password in plaintext.</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/6649810707380477785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2011/11/android-recover-mail-password.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/6649810707380477785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/6649810707380477785'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2011/11/android-recover-mail-password.html' title='Android Recover Mail password'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQBE2-DbpdWlZF5k5d-TWCvrB2WTukO53nv7_AEqVrCUBpFQK0Tee87uQdQEwGdwWs3dSqCurDja1bZ_5pYptynKTLmirh_xrxOo0rX6luBzLZ3VCbYbpMyDZKfMXd0o0V3eINruBCpw0/s72-c/HostAuth_plussign.png" height="72" width="72"/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-1655044383440934696</id><published>2011-03-12T03:40:00.000-08:00</published><updated>2011-03-12T04:50:06.291-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows linux VAIO VPCEB1S1E fan PCG-71211M"/><title type='text'>Quiet down a Noisy Fan (Sony VAIO VPCEB1S1E model PCG-71211M) (OS independent)</title><content type='html'>This post will tell you how to solve a noisy fan problem.  My notebook ran hot very quickly resulting in a fan that is going crazy.  (This post won&#39;t be about ubuntu nor android but the solution worked so well that I thought I should share it anyway.)&lt;br /&gt;&lt;br /&gt;First it is interesting to think about any possible reasons your PC is running hot.  If you are doing very intensive tasks it might be normal that it&#39;s hot.  But if your notebook or PC runs hot when doing normal stuff (e.g. searching in a large PDF document) then there might be a problem with the heath conduction within your notebook.&lt;br /&gt;&lt;br /&gt;My Notebook worked fine before so I knew it wasn&#39;t a design flaw of my notebook itself.  One very likely possibility is that there is dust in your computer which prevents a good internal air (and thus heat) flow.  Since my warranty expired 2 weeks before being fed up with the noise there was only 1 budget friendly solution, so I searched for my screwdrivers.&lt;br /&gt;&lt;br /&gt;Before opening up a notebook it can be wise to search for a service/repair manual of your notebook which describes how to open up your notebook.  As I couldn&#39;t find any on my model (PCG-71211M) I decided to work without a map.  Be warned that notebooks can be quite a pain to put together again (ordinary PC&#39;s are like 4 piece jigsaw puzzles compared to notebooks!).  Luckily my Vaio didn&#39;t need a lot of disassembling for my goal.&lt;br /&gt;&lt;br /&gt;Now I will describe how I opened up my notebook with some accompanying pictures (you can click on them to enlarge them).  &lt;span style=&quot;font-weight:bold;&quot;&gt;If you try this yourself, know that it is on your own responsibility!&lt;/span&gt;  Lets start with a picture:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_iv35DekNx7cFrBLWVClMmXf2iVsJaUhc3zxxtXPN4DPC8aMvx7l1SfmcqlkkwgJCM641fQQDjEUXU_JUPTUsHWQ-d9cIgiR_yrBuvBOMGP5Y26wh644Orj0aFhSATbyq08x_6oQ9CSo/s1600/img1_backUntouched.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 218px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_iv35DekNx7cFrBLWVClMmXf2iVsJaUhc3zxxtXPN4DPC8aMvx7l1SfmcqlkkwgJCM641fQQDjEUXU_JUPTUsHWQ-d9cIgiR_yrBuvBOMGP5Y26wh644Orj0aFhSATbyq08x_6oQ9CSo/s320/img1_backUntouched.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5583162154425541522&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is the backside of your notebook, you might already familiar with it.  You can notice that there are quite a lot of screws.  Since they may vary in size it is important to work neatly.  HINT: It can be useful to work on a large table and put the screw upside down on the table in the same layout you took them out of your notebook. (This sounds lame but if you&#39;ve got more than 20 screws you won&#39;t remember which one went where.)  &lt;br /&gt;&lt;br /&gt;Ok, first remove the battery.  Slide the lock and pull the release button away and you can roll out the battery.  Your notebook should look now like the picture below.  As you can see there already 19 screws visible (don&#39;t worry we only need to remove 21 screws in total).&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiscKa_SD4sujXLW_YrZTL94YH0hkt4eOL83K6QXl4O7Ih3DgUF9DkKT-ejTTQ9gE48mRNfEjCdKA7VnCDa3jmK8brl1Uyrv7X83-ExWnzBF_1H81zmmTZSJTzCmfEtoNN57j2oUaxm2QI/s1600/img2_back_nobatt_screwsNumbered.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 214px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiscKa_SD4sujXLW_YrZTL94YH0hkt4eOL83K6QXl4O7Ih3DgUF9DkKT-ejTTQ9gE48mRNfEjCdKA7VnCDa3jmK8brl1Uyrv7X83-ExWnzBF_1H81zmmTZSJTzCmfEtoNN57j2oUaxm2QI/s320/img2_back_nobatt_screwsNumbered.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5583163537423873682&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When you remove screws 16 and 17 you can remove the cover protecting your hard disk.  You can raise the cover at the side that is nearest to you (nearest to the bottom of the picture).  Then you can see screws 21 and 22.  Apparently I forgot number 20 when photo shopping the pictures and I am to lazy to redo them :-).   &lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUhDU4gNbTA5x-y4l6-Dy93s92I2j9055xJoiJ4hVImNI_rW4PNBebGQtPlC5fOzHNvy-bcB1KY9OsM66h5AoVP-agofRrrWGkn3JWt1RZQMaHfosnYwsgJMvuq-j8YgVo7b4xROL8DJY/s1600/img3_2extraScrewsHD.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 216px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUhDU4gNbTA5x-y4l6-Dy93s92I2j9055xJoiJ4hVImNI_rW4PNBebGQtPlC5fOzHNvy-bcB1KY9OsM66h5AoVP-agofRrrWGkn3JWt1RZQMaHfosnYwsgJMvuq-j8YgVo7b4xROL8DJY/s320/img3_2extraScrewsHD.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5583164434684169378&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now that all the screws are located remove them all!  And I mean all of them.  Otherwise you can force the body at the places where it is still screwed together!  When all screws are gone you can first remove your Hard Disk.  When screws 16,17,21 &amp; 22 are removed you can slide your Hard Drive as depicted below.  You want to treat this hard disk with care since it contains all your precious data.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWQFwXy9U9c2mqFTZuGm9exXlAcfyu8nyBBGQSOQ7u6a5N8ccpuSon1JH9K65gfG-GU2GTtctSOHE1_QoseJ-1lSKYsfiPGvtJZvLGQMPvyoWrI3aJp-ScDvIh0AAUD2u1CKJJq0Otz3Q/s1600/img4_MoveHD.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 222px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWQFwXy9U9c2mqFTZuGm9exXlAcfyu8nyBBGQSOQ7u6a5N8ccpuSon1JH9K65gfG-GU2GTtctSOHE1_QoseJ-1lSKYsfiPGvtJZvLGQMPvyoWrI3aJp-ScDvIh0AAUD2u1CKJJq0Otz3Q/s320/img4_MoveHD.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5583165371499122242&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After removing your Hard disk you can remove your CD/DVD drive.  When screws 6 and 9 are removed, you can just slide it out.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCKVDMbZfFgPb8nzFfwB2WUYv33k2myc3YQuIRJML97jDhAyWtM-3spIkyRf1RwKZH8k7upYAgkSM11TuA2-EgRMzLuqqVh0IQ2HG2geZ0MpKql8G4XFoJteeVV2_UOeJ94vMqiWEekr8/s1600/img5_rmv_CD.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 295px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCKVDMbZfFgPb8nzFfwB2WUYv33k2myc3YQuIRJML97jDhAyWtM-3spIkyRf1RwKZH8k7upYAgkSM11TuA2-EgRMzLuqqVh0IQ2HG2geZ0MpKql8G4XFoJteeVV2_UOeJ94vMqiWEekr8/s320/img5_rmv_CD.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5583165771692070178&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can also remove the cover that is fixed by screw number 10.  Behind this is your RAM memory.  I removed the RAM memory also but I don&#39;t think it is necessary. (The cover must be removed however!)&lt;br /&gt;&lt;br /&gt;Now you should be ready to open up the body!  Maybe to be sure you can do a last check to see if all screws are removed.  Then you can start lifting the side that is nearest to you and open up the body like it was a treasure chest (full of dust).  Be careful however, there are little plastic hooks that hold the body together.  So you might have to apply some light pressure at some points using a screw driver.  Be gently however since you don&#39;t want to break of any of the hooks.  It is not hard but the first time you might have to get used to it.  When your notebook is opened up it should look like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3wUNl39hIaACW7mLNL6OkKNiWFZUjRZw6g89cBhyphenhyphenFa50P_EIh7oXCG3WjVeLfzsxHA5JZlWML-Nv6R3Qj-3YCD_dKXpL-PgK_JqxYgzXPmoYut1dGDpOLjl0QIf9aNO7uEc4bJNG2mNE/s1600/img6_fanPower.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 236px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3wUNl39hIaACW7mLNL6OkKNiWFZUjRZw6g89cBhyphenhyphenFa50P_EIh7oXCG3WjVeLfzsxHA5JZlWML-Nv6R3Qj-3YCD_dKXpL-PgK_JqxYgzXPmoYut1dGDpOLjl0QIf9aNO7uEc4bJNG2mNE/s320/img6_fanPower.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5583167519767422354&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At this moment you might be a bit disappointed as you might have thought that there would be much more dust.  But don&#39;t worry!  The picture above was taken before the cleanup of my notebook so it didn&#39;t look too bad either!  But the cleaning helped a lot!  &lt;span style=&quot;font-weight:bold;&quot;&gt;Before you start cleaning: REMOVE THE POWER SUPPLY OF THE FAN!&lt;/span&gt;.  This is circled in blue on the picture above.  &lt;br /&gt;&lt;br /&gt;Now the cleaning can begin.  I cleaned it using a vacuum cleaner which can blow air.  If you don&#39;t have a vacuum cleaner which can blow you might want to search for cans containing pressurized air (so called air dusters).  I&#39;ve heard that sucking air isn&#39;t a good idea (don&#39;t know if this is true but I&#39;d rather play safe).  The metal on the upper part (see picture) I have cleaned using a cloth (that was a bit wet).  Then I dried the cloth and cleaned it again.  Make sure everything is dry when you put your notebook back together!  The other parts I have blown out using the vacuum cleaner.  When cleaning the ventilator you should hold it still using one of your hands.  Be sure to send a strong air flow through the ventilator shaft.  (The metal block that goes to the side of your notebook on the right.)  Since this is a place were dust can easily get trapped.  (Again hold the ventilator).    &lt;br /&gt;&lt;br /&gt;When the cleaning is done you can put your notebook back together by performing the steps above in reverse order.  &lt;span style=&quot;font-weight:bold;&quot;&gt;THE FIRST STEP IS TO RECONNECT YOUR FAN&lt;/span&gt;.  If you don&#39;t reconnect your fan you are blessed with a notebook that will be very silent (but silence can (and will) kill!).  The re-closing of the body is the hardest part.  First make sure the back sides (sides furthest away from you) fit together and than close the body.  Then gently press the body together at the sides.  You might hear little clicking sounds.&lt;br /&gt;&lt;br /&gt;Next insert the hard drive and CD/DVD drive again. Just gently slide them back in. Remember that screws 16 and 17 are there to keep the cap fixed to the body so they should be screwed after placing the cover over the hard disk.&lt;br /&gt;&lt;br /&gt;If everything is back at its place then you should boot up your notebook and enjoy the silence.</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/1655044383440934696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2011/03/quiet-down-noisy-fan-sony-vaio.html#comment-form' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/1655044383440934696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/1655044383440934696'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2011/03/quiet-down-noisy-fan-sony-vaio.html' title='Quiet down a Noisy Fan (Sony VAIO VPCEB1S1E model PCG-71211M) (OS independent)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_iv35DekNx7cFrBLWVClMmXf2iVsJaUhc3zxxtXPN4DPC8aMvx7l1SfmcqlkkwgJCM641fQQDjEUXU_JUPTUsHWQ-d9cIgiR_yrBuvBOMGP5Y26wh644Orj0aFhSATbyq08x_6oQ9CSo/s72-c/img1_backUntouched.JPG" height="72" width="72"/><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-7678938020523644071</id><published>2011-02-24T14:11:00.000-08:00</published><updated>2011-02-24T15:06:20.680-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android Ubuntu SMS PC"/><title type='text'>Ubuntu and EasySMS (for android)</title><content type='html'>&lt;h2&gt; Introduction &lt;/h2&gt;&lt;br /&gt;When you are on your computer almost all the time it might be interesting to send sms messages using your computer.  There is an application for Android that lets you do this.  It is called EasySMS and is available in the Android market.&lt;br /&gt;&lt;br /&gt;But it only gets useful if it&#39;s configured well.  So I want to share my configuration.  Important to note is that my configuration is for USB connections.  As I prefer a USB connection to a WiFi connection.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Configuration on the phone&lt;/h2&gt;&lt;br /&gt;After installing the application from the market you can launch the application (you can choose free or paid version.  The paid version obviously has some advantages and I bought it).&lt;br /&gt;When the application is launched you see a screen were you can set configuration options.  Check the box before &quot;Auto&quot; underneath &quot;Control of services Wifi/USB&quot;.  Secondly you should set a port for Wifi/USB (mine is set to 2511 but you can choose any number higher than 1023).  I have got the HTC Hero and my phone needs the checkbox before &quot;Alt. send&quot; to be checked.  Normally you only have to check this if you notice that your messages don&#39;t get send.&lt;br /&gt;You can set other configurations as you wish.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Configuration of Ubuntu &lt;/h2&gt;&lt;br /&gt;This part will tell you how to make it possible to send SMS messages by just clicking one button.  A requirement for your system is that you have the Android SDK somewhere on it.  You can find the SDK on http://developer.android.com/sdk/index.html  &lt;br /&gt;&lt;br /&gt;First make an simple script &quot;startUSBSMS.sh&quot; with the following contents:&lt;br /&gt;#!/bin/sh&lt;br /&gt;$PATH_TO_ANDROID_SDK/tools/adb forward &lt;span style=&quot;font-weight:bold;&quot;&gt;tcp:1977&lt;/span&gt; tcp:&lt;span style=&quot;font-style:italic;&quot;&gt;2511&lt;/span&gt;&lt;br /&gt;google-chrome http://localhost:&lt;span style=&quot;font-weight:bold;&quot;&gt;1977&lt;/span&gt;/&lt;br /&gt;&lt;br /&gt;Of course you can use another browser by changing google-chrome to firefox or any other browser launching command.  $PATH_TO_ANDROID_SDK must be changed to the android SDK folder containing the tools folder.  It is important that the bold port numbers match and that the number in italics is the same as the port number that was chosen during the configuration of the phone.  Finally you should make the script executable (chmod +x startUSBSMS.sh or using the properties window of the file)&lt;br /&gt;&lt;br /&gt;Normally you can add a custom application launcher to one of your gnome panels.  When creating this launcher you can select an icon and a command.  The command is just the path to your script.&lt;br /&gt;&lt;br /&gt;This might work for you but I had to do a little bit of extra work.  Since my phone wasn&#39;t always connected with the right permissions I had to create some udev rules to make sure my phone was accessible.  The udev rules should only be executed when you&#39;re phone is connected.  One way to do this is to find out the VendorId corresponding with your phone.  This can be done by executing &lt;span style=&quot;font-weight:bold;&quot;&gt;lsusb&lt;/span&gt; WHEN YOUR PHONE IS CONNECTED VIA USB!  it will give output of the different USB devices.  Find the line corresponding to your phone.  Normally every line has a description.  Ee.g. I have a htc (=High Tech Corporation) Hero phone and output is: &lt;br /&gt;&lt;br /&gt;Bus 002 Device 003: ID &lt;span style=&quot;font-weight:bold;&quot;&gt;0bb4&lt;/span&gt;:0c99 High Tech Computer Corp. &lt;br /&gt;&lt;br /&gt;The number after ID and before the following colon will be the vendorid.  Now we have got all the information to make the udev rules.  Make a file /etc/udev/rules.d/50-android.rules  with the following content:&lt;br /&gt;SUBSYSTEM==&quot;usb&quot;, SYSFS{idVendor}==&quot;&lt;span style=&quot;font-weight:bold;&quot;&gt;0bb4&lt;/span&gt;&quot;, MODE=&quot;0666&quot;&lt;br /&gt;SUBSYSTEM==&quot;usb&quot;, SYSFS{idVendor}==&quot;&lt;span style=&quot;font-weight:bold;&quot;&gt;0bb4&lt;/span&gt;&quot;, RUN+=&quot;$PATH_TO_ANDROID_SDK/tools/adb start-server&quot;&lt;br /&gt;&lt;br /&gt;Finally execute &lt;span style=&quot;font-weight:bold;&quot;&gt;sudo restart udev&lt;/span&gt; to make sure the rules are activated.  After reconnecting your phone you should be able to use your SMS button!&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; EasySMS link &lt;/h2&gt;&lt;br /&gt;http://www.fireblade.org/EasySMS/</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/7678938020523644071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2011/02/ubuntu-and-easysms-for-android.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7678938020523644071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/7678938020523644071'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2011/02/ubuntu-and-easysms-for-android.html' title='Ubuntu and EasySMS (for android)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-5675476736671618537</id><published>2010-05-22T13:35:00.000-07:00</published><updated>2010-05-22T14:02:05.337-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fix sound ubuntu VPCEB1S1E"/><title type='text'>Easiest fix for sound Sony VAIO VPCEB1S1E</title><content type='html'>&lt;h1&gt;Easiest fix for sound Sony Vaio VPCEB1S1E&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;In my previous post I allready explained some fixes.  But now it&#39;s even more easier, just follow these little steps&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;1)&lt;/span&gt;Download the following zip file on your pc&lt;br /&gt;&lt;blockquote&gt;&lt;a href=&quot;http://dl.dropbox.com/u/796832/vaio_soundfix.zip&quot;&gt;vaio_soundfix.zip&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;2)&lt;/span&gt;Go to the folder where you downloaded the file and extract it&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;3)&lt;/span&gt;This will create a folder called &quot;vaio_soundfix&quot;&lt;br /&gt;Because we will need root privileges we will continue in terminal:&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;4)&lt;/span&gt;Open up a terminal&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;5)&lt;/span&gt;Change the current directory to the vaio_soundfix you just created*&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;6)&lt;/span&gt;type in the following command (caution: capital I) and confirm with enter&lt;br /&gt;&lt;blockquote&gt;sudo ./Install.sh&lt;/blockquote&gt;&lt;br /&gt;This will output something like:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;username&lt;/span&gt;@&lt;span style=&quot;font-style:italic;&quot;&gt;computername&lt;/span&gt;:&lt;span style=&quot;font-style:italic;&quot;&gt;DirectoryWhereYouExtractedFiles&lt;/span&gt;/vaio_soundfix$ sudo ./Install.sh &lt;br /&gt;Now in directory /opt/vaio/vaio_soundfix&lt;br /&gt;update-rc.d: warning: /etc/init.d/soundvaio missing LSB information&lt;br /&gt;update-rc.d: see &lt;http://wiki.debian.org/LSBInitScripts&gt;&lt;br /&gt; Adding system startup for /etc/init.d/soundvaio ...&lt;br /&gt;   /etc/rc0.d/K20soundvaio -&gt; ../init.d/soundvaio&lt;br /&gt;   /etc/rc1.d/K20soundvaio -&gt; ../init.d/soundvaio&lt;br /&gt;   /etc/rc6.d/K20soundvaio -&gt; ../init.d/soundvaio&lt;br /&gt;   /etc/rc2.d/S20soundvaio -&gt; ../init.d/soundvaio&lt;br /&gt;   /etc/rc3.d/S20soundvaio -&gt; ../init.d/soundvaio&lt;br /&gt;   /etc/rc4.d/S20soundvaio -&gt; ../init.d/soundvaio&lt;br /&gt;   /etc/rc5.d/S20soundvaio -&gt; ../init.d/soundvaio&lt;br /&gt;All done, press enter to quit…&lt;/blockquote&gt;&lt;br /&gt;So the warning is normal.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;7)&lt;/span&gt;Reboot &amp; enjoy the bootsound!&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;span style=&quot;font-weight:bold;&quot;&gt;*&lt;/span&gt;Some more information on how to go to the right directory.  If you have for example downloaded vaio_soundfix.zip to &#39;Downloads&#39;.  You just type the following command in the terminal:&lt;br /&gt;&lt;blockquote&gt;cd &amp;#126;/Downloads&lt;/blockquote&gt;&lt;br /&gt;&#39;&amp;#126;&#39; Must be a &lt;a href=&quot;http://www.mathmlcentral.com/characters/glyphs/Tilde.html&quot;&gt;&#39;tilde&#39;&lt;/a&gt; for some reason it won&#39;t show correctly...&lt;br /&gt;cd is the change directory command and is followed by the directory to which you want to change.  &amp;#126; is a wildcard that gets replaced by the home directory of the userdirectory.  So this command will move your current directory to the Downloads-folder in your own home-folder.&lt;br /&gt;&lt;br /&gt;For the people interested: You can also just open the Install.sh script with gedit if you want to see what it does.  I&#39;ve commented it a little bit.</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/5675476736671618537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2010/05/easiest-fix-for-sound-sony-vaio.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5675476736671618537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5675476736671618537'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2010/05/easiest-fix-for-sound-sony-vaio.html' title='Easiest fix for sound Sony VAIO VPCEB1S1E'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-1533013152625213440</id><published>2010-05-04T13:34:00.000-07:00</published><updated>2010-05-22T14:04:11.626-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lucid"/><category scheme="http://www.blogger.com/atom/ns#" term="Sound"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="VAIO"/><category scheme="http://www.blogger.com/atom/ns#" term="VPCEB1S1E"/><title type='text'>Fixing sound issue on Sony vaio VPCEB1S1E</title><content type='html'>edit:&lt;span style=&quot;font-weight:bold;&quot;&gt;The easiest solution (which is also persistent!) is explained in a newer post which can be found &lt;a href=&quot;http://ubuntu42.blogspot.com/2010/05/easiest-fix-for-sound-sony-vaio.html&quot;&gt;here&lt;/a&gt;!!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This blogpost will explain how to make sound work on a Sony Vaio VPCEB1S1E. The solution is based on bug report 445889.  Where Arwin Tugade posted a solution.  In this post I&#39;ll try to provide a more detailed explanation.&lt;br /&gt;&lt;br /&gt;There are 2 solutions: an easy one and a hard one.  The easy one is however not persistent.  So after each reboot you&#39;ll have to redo all the steps to enable your sound.  The hard one on the other hand is persistent.  I will explain both.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Easy (non persistent) solution&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;For the easy solution a python script has to be downloaded.  This script is called HDA Analyzer and provides a GUI which will help us to enable the intern speaker of our notebook.  (HDA Analyzers wiki can be found on:http://www.alsa-project.org/main/index.php/HDA_Analyzer)&lt;br /&gt;First you&#39;ll have to download the script.  This can be don by starting up a terminal and execute the following command:&lt;br /&gt;&lt;blockquote&gt;wget -O run.py http://www.alsa-project.org/hda-analyzer.py&lt;/blockquote&gt;&lt;br /&gt;Next will have to run this script with super user privileges.  This can be done by executing the next command in the terminal:&lt;br /&gt;&lt;blockquote&gt;sudo python run.py&lt;/blockquote&gt; &lt;br /&gt;You will be prompted to enter your password.  After entering your password a GUI will start up. In the GUI click on &quot;Node[0x19] PIN&quot; in the list on the left-side.  Then in the right part you&#39;ll have to change the value of the dropdownlist next to VREF to HIZ.  See picture:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaLCbRxKOF-qvVGVQ1_O6TsdwvlKUw_9ik_WKtTUw4BKIdl61xfl2NOGdggxVe7132BU_2WZHBRkMHaCAh2wqspr4wbXF9wDWlMLqjqFsLOnlpq3pTfD5rTC5_boxDJ3uqui9LZIxOxPk/s1600/HDAAnalyzer.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 273px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaLCbRxKOF-qvVGVQ1_O6TsdwvlKUw_9ik_WKtTUw4BKIdl61xfl2NOGdggxVe7132BU_2WZHBRkMHaCAh2wqspr4wbXF9wDWlMLqjqFsLOnlpq3pTfD5rTC5_boxDJ3uqui9LZIxOxPk/s320/HDAAnalyzer.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5467520888222258194&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Now the sound of your notebook should work! &lt;br /&gt;&lt;br /&gt;When you close the application a popup will ask &quot;HDA-Analyzer: Would you like to revert settings for all HDA codecs?&quot;.  Answer No.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; Hard (persistent) solution&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Warning: The following instructions are to be used on Lucid only.  If the process isn&#39;t performed right, it might break your system.  And thus you will need to re-install your computer.  I hereby clearly state that I won&#39;t take any responsibility for broken systems.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Before trying this you might first check out the solution above because if that won&#39;t work, this also won&#39;t work.  For a persistent solution we wil create a custom kernel.  This means we need to recompile the kernel.  Therefore we first need to be sure the have some packages.  This by entering the 2 following commands:&lt;br /&gt;&lt;blockquote&gt;sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package&lt;/blockquote&gt;&lt;br /&gt;and&lt;br /&gt;&lt;blockquote&gt;sudo apt-get build-dep linux&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Then we need to download the kernel source, do this by entering the following commands:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)&lt;/blockquote&gt;&lt;br /&gt;&amp;&lt;br /&gt;&lt;blockquote&gt;apt-get source linux-image-$(uname -r)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Note: The source will be placed in your current working directory.  You can use the pwd command to print this directory out.  As I myself am new to building kernels I have just put it in my home folder.  But there might be a better practice.&lt;br /&gt;&lt;br /&gt;Note2:The `uname -r` command makes sure that you download the source of the kernel you are currently using&lt;br /&gt;&lt;br /&gt;Go into the directory with the kernel source:&lt;br /&gt;It&#39;s name will start with linux and contain the first part of the kernel release number.  &lt;br /&gt;For example when the `uname -r` command returns &quot;2.6.32-21-generic&quot;.  The kernel source will be in a map with a name like `linux-2.6.32`.  In that case you want to go into that directory by executing the following command:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;cd linux-2.6.32&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to change the source.  Therefore we need to open the file that needs to be changed in a text-editor.  You can open it with gedit by executing the following command:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;gedit sound/pci/hda/patch_realtek.c&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Then find “static struct hda_verb alc269_init_verbs[] = {“.  In my file it was around line number 13272 but it may be different because you might have got another version of the file, depending on your current kernel.  In this struct definition (thus the code between curly brackets) you must find the line stating: &lt;br /&gt;{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, &lt;br /&gt;&lt;br /&gt;and you will have to change this line into:&lt;br /&gt;&lt;br /&gt;{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},&lt;br /&gt;&lt;br /&gt;Than &lt;b&gt;save&lt;/b&gt; and quit the file.&lt;br /&gt;&lt;br /&gt;Now that the source is changed we need to recompile the kernel.  &lt;br /&gt;This is done by executing the following 2 commands:&lt;br /&gt;&lt;blockquote&gt;fakeroot debian/rules clean&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;AUTOBUILD=1 fakeroot debian/rules binary-debs-FLAVOUR&lt;/blockquote&gt;&lt;br /&gt;Where FLAVOUR must be changed to the flavour you wish.  If you type `uname -r` in your terminal you will get the release of your kernel and normally this contains the flavour you need.  For example:&lt;br /&gt;if `uname -r` results in the following answer:&lt;br /&gt;2.6.32-21-generic&lt;br /&gt;&lt;br /&gt;Then your flavour is generic and the second command should have been:&lt;br /&gt;&lt;blockquote&gt;AUTOBUILD=1 fakeroot debian/rules binary-debs-generic&lt;/blockquote&gt;&lt;br /&gt;I haven&#39;t test this because I had executed&lt;br /&gt;&lt;blockquote&gt;AUTOBUILD=1 fakeroot debian/rules binary-debs&lt;/blockquote&gt;&lt;br /&gt;by mistake and this command builds kernels for every possible flavour.  You can do this also, but I don&#39;t recommend this since building may take a while...&lt;br /&gt;&lt;br /&gt;After the building of the kernel you will have 2 deb files. You can install them by executing the command:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo dpkg -i name_of_file.deb&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I have first installed the header file and then the image, but I don&#39;t know if the order is important.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;URLs of the webpages that helped me a lot:&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;The bug report that showed me the solution. (THANK YOU Arwin Tugade)&lt;br /&gt;https://bugs.launchpad.net/ubuntu/+source/linux/+bug/445889&lt;br /&gt;&lt;br /&gt;The necessary information on Kernel compiling&lt;br /&gt;https://help.ubuntu.com/community/Kernel/Compile</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/1533013152625213440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2010/05/fixing-sound-issue-on-sony-vaio.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/1533013152625213440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/1533013152625213440'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2010/05/fixing-sound-issue-on-sony-vaio.html' title='Fixing sound issue on Sony vaio VPCEB1S1E'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaLCbRxKOF-qvVGVQ1_O6TsdwvlKUw_9ik_WKtTUw4BKIdl61xfl2NOGdggxVe7132BU_2WZHBRkMHaCAh2wqspr4wbXF9wDWlMLqjqFsLOnlpq3pTfD5rTC5_boxDJ3uqui9LZIxOxPk/s72-c/HDAAnalyzer.png" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4419564480834914366.post-5695867028615064818</id><published>2009-12-21T05:58:00.000-08:00</published><updated>2009-12-21T06:23:50.183-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adb"/><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="udev-rules"/><title type='text'>udev rules needed for your android device</title><content type='html'>This blogpost will contain the udev-rules needed for making adb work.&lt;br /&gt;&lt;br /&gt;This information is partly copied from &lt;a href=&quot;http://androidcommunity.com/forums/f4/how-to-install-apps-using-adb-4482/&quot;&gt;here&lt;/a&gt;.  I&#39;ve posted it here because that source wasn&#39;t available anymore, and it was for htc-devices only.&lt;br /&gt;&lt;br /&gt;To add the rules file you must do the following steps:&lt;br /&gt;&lt;br /&gt;   1. Login as root and create this file: &lt;span style=&quot;font-weight:bold;&quot;&gt;/etc/udev/rules.d/50-android.rules&lt;/span&gt;. &lt;br /&gt;      &amp;nbsp;&amp;nbsp;  For Gusty/Hardy/Intrepid/Jaunty/Karmic, edit the file to read:&lt;br /&gt;      &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &lt;span style=&quot;font-style:italic;&quot;&gt;SUBSYSTEM==&quot;usb&quot;, SYSFS{idVendor}==&quot;0bb4&quot;, MODE=&quot;0666&quot;&lt;/span&gt;&lt;br /&gt;      &amp;nbsp;&amp;nbsp;  For Dapper and earlier, edit the file to read:&lt;br /&gt;      &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &lt;span style=&quot;font-style:italic;&quot;&gt;SUBSYSTEM==&quot;usb_device&quot;, SYSFS{idVendor}==&quot;0bb4&quot;, MODE=&quot;0666&quot;&lt;/span&gt;&lt;br /&gt;   2. Now execute:&lt;br /&gt;      &amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-style:italic;&quot;&gt;chmod a+rx /etc/udev/rules.d/50-android.rules&lt;/span&gt;&lt;br /&gt;   3. And make the rule active by restarting udev:&lt;br /&gt;      &amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-style:italic;&quot;&gt;sudo /etc/init.d/udev restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is important to note that this only works for HTC-devices. However you can make it work for any device. You&#39;ll just have to change the value of &lt;span style=&quot;font-style:italic;&quot;&gt;SYSFS{idVendor}&lt;/span&gt; into another value (read further).&lt;br /&gt;&lt;br /&gt;You can obtain the value of SYSFS{idVendor} by connecting your device via usb and launching the command &lt;span style=&quot;font-style:italic;&quot;&gt;lsusb&lt;/span&gt;:&lt;br /&gt;an example output:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 001 Device 003: ID 0bb4:0c02 High Tech Computer Corp. &lt;br /&gt;Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;As you can see this is for a HTC (High Tech Computer Corp.) Device. And you can read the id of the vendor after ID and before the colon.  So if you have another device, just use the id printed out. This by putting it in the quotes, instead of 0bb4 in &lt;span style=&quot;font-weight:bold;&quot;&gt;/etc/udev/rules.d/50-android.rules&lt;/span&gt;.</content><link rel='replies' type='application/atom+xml' href='http://blog.allinthemiddle.com/feeds/5695867028615064818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.allinthemiddle.com/2009/12/udev-rules-needed-for-your-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5695867028615064818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4419564480834914366/posts/default/5695867028615064818'/><link rel='alternate' type='text/html' href='http://blog.allinthemiddle.com/2009/12/udev-rules-needed-for-your-android.html' title='udev rules needed for your android device'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>