Wednesday, December 19, 2012

Replace Unity desktop with Gnome 3 on ubuntu 12.10
1. Install the Ubuntu GNOME packages 
sudo apt-get install ubuntu-gnome-desktop ubuntu-gnome-default-settings
sudo dpkg-reconfigure gdm
sudo apt-get remove ubuntu-settings
2. Install missing GNOME 3 packages 
64 bit only
sudo apt-get install gnome-documents gnome-boxes
3. Upgrade GNOME Control Center, Nautilus, Totem 
and other GNOME 3 packages to version 3.6.x 
upgrade gnome control center 
sudo add-apt-repository ppa:gnome3-team/gnome3   
4. Remove overlay scrollbars 
sudo apt-get remove overlay-scrollbar* 

Monday, December 17, 2012

Asterisk on pi reconfiguration


Next steps after downloading the image

Instructions on how to write the downloaded image to your card can be found here:
The image is only utilizing 4GB of your card, even if you bought a bigger one. On a bigger card, you can make more space available to your root partition by running on the console of your booted RPi:
Select the option expand_rootfs. If you rather prefer to do this manually, one of the easiest ways is using GParted on Linux. Details can be found here:

1. Determine hostname / IP address

Once your RPi is booted, you need to know it’s hostname or IP address for ssh login or to open the web GUI. On Windows computers, you can just use the hostname raspbx to access your RPi.
SSH login:
ssh root@raspbx
Web GUI:
On Macintosh, use raspbx.local instead:
ssh root@raspbx.local
Web GUI:
In case this is not successful you can check your router’s DHCP client list, and search for the IP associated with the name raspbx.
If this is still not working out, you can always just connect an HDMI monitor and USB keyboard, log in to the console with user root, password raspberry, and run the command:

2. Basic configuration

After your RPi has booted successfully, log in either on the console or by ssh with user root and password raspberry. Follow these steps to complete the initial configuration:
Choose your timezone:
dpkg-reconfigure tzdata
Configure locale settings:
dpkg-reconfigure locales
Configure keyboard settings (not needed when working with ssh only):
dpkg-reconfigure keyboard-configuration

3. Email setup

Email delivery from your RPi is needed if you plan to have voicemails sent to users by email. Email already works in the default configuration using Exim4 as MTA. By default, Exim is configured to directly send mails to the recipient MX hosts. This is however discouraged, as many email providers classify emails coming from dynamic IP adresses as spam. To avoid this, you need to set a smarthost. Unless you have an open SMTP server on your network that can be used as smarthost without authentication, you will need to specify SMTP authentication credentials as well. It is basically possible to use almost any publicly available freemailer as smarthost with the RPi. Have username and password as well as SMTP hostname (sometimes also referred to as outgoing mail server) of the email account you are going to use ready. Run on the console:
dpkg-reconfigure exim4-config
On the first configuration page select “mail sent by smarthost; no local mail”. On the following pages just keep the default values by pressing enter, until you reach the page starting with “Please enter the IP address or the host name of a mail server…”. Here, enter the SMTP hostname of your email provider. Again, keep default values on the remaining pages.
Then, edit the file passwd.client by running:
nano /etc/exim4/passwd.client
Add your credentials at the bottom of this file in the following format:
In most cases, the SMTP hostname used in this file is identical to the hostname used as smarthost before. If email fails to work, specify the reverse lookup of your email provider’s SMTP host IP address here. For Google Mail, this is currently
Some email providers also require you to use sender addresses identical to one of the public email adresses of your account. In this case, edit:
nano /etc/email-addresses
On the bottom of this file add:
This configures the sender address of all outgoing mail to
Finally, to activate your configuration run:
You can test your email setup with this command:
A test email should reach your inbox shortly.

4. Initial Asterisk setup

