Tuesday, October 1, 2013

Printing mirror imaging in Windows

To resolve the issue, turn off mirror imaging in Printer Preferences. To do this, use the following steps:

1.    Click Start and then Control Panel.

2.    If your computer is in category view, click Printers and Other Hardware, and then click Printers and Faxes. If your computer is in classic view, click Printers and Faxes.

3.    Right-click the HP product from the list of printers, and then select Properties. The Properties dialog box displays.

4.    From the General tab, click Printing Preferences. The Printing Preferences dialog box displays.

5.    Click the Advanced tab.

6.    Under Printer Features, click Mirror Image, click the down arrow ( ) to the right of the field, and then click Off.

7.    Click OK to apply the change

Tuesday, September 24, 2013

How to change Windows 7 product key with command line?

This method works with Windows Vist, Windows 7 and Windows 8



  1. Click on the Start Button and type: CMD (into the 'Search programs and files' field in the Start Menu)


  1. The Start Menu will show 'CMD.exe', 


  1. Right-click the CMD.exe file and select Run As Administrator.
























  1. In the CMD window, type: slmgr.vbs -ipk <type your product key here>


















  1. To activate windows after changing the key, type: slmgr.vbs -ato





How to change Windows XP Product Key

  1. Click on Start and then Run.





  2. In the text box in the Run window, type regedit and click OK. This will open the Registry Editor program.







  3. Locate the HKEY_LOCAL_MACHINE folder under My Computer and click on the (+) sign next the folder name to expand the folder.










  4. Continue to expand folders until you reach the HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents registry key.
  5. Click on the WPAEvents folder.
  6. In the results that appear in the window on the right, locate OOBETimer.







  7. Right-click on the OOBETimer entry and choose Modify from the resulting menu.







  8. Change at least one digit in the Value data text box and click OK. This will deactivate Windows XP.
    Feel free to close Registry Editor at this point.

  9. Click on Start and then Run.

  10. In the text box in the Run window, type the following command and click OK.
    %systemroot%\system32\oobe\msoobe.exe /a








  11. When the Let's activate Windows window appears, choose Yes, I want to telephone a customer service representative to activate Windows and then click Next.











  12. Click the Change Product Key button at the bottom of the window.
    Don't worry about filling anything out on this screen.












  13. Type your new, valid Windows XP product key in the New key: text boxes and then click the Update button.












  14. You should now reactivate Windows XP by following the instructions on the Activate Windows by phone window which you should now be seeing or via the Internet by clicking the Back button and following the instructions on that screen.
    If you'd rather postpone activating Windows XP until a later date, you can click the Remind me later button.
  15. After activating Windows XP, you can verify that activation was successful by repeating steps 9 and 10 above.
    The Windows Product Activation window that appears should say "Windows is already activated. Click OK to exit."

Monday, September 16, 2013

454 4.7.0 TLS not available due to local problem

In /var/log/syslog, I found following error messages

Sep 16 15:16:22 main2 postfix/smtpd[24908]: warning: TLS library problem: 24908:error:0906406D:PEM routines:PEM_def_callback:problems getting password:pem_lib.c:105:
Sep 16 15:16:22 main2 postfix/smtpd[24908]: warning: TLS library problem: 24908:error:0906A068:PEM routines:PEM_do_header:bad password read:pem_lib.c:403:
Sep 16 15:16:22 main2 postfix/smtpd[24908]: warning: TLS library problem: 24908:error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib:ssl_rsa.c:669:
Sep 16 15:28:55 main2 postfix/smtpd[26361]: warning: TLS library problem: 26361:error:0906406D:PEM routines:PEM_def_callback:problems getting password:pem_lib.c:105:
Sep 16 15:28:55 main2 postfix/smtpd[26361]: warning: TLS library problem: 26361:error:0906A068:PEM routines:PEM_do_header:bad password read:pem_lib.c:403:
Sep 16 15:28:55 main2 postfix/smtpd[26361]: warning: TLS library problem: 26361:error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib:ssl_rsa.c:669:



