<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pofHQ</title>
	<atom:link href="http://pof.eslack.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://pof.eslack.org</link>
	<description>Just another eslack.org blogs weblog</description>
	<lastBuildDate>Thu, 23 Dec 2010 16:45:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Best solution to fully backup KVM virtual machines</title>
		<link>http://pof.eslack.org/blog/2010/12/23/best-solution-to-fully-backup-kvm-virtual-machines/</link>
		<comments>http://pof.eslack.org/blog/2010/12/23/best-solution-to-fully-backup-kvm-virtual-machines/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 15:27:43 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[virtual]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/?p=1476</guid>
		<description><![CDATA[Today I found the &#8220;virt-backup.pl&#8221; script from Daniel Berteaud which is IMHO the best solution to fully backup a libvirt managed virtual machine. The perl script is very flexible and allows for various configurations depending on your VM setup and backup needs, it requires ubuntu packages &#8220;libsys-virt-perl&#8221; and &#8220;libxml-simple-perl&#8221; to run. I use it to [...]]]></description>
			<content:encoded><![CDATA[	<p>Today I found the &#8220;<a href="http://repo.firewall-services.com/misc/virt/virt-backup.pl">virt-backup.pl</a>&#8221; script from Daniel Berteaud which is IMHO the best solution to fully backup a libvirt managed virtual machine. The perl script is very flexible and allows for various configurations depending on your VM setup and backup needs, it requires ubuntu packages &#8220;libsys-virt-perl&#8221; and &#8220;libxml-simple-perl&#8221; to run.</p>
	<p>I use it to backup running virtual machines in this way: first, suspend the virtual machine (for a short while), then create a snapshot of the LVM used as storage by the virtual machine, then resume the virtual machine so it can continue running without almost no downtime (taking a LVM snapshot is very fast!), and after that dump the snapshot to a compressed image file on a remote server (backup storage). To accomplish this just run this command (for example from a cron job):</p>
	<p><code><br />
virt-backup.pl --pre --vm=machine1 --backupdir=/mnt/remotenas/ --privatedir --compress --snapsize=5G --debug<br />
</code></p>
	<p>If you use ubuntu, note that the script needs to be edited to adjust the location of lvcreate and lvremove (in /sbin instead of /usr/sbin).
</p>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2010/12/23/best-solution-to-fully-backup-kvm-virtual-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux on ONKYO BX407A4</title>
		<link>http://pof.eslack.org/blog/2010/07/30/linux-on-onkyo-bx407a4/</link>
		<comments>http://pof.eslack.org/blog/2010/07/30/linux-on-onkyo-bx407a4/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 13:31:43 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[gadgets]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/?p=1438</guid>
		<description><![CDATA[On a recent trip to Japan I bought this UMPC, of course I was not happy with the default Japanese windows OS, and changed it to Ubuntu. Here are some quick notes I took during the process for me to remember if I need to reinstall in the future and hoping it can be useful [...]]]></description>
			<content:encoded><![CDATA[	<p>On a recent trip to Japan I bought this UMPC, of course I was not happy with the default Japanese windows OS, and changed it to Ubuntu. Here are some quick notes I took during the process for me to remember if I need to reinstall in the future and hoping it can be useful to anyone else having this UMPC. As far as I know, this is the same hardware as UMID Mbook BZ / M2 or Sagem SPIGA, so instructions should be valid for these devices as well.</p>
	<p><img src="http://pof.eslack.org/images/onkyo-bx4.jpg" alt="onkyo bx407a4" /></p>
	<p><span id="more-1438"></span></p>
	<h3>Backup of the recovery partition</h3>
	<p>Boot with a USB bootable linux distro, and backup the whole sda1 partition, it contains a FreeDOS with a Symantec Ghost of the default Windows installation (in Japanese), keep it in a safe place in case you need to restore it in the future:</p>
	<pre>
dd if=/dev/sda1 bs=16384 |gzip -9 > /mnt/onkyo-sda1.tgz
</pre>
	<h3>Ubuntu installation</h3>
	<p>I installed the Netbook edition of Ubuntu 10.4, you can install it using a USB pen drive. To select the boot device press Fn+F11 during boot (you can enter the BIOS pressing Fn+Del while booting).</p>
	<h3>Fix Wireless: Libertas SDIO SD8686</h3>
	<p>The default module in ubuntu 2.6.32-21-generic kernel needs to be patched, otherwise the system hangs when associating to an access point. I got the <a href="http://pof.eslack.org/archives/libertas.patch">patch</a> and instructions from <a href="http://nblog.jp/0132">this website</a> (in Japanese!). In short, this is what needs to be done (you can do it on a virtual machine if you don&#8217;t want to make the system dirty just to get the two patched .ko files for your kernel):</p>
	<pre>
$ sudo apt-get install build-essential kernel-package linux-source-2.6.32 git-core
$ cd /usr/src
$ sudo tar xvjf linux-source-2.6.32.tar.bz2
$ cd linux-source-2.6.32
$ sudo cp /boot/config-2.6.32-21-generic .config
$ sudo make oldconfig
$ sudo git apply libertas.patch
$ sudo cp /usr/src/linux-headers-2.6.32-21-generic/Module.symvers .
$ sudo make modules_prepare
$ sudo make M=drivers/net/wireless/libertas
</pre>
	<p>This will create libertas.ko and libertas_sdio.ko which needs to be replaced in /lib/modules/.</p>
	<p>To get the wifi working, you also need to place the libertas firmware <a href="http://extranet.marvell.com/drivers/driverDisplay.do?driverId=203">downloaded from marvell website</a> in /lib/firmware, this is important as the firmware provided by default in Ubuntu (v8 and v9) doesn&#8217;t work:</p>
	<pre>
# unzip SD-8686-LINUX26-SYSKT-9.70.3.p24-26409.P45-GPL.zip
# tar xvfp SD-8686-FEDORA26FC6-SYSKT-GPL-9.70.3.p24-26409.P45.tar
# cp FwImage/sd8686.bin /lib/firmware/sd8686.bin
# cp FwImage/helper_sd.bin /lib/firmware/sd8686_helper.bin
</pre>
	<p>To enable IEEE PS (power management:on), add the following to your /etc/rc.local:</p>
	<pre>iwconfig wlan0 power on</pre>
	<h3>suspend/resume and hibernation:</h3>
	<p>Currently there is a known bug in Intel GMA500 &#8216;Poulsbo&#8217; where 3D Graphics (OpenGL) does not work after  resume. Some threads in ubuntu forums suggest to use uswsusp (s2ram) instead of the default pm-suspend, and removing the package vbetool. I have tried all sorts of combinations and couldn&#8217;t get resume to work: suspend works using the command &#8216;s2ram -f -a 2 -m&#8217;, but after resuming you can&#8217;t see the terminal nor the X display.</p>
	<p>Hibernation works out of the box using the default pm-hibernate, however after the computer is back it goes to gdm login screen and doesn&#8217;t allow the user to login, so at the moment this feature is completely useless.</p>
	<h3>Fix Sound: snd-hda-intel Realtek ALC262</h3>
	<p>By default sound works, however the internal microphone does not record anything. To fix it add the following line to /etc/modprobe.d/alsa-base.conf:</p>
	<pre>
options snd-hda-intel model=basic
</pre>
	<p>Check the Capture settings in alsamixer (press F4 to see Capture settings). If you activate the Mic setting in the Playback screen (F3 or F5) then you get annoying whistling, leaving that setting to zero works fine.<br />
Another solution is to install an advanced graphical mixer: pavucontrol</p>
	<p>To enable power saving on the soundcard, you can add the following to /etc/rc.local:</p>
	<pre>echo 1 > /sys/module/snd_hda_intel/parameters/power_save</pre>
	<h3>Fix Graphics: Intel GMA500</h3>
	<p>This will enable the screen resolution to 1024&#215;600, check <a href="https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo">ubuntu wiki</a> for more information.</p>
	<pre>
add-apt-repository ppa:gma500/ppa
apt-get update
apt-get install poulsbo-driver-2d poulsbo-driver-3d poulsbo-config
</pre>
	<p>Note, this step must be done before installing the TouchScreen driver.</p>
	<p>If you are having problems not being able to login (due to a current bug in poulsbo drivers), it helps adding this to the ServerFlags section of your xorg.conf file:</p>
	<pre>
Section \"ServerFlags\"
	Option \"AIGLX\"	\"off\"
EndSection
</pre>
	<p>Also, you must change the Power Management settings to don&#8217;t Reduce the backlight brightness nor Dim display when idle, otherwise the screen goes completely dark.</p>
	<p>Xv video output doesn&#8217;t work (Totem, webcam, skype, etc). Ubuntu wiki suggest to use mplayer-vaapi to get decent video playback, but I found <a href="http://ubuntuforums.org/showpost.php?p=9598669&#038;postcount=1461">VLC</a> to be a better solution. Just follow these instructions for video playback:</p>
	<pre>
sudo add-apt-repository ppa:nvidia-vdpau/cutting-edge-multimedia
sudo apt-get update
sudo apt-get install vlc mplayer
</pre>
	<p>Then open VLC media player, go to Tools, Preferences, Video and select &#8220;X11 Video Output (XCB)&#8221; as video Output.<br />
For video playback with mplayer, use: mplayer -vo vaapi -va vaapi videofile.</p>
	<h3>Fix TouchScreen</h3>
	<p>First, add the following to /etc/rc.local:</p>
	<pre>
echo -n serio_raw>/sys/bus/serio/devices/serio4/drvctl
</pre>
	<p>Then download the latest <a href="http://home.eeti.com.tw/web20/eGalaxTouchDriver/linuxDriver.htm">eGalax Touch Driver</a>, untar it and run setup.sh as root. You need to select &#8220;2&#8243; (PS/2 device). After running setup, reboot the computer and run eGalaxTouch to calibrate the touchscreen.</p>
	<h3>Fix Hotkeys</h3>
	<p>Create the file /lib/udev/keymaps/onkyo-bx4 with this content:</p>
	<pre>
0xE2 cyclewindows      # Fn+Esc
0xEE battery           # Fn+Q
0xDF sleep             # Fn+W
0xF5 switchvideomode   # Fn+E
0xF0 record            # Fn+R
0xF6 camera            # Fn+T
0xF7 f22               # Fn+Y (touchpad toggle)
0xF9 brightnessdown    # Fn+A
0xF8 brightnessup      # Fn+S
0xA0 mute              # Fn+D
0xAE volumedown        # Fn+F
0xB0 volumeup          # Fn+G
0xE0 bluetooth         # Fn+H
0xFB wlan              # Fn+J
</pre>
	<p>Then, edit /lib/udev/rules.d/95-keymap.rules and add the following line inside the keyboard_vendorcheck label:</p>
	<pre>
ENV{DMI_VENDOR}==\"ONKYO CORPORATION\", ATTR{[dmi/id]product_name}==\"ONKYOPC\", RUN+=\"keymap $name onkyo-bx4\"
</pre>
	<p>Reboot and customize the hotkeys in gnome-keybinding-properties, I have added the following Custom Shorcuts:<br />
1) Toggle wifi (XF86WLAN): make it run the following script</p>
	<pre>
#!/bin/bash
ifconfig |grep ^wlan
if [ $? == 0 ]; then
	dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set string:org.freedesktop.NetworkManager string:WirelessEnabled variant:boolean:false
else
	dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set string:org.freedesktop.NetworkManager string:WirelessEnabled variant:boolean:true
fi
</pre>
	<p>2) Toggle bluetooth (XF86Bluetooth): make it run the following script</p>
	<pre>
#!/bin/bash
rfkill list |grep \"blocked: yes\"
if [ $? == 0 ]; then
	rfkill unblock bluetooth
else
	rfkill block bluetooth
fi
</pre>
	<p>3) Camera App (XF86WebCam): make it run &#8216;cheese&#8217; application<br />
4) Sound Recorder (XF86AudioRecord): make it run &#8216;gnome-sound-recorder&#8217;</p>
	<p>The rest of the hotkeys work by default, without needing to add them in gnome-keybinding-properties.</p>
	<h3>Fix Backlight issues</h3>
	<p>Launch gconf-editor, go to /apps/gnome-power-manager/backlight and set the following settings:</p>
	<p>battery_reduce = yes<br />
brightness_ac = 100<br />
brightness_dim_battery = 20<br />
dpms_method_ac = off<br />
dpms_method_battery = off<br />
enable = yes<br />
idle_brightness = 84<br />
idle_dim_ac = yes<br />
idle_dim_battery = yes<br />
idle_dim_time = 1</p>
	<p>Then, make sure /apps/gnome-power-manager/general/use_time_for_policy is disabled (off).</p>
	<h3>Configuration tweaks for SSD</h3>
	<p>1) Disable file access time updates to reduce writes: edit /etc/fstab and add the options <tt>noatime,nodiratime</tt> to your linux partitions.<br />
2) Create a RAM disk mounted at “/tmp” to avoid temporary files SSD I/O by adding the following line to /etc/fstab: <tt>tmpfs /tmp tmpfs mode=1777</tt><br />
3) Change the default I/O scheduler. <a href="http://en.wikipedia.org/wiki/Noop_scheduler">noop</a> or <a href="http://en.wikipedia.org/wiki/Deadline_scheduler">deadline</a> are better suited to SSD drives. In my tests I found deadline to be slightly better for my needs. To enable it:<br />
- Add <tt>elevator=deadline</tt> at the end of GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub.<br />
- run sudo update-grub<br />
- Adjust the &#8220;fifo_batch&#8221; value for the deadline scheduler. A higher value should reduce seeks, but also increase latency. SSDs don&#8217;t need to worry about excessive seeks, so we can set the value low. Add the following line to /etc/rc.local:</p>
	<pre>echo 1 > /sys/block/sda/queue/iosched/fifo_batch</pre>
	<p>4) Avoid writes to swap, add the following to /etc/sysctl.d/99-swap-on-ssd.conf:</p>
	<pre>