Point your browser to the RPi’s hostname or IP address (http://raspbx).
The default login to FreePBX is:
user: admin
password: admin
For inital setup please follow this guide:
Most of the configuration steps presented here apply to the RPi as well. If you are going to use SIP technology, you absolutely need to follow section 5, “Configure Asterisk SIP Settings”. After filling the Asterisk SIP Settings page, you need to go back to the console and run:
amportal restart
This step is only required once after Asterisk SIP Settings have been configured for the first time. For all other configuration changes just use the red apply config button in the GUI.

dpkg cheat info

trying to do a reinstall of a package still means some dpkg work.

here is a cheat sheet.

dpkg command cheat sheet for Debian Linux

dpkg is package manager for Debian Linux which is use to install/manage individual packages. Here is quick cheat sheet you will find handy while using dpkg at shell prompt:
Syntax Description Example
dpkg -i {.deb package} Install the package dpkg -i zip_2.31-3_i386.deb
dpkg -i {.deb package} Upgrade package if it is installed else install a fresh copy of package dpkg -i zip_2.31-3_i386.deb
dpkg -R {Directory-name} Install all packages recursively from directory dpkg -R /tmp/downloads
dpkg -r {package} Remove/Delete an installed package except configuration files dpkg -r zip
dpkg -P {package} Remove/Delete everything including configuration files dpkg -P apache-perl
dpkg -l List all installed packages, along with package version and short description dpkg -l
dokg -l | less
dpkg -l '*apache*'
dpkg -l | grep -i 'sudo'
dpkg -l {package} List individual installed packages, along with package version and short description dpkg -l apache-perl
dpkg -L {package} Find out files are provided by the installed package i.e. list where files were installed dpkg -L apache-perl
dpkg -L perl
dpkg -c {.Deb package} List files provided (or owned) by the package i.e. List all files inside debian .deb package file, very useful to find where files would be installed dpkg -c dc_1.06-19_i386.deb
dpkg -S {/path/to/file} Find what package owns the file i.e. find out what package does file belong dpkg -S /bin/netstat
dpkg -S /sbin/ippool
dpkg -p {package} Display details about package package group, version, maintainer, Architecture, display depends packages, description etc dpkg -p lsof
dpkg -s {package} | grep Status Find out if Debian package is installed or not (status) dpkg -s lsof | grep Status
{package} - Replace with actual package name

Asterisk for raspberry PI

here is the home page for this effort.  Not simple, for sure


the ITU code for the US is 1 (as in the digit you dial for a country code).  for some reason one install attempt I made came up with 61 for Australia, and offered the code for Italy as well, both useless and wrong.

Linode library link

sample page is for setting up voip services server, and asterisk, but looks nice

Sunday, November 11, 2012

Record using audacity (ubuntu sound recording)

Ubuntu X monitor resolution addition

In my case there is a KVM blocking the monitor detection in this case, so the resolutions are defaulted to VESA.

Add 1600 x 1200 for Viewsonic P815 on Dell 745 optiplex

xrandr --newmode "1600x1200_60.00"  161.00  1600 1712 1880 2160  1200 1203 1207 1245 -hsync +vsync

xrandr --addmode VGA1 1600x1200_60.00

Quoting blog

Change Resolution of Unknown Monitor in Ubuntu 11.10

Ubuntu LogoI have the HP v185e Monitor and it was unrecognizable by my Ubuntu 11.10. The “Display” setting shows “Unknown Monitor”, and the maximum resolution I could get is 1024 x 768, the optimal resolution is 1368 x 768. I found that the “Unknown Monitor” could be set with XRandr from the posting in the Ubuntu Forum.
I did that right and the resolution is 1368 x 768, but after restarting, the resolution options were reverted back to 1024 x 768. From the Ask Ubuntu, I found that Ubuntu 11.10 have different way to permanenting the XRandr customization than it’s predecessors.
XRandr 001
Here’s the summary (I’m using the example of adding 1440 x 900 resolution):
  1. Open Terminal and type
  2. $ xrandr
  3. The XRandr will show the maximum resolution allowed like this:
  4. Screen 0: minimum 320 x 200, current 1368 x 768, maximum 8192 x 8192
    VGA1 connected 1368x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
       1368x768_60.00   59.9*+
       1024x768       60.0  
       1024x768_60.00   59.9  
       800x600        60.3     56.2  
       848x480        60.0  
       640x480        59.9  
       1280x800_60.00   59.8  
    HDMI1 disconnected (normal left inverted right x axis y axis)
    DP1 disconnected (normal left inverted right x axis y axis)
    HDMI2 disconnected (normal left inverted right x axis y axis)
    DP2 disconnected (normal left inverted right x axis y axis)
  5. Type “cvt [x resolution] [y resolution]” in the terminal, for my case is like this:
  6. $ cvt 1440 900
  7. The Terminal will show the output:
  8. # 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
    Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
  9. For the next step, type:
  10. $ xrandr --newmode [Modeline]
    in my case is
    $ xrandr --newmode "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
    Copy the “Modeline” configuration from the previous output
  11. To add the new resolution to the “Display” option type:
  12. $ xrandr --addmode VGA1 1440x900_60.00
    Now the new resolution is ready in the “Display” option
    XRandr 002
  13. To apply the new resolution, type:
  14. $xrandr --output VGA1 --mode 1440x900_60.00
    And now the screen will be in the new resolution
  15. In order to make it permanent, add the resolution to /etc/X11/xorg.conf
  16. $ sudo gedit /etc/X11/xorg.conf
  17. The xorg.conf will show the output like this:
  18. Section "Monitor"
        Identifier    "Monitor0"
        Modeline "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync
        Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
        Modeline "1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync
    Section "Screen"
        Identifier     "Screen0"
        Device         "Card0"
        Monitor        "Monitor0"
        SubSection "Display"
            Modes      "1280x800_60.00" "1368x768_60.00" "1024x768_60.00"
    Section "Device"
        Identifier    "Card0"
        Driver        ""
  19. Add the new Modeline and resolution, for the “Driver” in the “Section Device” I just simply type “Intel” (because I’m using intel standard graphic card), if you are using Nvidia just simply type “nvidia”. The output is like:
  20. Section "Monitor"
        Identifier    "Monitor0"
        Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
        Modeline "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync
        Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
        Modeline "1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync
    Section "Screen"
        Identifier     "Screen0"
        Device         "Card0"
        Monitor        "Monitor0"
        SubSection "Display"
            Modes      "1440x900_60.00" "1280x800_60.00" "1368x768_60.00" "1024x768_60.00"
    Section "Device"
        Identifier    "Card0"
        Driver        "intel"
  21. Restart and see the resolution setting is now permanent
Hope it worked

Anton Hermansyah

Thursday, November 1, 2012

raspberry pi motorola dock lashup

RISC laptop: cables / cabos

HDMI, USB, Micro, Mini, A/B, M/F ... ?

Motorola Atrix LapDock (Micro USB B M, Micro HDMI M)
Micro USB B (F)->USB A (F) , USB A (M)->USB A (M)
Micro HDMI (F)->Micro HDMI (M) , Micro HDMI (F)->HDMI (M)

Raspberry Pi v1.1, v2.0

RPi v1.1, v2.0: 2 cables / cabos

Raspberry Pi v1.0

USB A (M)->Micro USB B (M)

RPi v1.0: 3 cables / cabos


HDMI = On/Off

cifs / smbfs mount notes

Note:  from above articles writing to present, package install has changed form

apt-get -y install smbfs


apt-get -y install cifs-utils

Now, if it worked, you should see your mount right on the desktop. Browse through it, play music from it, watch movies from it (network speed permitting). Here are some common errors:
  • mount error: can not change directory into mount target... - either you didn't create your /media/my_share directory or specified it wrong in your mount command.
  • mount error 13 = Permission denied - your username and password are being rejected. Try some other combinations
  • mount error 6 = No such device or address - the share_name that you specified in your mount command is not being found on the host computer. Browse the network, find that computer, and check to make sure you see the exact share name.

Saturday, October 20, 2012

How to use three Open Build Service Source Services to simplify the packaging

I think this might be served up from a dyndns home system, so am capturing it here.  On the hunt for OBS info.

this puzzle part relates to obs2obs copy and tag creation.

This is a short HowTo about using the OBS Source Services.
Sometimes a packager has a package who changes the Sourcecode very often. So the packager has to choose: On the first hand he can checkout the code from git or svn makes a tar.gz or bz2 from it or he can use the Source Services from the Buildservice. But how to do that?
In the following Example i'm using calligra from the KDE:Active Repository.
First of all i have uploaded the needed specs and *.changes files and all optional Sources. Then i'm going to the "Sources" Tab.In my case it looks like:

There we have two ranges. The first is called "Source Services" and the second "Source Files". If you are creating an new package this range is empty.
In my case i have filled the "Source Files" Range with my files. All my uploaded Files are in Section (2) from the Image. The Files in Section (3) will be automaticly created by the Source Services. But in your case this is empty Range.
But let us show the "Source Service" Section:

If you go to (1) "Add Service for Source Processing" you see this:

In this Overview you can choose your wanted Source Processor. In my case i choosed: tar_scm, recompress and update_sources.
If you choose tar_scm you can fill out a little form. It looks like:

In the field "url" you can add the full git adress. In my case it is "git://". Other Repositories like "git://" are possible too. In the field "scm" you can choose the Version Control System like git, svn, hg and bzr.
In the Standardform the field "versionprefix" isn't available. But it works.
The Source Services recompress and update_sources coming out without any configuration and working out of the box. So the OBS works like:
  1. fetch the data from scm
  2. recompress the *.tar to *.tar.gz
  3. make a temp spec file with changed versiontag (used that from the source)
  4. make a build
My Problem was now that i got a File like %{name}-%{gitversion} so it looks like calligra-1234567.tar.gz But my goal was to get calligra-2.3.90.git1234567.tar.gz. So i must set the versionprefix.
For doing that you must edit the file "_service". You can just click on it and choose "Edit File". The File itself is a simple XML File, so it is human readable. :-)
That's my file content:

  <service name="tar_scm"><param name="url">git://</param><param name="scm">git</param>
