Saturday, December 31, 2011

Disable writing when not mounted

copied from http://wiki.openwrt.org/doc/howto/usb.storage

You may create an empty file to indicate that the disk is not plugged in so that you don't put files directly onto NAND by doing

touch /mnt/usbstorage/USB_DISK_NOT_PRESENT
chmod 444 /mnt/usbstorage -R

Tuesday, December 27, 2011

gentoo guest using virtio

kernel config


CONFIG_NET_9P_VIRTIO=m
CONFIG_VIRTIO_BLK=m
CONFIG_VIRTIO_NET=m
CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_VIRTIO=y
CONFIG_VIRTIO_RING=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=m

Virtualization ---> 
  Host kernel accelerator for virtio net (EXPERIMENTAL)
<*>   PCI driver for virtio devices (EXPERIMENTAL)
  Virtio balloon driver (EXPERIMENTAL)

Networking Support --->   Plan 9 Resource Sharing Support (9P2000)  ---> 
  9P Virtio Transport

Device Drivers  --->  [*] Block devices  ---> 
  Virtio block driver (EXPERIMENTAL)

Device Drivers  --->  [*] Network device support  --->
  Virtio network driver (EXPERIMENTAL)

Device Drivers  --->  Character devices  --->
<*> Virtio console
  VirtIO Random Number Generator support

Monday, December 26, 2011

Fedora 16 Virtualizaton setup

yum -y install qemu-kvm libvirt python-virtinst bridge-utils
cat /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=dhcp
STP=on
DELAY=0
NM_CONTROLLED=no


cat /etc/sysconfig/network-scripts/ifcfg-em1
DEVICE=em1
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
BRIDGE=br0
TYPE=Ethernet
NM_CONTROLLED=no

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

chkconfig network on
service network start

reboot

Sunday, April 03, 2011

How to check files ignored in git

git ls-files --ignored --others --exclude-standard

Sunday, March 27, 2011

TP-Link 1043ND with OpenWRT

By default,  wifi was not enabled by the firmware.  Use the following command to enable

ssh -l root 192.168.1.1
inside router

opkg update
opkg install hostapd wpa-supplicant kmod-ath9k

Now you can go to the luci menu > Essentials > Network > wifi to enable and provide password

To enable DDNS

opkg luci-app-ddns


configure it luci menu > Essentials > Dynamic DNS

Saturday, March 05, 2011

run Adobe Photoshop Elements 6 with MacOSX case sensitive filesystem

1. Install to case insensitive OS first and activate it to run
2. create dmg formatted and mounted as case insensitive. Copy files installed to /Applications of the mounted dmg
3. copy files under /Library/Application Support, /Library/Preferences and /Applications/Utilities to target case sensitive OS
4. transfer the dmg created in step 2 above to target OS and mounted there. Run the application from the mounted dmg which will fail
5. download Adobe license fixing dmg from Adobe and run to fix the application in step 4