vm.swappiness=1
vm.vfs_cache_pressure=50
</pre>
	<p>5) Disable rsyslog if you don&#8217;t need any logging on your netbook (YMMV):</p>
	<pre>sudo mv /etc/init/rsyslog.conf /etc/init/rsyslog.conf.noexec</pre>
	<h3>Other random things</h3>
	<p>Firefox extensions: <a href="https://addons.mozilla.org/en-US/firefox/addon/1250/">Grab-and-drag</a>, <a href="http://banshee.fm/~abock/meerkat/">meerkat</a>.<br />
Other browser: <a href="http://www.twotoasts.de/index.php?/pages/midori_summary.html">midori</a>, <a href="http://www.chromium.org/Home">chromium-browser</a> (extension: <a href="https://chrome.google.com/extensions/detail/ncegfehgjifmmpnjaihnjpbpddjjebme">chromeTouch</a>).<br />
Remember: On the time/date applet preferences, uncheck the box &#8220;Show date&#8221;. Go to System->Preferences -> Startup Applications, remove: Check for new hardware, evolution alarm, Gnome login sound, Print queue applet, Ubuntu One, User folders update, Visual Assistance.<br />
To enable USB autosuspend for non-input devices, add the following to /etc/rc.local:</p>
	<pre>
echo auto > /sys/bus/usb/devices/usb1/power/level
echo auto > /sys/bus/usb/devices/usb2/power/level
echo auto > /sys/bus/usb/devices/usb3/power/level
echo auto > /sys/bus/usb/devices/usb4/power/level
echo auto > /sys/bus/usb/devices/3-2/power/level
</pre>
	<p>To load Intel Atom thermal sensor by default, add &#8220;coretemp&#8221; to /etc/modules.</p>
	<h3>TODO</h3>
	<p>I&#8217;m still trying to figure out how to get the integrated optical micro touchpad working, if you have any hint on this please leave a comment. It looks like the touchscreen and the integrated optical micro-touchpad share the same i8042 port, which is used as a char device (like kernel 2.4.x does) assigned to serio0 by using the serio_raw fix, and only dumps the touchscreen information.