<param name="versionprefix">2.3.80.git</param></service>
<service name="recompress"><param name="file">*.tar</param><param name="compression">gz</param></service><service name="set_version"/></services>  
The _services file is the control file for all services in that package. For adding the parameter "versionprefix" i've added the marked line.
After that i got my prefered format.
The Source Services are a mighty. You can download a special file and use it, or you can check the checksum with md5. I can see in this Source Services a very good potencial.
If you want to read more about that, just go to
ATM it looks for me, that if you must start the services manually daily, if you want to update the sources. But all in all you can save time if you use that great tools.
If you liked this short intro or not, i'm happy about comments and trachbacks ;-)

Tuesday, October 16, 2012

vmware serial ports (on guests)

utility for configuring or connecting to ports


As far as I could gather, there is/was no easy way to do what I wanted to do.  That said, I was able to cobble together a solution.

First of all, VMware sells an additional license called the "Remote Virtual Serial Port Concentrator" license (for way too much money, IMO) per ESXi server, which is what allows one to pipe a virtual machine's serial port out to a telnet port, using a telnet daemon running on the ESXi server.  Paying the money and getting this license was the first step.  Thankfully, VMware's turnaround was quick enough after we paid the money, that we were able to install these permanent licenses before the temporary, evaluation licenses expired.

The next step was to dynamically configure this serial port for my virtual machines.  I could find no VMware-supplied API's, so I hacked my own perl script.  I've attached it in case others find it useful, warts and all.  I put in lots of comments since I was learning how to do this and I'm sure there's extra junk in there that's not needed, but it's working for me.  Use at your own risk.

Friday, October 12, 2012

stupid solaris 10 tricks

installation:  use the automatic installer for the install

networking:  on vmware esxi eventually the e1000 works  Install the vmware tools for solaris.

didn't use this but here is networking link for vmware vmxnet

desktop:   use cde.  it still works.
    /usr/dt/bin/Xsession is used to create the session.  use it with vncserver to get rid of the horrid twc desktop (at least there is a default, not a crash, but still.)

nfs mounts:  nfs version 3 should be max for this place.  many of the nfs servers don't support the version 4 authentication and will say "not owner" when you do mounts.  Ubuntu supports 4, readynas does not.

nfs partitions:

paths:  very few paths are set up.  Add /usr/X11/bin and /usr/openwin/bin to the path somewhere, or vncserver won't work (and probably a lot else).

useradd -m -d /export/home/<account> creates an account with a home directory.  /home is off limits.  useradd doesn't add on the user name so you have to supply it with this command.  after this use passwd.

if you mess up usermod will let you change some things.

Probably more to it with the kerberos stuff, and roleadd, rolemod, etc.

ssh logins for root from remote:
# /etc/ssh/sshd_config with PermitRootLogin yes to replace PermitRootLogin no 
# svcadm restart svc:/network/ssh:default

bash tuning:  for lack of a better way, copy over .bashrc and .profile from linux if they contain the bash setup stuff.  .profile should be merged, and .bashrc probably doesn't exist.  Add path stuff above to .profile

Monday, August 20, 2012

bash file name handling scripts

read file names
IFS=$(echo -en "\n\b")
for f in *
  echo "$f"

IFS=$(echo -en "\n\b")
# set me
for f in $FILES
  echo "$f"
# restore $IFS

IFS=$(echo -en "\n\b")

for f in `cat /root/movedata.txt`
  echo "$f"
  ls -l |grep $f

read password file
while IFS=: read userName passWord userID groupID geCos homeDir userShell
      echo "$userName -> $homeDir"
done < /etc/passwd
find command
find . -print0 | while read -d $'\0' file
  echo -v "$file"

# failsafe - fall back to current directory
[ "$DIR" == "" ] && DIR="."
# save and change IFS 
# read all file name into an array
fileArray=($(find $DIR -type f))
# restore it 
# get length of an array
# use for loop read all filenames
for (( i=0; i<${tLen}; i++ ));
  echo "${fileArray[$i]}"