Then, i use following solution and it worked for me,


To create a new ssl cert for postfix, run these commands:


cd /etc/postfix/ssl/

openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
(Create your pass phrase)

chmod 600 smtpd.key

openssl req -new -key smtpd.key -out smtpd.csr

openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt

openssl rsa -in smtpd.key -out smtpd.key.unencrypted

mv -f smtpd.key.unencrypted smtpd.key

openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650




Thursday, August 1, 2013

Install Rocketraid 2720 raid card driver in Ubuntu server

Install Rocketraid 2720 raid card driver in Ubuntu server

1.       Download Rocketraid 2720 raid card driver
#cd ~


2.       create a temporary folder
root@BACKUP-HOST:~#mkdir -p /tmp/df


3.       Extract the driver package to the /tmp/df folder
root@BACKUP-HOST:~# tar xvf RR272x_1x-Linux-Src-v1.5-130325-0732.tar.gz -C /tmp/df



4.       Install/update driver
root@BACKUP-HOST:~#cd /temp/df
root@BACKUP-HOST:/tmp/df# cd rr272x_1x-linux-src-v1.5/product/rr272x/linux/
root@BACKUP-HOST:/tmp/df/rr272x_1x-linux-src-v1.5/product/rr272x/linux#make install
root@BACKUP-HOST:/tmp/df/rr272x_1x-linux-src-v1.5/product/rr272x/linux#modprobe rr272x_1x

5.       Update fstab, add the following line in fstab

/dev/dm-0       /backup         ext4    errors=remount-ro       0       0


Reboot the server

Wednesday, May 22, 2013

Can't Search in Google Drive Folder in Windows 7


Problem:

I am trying to search files in Google Drive Folder in Windows 7 with Windows File Explorer, there is no search result returns.




Solution:

1. In Windows 7, open your Windows File Explorer


2. Select your Google Drive Folder


3. Click on "Organize" drop down menu (It located at the left top corner in Windows File Explorer)


4. Select "Folder and search options"


5. In the new pop windows, click on "Search" tab


6. Then, put a check mark on "Don't use the index when searching in files folders for system files (searches  
might take longer)"


7. Click "OK" button to finish and try again

Friday, May 17, 2013

Setting up a KVM virtual machine in LVM (Logical Volume)



1. Install Ubuntu Server 12.04 64bit (Total Hard Disk Size = 200GB and 4GB RAM)
Hostname: U-HOST
Partitioning method: Manual
Create #1 primary 30.0GB f ext4 /
Create #2 primary 8.0GB f swap swap
Create #3 primary 176.7GB k lvm
Choose software to install: [*] OpenSSH server
Install the GRUB boot loader to the master boot record? <Yes>



2. After the base server installed, do the update
root@U-HOST:/iso#apt-get update
root@U-HOST:/iso#apt-get dist-upgrade



3. Install packages
root@U-HOST:/iso#apt-get install ubuntu-virt-server python-vm-builder kvm-ipxe



4. Add the current user to the group libvirtd
root@U-HOST:/iso#adduser 'root' libvirtd
root@U-HOST:/iso#adduser 'root' kvm

To check if KVM has successfully been installed, run
root@U-HOST:/iso#virsh -c qemu:///system list

it should display something like this:

root@U-HOST:~# virsh -c qemu:///system list
Id Name State
----------------------------------



5. Install bridge-utils... (In Ubuntu 12.04, this is package is already installed)
root@U-HOST:/iso#apt-get install bridge-utils




6. configure a bridge,
root@U-HOST:/iso#nano /etc/network/interfaces
Before the modification, it file is looks as follows:

# This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).

 # The loopback network interface
 auto lo
 iface lo inet loopback

 # The primary network interface
 auto eth0
 iface eth0 inet dhcp



After modification, it will looks as follows,