</p>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2010/07/30/linux-on-onkyo-bx407a4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dingoo A320</title>
		<link>http://pof.eslack.org/blog/2009/11/04/dingoo-a320/</link>
		<comments>http://pof.eslack.org/blog/2009/11/04/dingoo-a320/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 08:08:42 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[gadgets]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[dingoo]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/?p=1433</guid>
		<description><![CDATA[Yesterday I got a Dingoo A320 as a birthday present (thanks iolanda!!!). Here are my notes of things i need to remember in the future&#8230; To upgrade the firmware (I flashed official 1.20) just copy the firmware file (named a320.hxf) to the root folder of the dingoo internal memory, disconnect it from your computer and [...]]]></description>
			<content:encoded><![CDATA[	<p>Yesterday I got a <a href="http://www.dingoo888.cn/">Dingoo A320</a> as a birthday present <img src='http://pof.eslack.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (thanks iolanda!!!). Here are my notes of things i need to remember in the future&#8230;</p>
	<p>To upgrade the firmware (I flashed <a href="http://dingoo-scene.blogspot.com/2009/11/firmware-120-seen-in-wild-fixes-yb.html">official 1.20</a>) just copy the firmware file (named a320.hxf) to the root folder of the dingoo internal memory, disconnect it from your computer and switch it off, then press and hold &#8220;down&#8221; and switch on your dingoo again. After the firwmare has been updated the a320.hfx file can be deleted from the dingoo.</p>
	<p>To check the LCD type (to choose the correct kernel and dual-boot bootloader for <a href="http://www.dingux.com">Dingux</a>) just go to system setup &#8211; about, and press up-right-down, up-right-down. My LCD module is ILI9331.
</p>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2009/11/04/dingoo-a320/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mounting a VirtualBox dynamic size VDI Image</title>
		<link>http://pof.eslack.org/blog/2009/03/28/mounting-a-virtualbox-dynamic-vdi-image/</link>
		<comments>http://pof.eslack.org/blog/2009/03/28/mounting-a-virtualbox-dynamic-vdi-image/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 13:28:13 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[vdi]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/?p=1428</guid>
		<description><![CDATA[To work with a variable sized VDI file, you have to dump it to a dd file first (COPYDD); this will create a fixed size dump that then can be opened on a loop device. The variable sized file does not allow mounting as the fs driver needs to see the expected disk size. So [...]]]></description>
			<content:encoded><![CDATA[	<blockquote><p>To work with a variable sized VDI file, you have to dump it to a dd file first (COPYDD); this will create a fixed size dump that then can be opened on a loop device. The variable sized file does not allow mounting as the fs driver needs to see the expected disk size.
</p></blockquote>
	<p>So we proceed as follows:</p>
	<pre>
~/.VirtualBox/VDI$ vditool COPYDD win.vdi dump
vditool    Copyright (c) 2008 Sun Microsystems, Inc.
</pre>
	<p>Then we look where the partition starts, in my case this was a WinXP fat32 formatted filesystem:</p>
	<pre>
~/.VirtualBox/VDI$ hexdump -C -v dump |head -n 30000 |grep -i dos
00007e00  eb 58 90 4d 53 44 4f 53  35 2e 30 00 02 10 24 00  |.X.MSDOS5.0...$.|
00008a00  eb 58 90 4d 53 44 4f 53  35 2e 30 00 02 10 24 00  |.X.MSDOS5.0...$.|
~/.VirtualBox/VDI$
</pre>
	<p>Then we mount it:</p>
	<pre>
~/.VirtualBox/VDI$ sudo mount -o loop,offset=0x7e00,umask=000 -o ro dump /mnt/
</pre>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2009/03/28/mounting-a-virtualbox-dynamic-vdi-image/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>random notes on setting up KVM + libvirt + virtio</title>
		<link>http://pof.eslack.org/blog/2009/03/03/random-notes-on-setting-up-kvm-libvirt-virtio/</link>
		<comments>http://pof.eslack.org/blog/2009/03/03/random-notes-on-setting-up-kvm-libvirt-virtio/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 03:47:02 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[virtio]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/?p=1420</guid>
		<description><![CDATA[This is a collection of notes I took while setting up a virtual machine host which has several guest virtual machines running on Ubuntu 8.10. 1) Create a logical volume to install the guest $ sudo lvcreate -v -n phq_mail -L 80G vg0 /dev/md1 Setting logging type to disk Finding volume group \"vg0\" Creating directory [...]]]></description>
			<content:encoded><![CDATA[	<p>This is a collection of notes I took while setting up a virtual machine host which has several guest virtual machines running on Ubuntu 8.10.</p>
	<p><strong>1) Create a logical volume to install the guest</strong></p>
	<pre>$ sudo lvcreate -v -n phq_mail -L 80G vg0 /dev/md1
    Setting logging type to disk
    Finding volume group \"vg0\"
    Creating directory \"/etc/lvm/archive\"
    Archiving volume group \"vg0\" metadata (seqno 6).
    Creating logical volume phq_mail
    Creating volume group backup \"/etc/lvm/backup/vg0\" (seqno 7).
    Found volume group \"vg0\"
    Creating vg0-phq_mail
    Loading vg0-phq_mail table
    Resuming vg0-phq_mail (254:5)
    Clearing start of logical volume \"phq_mail\"
    Creating volume group backup \"/etc/lvm/backup/vg0\" (seqno 7).
  Logical volume \"phq_mail\" created</pre>
	<p>Remember you can view all your logical volumes using <tt>lvdisplay</tt></p>
	<p><strong>2) Creating a network segment to separate the servers from the rest of the network</strong> (the clients will use routing through the host to access the server).</p>
	<pre>$ vim ~/pofhq-servers.xml
	
&lt;network&gt;
  &lt;name&gt;default&lt;/name&gt;
  &lt;uuid&gt;e81218cf-6d5a-4a6f-8af8-b2d5b77947be&lt;/uuid&gt;
  &lt;bridge name=\"virbr%d\" /&gt;
  &lt;forward/&gt;
  &lt;ip address=\"192.168.25.1\" netmask=\"255.255.255.0\"&gt;
    &lt;dhcp&gt;
      &lt;range start=\"192.168.25.2\" end=\"192.168.25.30\" /&gt;
    &lt;/dhcp&gt;
  &lt;/ip&gt;
&lt;/network&gt;
	
$ virsh net-define pofhq-servers.xml
Network pofhq-servers defined from pofhq-servers.xml
	
$ virsh net-create pofhq-servers.xml
Network pofhq-servers created from pofhq-servers.xml
	
$ virsh net-autostart pofhq-servers
Network pofhq-servers marked as autostarted
	
$ rm ~/pofhq-servers.xml</pre>
	<p>This will create the file pofhq-servers.xml into <tt>/etc/libvirt/qemu/networks</tt> and link it to autostart folder.</p>
	<p>Optionally, if you don&#8217;t want to use the &#8216;default&#8217; network segment, you can delete it:</p>
	<pre>$ virsh net-undefine default
$ virsh net-destroy default</pre>
	<p>This will automatically delete de default-network.xml file (and autostart symlink if present) on <tt>/etc/libvirt/qemu/networks</tt>.</p>
	<p><strong>3) Installing the guest operating system using virtio for best virtual machine network and disk performance</strong></p>
	<p>We will start by letting <em>virt-install</em> create the default VM template for us:</p>
	<pre>$ sudo virt-install -n phq_mail -r 1024 -f /dev/vg0/phq_mail -c ubuntu-server.iso --accelerate --vnc --noautoconsole -v
Starting install...
Creating domain...                                                 0 B 00:00
Domain installation still in progress.  You can reconnect to
the console to complete the installation process.</pre>
	<p>Right after this, we will stop the VM and edit it&#8217;s configuration manually:</p>
	<pre>$ virsh shutdown phq_mail
$ virsh dumpxml phq_mail &gt; phq_mail.xml
$ virsh undefine phq_mail
$ virsh destroy phq_mail
$ vim phq_mail.xml</pre>
	<p>Make the following modifications:</p>
	<ul>
	<li>Boot from CD:</li>
	</ul>
	<pre>  &lt;os&gt;
    &lt;type&gt;hvm&lt;/type&gt;
    &lt;boot dev='cdrom'/&gt;
  &lt;/os&gt;
	
    &lt;disk type='file' device='cdrom'&gt;
      &lt;source file='/home/pau/ubuntu-8.10-server-i386.iso'/&gt;
      &lt;target dev='hdc' bus='ide'/&gt;
      &lt;readonly/&gt;
    &lt;/disk&gt;</pre>
	<ul>
	<li>Use virtio for the hard disk:</li>
	</ul>
	<pre>    &lt;disk type='block' device='disk'&gt;
      &lt;source dev='/dev/vg0/phq_mail'/&gt;
      &lt;target dev='vda' bus='virtio'/&gt;
    &lt;/disk&gt;</pre>
	<ul>
	<li>Use virtio for the network:</li>
	</ul>
	<pre>    &lt;interface type='network'&gt;
      &lt;mac address='00:16:36:7a:7b:7c'/&gt;
      &lt;source network='pofhq-servers'/&gt;
      &lt;model type='virtio'/&gt;
    &lt;/interface&gt;</pre>
	<p>Save the file, and create again the virtual machine with the new config:</p>
	<pre>$ virsh define phq_mail.xml
Connecting to uri: qemu:///system
Domain phq_mail defined from phq_mail.xml
	
$ virsh create phq_mail.xml
Connecting to uri: qemu:///system
Domain phq_mail created from phq_mail.xml
	
$ virsh autostart phq_mail
Connecting to uri: qemu:///system
Domain phq_mail marked as autostarted</pre>
	<p>Install normally, and then change the boot option to &#8216;hd&#8217; to boot from normal hard disk again when installation has been finished (if needed, use shutdown/undefine/destroy and define/create/autostart again after finishing the installation).</p>
	<p><strong>4) If the guest VM you have installed is Ubuntu</strong>, remember to install <code>acpid</code>, for the VM to shutdown cleanly.</p>
	<p><strong>5) Useful documentation:</strong></p>
	<ul>
	<li><a href="http://wiki.libvirt.org/page/Virtio">http://wiki.libvirt.org/page/Virtio</a></li>
	<li><a href="http://wiki.libvirt.org/page/Tips">http://wiki.libvirt.org/page/Tips</a></li>
	<li><a href="https://help.ubuntu.com/8.10/serverguide/C/libvirt.html">https://help.ubuntu.com/8.10/serverguide/C/libvirt.html</a></li>
	<li> <a href="http://ubuntuforums.org/showthread.php?t=1026006">http://ubuntuforums.org/showthread.php?t=1026006</a></li>
	</ul>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2009/03/03/random-notes-on-setting-up-kvm-libvirt-virtio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nbimg: HTC splash screen tool</title>
		<link>http://pof.eslack.org/blog/2008/07/03/nbimg-htc-splash-screen-tool/</link>
		<comments>http://pof.eslack.org/blog/2008/07/03/nbimg-htc-splash-screen-tool/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 08:39:03 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[HTC]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/blog/2008/07/03/nbimg-htc-splash-screen-tool/</guid>
		<description><![CDATA[nbimg is a command line tool which allows to convert HTC Splash Screen images from NB to BMP and create NB splash screens from BMP format. Any splash screen size is supported (yes, it works for Diamond or Athena at 640&#215;480 resolution too). === nbimg v1.1 === Convert NB &#60;--&#62; BMP splash screens === (c)2008 [...]]]></description>
			<content:encoded><![CDATA[	<p>nbimg is a command line tool which allows to convert HTC Splash Screen images from NB to BMP and create NB splash screens from BMP format. Any splash screen size is supported (yes, it works for Diamond or Athena at 640&#215;480 resolution too).</p>
	<pre>=== nbimg v1.1
=== Convert NB &lt;--&gt; BMP splash screens
=== (c)2008 Pau Oliva - pof @ xda-developers
	
Usage: nbimg -F file.[nb|bmp]
	
Mandatory arguments:
   -F &lt;filename&gt;    Filename to convert.
                    If the extension is BMP it will be converted to NB.
                    If the extension is NB it will be converted to BMP.
	
Optional arguments:
   -w &lt;width&gt;       Image width in pixels. If not specified will be autodetected.
   -h &lt;height&gt;      Image height in pixels. If not specified will be autodetected.
   -t &lt;pattern&gt;     Manually specify the padding pattern (usually 0 or 255).
   -p &lt;size&gt;        Manually specify the padding size.
   -n               Do not add HTC splash signature to NB file.
   -s               Output smartphone format.
	
NBH arguments:      (only when converting from BMP to NBH)
   -D &lt;model_id&gt;    Generate NBH with specified Model ID (mandatory)
   -S &lt;chunksize&gt;   NBH SignMaxChunkSize (64 or 1024)
   -T &lt;type&gt;        NBH header type, this is typically 0x600 or 0x601</pre>
	<p>Example to convert a NB to BMP:</p>
	<pre>$ ./nbimg.exe -F diamond137.nb
=== nbimg v1.1
=== Convert NB &lt;--&gt; BMP splash screens
=== (c)2008 Pau Oliva - pof @ xda-developers
	
[] File: diamond137.nb
[] Image dimensions: 480x640
[] Encoding: diamond137.nb.bmp
[] Done!</pre>
	<p>Example to convert a BMP to NB:</p>
	<pre>$ ./nbimg.exe -F diamond137.bmp
=== nbimg v1.1
=== Convert NB &lt;--&gt; BMP splash screens
=== (c)2008 Pau Oliva - pof @ xda-developers
	
[] File: diamond137.bmp
[] Encoding: diamond137.bmp.nb
[] Image dimensions: 480x640
[] Done!</pre>
	<h3>Download</h3>
	<p>version 1.1</p>
	<ul>
	<li>Linux version (source code): <a href="http://pof.eslack.org/HTC/nbimg/nbimg-1.1.tar.gz">nbimg-1.1.tar.gz</a></li>
	<li>Windows version: <a href="http://pof.eslack.org/HTC/nbimg/nbimg-1.1win32.zip">nbimg-1.1win32.zip</a></li>
	</ul>
	<p>version 1.0</p>
	<ul>
	<li>Linux version (source code): <a href="http://pof.eslack.org/HTC/nbimg/nbimg-1.0.tar.gz">nbimg-1.0.tar.gz</a></li>
	<li>Windows version: <a href="http://pof.eslack.org/HTC/nbimg/nbimg-1.0win32.zip">nbimg-1.0win32.zip</a></li>
	</ul>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2008/07/03/nbimg-htc-splash-screen-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Netbook Remix on HTC Shift</title>
		<link>http://pof.eslack.org/blog/2008/06/17/ubuntu-netbook-remix-on-htc-shift/</link>
		<comments>http://pof.eslack.org/blog/2008/06/17/ubuntu-netbook-remix-on-htc-shift/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 02:44:18 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/blog/2008/06/17/ubuntu-netbook-remix-on-htc-shift/</guid>
		<description><![CDATA[kornel has requested to post some instructions on installing ubuntu netbook remix on HTC Shift. First, for those who still don&#8217;t know what UNR is, a picture is worth 1000 words: Here are the instructions: 1) Go to System -> Administration -> Software Sources. Click on Third Party software. Click Add&#8230;, and add the following: [...]]]></description>
			<content:encoded><![CDATA[	<p>kornel has <a href="http://pof.eslack.org/blog/2008/04/14/linux-on-htc-shift/#comment-154770">requested</a> to post some instructions on installing <a href="https://launchpad.net/netbook-remix">ubuntu netbook remix</a> on HTC Shift.</p>
	<p>First, for those who still don&#8217;t know what UNR is, a picture is worth 1000 words:</p>
	<table border="0" cellpadding="3">
<tr>
<td>
<a href="http://pof.eslack.org/photos/albums/HTC_Shift_Ubuntu/shift-netbook-remix-01.png"><img src="http://pof.eslack.org/photos/thumb/albums/HTC_Shift_Ubuntu/shift-netbook-remix-01.png" alt="ume-launcher on HTC Shift 1" /></a>
</td>
	<td>
<a href="http://pof.eslack.org/photos/albums/HTC_Shift_Ubuntu/shift-netbook-remix-02.png"><img src="http://pof.eslack.org/photos/thumb/albums/HTC_Shift_Ubuntu/shift-netbook-remix-02.png" alt="ume-launcher on HTC Shift 2" /></a>
</td>
</tr>
	</table>
	<p>Here are the instructions:</p>
	<p>1) Go to System -> Administration -> Software Sources. Click on Third Party software. Click Add&#8230;, and add the following:</p>
	<pre>
deb http://ppa.launchpad.net/netbook-remix-team/ubuntu hardy main
deb-src http://ppa.launchpad.net/netbook-remix-team/ubuntu hardy main
</pre>
	<p>Then Click Close and Click Reload.</p>
	<p>Advanced users can just add the above lines to their <code>/etc/apt/sources.list</code> (and run sudo apt-get update afterwards). </p>
	<p>2) Install all netbook remix packages:</p>
	<pre>$ sudo apt-get install go-home-applet window-picker-applet maximus human-netbook-theme ume-launcher</pre>
&#8216;</p>
	<p>3) Once installed, you&#8217;ll need to add <em>maximus</em> to autostart for your session. You&#8217;ll also need to setup the gnome-panel to look like the screenshots, basically:</p>
	<ul>
	<li>Delete bottom panel</li>
	<li>Setup top panel like: GoHomeApplet|WindowPickerApplet|NotificationArea|MixerApplet|Clock</li>
	</ul>
	<p>UPDATE: This has been fixed in current ume-launcher version.</p>
	<p><del>You&#8217;ll notice that the icons are very small by default, this is because UNR doesn&#8217;t support resolutions below 1024&#215;600. I have done a patch to ume-launcher which increases the icon size, available in <a href="https://bugs.launchpad.net/netbook-remix-launcher/+bug/237373">launchpad bug #237373</a>.</del></p>
	<p><del>So, if you prefer bigger icons, just download my patched <a href="http://pof.eslack.org/HTC/shift/ume-launcher/ume-launcher_0.3ubuntu3_i386.deb">ume-launcher_0.3ubuntu3_i386.deb</a>, and install it.</del>
</p>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2008/06/17/ubuntu-netbook-remix-on-htc-shift/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>HTCFlasher: Open Source ROM Update Utility (RUU) for HTC devices</title>
		<link>http://pof.eslack.org/blog/2008/06/14/htcflasher-open-source-rom-update-utility-ruu-for-htc-devices/</link>
		<comments>http://pof.eslack.org/blog/2008/06/14/htcflasher-open-source-rom-update-utility-ruu-for-htc-devices/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 10:28:24 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/blog/2008/06/14/htcflasher-open-source-rom-update-utility-ruu-for-htc-devices/</guid>
		<description><![CDATA[I have just released HTCFlasher version 3, get it while it&#8217;s hot!! HTCFlasher -formerly known as HERMflasher- is an open source tool which allows you to flash ROMs on most current HTC devices. It has some extra features that the original HTC RUU doesn&#8217;t have, like for example it can present a serial prompt to [...]]]></description>
			<content:encoded><![CDATA[	<p>I have just released HTCFlasher version 3, get it while it&#8217;s hot!! <img src='http://pof.eslack.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
	<p>HTCFlasher -formerly known as <a href="http://forum.xda-developers.com/showthread.php?t=296436">HERMflasher</a>- is an open source tool which allows you to flash ROMs on most current HTC devices. It has some extra features that the original HTC RUU doesn&#8217;t have, like for example it can present a serial prompt to the bootloader (replacing mtty), or it can dump NBH file contents (.nb ROM parts).</p>
	<p>Currently most new HTC devices are supported, and the basic set of functions to work with every HTC bootloader has been implemented, so adding support for new bootloader versions or new devices should be quite easy to do, if not working out of the box.</p>
	<p>For an incomplete list, see <a href="http://code.google.com/p/htc-flasher/wiki/SupportedDevices">SupportedDevices</a>.</p>
	<p><strong>Supported Operating Systems</strong></p>
	<ul>
	<li>GNU/Linux x86 and x86_64</li>
	<li>Win32/Cygwin (except Vista)</li>
	<li>Mac OS X (intel based)</li>
	</ul>
	<p><strong>Features</strong></p>
	<ul>
	<li>Flash NBH files: replaces the Windows Rom Upgrade Utility (RUU)</li>
	<li>Extract NBH files: replaces windows tools like nbhextract</li>
	<li>Serial prompt: replaces mtty / minicom</li>
	<li>Easy to use Gtk GUI</li>
	</ul>
	<p><strong>Screenshots</strong></p>
	<p>Main Window<br />
<img src="http://pof.eslack.org/HTC/HTCFlasher/Screenshot-HTCFlasher-1.png" alt="HTCFlasher main window" /></p>
	<p>Flash NBH file<br />
<img src="http://pof.eslack.org/HTC/HTCFlasher/Screenshot-HTCFlasher.png" alt="HTCFlasher flash NBH file" /></p>
	<p>For more information:</p>
	<ul>
	<li><a href="http://htc-flasher.googlecode.com/">HTCFlasher Project Page</a></li>
	<li><a href="http://code.google.com/p/htc-flasher/wiki/HomePage">HTCFlasher WIKI</a></li>
	<li><a href="http://code.google.com/p/htc-flasher/downloads/list">Download</a></li>
	</ul>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2008/06/14/htcflasher-open-source-rom-update-utility-ruu-for-htc-devices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>shiftbuttons: HTC Shift Hardware Buttons control</title>
		<link>http://pof.eslack.org/blog/2008/06/11/shiftbuttons-htc-shift-hardware-buttons-control/</link>
		<comments>http://pof.eslack.org/blog/2008/06/11/shiftbuttons-htc-shift-hardware-buttons-control/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 01:05:00 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/blog/2008/06/11/shiftbuttons-htc-shift-hardware-buttons-control/</guid>
		<description><![CDATA[shiftbuttons is a program that monitors the two right side hardware buttons on HTC shift, and launches any desired program when a button is pressed. Typical usage is to start it as daemon (-d option) when you start your X session, and map each button to the desired function. For example, you can go into [...]]]></description>
			<content:encoded><![CDATA[	<p>shiftbuttons is a program that monitors the two right side hardware buttons on HTC shift, and launches any desired program when a button is pressed.</p>
	<p>Typical usage is to start it as daemon (-d option) when you start your X session, and map each button to the desired function. For example, you can go into Gnome menu System -> Settings -> Sessions. There you find a tab named &#8216;Startup Programs&#8217;, and add the following:</p>
	<pre>
    shiftbuttons -d -c \"gksudo /usr/bin/hsect2\" -r htcshift-rotate
</pre>
	<p>This will launch hsect2 when you press the CommManager button, and will rotate the screen when you press the switch resolution button.</p>
	<p>System wide configuration can be changed at <code>/etc/xdg/autostart/shiftbuttons.desktop</code>.</p>
	<p>htcshift-rotate is also included in the tarball and the debian package.</p>
	<h3>Download</h3>
	<p><strong>Source code</strong>: <a href="http://pof.eslack.org/HTC/shift/shiftbuttons/shiftbuttons-1.0.tar.gz">shiftbuttons-1.0.tar.gz</a><br />
<strong>Ubuntu / Debian package</strong>: <a href="http://pof.eslack.org/HTC/shift/shiftbuttons/shiftbuttons_1.0-1_i386.deb">shiftbuttons_1.0-1_i386.deb</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2008/06/11/shiftbuttons-htc-shift-hardware-buttons-control/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>gsensor-joy: HTC Shift G-Sensor Joystick Linux kernel module</title>
		<link>http://pof.eslack.org/blog/2008/06/05/gsensor-joy-htc-shift-g-sensor-joystick-linux-kernel-module/</link>
		<comments>http://pof.eslack.org/blog/2008/06/05/gsensor-joy-htc-shift-g-sensor-joystick-linux-kernel-module/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 20:18:43 +0000</pubDate>
		<dc:creator>pof</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://pof.eslack.org/blog/2008/06/05/gsensor-joy-htc-shift-g-sensor-joystick-linux-kernel-module/</guid>
		<description><![CDATA[I have found some free time (long night) to implement a kernel module which converts the axis reported by the HTC Shift G-Sensor accelerometer (see previous post!) into a Joystick input event device. Download gsensor-joy-1.1.tar.gz Install Instructions Download the tarball, extract it to some temporary directory, compile and install it: # make # make install [...]]]></description>
			<content:encoded><![CDATA[	<p>I have found some free time (long night) to implement a kernel module which converts the axis reported by the HTC Shift <a href="http://pof.eslack.org/blog/2008/06/03/i2c-gsensor-lis3lv02dl-accelerometer-on-htc-shift-g-sensor/">G-Sensor accelerometer (see previous post!)</a> into a Joystick input event device.</p>
	<h3>Download</h3>
	<p><a href="http://pof.eslack.org/HTC/shift/gsensor/gsensor-joy-1.1.tar.gz">gsensor-joy-1.1.tar.gz</a></p>
	<h3>Install Instructions</h3>
	<p>Download the tarball, extract it to some temporary directory, compile and install it:</p>
	<pre>
   # make
   # make install
</pre>
	<p>Load the needed modules:</p>
	<pre>
   #modprobe i2c_i801
   #modprobe i2c_dev
   #modprobe gsensor-joy
   #modprobe joydev
</pre>
	<p>If you want that automatically loaded every boot, you can also add them to <code>/etc/modules</code>.</p>
	<p>For X.org configuration see the README file included in the tarball.</p>
	<p>Here&#8217;s a demo video playing TuxRacer&#8230;</p>
	<p><span id="more-1410"></span></p>
	<h3>Demo Video</h3>
	<p><object width="425" height="349"><br />
<param name="movie" value="http://www.youtube.com/v/6m4mzFPdtUA&#038;hl=en&#038;color1=0xe1600f&#038;color2=0xfebd01&#038;border=1"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/6m4mzFPdtUA&#038;hl=en&#038;color1=0xe1600f&#038;color2=0xfebd01&#038;border=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="349"></embed></object>
</p>
]]></content:encoded>
			<wfw:commentRss>http://pof.eslack.org/blog/2008/06/05/gsensor-joy-htc-shift-g-sensor-joystick-linux-kernel-module/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.842 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-01-07 12:20:16 -->