for line in $(< line-with-spaces-between-fields.txt); do

scoop up list of file using "set" builtin

cd ..; set *.txt; cd ~-
 for f; do
 echo "../$f" "$f"
remove unwanted characters in filenames:
IFS=$(echo -en "\n\b")
for f in $FILES
 #echo "$f"
 mv -b --strip-trailing-slashes "$f" "$FILENAME"
replaces ?, % and + with
sql example
array=($(mysql –host= –user=XXXX –password=XXXX -s -N -e ‘use
 xbmc_video; SELECT c22 FROM movie, files WHERE 
files.idFile=movie.idFile ORDER BY idMovie DESC LIMIT 10;’))
array=( "${array[@]// /}" )
read names into array, and process

# failsafe - fall back to current directory
#[ "$DIR" == "" ] && DIR="."
# save and change IFS
cd $DIR
# read all file name into an array
fileArray=( * )
# restore it
# get length of an array
echo $tLen
# use for loop read all filenames
for (( i=0; i<${tLen}; i++ ));
  echo "${fileArray[$i]}"

Wednesday, July 25, 2012

Mouning Readynas Drives on X86 systems

copied here for archival

Update – Thanks to Peter Schlesinger in the comments section below:
Simple step by step guide to mounting Sparc-based ReadyNAS Drives in x86-based Linux:
Tested on brand new install of Ubuntu 10.10 (32bit x86), no other dependencies- 23rd Jan 2011
In a terminal window:
(1) sudo su
(2) apt-get install fuseext2
(3) apt-get install lvm2
(4) modprobe fuse
(5) vgscan
(6) vgchange -ay c
(7) fuseext2 -o ro -o sync_read /dev/c/c /mnt
That’s it!!!
You can now see the mounted files in the /mnt directory
(NB: Without the “-o sync_read” option to fuseext2 I had problems with copying large files. It kept saying the source file wasn’t found. After adding this option everything worked fine).
Original Post
When the ReadyNAS developers changed the default block size in RAIDiator 4.x to 16 KB (from 4 KB in version 3.x), there was concern from the community that users would be unable to mount drives from a failed ReadyNAS into a Linux computer.  The concern is that the ReadyNAS Duo, NV+, X6, 600 & 1100 use a Sparc-based processor and that an x86-based PC cannot read 16 KB blocks.  One of the developers, Skywalker, has provided some details and I have taken the liberty of editing his posts into an easy-to-follow step-by-step set of instructions.

Quoting Skywalker:

There is no “proprietary” filesystem running on any ReadyNAS.  It is “straight”, ordinary, unmodified EXT3.  You can even run all the e2fsprogs (debugfs, e2fsck, etc) on a 16KB ReadyNAS filesystem on a standard Linux PC with no modifications.  Mounting a 16KB ReadyNAS filesystem on an x86 PC requires about the same amount of work as mounting an NTFS filesystem read/write on Linux — using a FUSE driver to mount it.
The ext2fuse driver won’t come on any LiveCDs,  so you’d need a full distro running with the necessary build tools installed.
Ubuntu, Fedora, Debian… it doesn’t really matter.  Once you get those installed, you need to get the ext2fuse source code from
  1. Using Debian, you can install the build tools by issuing the following command as root:
  2. apt-get install build-essential
  3. Download the ext2fuse package and extract it:
  4. tar xvzf ext2fuse-src-0.8.1.tar.gz
  5. Change to the directory of the extracted program
  6. Run the following command:
  7. ./configure
  8. Before compiling, open src/Makefile in an editor.
  9. Remove the lines that look like this:
  10. ext2fuse_DEPENDENCIES = ../lib/et/libcom_err.a \

  11. Change this line:
  12. ext2fuse_LDADD = ../lib/et/libcom_err.a ../lib/ext2fs/libext2fs.a
  13. To this:
  14. ext2fuse_LDADD = -lcom_err -lext2fs
  15. Then build the executable by running make:
  16. make
  17. Next, install the package by running make install:
  18. make install
  19. After compiling and installing the package, you’ll need to load the fuse module:
  20. modprobe fuse
  21. Next, run the following commands to recover the volume group information and then activate it:
  22. vgscan
    vgchange -ay c

  23. Create a directory to mount the array:
  24. mkdir /mnt/lvm
  25. Mount the array:
  26. ext2fuse /dev/c/c /mnt/lvm
  27. If successful, you should see:
  28. /dev/c/c is to be mounted at /mnt/lvm
    fuse-ext2 initialized for device: /dev/c/c
    block size is 16384

  29. At this point, your ReadyNAS data volume should be mounted on /mnt/lvm and you should be able to access your data.
I haven’t tried this myself (I gave my NV+ to my dad), but welcome any feedback on making it better.
Update (May 22, 2010) – Have a look at this for additional information:

Alternative Method

If you are trying to recover data from a Duo (or from a disk with only 1 or 2 disks in the array), then you may be able to recover the data using the following method:
  1. Connect your faulty disk to PC using a SATA to USB cable
  2. Download, install & run the free software R-Linux from
  3. Copy the recovered data from the faulty disk