# This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).

 # The loopback network interface
 auto lo
 iface lo inet loopback

 # The primary network interface
 auto eth0
 iface eth0 inet manual


 auto br0
 iface br0 inet static
        address 192.168.122.21
        network 192.168.122.0
        netmask 255.255.255.0
        broadcast 192.168.122.255
        gateway 192.168.122.1
        dns-nameservers 8.8.8.8 8.8.4.4
        bridge_ports eth0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off


After the modification of 'interface' file, restart networking service,
root@U-HOST:/iso#/etc/init.d/networking restart


It should now show the network bridge (br0):
root@U-HOST:/iso#ifconfig

it will show following,

br0       Link encap:Ethernet HWaddr 52:54:00:14:81:b7
          inet addr:192.168.122.21 Bcast:192.168.122.255 Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe14:81b7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:152 errors:0 dropped:0 overruns:0 frame:0
          TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12428 (12.4 KB) TX bytes:10608 (10.6 KB)

eth0     Link encap:Ethernet HWaddr 52:54:00:14:81:b7
          inet6 addr: fe80::5054:ff:fe14:81b7/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:157 errors:0 dropped:0 overruns:0 frame:0
         TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:14796 (14.7 KB) TX bytes:10962 (10.9 KB)

lo        Link encap:Local Loopback
         inet addr:127.0.0.1 Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING MTU:16436 Metric:1
         RX packets:16 errors:0 dropped:0 overruns:0 frame:0
         TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:1184 (1.1 KB) TX bytes:1184 (1.1 KB)


Reboot the server now.



7. Create the Physical Volume
#apt-get install lvm2


Check the partitions by run,

#cat /proc/partitions

It should looks like this,

root@U-HOST:~# cat /proc/partitions
major minor #blocks name

253 0 209715200 vda
253 1 29295616 vda1
253 2 7812096 vda2
253 3 172605440 vda3
11 0 1048575 sr0

The 'vda3' is the lvm partition, you can check it by this,
root@U-HOST:/iso#fdisk -l

Disk /dev/vda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders, total 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006e7b2

Device Boot Start End Blocks Id System
/dev/vda1 * 2048 58593279 29295616 83 Linux
/dev/vda2 58593280 74217471 7812096 82 Linux swap / Solaris
/dev/vda3 74217472 419428351 172605440 8e Linux LVM

Create physical volume
root@U-HOST:~# pvcreate /dev/vda3
Physical volume "/dev/vda3" successfully created 
 
Create volume group
root@U-HOST:~# vgcreate vgpool /dev/vda3
Volume group "vgpool" successfully created 
 
”vgpool” can be replace with any name you want


Create logical volume
root@U-HOST:~# lvcreate -L 30G -n win7 vgpool
Logical volume "win7" created 
 
30G is the partition size, win7 is the logical volume name, vgpool is the volume group that created from previous step




8. Now you can install virtual machine from command line

Install virtinst by run,
root@U-HOST:/iso#apt-get install virtinst


I am going to use a Windows 7 ISO file where is located at
/iso/Windows.7.SP1.ENG.x86-x64.MAFIAA.iso


Install the Windows 7 Virtual Machine by running following command,


root@U-HOST:/iso#virt-install --connect qemu:///system --name=win7vm --ram=2048 --disk path=/dev/vgpool/win7 --cdrom=/iso/Windows.7.SP1.ENG.x86-x64.MAFIAA.iso --network bridge=br0,model=virtio --os-type=windows --noautoconsole --graphics vnc,listen=0.0.0.0,port=5901 –hvm

Starting install...
Creating domain... | 0 B 00:01
Domain installation still in progress. Waiting for installation to complete.



9. Install an virtual machine via “Virtual Machine Manager”
You can install “Virtual Machine Manager” from Ubuntu Software Centre on a Ubuntu Desktop Then, connect to

In “Virtual Machine Manager”, go to File -> Add Connection


























Type “yes” in following windows
















 

In Nex Window, type in the user's password


















After enter the password, you will see the “win7vm” in “Virtual Machine Manager”
  


 

Double click the virtual machine “win7vm”, it will show you the virtual machine status,
You can finish the Windows 7 installation by using Virtual Machine Manager