Wireless connection: only local, no internet

July 24th, 2010

I installed the KPN experiabox twice, and got the same problem twice: only local connection when connected by a notebook (wireless). Passwords/encryption were set right. Now, the solution is pretty simple; Update the driver to the lastest one.

Windows 7 likes to set another driver for devices, like my SMC EzConnect (SMCWPCI-G2) card. Artheos 5005gs driver was set; when you try to update the driver for this device with the latest driver downloaded from SMC website it says something like: “Best driver already installed”; in this case you need to force Windows 7 to use the SMC driver, by selecting the driver from the list when updating the driver. Then you get a few warnings but finally you get the wireless card back to life with internet connection.

SMCWPCI_G2

Auto start bluetooth sync PDA (QTEK G100)

November 15th, 2009

Because of the availability of syncing PDA with PC by Bluethooth, it’s nice to autosync the PDA without first pressing “Connect to bluetooth” in ActiveSync.

1. Download “BlueStart” here
2. Install the cab file on the PDA
3. Open “Bluestart” on the PDA.

4. Run application at discovery: \\windows\\repllog.exe
Application arguments: /auto /c:”yourpcname”

Note:
Make sure the PC Bluetooth COM port is enabled (for example COM 7) in Active Sync and for BlueStarter use the following repllog arguments /auto /c:”yourpcname”.

5. Choose menu and set interval: every x minutes (at turn on doesnt work on the QTEK G100)
Or set at power on: In this case set Run application at discovery to: \\windows\\repllog (without .exe)

Source: http://forum.xda-developers.com/showthread.php?t=466062&page=5

Start external Desktop automatic with windows

November 14th, 2009

1.Turning on Remote Desktop
2.Setting the service called Terminal Services to manual

Disable auto admin login (Windows XP)

November 14th, 2009

1. Open regedit
2. Go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
3. Change autologin to 0

Clonezilla backup/restore solution

August 18th, 2009

Clonezilla is a free backup / restore solution. The data can be saved to locally attached storage, an SSH server, Samba Server or a NFS file share and then restored at a later date. It is very efficient software and it can be used with many different options (Partimage, ntfsclone, partclone and dd) which can be set by the user.

The following filesystems are supported:

ext2, ext3, ext4, reiserfs, xfs, jfs of GNU/Linux, FAT, NTFS of MS Windows, and HFS+ of Mac OS.

LVM2 (LVM version 1 is not) under GNU/Linux is supported.

Clonezilla can be run from either a bootable USB flash drive or CD/DVD.

Click here to visit the Clonezilla website

Backup data using “dd”

August 18th, 2009

The “dd” tool is a very useful tool in Linux, it can be used to backup your entire hard disk or just parts of it. It is important to know that if you backup your full hard drive, the destination drive must have exactly the same, or more disk space than the source drive.

I use it to make a full backup of my servers root partition every week.

Some examples:

This will create a backup of your entire hard disk (hda) and will output a compressed image file.

dd if=/dev/hda | gzip > /path/to/image.gz

Create a backup of partition hda1

dd if=/dev/hda1 | gzip > /path/to/image.gz

This will restore the image to “/dev/hda”

dd if=/path/to/image.gz of=/dev/hda

Backup the Master Boot Record

dd if=/dev/hda of=/path/to/image count=1 bs=512

Restore Master Boot Record

dd if=/path/to/image of=/dev/hda count=1 bs=446

Enable .htaccess in Apache webserver

August 18th, 2009

Modify the Apache config file for the virtual machine.
Add the following line to a virtual machine: AllowOveride All

<VirtualHost 10.0.0.153:80>
DocumentRoot "/var/www/website"
ServerName website.com
<Directory "/var/www/website"
allow from all
Options +Indexes
AllowOverride All
</Directory>
</VirtualHost>

Hard disk hangs during bootup Windows XP

August 18th, 2009

While booting Windows XP , the boot process hangs on this screen:

windows-xp-boot

XP hangs during bootup

The hard disk led on the front of the PC was burning continuously.
Though, I could access Windows through Safe Mode.