13 Responses to “Mounting Sparc-based ReadyNAS Drives in x86-based Linux”

  1. dbott Says:
    October 29th, 2009 at 11:18 am
    User dekkit at the ReadyNAS forums has built a VMWare image that can mount drives from a ReadyNAS in a USB enclosure:
  2. jastronomy Says:
    May 19th, 2010 at 9:13 am
    root@PC038:/tmp/ext2fuse-src-0.8.1/src# make
    if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/fuse -I/usr/local/include/fuse -I../lib -I../lib/et -I../lib/ext2fs -D_FILE_OFFSET_BITS=64 -g -O2 -MT ext2fuse-readdir.o -MD -MP -MF “.deps/ext2fuse-readdir.Tpo” -c -o ext2fuse-readdir.o `test -f ‘readdir.c’ || echo ‘./’`readdir.c; \
    then mv -f “.deps/ext2fuse-readdir.Tpo” “.deps/ext2fuse-readdir.Po”; else rm -f “.deps/ext2fuse-readdir.Tpo”; exit 1; fi
    In file included from readdir.c:1:
    readdir.h:6:27: error: fuse_lowlevel.h: No such file or directory
    In file included from readdir.c:1:
    readdir.h:8: error: expected ‘)’ before ‘req’
    readdir.c:7: error: expected ‘)’ before ‘req’
    readdir.c:46: error: expected ‘)’ before ‘req’
    make: *** [ext2fuse-readdir.o] Error 1
  3. apnea Says:
    May 29th, 2010 at 10:42 pm
    Thanks dbott – very useful and clear site! Currently backing up thousands of pics off my 3 NAS drives from an Ubuntu box :-)
    I managed to bypass the compilation step by using an older pre-built ext2fuse 0.5 from here:
  4. dbott Says:
    May 31st, 2010 at 3:13 pm
    From the blog linked to above:
    Choosing a NAS solution where you can’t mount the storage media outside of the NAS is asking for trouble. I was worried I’d made the wrong choice when I found that mounting the ReadyNAS do ext3 drives is not trivial, mainly because they use a 16kb block size with their SPARC cpus.
    A bit of routing around found various solutions, but the one which worked for me was as follows.
    1. Fire up ubuntu vm (running on OS X for me and in my case 9.10 Karmic)
    2. install lvm2 using: apt-get install lvm2
    3. Download ext2fuse 0.5 (from here for example)
    4. run vgscan to locate drives
    5. vgchange -ay c to allow access to drive
    6. mkdir /mnt/lvm
    7. ext2fuse /dev/c/c /mnt/lvm (where ext2fuse will have been downloaded)
    8. drive can now be accessed on /mnt/lvm
  5. Relic Says:
    January 10th, 2011 at 7:50 pm
    ext2fuse is no longer active and apparently redundant based on comments on the project itself. It seems to be superseded by a another project called fuse-ext2.
    I’m using ubuntu 10.10 and I found a ‘fuseext2′ package in the repository and it worked with no problems. Although it complained that it’s experimental and to only use write option at your own risk, and so because I only need this to get my data off the disk I simply mounted it are read only:
    fuseext2 -o ro /dev/c/c /mnt/lvm/
  6. Peter Schlesinger Says:
    January 22nd, 2011 at 9:48 pm
    Simple step by step guide to mounting Sparc-based ReadyNAS Drives in x86-based Linux:
    Tested on brand new install of Ubuntu 10.10 (32bit x86), no other dependencies- 23rd Jan 2011
    In a terminal window:
    (1) sudo su
    (2) apt-get install fuseext2
    (3) apt-get install lvm2
    (4) modprobe fuse
    (5) vgscan
    (6) vgchange -ay c
    (7) fuseext2 -o ro -o sync_read /dev/c/c /mnt
    That’s it!!!
    You can now see the mounted files in the /mnt directory
    (NB: Without the “-o sync_read” option to fuseext2 I had problems with copying large files. It kept saying the source file wasn’t found. After adding this option everything worked fine).
  7. Brian Ost Says:
    February 6th, 2011 at 6:58 am
    I’v tried to mount a disk from a 2 disk Duo with Ubuntu 10.10. vgscan dosent locate the disk but I can se it in the diskutility. How can I find the name of the disk so that I can run “vgchange -ay c” ?
  8. Richard Millington Says:
    March 30th, 2011 at 6:01 am
    Thanks. Peter Schlesinger’s method works fine for me in LinuxMint 9, even though (4) modprobe fuse returned an error.
    Installed fuseext2 and lvm2 from the repositories.
    In terminal ran 5,6, and 7.
    Copy needed files.
    Change owner. (Copied files will be root)
    chown -R (user) /home/user/folder_name
    May need to changed permissions also.
    chmod -R a=rwx /home/user/folder_name
    Maybe Peter Schlesinger could make this a ‘sticky’ in the ReadyNas forums.
    Again – Thanks
  9. Mathias Says:
    March 30th, 2011 at 9:58 am
    @Brian Ost
    did you found a solution? I have the same problem.
  10. Bilal Says:
    April 3rd, 2011 at 9:30 am
    Hi, just like ext2fuse, fuseex2 on Ubuntu 10.10 is not allowing me to copy files > 4GB onto another ext3 system. The portion of file >4gb is rewritten from the start, so that files never end up greater than 4GB.
    Has anyone managed to work around this? I tried compiling fuse-ext2-0.0.7 on Ubuntu, but the compile doesn’t produce an executable. The changelog said it had fixed the >4gb problem
  11. Brian Ost Says:
    April 10th, 2011 at 3:13 pm
    Hi Mathias
    The free software for windows “R-Linux” did the job for me.
    It took some time for it to scan my disk, but it found all my data with folders and the right file names and extensions.
    Try it !!
  12. Maurice Says:
    April 12th, 2011 at 7:17 am
    @Peter Schlesinger ,
    Brian Ost has already said:
    “vgscan dosent locate the disk but I can see it in the diskutility. How can I find the name of the disk so that I can run “vgchange -ay c” ?”
    What are we doing wrong?
    Do we have to make Local Volumes?
    I used fresh installed Ubuntu 10.04 LTS
  13. Frederic Says:
    April 30th, 2011 at 12:03 am
    The method doesn’t work for me.
    The vgscan doesn’t detect my drive.
    # vgscan
    Reading all physical volumes. This may take a while…
    When I try to mount it manually the system return to me:
    # mount /dev/sdb1 /mnt/lvm
    mount: unknown filesystem type ‘linux_raid_member’
    This drive was used previously as RAID but not in my last configuration.
    Have you any idea to help me to mount this drive? Something is wrong with vgscan but I don’t know what.

Wednesday, July 18, 2012

NTP tips

setting time with ntp and other tools.

see if ntp running:  pgrep ntpd

stop service if running:  service ntpd stop

set from known server  ntpdate -u

Determining If NTP Is Synchronized Properly:  ntpq -p

