• CEPH isΒ a free and opensource object storage system. This article describes the basic terminology, installation and configuration parameters required to build your own CEPH environment.

    CEPH has been designed to be a distributed storage system which is highly fault tolerant, scalable and configurable. It can run on large number of distributed commodity hardware thus eliminating the need for very large central storage solutions.

    This post aims to be a basic, short and self contained article that explains all the key details to understand and play with CEPH.

    Environment

    I’ve setup CEPH on my laptop with a few LXC containers. My setup has –

    • Host: Ubuntu 16.04 xenial 64-bit OS
    • LXC version: 2.0.6
    • 40G disk partition that is free to use for this experiement.
    • CEPH Release – Jewel

    The Ubuntu site has documentation on LXC configuration here. But this site talks about creating unprivileged containers. However, we’ll need “privileged” containers. Privileged containers are’t considered secure, since processes are mapped to root user on the host. Hence it has been used only for the purpose of experimenting.

    See documentation on LXC site here to understand how to create privileged LXC containers.

    Now, create these containers (as privileged) with names like these –

    • cephadmin
    • cephmon
    • cephosd0
    • cephosd1
    • cephosd2
    • cephradosgw

    Here’s a command to create a container with Ubuntu Xenial 64-bit container. You could choose another distro, in which case some of the instructions might not be applicable. Using the names above run the command to create each container –

    host:~# lxc-create -n <container-name> -t download -- -d ubuntu -r xenial -a amd64

    Though CEPH installations talk about private and public networks. For testing purposes, the ‘lxcbr0’ available from LXC is sufficient to successfully work with CEPH.

    Start the containers and install SSH servers on all of them –

    host:~# lxc-start -n <container-name>
    host:~# lxc-attach -n <container-name>
    container:~# apt-get install openssh-server
    container:~# exit

    Repeat the above commands for all the containers you’ve created. Re-start all the containers. Register the container-names into your /etc/hosts for easily being able to login to them.

    DiskΒ Setup

    On the 40G disk partition you’ve allocated for this exercise performΒ –

    1. Delete the existing partition
    2. Create 3 new partitions
    3. Format each of them with ‘XFS’ filesystem.

    CEPH recommends using XFS / BTRFS / EXT4. I’ve used XFS in my tests. I tried with EXT4 but received warnings related to limited xattr sizes while CEPH was being deployed.

    Note down the device major and minor numbers for the partitions you’ve created from the above steps.

    Make each of the partition you’ve created available to each of the cephosd0, cephosd1 and cephosd2 containers. If the above operation resulted in ‘/dev/sda8’, ‘/dev/sda9’ and ‘/dev/sda10’ devices. Assign each of the device major and minor number to a corresponding cephosd<N> container. To do that, you’ll need to edit the LXC configuration file for each of the cephosd* container by performing the steps –

    • Login to each cephosd<N> node, and run
       container:~# mkdir -p /mnt/xfsdisk
    • Stop your cephosd containers (cephosd0, cephosd1, cephosd2) –
       host:~# lxc-stop -n cephosd<N>
    • On the host create corresponding ‘fstab’ file for each container. You’d assign /dev/sda8 to cephosd0, /dev/sda9 to cephosd1 and so on. The syntax of fstab would have lines like this depending on how many disks / partitions you intend to share –
    /dev/sda<N> <mount-point-in-container> <file-system> <options>

    Example –

    /dev/sda8 mnt/xfsdisk xfs noatime 0 0

    IMPORTANT NOTE

    The <mount-point-in-container> has no preceding forward slash. The preceding slash is not required. Refer this post on askubuntu.comΒ for more details.

    • For each of the cephosd<N> node edit the configuration file
    host:~# cd /var/lib/lxc
    host:~# cd cephosd<N>

    Edit the container configuration file ‘config’. The lines below gives the container permission to access the device inside LXC and mount it to the mount point defined in the fstab file. Add the following lines –

    lxc.cgroup.devices.allow = b <maj>:<min> rwm
    lxc.aa_profile = unconfined
    lxc.mount = /var/lib/lxc/cephosd<N>/fstab

    Now, start/restart the containers. With the above set of steps we complete the creation of containers ready for us to install CEPH.

    CEPH Installation

    Complete the pre-flight steps on the CEPH quick install from here. The steps in pre-flight –

    • Setup the ‘cephadmin’ node with the ceph-deploy package.
    • Installs ‘ntp’ on all the nodes (required where OSD or MON run).
    • Create a common ceph deploy user (password-less ssh sudo access) that will be used for CEPH installation on all nodes.

    After the pre-flight steps are complete check –

    • To ensure the password-less access works from ‘cephadmin’ to all the other nodes on your cluster via the ceph deploy user you have created.
    • The XFS partition created earlier is available on all OSDs under /mnt/xfsdisk.

    Next, you need to complete the CEPH deployment. The steps with all the illustrations are available here. To get a good understanding of each command read the description from the link. Since our experiement has 3Β OSDs and 3 monitorΒ daemons; You could run these commands from the ‘cephadmin’ node using the ceph deploy user created in pre-flightΒ –

    • Create a directory and run the commands below from within it.
    • Designate following nodes as CEPH Monitors
     cephadmin:~$ /usr/bin/ceph-deploy new cephmon cephosd0 cephosd1
    • Install CEPH on all nodes including admin node.
    cephadmin:~$ /usr/bin/ceph-deploy install cephadmin cephmon cephosd0 cephosd1 cephosd2 cephradosgw
    • Add the initial monitors and gather their keys
    cephadmin~:$ /usr/bin/ceph-deploy mon create-initial
    • Prepare the disk on each OSD
    cephadmin~:$ /usr/bin/ceph-deploy osd prepare cephosd0:/mnt/xfsdisk cephosd1:/mnt/xfsdisk cephosd2:/mnt/xfsdisk
    • Activate each OSD
    cephadmin~:$ /usr/bin/ceph-deploy osd activate cephosd0:/mnt/xfsdisk cephosd1:/mnt/xfsdisk cephosd2:/mnt/xfsdisk
    • Run this command to ensure cephadmin can perform administrative activities on all your nodes on the CEPH cluster
    cephadmin~:$ /usr/bin/ceph-deploy admin cephadmin cephmon cephosd0 cephosd1 cephosd2 cephradosgw
    • Check health of cluster (You must see HEALTH_OK) if you’ve performed all the steps correctly.
    cephadmin~:$ ceph health
    • Install and deploy the instance of RADOS gateway
    cephadmin~:$ /usr/bin/ceph-deploy install --rgw cephradosgw
    cephadmin~:$ /usr/bin/ceph-deploy rgw create cephradosgw

    NOTE

    If you haven’t configured the OSD daemons to start automatically via upstart, they won’t after a LXC startup/restart. And running ‘ceph -s’ or ‘ceph -w’ or ‘ceph health’ on admin node shows HEALTH_ERR and degraded cluster since the OSDs are down. In such a case, manually login to each OSD and start the OSD instance with the command sudo systemctl start ceph-osd@<instance>;Β <instance> in our case is 0, 1, or 2.

    With the above steps, the cluster must be up with all the PGs showing ‘active + clean’ status;

    Access data on cluster

    To run these commands you’ll need a subset ceph.conf with monitor node information and admin keyring file. For test purposes you could run it on the cephadmin node under the cluster directory you’ve created in the first step ofΒ CEPH installation section.

    To list all available data pools

    cephadmin~:$ rados lspools

    To create a pool

    cephadmin~:$ rados mkpool <pool-name>

    To insert data in a file into a pool

    cephadmin~:$ rados put {object-name} {file-path} --pool=<pool-name>

    To list all objects in a pool

    cephadmin~:$ rados -p <pool-name> ls

    To get a data object from the pool

    cephadmin~:$ rados get {object-name} {outfile-path} --pool=<pool-name>

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • Symptom:

    You have recently updated packages on your Ubuntu distribution and are seeing a black screen post the Plymouth splash screen. The alternate consoles are not enabled. But the system responds to Ctrl-Alt-Del.

    Cause:

    This could mean that the update of the Xserver packages did not happen correctly. The update removes the following packages

    xserver-xorg-video-ati
    xserver-xorg-video-tdfx
    xserver-xorg-video-trident
    xserver-xorg-video-fbdev
    xserver-xorg-video-mga
    xserver-xorg-video-r128
    xserver-xorg-video-vesa
    xserver-xorg-video-siliconmotion
    xserver-xorg-video-mach64
    xserver-xorg-video-sis
    xserver-xorg-video-s3
    xserver-xorg-video-savage
    xserver-xorg-video-nouveau
    xserver-xorg-video-neomagic
    xserver-xorg-video-sisusb
    xserver-xorg-video-radeon
    xserver-xorg-video-cirrus
    xserver-xorg-video-intel

    Solution:

    This can be corrected by entering recovery mode with networking enabled and typing the following command –

    sudo apt-get -f install

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • I was in the process of configuring my USB 3G broadband modem with my Linux boxes and was interested to
    find out all about Linux’s USB serial interface and drivers etc. So I’ve kind of assimilated all the
    information below along with the links for those of you who want to read them.

    Its fairly simple to configure any (or most) of the USB modems in Linux.
    But you’ll need to know some details about it first. You would need to find out

    – Username (this could be your SIM card’s phone number)
    – Password (this could be your SIM card’s phone number)
    – Phone Number (which number to dial to #777 or *99# something like that)

    NOTE : For Airtel it is *99# and for Reliance it is #777.

    Before you connect you will need to write /etc/wvdial.conf You can read the man
    page of wvdial.conf and write everything by hand or run “sudo wvdialconf” on your
    computer. Linux probes for details of the device and generates wvdial.conf with
    some information. It could look like something below —

    [Dialer Defaults]
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem Type = Analog Modem
    ; Phone = <Target Phone Number>
    ISDN = 0
    ; Username = <Your Login Name>
    Init1 = ATZ
    ; Password = <Your Password>
    Modem = /dev/ttyUSB0
    Baud = 9600

    You will then need to fill up the rest of the details such as (a sample) –

    [Dialer Defaults]
    Modem = /dev/ttyUSB0
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    CBaud = 460800
    Stupid Mode = 1
    Modem Type = Analog Modem
    Phone = *99#
    New PPPD = yes
    ISDN = 0
    Username = <Your Username>
    Password = <Your Password>
    Baud = 9600

    Save and quit the above file and then run “sudo wvdial” with the device plugged
    and you should be online after that.

    Some internal information –

    USB modem (http://en.wikipedia.org/wiki/Modem)

    “USB wireless modem use a USB port on the laptop instead of a PC card or
    ExpressCard slot. Most of the wireless modems come with an integrated SIM
    cardholder (Huawei E220, Sierra 881, etc.) and some models also provided a
    microSD memory slot and/or jack for additional external antenna such as Huawei
    E1762 and Sierra Wireless Compass 885.

    USB modems work in Linux with kernel versions 2.6.20 and greater. Its development
    started in 2.5. This article on Linux Journal explains about USB Serial implementation
    in the linux kernel in detail.

    It needs support for /dev/ttyUSB* devices. See this link in wikipedia for more
    information http://en.wikipedia.org/wiki/Huawei_E220. You can use wvdial
    to connect via this USB modem.

    wvdial (See wikipedia link http://en.wikipedia.org/wiki/Wvdial) is a dial-up
    utility available for Linux OSes.

    wvdial initializes the modem and executes the dial up instructions based on
    what is specified in wvdial.conf (See man wvdial.conf) to find out what to
    write in that file. Or you can plugin the USB modem and run wvdialconf
    (as root or sudo) and that detects and generates the /etc/wvdial.conf file.

    RESOURCES

    http://en.wikipedia.org/wiki/Modem
    https://forum.openwrt.org/viewtopic.php?id=19171
    http://en.wikipedia.org/wiki/Wvdial#cite_note-0
    https://wiki.archlinux.org/index.php/USB_3G_Modem
    http://www.mjmwired.net/kernel/Documentation/usb/usb-serial.txt
    http://www.linux-usb.org/
    http://www.linuxjournal.com/article/6434?page=0,2
    http://www.linux-usb.org/devices.html
    http://cateee.net/lkddb/web-lkddb/USB_SERIAL.html

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • This post provides a series of steps and commands that is required to setup and configure reviewboard server on your Ubuntu OS. Having reviewboard to post and track changes and reviews is really awesome. Well of-course reviewboard documentation has done a wonderful job of describing everything needed. I had to open a few other sites (like MySQL and some forums) to complete the steps successfully. I stumbled upon a few errors while I was setting up reviewboard and I’ve added steps on how I got around them and got it up and running.

    I have a Ubuntu 10.10 running on a system on which I’ve setup reviewboard. You could put these in a script and it would work –

    There are some pre-requisites –

    Β Β Β  sudo apt-get install firefox
    Β Β  Β sudo apt-get install mysql-server
    Β Β  Β sudo apt-get install libmysqlclient-dev
    Β Β  Β sudo apt-get install apache2
    Β Β  Β sudo apt-get install libapache2-mod-python

    Β Β Β  sudo apt-get install python-setuptools
    Β Β  Β sudo apt-get install python-devΒ  # (re-starts the machine to complete setup)
    Β Β  Β sudo apt-get install memcached
    Β Β  Β sudo apt-get install patch

    All of reviewboard components and python modules can be installed using setuptools (easy_install)

    Β Β Β  sudo easy_install python-memcached
    Β Β  Β sudo easy_install ReviewBoard
    Β Β  Β sudo easy_install mysql-python
    Β Β  Β sudo easy_install python-mysqldb

    Am setting this up for subversion. Installing subversion and the python-svn (source control components)

    Β Β Β  sudo apt-get install subversion
    Β Β  Β sudo apt-get install python-svn

    In order to setup / configure reviewboard you’ll need a MySQL database (I’ve chosen MySQL, you could choose others listed on reviewboard site). So run the following command –

    mysql –user=root –password=”your passwd here” mysql

    Create the reviewboard database of your choice. At the mysql prompt type

    mysql> CREATE DATABASE {your-database-name-here};

    At the mysql prompt create a reviewboard user and grant it all permissions.

    mysql> CREATE USER ‘rbuser’@’localhost’ IDENTIFIED BY ‘your_password’;
    mysql> GRANT ALL PRIVILEGES ON *.* TO ‘rbuser’@’localhost’ WITH GRANT OPTION;

    Now run the configuration command rb-site install to configure your review board server

    sudo rb-site install /var/www/your.review-site.com

    sudo chown -R www-data:www-data /var/www/your.review-site.com

    rb-site install is going to ask you a lot of questions, which you should be able to answer since it would be your choices and specific to your environment. Remember your reviewboard admin credentials which will be required later.

    NOTE: Apache runs as www-data user on my Ubuntu. If you don’t change the owner and group of /var/www/your.review-site.com to www-data:www-data, Apache won’t have the right permissions to add the source control repository. This is required because, you would have to upload your changed files and reviewboard should be able to detect the difference between what is in the source repository vs. the file you’ve submitted.

    cd /etc/apache2/sites-available
    cp /var/www/your.review-site.com/conf/apache-modpython.conf your.review-site.com.conf
    cd ../sites-enabled
    sudo ln -s ../sites-available/your.review-site.com.conf .

    And you’re done !

    With this, you have a review board setup. Based on the questions you’ve answered (hopefully with correct details) visit reviewboard link http://<your.rb.hostname&gt;:<port>/dashboard

    As an admin you’ll have to add your source control repository URL in to your reviewboard environment. Login to your reviewboard server as ‘admin’. Click on the “Add” link next to “Repositories” in the “Database” tab. In this window, fill-up the Source control details. And click ‘Save’.

    NOTE-1: If you’ve forgotten to run the chown command command above to set the owner to www-data on /var/www/your.review-site.com/ reviewboard cannot create the configuration.

    NOTE-2: If you get an error saying unable to create .subversion directory under /var/www/your.review-site.com/data, then create it manually.

    Once you’ve added your source repository successfully, the setup is complete.

    Users of reviewboard need to

    1. Create their accounts and login to reviewboard.
    2. To post new reviews, users would need post-review (part of RBTools). This is a tool that allows you to post review from your source control using command line. This tool is available for Linux, Windows and MacOS. This can be installed by running

    easy_install -U RBTools

    For users to start using the tool (in case of SVN). In your SVN checked-out directory set a property using –

    svn propset reviewboard:url http://<your.rb.hostname&gt;:<port>/

    post-review –user=<your-username> –password=<your-passwd> -p

    This should post this for review !

     

     

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • A new post on my blog been long due. I’ve switched to Linux as the primary and the only OS on my work laptop for a while now and have setup equivalent alternatives to all the office applications and I feel at $HOME. And this one being the last piece of the puzzle.OSS & Linux Rocks and I cannot emphasize enough.

    I’ve built all the required pre-requisites for Pidgin right from glib, gtk+ to pidgin and pidgin-sipe (MS Office Communicator Plugin) and got it working and am delighted. I am running RHEL 5.5 and I’ve compiled all the components for this environment. I had a few things I found out on the way and would like to share it here.

    You can download the bash script (available from my box.net widget).Β This script does –

    • Download
    • Extract archive and build
    • Install

    of all the required software, pidgin and pidgin-sipe. After the script completes, you will have a fully functional pidgin with SIPE plugin and you’ll be able to use it as an alternative to MS Office Communicator client.

    These are the required packages and the script builds them in the following order –

    1. glib-2.26.1.tar.bz2
    2. atk-1.29.2.tar.gz
    3. tiff-3.9.4.tar.gz
    4. gdk-pixbuf-2.22.1.tar.bz2
    5. pixman-0.21.4.tar.gz
    6. cairo-1.8.0.tar.gz
    7. fontconfig-2.8.0.tar.gz
    8. pango-1.28.3.tar.bz2
    9. gtk+-2.22.1.tar.bz2
    10. enchant-1.6.0.tar.gz
    11. gtkspell-2.0.16.tar.gz
    12. pidgin-2.7.9.tar.bz2
    13. pidgin-sipe-1.10.0.tar.gz

    The script uses 3 variables. You can alter them and make them point to directories of your choice. The default values are –

    • ZIPS=$HOME/sandbox/zips (Location where the packages would get downloaded)
    • SRC=$HOME/sandbox/src (Extract each of the packages here; configure and make runs here)
    • DST=$HOME/pidgin-deps (Install them into this location)

    Many of these packages have dependencies / pre-requisites that need to be met before they get built and installed. You could take a look into the script to know exactly what they are. Some of those details are described here.

    PKG_CONFIG_PATH is a variable that the configure script refers to. If the package you are building is dependent on another package and that package is installed in a non-standard location, then you could set this variable to point it to the location of lib/pkgconfig (.pc files). So that the configure script knows where to look for its dependencies.

    • ATK – depends on GLIB
    • GDK-PIXBUF does not compile if LIBTIFF environment variable is not set to point to LIBTIFF install location /lib directory.And CFLAGS need to be set to LIBTIFF/include.
    • CAIRO – depends on Pixman
    • PANGO – depends on Cairo and pangocairo builds only when you have the latest fontconfig.
    • GTK+ – depends on all of the above packages.
    • GTKSPELL – required for spell check in your IM depends on Enchant
    • PIDGIN – depends on all of the above. And the configure script needs quite a few options. I’ve disabled some features that I didn’t require (–disable-screensaver –disable-startup-notification –disable-gstreamer –disable-vv –disable-idn –disable-meanwhile –disable-avahi –disable-dbus –disable-tcl –disable-consoleui)
    • PIDGIN-SIPE – depends on pidgin and the install location should be set to pidgin so that the plugins are placed correctly.

    NOTE: While compiling gtk+ if you get an error that says “/bin/sh: no : command not found”. This could mean, that one of the commands was not found during the configure step. Peek into the config.log to find out more and also take a look at the configure script. gtk+ requires gdk-pixbuf-csource make sure you put that on PATH before running configure.

    After all this, you’ll have a working pidgin that can work as a MS communicator client.

    Some of the references that could prove useful –

    Reference URLs:

  • This article describes how to build SVN client from source on a Linux OS.

    These are the following modules you’ll need. Well ofcourse you are free to download other versions of the sources and experiment with them. I’ve tested the SVN client with these versions and found them to be working.

    Copy all these tar.gz files under your working directory.If you are bored of clicking and downloading each of these versions you could just paste these wget commands on your linux box. Just be sure you have internet access from that machine –

    And you could run this simple wrapper script that I’ve written. This script extracts, builds and installs all the required components and SVN client to the location of your choice. You can get the script (makesvn.sh) from my box.net widget on the right hand side of this blog. If you are using different versions of the dependent software, just edit the makesvn.sh and alter the first few variables APR_GZ, APRUTIL_GZ etc. to point to the correct names.

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • It is hard to believe how complex enabling user-dump can get in Windows !! And there are different procedures on every different version of Windows ! I don’t understand Windows internals that well. But I wonder what makes it that difficult to keep it consistent across their own OS kernels. Gives one more reason (as a developer) to not like Windows. And there are different tools, procedures, scattered knowledge base articles to illustrate the steps.

    1. Using a tool named userdump and this can be used to generate user dump on the following Windows OSes –

    • Microsoft Windows Server 2003, Standard x64 Edition
    • Microsoft Windows Server 2003, Enterprise x64 Edition
    • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
    • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
    • Microsoft Windows XP Professional x64 Edition
    • Microsoft Windows XP Professional
    • Microsoft Windows XP Home Edition
    • Microsoft Windows 2000 Service Pack 1
    • Microsoft Windows 2000 Service Pack 2
    • Microsoft Windows 2000 Advanced Server

    A sample of using userdump – (@See more hereΒ http://support.microsoft.com/kb/250509)

    C:\>Β userdump 1188 c:\store.dmp

    2. Now this is different for Windows Vista and Windows 7 andΒ Β for these OS flavors, you open task manager, right-click on the process and click on “Create dump file” option. And if you have process that hangs or crashes you can use Adplus tool. The same procedure is applicable to all sorts of Windows 2008 editions

    Adplus is a vbscript a utility written around CDB. This can run in two modes –

    a. Hang mode – to detect process hangs and create user dump

    b. Crash mode – to detect process crashes and create user dump

    For example to create a user dump using adplus run the following command –

    For a process that crashes –

    C:\> adplus -crash -p <PID>

    For the process that hangs –

    C:\> adplus -hang -p <PID>

    Here is a decent link I found that records a lot of these options –Β http://support.microsoft.com/kb/286350/

    3. And then there is “Debug diagnostic 1.1” that is used to debug high performance applications that crashes, hangs etc.Β http://support.microsoft.com/kb/931370

    4. And then there is generating a Kernel dump. Luckily there is just one way to generate kernel dump on most of the Windows OSes; Details on how to is hereΒ http://support.microsoft.com/kb/254649; There is a hotfix from Microsoft that allows user to generate memory dump via a keystroke –Β http://support.microsoft.com/kb/244139

    Here are some reference links

    5. Now what about production systems where you wouldn’t want to install any such tools but still want to get a user-dump file. This is still a question to me and am looking for an answer. So if any of you windows gurus are here do tell me how ?

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • I started using Reliance NetConnect wireless broadband internet over the last few weeks. Everything was fine. I used to conect to a VPN over the Reliance NetConnect connection. Things were fine.

    Later at home I tried using my WiFi connection (via the Linksys router). I was able to connect to the router and browse the net. However the VPN connection was never successful. I kept getting errors. I saw the error numbers 691 and 829. I struggled with this error for two days before I figured out I had to run the following commands —

    Netcfg –u MS_PPTP

    Netcfg –u MS_L2TP

    And then,

    Netcfg -l %windir%\inf\netrast.inf –c p –i MS_PPTP

    Netcfg –l %windir%\inf\netrast.inf –c p –i MS_L2TP

    After running these commands I am now able to connect to the VPN via my WiFi !

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • I had a Linux box (RHEL 5.4 X64) to which I only had Telnet & SSH access. And I wanted a full screen export to test some GUI. So here is what I learnt and did to enable VNC and get a full screen export to the GNOME environment.

    Make sure you have installed a VNC server on the box. You could downloadΒ TightVNC source and compile it on your Linux box.

    • First login to the machine as root (via telnet/SSH).
    • Edit the following file /etc/sysconfig/vncservers and add lines with the following syntax/format

    ο»ΏVNCSERVERS=”n:username”

    VNCSERVERARGS[n]=”arguments here”

    For example to enable a VNC access for root user on display 2, you would enter the following lines

    VNCSERVERS=”2:root”

    VNCSERVERARGS[2]=”-geometry 800×600″

    The above entries will enable root user to login to VNC display 2, with a screen resolution of 800 x 600.

    • As root run the command /usr/bin/vncpasswd; Enter and confirm the VNC login password to be used by the client.
    • Then Edit the /etc/X11/xorg.conf and add the following lines to the end of the file –

    Section “Module”
    Load “glx”
    Load “dbe”
    Load “extmod”
    Load “freetype”
    Load “type1”
    Load “dri”
    Load “vnc”
    EndSection

    • NOTE: Press Enter after “EndSection” then save & quit the file.
    • If the firewall on Linux (iptables) is enabled and running then it is likely that the ports that VNC uses (5900 – 590x) are blocked.
    • Open those ports by running “system-config-securitylevel” at the root prompt (#). In the (curses type) CUI that appears on the screen, click on “Customize” button and in the “Allow incoming” section in the “Other ports” textfield, add “5900-5904:tcp”. Save and exit the application.
    • You will then have to enable VNCServer for a particular run-level. And here is how you can check and enable them

    chkconfig –list vncserver # This list the displays enabled/disabled status (from run-level 0 to 6).

    chkconfig –level 3 vncserver on

    • Now start the VNC service by typing “service vncserver start“. This should start the VNC server on your machine on display 2 for root user.
    • At this point you can VNC to the server, but you will by default get a TWM window manager (which just has a X-Windows bash prompt). Which is not good enough. So to enable GNOME or KDE,
    • Now edit the file $HOME/.vnc/xstartup, Un-comment the following lines –

    unset SESSION_MANAGER
    exec /etc/X11/xinit/xinitrc

    At the end of the file, replace “twm &” with “startx &” for GNOME and “startkde &” for KDE.

    • Re-start your VNC service with “service vncserver restart”.
    • With this you are all set.

    You can install a Tight VNC client on your Windows or any other box and then connect to display 2, by typing your machines IP followed by :2. For example – 192.168.3.130:2

    Thanks to these links from where I gathered the above info πŸ™‚

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

  • I recently had to understand and debug an application that processes MSI and MSP files. This was my first time I had to really work on debugging Windows Installer application. And a learnt a thing or two which I found useful. Then I thought it would be blog about the basics.

    MSI – This is a Windows installer package (a .msi file) which is used for installation, repair of software on Windows OSes. A MSI file can be viewed and editied by using softwares like Wise for Windows Installer (now Symantec), ORCA a tool that Microsoft ships with its Windows Installer SDK (which can also be downloaded for free here). You can imagine a MSI to contain a set of Properties, Tables (like database tables), Components, Files, Custom Action logic etc. In Windows Installer files could be inside the MSI or could be part of an “Administrative Install”. In an Administrative installation, the files are kept in a separate location and the MSI contains the location information of the files which are used during installation.

    MSP – In a nutshell (MSP = MST + .CAB). A patch file (.msp) contains MST (Transforms) and CAB (Cabinet) files. The files in the patch could be patching existing files which are part of the base installation and/or could contain a set of new files not present in the original MSI. The files in the .CAB in the MSP could contain only binary differences as compared to the files in the base installation. Windows installer follows a set of rules to decide whether a file in the patch is a diff or if it has to keep the entire file. If the size of the file part of the patch is greater than the size of the original file, then a diff is created. But if the size of the file is smaller, then the entire file is maintained. Look at this link for more information — http://msdn.microsoft.com/en-us/library/aa371146(VS.85).aspx.

    MST – As we know a MSI contains properties, tables etc. If the patch is changing any of the properties or one of the values in a table such as updating a file’s timestamp etc.; then such things are recorded as a transform. If you have an MST file, then you could observe the effects it has on the MSI by applying the transform to the MSI. You could achieve this by using the ORCA tool. Open the MSI using ORCA, then click on menu Transform -> Apply Transform…

    Installing a MSI

    The command to install, un-install, verify, update a MSI/Package is -> “msiexec.exe”. To install an msi, you could use the command –

    msiexec /i adobe.msi /L*v msi_install.log

    Enable Logging

    When debugging or looking into errors that may have been caused during installation/uninstallation etc, looking at a detailed log is most important. The above command will install the MSI with verbose logging. Inorder for verbose logging to work, you will have to add the following registry setting –

    • run ‘regedit’
    • Goto HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
    • Create key Logging (Type will be REG_SZ).
    • For value voicewarmupx

    For complete Β on logging see – http://support.microsoft.com/kb/223300. Also look at the Wikipedia link http://en.wikipedia.org/wiki/Windows_Installer that has additional info on how to enable this logging from Windows Server 2008 onwards (the procedure has changed as compared to how it was done in XP/W2K3).

    More on Patching

    If you want to extract a .msp file and look in to what is inside the file then you could use a tool called msix to extract a MSP file into pieces. The msix tool extracts an MSI into a set of MSTs and CAB files.The tool along with the source has been provided along with good description on Heath Stewarts MSDN blog link – http://blogs.msdn.com/heaths/archive/2006/04/07/571138.aspx

    Usually as a good practice exe and dlls have version information associated with them. So a exe/dll in a patch would have a version greater than the one present in the base installation. In such Β cases it is easier for Windows installer to decide how to patch the file. But in some cases, where the exe/dll does not have any version information or if the file is not an exe/dll. For example if it is a text file or some other file like an image for example. Then Windows installer follows a flowchart to decide how to patch such files. I found a good link here – Aaron Stebner’s WebLog : How Windows Installer handles file replacement logic for versioned and unversioned files

    Programming

    You could write a program and register a call back as an external UI, which gets called for every file being installed by the Windows installer. See this API as a starting point for that here documented here – http://msdn.microsoft.com/en-us/library/aa370384(VS.85).aspx

    Windows Installer page has a flowchart that clearly describes the handling of such scenarios – http://msdn.microsoft.com/en-us/library/aa370532%28VS.85%29.aspx

    Here are a bunch of reference links that helped me understand some basics of Windows Installer

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ

    ΒΆΒΆΒΆΒΆΒΆ