The solution

I connected another hard disk to the machine and booted Ghost 11. Then I copied the partitions to the new hard drive and everything worked fine again, please note that the new hard drive must be equivalent or bigger in size than the source drive.

Sendmail Error – DSN: Data format error

August 17th, 2009

In my server I run sendmail as mailserver, and I experienced that mail that was sent via PHP didn’t reached it’s target. I got error messages like:

Aug 17 21:40:26 thuis sendmail[7952]: n7HJeQcB007952: to=xx@xx.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30500, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n7HJeQTA007953 Message accepted for delivery)
Aug 17 21:40:27 thuis sendmail[7951]: n7HJePuh007949: to=, ctladdr= (48/48), delay=00:00:02, xdelay=00:00:01, mailer=esmtp, pri=120583, relay=mx3.xs4all.nl. [194.109.24.134], dsn=5.6.0, stat=Data format error
Aug 17 21:40:27 thuis sendmail[7951]: n7HJePuh007949: n7HJeRuh007951: DSN: Data format error

The solution

Just modify the php configuration file (located at /etc/php.ini) and modify the “sendmail_path” option

sendmail_path = /usr/sbin/sendmail -t -i -f admin@yourdomain.com

Extend a LVM partition

August 17th, 2009

I have a server installed with Linux distribution Centos 4, I recently replaced the main harddrive and because the new drive was quite bigger (160gb vs 80gb), and I did not want to do a fresh install, it was needed to extend the root (/) partition. I used “Clonezilla” to backup and restore the data from the disk. After restore on the new disk I had about 74 GB of unused diskspace, so I wanted to merge it with the root partition.

Because the partition is LVM, and it is not readable by most partition/GUI tools (like gparted), it has to be done in another way.

Note. Fedora comes with a GUI LVM tool (system-config-lvm) , we do it via console.

  1. Put the Linux Rescue cd-rom in the cd-rom drive and boot.
  2. Open a terminal and type: pvdisplay

It will show something like this:

 --- Physical volume ---
  PV Name               /dev/hda1
  VG Name               VolGroup00
  PV Size               1.44 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              46
  Free PE               1
  Allocated PE          45
  PV UUID               auQ2kD-GuHQ-6feE-nSr9-cA0A-dGbD-CrHZhg

 Here you can see the details (size etc.) of the Physical volume, now we need to add space to this volume (VolGroup00)

3. Open “gparted” and create a new partition from the unallocated space (ext3 recommended)
Notice the name of the new parition (i.e hda2)

4.  Open the terminal and type: pvcreate /dev/hda2

[root@localhost ~]# pvcreate /dev/hda2
  Physical volume "/dev/hdb" successfully created

5.  Type pvdisplay

[root@localhost ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/hda1
  VG Name               VolGroup00
  PV Size               1.44 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              46
  Free PE               1
  Allocated PE          45
  PV UUID               auQ2kD-GuHQ-6feE-nSr9-cA0A-dGbD-CrHZhg
 
  --- Physical volume ---
  PV Name               /dev/hda2
  VG Name               VolGroup00
  PV Size               3.97 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              127
  Free PE               127
  Allocated PE          0
  PV UUID               6TvkYu-sY2K-tIsj-aXZh-KLPb-81Ox-oPIFyO

Now we need to merge the newly created partition into one volume group.

6. Extend the current volume group with the new partition:

[root@localhost ~]# vgextend VolGroup00 /dev/hda2
  Volume group "VolGroup00" successfully extended

7. Remember the space of the new partition, so we can add this to the current Volume Group (/dev/hda1)

[root@localhost ~]#  lvextend -L+3.97G /dev/VolGroup00/LogVol00
 
Rounding up size to full physical extent 5.31 GB
Extending logical volume LogVol00 to 5.31 GB
  Logical volume LogVol00 successfully resized

8. Bootup Linux and resize the volume to the actual size

[root@localhost ~]# ext2online /dev/VolGroup00/LogVol00

You can check the new size with “df”