ntpd notes

service ntpd stop
ntpdate <server>
ntpq -p

Saturday, July 7, 2012

Symantec anti virus removal

Symantic anti-virus client removal when there is a password required is accomplished as in this article.


1. Open Registry Editor (regedit).
2. Navigate to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusPro tect6\CurrentVersion\Administrator Only\Security\

3. Change the value for useVPuninstallpassword key from 1 to 0.
4. Exit Registry Editor and now you can uninstall Symantec AntiVirus Client.

Thursday, July 5, 2012

vmware esxi network adapters


vlance, vmxnet, flexible, e1000, e1000e, vmxnet2, vmxnet3

Available Network Adapters
Only those network adapters that are appropriate for the virtual machine you are creating, are available configuration options in the Choose Networks window.
  • Vlance — An emulated version of the AMD 79C970 PCnet32- LANCE NIC, an older 10Mbps NIC with drivers available in most 32-bit guest operating systems except Windows Vista and later. A virtual machine configured with this network adapter can use its network immediately.
  • VMXNET — The VMXNET virtual network adapter has no physical counterpart. VMXNET is optimized for performance in a virtual machine. Because operating system vendors do not provide built-in drivers for this card, you must install VMware Tools to have a driver for the VMXNET network adapter available.
  • Flexible — The Flexible network adapter identifies itself as a Vlance adapter when a virtual machine boots, but initializes itself and functions as either a Vlance or a VMXNET adapter, depending on which driver initializes it. With VMware Tools installed, the VMXNET driver changes the Vlance adapter to the higher performance VMXNET adapter.
  • E1000 — An emulated version of the Intel 82545EM Gigabit Ethernet NIC. A driver for this NIC is not included with all guest operating systems. Typically Linux versions 2.4.19 and later, Windows XP Professional x64 Edition and later, and Windows Server 2003 (32-bit) and later include the E1000 driver.

    Note: E1000 does not support jumbo frames prior to ESX/ESXi 4.1.
  • E1000e - This feature emulates a newer model of Intel gigabit NIC (number 82574) in the virtual hardware. This is known as the "e1000e" vNIC. e1000e is available only on hardware version 8 (and newer) VMs in vSphere5. It is the default vNIC for Windows 8 and newer (Windows) guest OSes. For Linux guests, e1000e is not available from the UI (e1000, flexible vmxnet, enhanced vmxnet, and vmxnet3 is available for Linux).

  • VMXNET 2 (Enhanced) — The VMXNET 2 adapter is based on the VMXNET adapter but provides some high-performance features commonly used on modern networks, such as jumbo frames and hardware offloads. This virtual network adapter is available only for some guest operating systems on ESX/ESXi 3.5 and later.

    VMXNET 2 is supported only for a limited set of guest operating systems:

    • 32- and 64-bit versions of Microsoft Windows 2003 (Enterprise, Datacenter, and Standard Editions).

      Note: You can use enhanced VMXNET adapters with other versions of the Microsoft Windows 2003 operating system, but a workaround is required to enable the option in VMware Infrastructure (VI) Client or vSphere Client. See
      Enabling enhanced vmxnet adapters for Microsoft Windows Server 2003 (1007195) if Enhanced VMXNET is not offered as an option.
    • 32-bit version of Microsoft Windows XP Professional
    • 32- and 64-bit versions of Red Hat Enterprise Linux 5.0
    • 32- and 64-bit versions of SUSE Linux Enterprise Server 10
    • 64-bit versions of Red Hat Enterprise Linux 4.0
    • 64-bit versions of Ubuntu Linux
    In ESX 3.5 Update 4 or higher, these guest OS are also supported:
    • Microsoft Windows Server 2003, Standard Edition (32-bit)
    • Microsoft Windows Server 2003, Standard Edition (64-bit)
    • Microsoft Windows Server 2003, Web Edition
    • Microsoft Windows Small Business Server 2003
Note: Jumbo Frames are not supported in the Solaris Guest OS for VMXNET 2.
  • VMXNET 3 — The VMXNET 3 adapter is the next generation of a paravirtualized NIC designed for performance, and is not related to VMXNET or VMXNET 2. It offers all the features available in VMXNET 2, and adds several new features like multiqueue support (also known as Receive Side Scaling in Windows), IPv6 offloads, and MSI/MSI-X interrupt delivery.

    VMXNET 3 is supported only for virtual machines version 7 and later, with a limited set of guest operating systems:
    • 32- and 64-bit versions of Microsoft Windows XP,7, 2003, 2003 R2, 2008, and 2008 R2
    • 32- and 64-bit versions of Red Hat Enterprise Linux 5.0 and later
    • 32- and 64-bit versions of SUSE Linux Enterprise Server 10 and later
    • 32- and 64-bit versions of Asianux 3 and later
    • 32- and 64-bit versions of Debian 4
    • 32- and 64-bit versions of Ubuntu 7.04 and later
    • 32- and 64-bit versions of Sun Solaris 10 U4 and later
    • In ESX/ESXi 4.1 and earlier releases, Jumbo Frames are not supported in the Solaris Guest OS for VMXNET 2 and VMXNET 3. The feature is supported starting with ESXi 5.0 for VMXNET 3 only.

      For more information, see Enabling Jumbo Frames on the Solaris Guest OS (2012445).
    • Fault Tolerance is not supported on a virtual machine configured with a VMXNET 3 vNIC in vSphere 4.0, but is fully supported on vSphere 4.1.

Thursday, June 28, 2012

notes about setting up wifi and camera on a raspberry pi

Has a lot of good notes about the task of adding a driver or drivers to a system and getting it going.

copied here because google lost the item and the web site 404's on it.

Setup of motion, RTL8188CUS realtek based wifi & UVC webcam

2 posts
by nf_ » Tue Jun 05, 2012 9:24 pm
Hi all.

Hopefully this will be of interest and help to someone trying to get a uvc webcam and/or realtek wifi dongle working on their rpi.

I hope this is the correct place to post this kind of topic.


