vmbuilder, virtio and fstab

nic@vm-base:~$ sudo blkid /dev/vda2
/dev/vda2: UUID=”0c75b2dd-6c6f-4729-b041-0d95475dc171″ TYPE=”swap”

If you install a vm with vmbuilder without virtio the swap section of /etc/fstab will use /dev/sda2 instead of /dev/vda2. You can use blkid

nic@vm-base:~$ sudo blkid
/dev/vda1: UUID="bac299c4-c545-46ca-aed3-26da4a56f6d7" TYPE="ext3"
/dev/vda2: TYPE="swap" UUID="0c75b2dd-6c6f-4729-b041-0d95475dc171"
/dev/vdb: UUID="jIkLcQ-zXUo-KIWR-zvmm-cpKP-9PpT-eE9RY3" TYPE="lvm2pv"
and then add this UUID to fstab:
nic@vm-base:~$ cat /etc/fstab
# /etc/fstab: static file system information.
# <file system>                                 <mount point>   <type>  <options>       <dump>  <pass>
proc                                            /proc           proc    defaults        0       0
/dev/sda1                                       /               ext3    defaults        0       0
UUID="0c75b2dd-6c6f-4729-b041-0d95475dc171"     swap            swap    defaults        0       0

in order to get swap working with different driver types.

Comments off

Edit zip file in vim

Clever tip for using vim on zipped files. ie Openxml or ODF.

Comments off

From Professional VMware blog, here is another method to fix your lost Ethernet device on Ubuntu.

Another method of doing this, is to edit the ‘persistent-net-generator.rules’ file to include something similar to:

# ignore VMware virtual interfaces
ATTR{address}==”00:0c:29:*”, GOTO=”persistent_net_generator_end”

Comments off

Disappearing Windows

Often when using multiple screens with a laptop then traveling away with just the single laptop screen applications my remember the second screen and disappear when windowed. Often you can “get them back” by maximizing the window.

A better method is to:

There’s a simple trick to get around this. First make sure you’ve alt-tabbed to the window, or clicked on it once to bring it into focus. Then right-click on the taskbar and choose Move

At this point, you should notice that your cursor changes to the “Move” cursor, but you still can’t move anything.

Just hit any one of the arrow keys (Left, Right, Down, Up), move your mouse, and the window should magically “pop” back onto the screen.

Note: For keyboard savvy people, you can just alt-tab to the window, use Alt+Space, then M, then Arrow key, and then move your mouse.

Comments (4)