I wanted to have a rpi with a wifi dongle & a uvc logitech webcam and motion installed.

Arch, has the webcam modules but unable to get the rpi arch image to
support either of my 2 RTL8188CUS realtek based dongles.

: Belkin surf n150 micro adapter

: Edimax N150 Wireless nano USB Adaptor

Debian, doesn't immediately work with the dongle, but fairly easy to get working using this great

script: viewtopic.php?f=26&t=6256

But.... the default rpi Debian kernel doesn't have the uvc webcam stuff.

So I cant use the script above, because I need to bake in the webcam.

So...these instructions should enable you to have a:

1) debian based distro (custom kernel)

2) wifi working with RTL8188CUS based adapters.
3) logitech webcam working.


What you will need

1 x linux machine
1 x rpi
1 x SD card
Wired network between rpi & linux machine
1 X Realtek based wireless dongle. !DO NOT PLUG IN UNTIL TOLD TO!
1 X Logitech webcam


Getting started..

Prepare SD with the image from

Lots of methods to do this.. take a look at:

Resize SD card if you need to gparted on your linux machine is your friend.


Boot for the first time.

Login as the user you have been given as part of the download for your initial image and change the password

Change your user (pi) password

Code: Select all
  # passwd

Change the root passwd

Code: Select all
  # sudo passwd

Switch to root

Code: Select all
  # su

Enter the password you just changed

Get everything up to date

Code: Select all
  # apt-get update
  # apt-get update [to clear duplicates]
  # apt-get upgrade

At this point I normally (2xpi, 2xpowerAdapters ) get a kernel panic on first upgrade
Just pull plug out and reboot

Login as root this time

Code: Select all
  # apt-get upgrade 

I want a fixed IP on this machine so I can find it when i disconnect the monitor
dont do this if you want the wired to be dhcp


Code: Select all
  # vi /etc/network/interfaces

(of course you could you emacs here)

Change the following line

Code: Select all
    iface eth0 inet dhcp


Code: Select all
   iface eth0 inet static

    address     <---- whatever is applicable to your lan config
    netmask    <---- whatever is applicable to your lan config
    network      <---- whatever is applicable to your lan config
    gateway      <---- whatever is applicable to your lan config

Then to write the file

Code: Select all

Code: Select all
   # ifdown eth0
    # ifup   eth0

* if after the next reboot you lose your ability to resolve hostnames

* i.e. ping --> unknown host
* just add:

Code: Select all
nameserver   (or your favourite DNS server IP address)

* to the bottom of /etc/resolv.conf


To see (or check ) the address assigned to your eth0 network interface

Code: Select all
  # ifconfig

eth0 inet addr, should be either a dhcp address or the one you set in the interfaces file.

Now I want to install Hexxeh/rpi-update tool

From here:

Code: Select all
 # cd
 # mkdir hexxeh
 # cd hexxeh
 # apt-get install ca-certificates
 # apt-get install git

Code: Select all
 # wget -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
 # rpi-update

Dont worry if you get this:

Code: Select all
 /opt/vc/sbin/vcfiled: error while loading shared libraries: cannot open shared object file: No such file or directory

* Always happens and no one seems worried about it.

Ok..... lets leave our rpi alone for a minute.

On our second linux (Ubuntu in my case) machine

(A lot of this next bit sourced from here:

Code: Select all
  # sudo apt-get install gcc-4.6-arm-linux-gnueabi
  # sudo apt-get install git-core 
  # cd 
  # mkdir raspberrypi
  # cd raspberrypi
  # git clone
  # cd linux
  # sudo ln -s  /usr/bin/arm-linux-gnueabi-gcc-4.6 /usr/bin/arm-linux-gnueabi-gcc
  # cp arch/arm/configs/bcmrpi_cutdown_defconfig .config
  # make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- oldconfig
  # make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k

Depending on your machine this might take a while.

(You can use -j flag if you have multi-core see notes on above url
you might have to press ENTER a lot)

This will have create a kernel image in: /home/yourUser/raspberrypi/linux/arch/arm/boot/

called: "zImage"
Now we need to copy it to our pi

* back on the pi....

Code: Select all
  # apt-get install sshfs
  # cd /mnt
  # mkdir linux
  # sshfs yourUserName@yourLinuxMachineIPorHostname:/home/yourUser/raspberrypi/linux linux

You can check it mounted okay by:

Code: Select all
  # df -kh

* will show you that /mnt/linux is mounted to yourLinuxMachines linux directory

Code: Select all
# cd linux
  # make modules_install
  # cd /boot
  # cp kernel.img /root/backup-original-kernel.img    

Now copy your new kernel over....

Code: Select all
  # cp /mnt/linux/arch/arm/boot/zImage kernel.img

You can check it worked by doing this....

Code: Select all
 # diff kernel.img /root/backup-original-kernel.img
  Binary files kernel.img and /root/backup-original-kernel.img differ

Fingers crossed

Now to get the wireless driver working........

Back on your Linux Machine.

Code: Select all
  # cd
  # cd raspberrypi
  # mkdir wifi

Grab the UNIX (Linux) RTL8192CU driver package from
its a long url... but this shortLink should get you there....
the file should be called something like this:

* Save the downloaded zip file in the wifi directory you just created

*! there must be a way of building this on the pi but I could not get it to work.
*! annoying as it means I cant use the install script.

Code: Select all
  # cd
  # cd raspberrypi/wifi
  # unzip
  # cd RTL8188C_8192C_8192D_USB_linux_v3.4.2_3727.20120404
  # cd driver
  # tar -zxvf rtl8188C_8192C_8192D_usb_linux_v3.4.2_3727.20120404.tar.gz
  # cd rtl8188C_8192C_8192D_usb_linux_v3.4.2_3727.20120404/
  # make KSRC=/home/yourUserName/raspberrypi/linux/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k
  # ls -ltrh

[you will now see you have a brand spanking new]


kernel module, that has been compiled to work with the kernel you prepared earlier.

Back to the rPi

Code: Select all
 # cd /mnt
 # mkdir wifi
 # sshfs yourUserName@yourLinuxMachineIPorHostname:/home/yourUser/raspberrypi/wifi wifi
 # cd /mnt/wifi/RTL8188C_8192C_8192D_USB_linux_v3.4.2_3727.20120404/driver/rtl8188C_8192C_8192D_usb_linux_v3.4.2_3727.20120404
 # cp 8192cu.ko /root
 # cd
 # install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/

Blacklist bad module

Code: Select all
 # echo 'blacklist rtl8192cu' >> /etc/modprobe.d/blacklist.conf
 # echo >> /etc/network/interfaces   <--- put a blank line at the bottom of our interfaces file.
 # echo "allow-hotplug wlan0" >> /etc/network/interfaces   <---- if we want to allow hotplug of our adapter
 # echo >> /etc/network/interfaces
 # echo 'auto wlan0' >> /etc/network/interfaces   <-- create an entry for our wlan0
 # echo >> /etc/network/interfaces
 # echo 'iface wlan0 inet dhcp' >> /etc/network/interfaces  <-- we can change this to static if it works.
 # echo 'wpa-ssid "putYourSSIDhere" ' >> /etc/network/interfaces   <--- this is the name of your wireless Lan.
 # echo 'wpa-psk  "putYourWirelassPasswordHere" ' >> /etc/network/interfaces
 # echo '8192cu' >> /etc/modules
 # depmod -a

Ok NOW plug in your wifi usb adapter..

Code: Select all
 # iwconfig

You should see something like this......

Code: Select all
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"YourWifiNetworkName"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.462 GHz  Access Point: XX:YY:ZZ:AA:BB:CC 
          Bit Rate:150 Mb/s   Sensitivity:0/0 
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=94/100  Signal level=44/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Code: Select all
 # ifconfig

Should give you something like this

Code: Select all
wlan0     Link encap:Ethernet  HWaddr XX:YY:ZZ:AA:BB:CC 
          inet addr:  Bcast:  Mask:
          RX packets:304 errors:0 dropped:310 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:52965 (51.7 KiB)  TX bytes:4064 (3.9 KiB)

Back on your linuxMachine

Code: Select all
# ping
64 bytes from icmp_seq=0 ttl=64 time=0.993 ms

Lets reboot and make sure it all works then.....

Code: Select all
# reboot

Ok... the goal of this for me is a rpi with wifi, camera and motion so actually I need to set
the wifi address to be static so I can connect to it, otherwise it will keep changing and without
a keyboard and screen attached it will be a pain.

Login to your rpi as root (or just prefix all commands with sudo, up to you.)

Code: Select all
   # vi /etc/network/interfaces

change the following line

Code: Select all
    iface wlan0 inet dhcp


Code: Select all

    iface wlan0 inet static
    address     <---- whatever is applicable to your lan config, not an address handed by your dhcp server
    netmask    <---- whatever is applicable to your lan config
    network      <---- whatever is applicable to your lan config
    gateway      <---- whatever is applicable to your lan config

Then to write the file

Code: Select all

Code: Select all
    # ifdown wlan0
    # ifup   wlan0
    # ifconfig

This should give you something like this

Code: Select all
wlan0     Link encap:Ethernet  HWaddr XX:YY:ZZ:AA:BB:CC 
          inet addr:  Bcast:  Mask: 

Back on your linux machine open a terminal window and

Code: Select all
 # ssh root@9192.168.0.81

* enter your password

Code: Select all
## hostname

OK all good, we dont need a screen or keyboard anymore.

Now unplug the keyboard from the rpi, we will need the usb for your webcam.
Plug your webcam in

Code: Select all
 # dmesg  (in your terminal window)

You should see something like this...

Code: Select all
usb 1-1.2: new high speed USB device number 6 using dwc_otg
usb 1-1.2: New USB device found, idVendor=046d, idProduct=0825
usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=2
usb 1-1.2: SerialNumber: AB81D3F0
Linux video capture interface: v2.00
uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
input: UVC Camera (046d:0825) as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input2
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
6:3:1: cannot set freq 16000 to ep 0x86
6:3:2: cannot set freq 24000 to ep 0x86
6:3:3: cannot set freq 32000 to ep 0x86
6:3:4: cannot set freq 48000 to ep 0x86
usbcore: registered new interface driver snd-usb-audio
rtw_set_ps_mode(): Busy Traffic , Leave 802.11 power save..
rtl8192c_set_FwPwrMode_cmd(): Mode = 0, SmartPS = 0

* I have tried this with the following webcams...
* logitech c120
* logitech c160

* lets see if a video device has been created.

Code: Select all
# ls -ltrh /dev/video*
crw-rw---- 1 root video 81, 0 Jun  4 18:42 /dev/video0

* ok good.
* almost there..

Install motion

Code: Select all
# apt-get install motion
# apt-get install uvcdynctrl
# apt-get install guvcview
# vi /etc/motion/motion.conf

Change: webcam_localhost on --> webcam_localhost off <--- this means we will be able to see the camera stream from other machines
Change: videodevice /dev/video0 To whatever video device was shown by ls -ltrh /dev/video*

Optional (but these are my settings):
Change: width 320 --> width 640 This will depend on your camera model.
Change: height 240 --> height 480
Change: framerate 25 --> ... nFramerate
Change: webcam_maxrate 25 --> ... camMaxrate
Change: output_normal on --> off , Im happy just to have the avi I can always jpeg split later if i want

Code: Select all
:wq!   <--- Save your settings and exit.

Lets try it.

Code: Select all
# motion 

All done.


Hopefully this will be of use or interest to others, its quite long so if you spot any mistakes
feel free to point them out.

I have read a lot of web pages trying to get all this to work, and Im sure I will have forgotten
the authors of some.

But…thanks and credit to those below :

MrEngman --- viewtopic.php?f=26&t=6256
everyone who wrote this: ... on=history

Cian's Blog ---
Hexxeh ---
Kenneth Lavrsen -- for maintaining motion.