Saturday, December 13, 2008

Setting up NFS share on Ubuntu

This post summarizes steps I've done to setup a NFS share on Ubuntu 8.10 VM host and mount it on an another Linux machine (Debian Linux running on embedded arm in my case).

Host machine: Ubuntu, 192.168.1.110
Client machine: Debian, 192.168.1.175

1. Install NFS package by either going to Synaptic Package Manager (System->Administration->...) and searching for nfs-kernel-server or typing the following on the command line:
$ sudo apt-get install nfs-kernel-server

This will download and install all the required dependencies.

2. Add the directory desired to be shared, permissions and other information to /etc/exports file.
$ vi /etc/exports
Add without quotes: "/path/to/nfsshare 192.168.1.110/255.255.255.0(rw,no_root_squash,insecure)"

Here, 192.168.1.110 is the IP of the host. The mask allows NFS connections from the following IP addresses: 192.168.1.0-255. This can be modified to suit the needs.

3. Restart NFS and update the exports list.
$ sudo /etc/init.d/nfs-kernel-server restart
$ sudo exportfs -a

4. To mount NFS root, run on the client:
$ portmap &

5. Mount NFS shared directory on the client machine.
$ mkdir /mnt
$ mount -t nfs 192.168.1.110:/path/to/nfsshare /mnt

6. Now the files placed into /path/to/nfsshare/ on the host are accessible from the client!

Notes
1. Mounted devices can be found here:
$ cat /proc/mounts
or just run
$ mount

2. For automatic mounts after restart of the client, I added the following line to ~/.bashrc file:
mount -t nfs 192.168.1.110:/path/to/nfsshare /mnt

3. To check the IP addresses of the Linux machines, run 'ifconfig'.
To check the connection between the machines, use the ping command:
-from client: 'ping 192.168.1.110'
-from host: 'ping 192.168.1.175'

References:
[1] Enabling NFS in Ubuntu
[2] Easy-Peasy Ubuntu Linux NFS File Sharing

Adding a root user without root access (Ubuntu)

If you are trying to run a root command and your username is not in the sudo list (i.e. getting a message like " is not in sudoers file ubuntu" when running 'sudo '), then add yourself to the sudoers file.

1. Reboot the machine and enter the recovery mode (press ESC a few times during the startup and select Recovery Mode)
2. Execute 'visudo'. Copy the line containing 'root ...' from sudoers file replacing root with your username.
3. Save the file and root. Your username now should be allowed to run sudo command.

Password Reset in Linux (Ubuntu Recovery Mode)

Here is another password recovery post that I previously used for dual boot system with Grub:
http://cybercamping.blogspot.com/2007/04/easy-password-reset-in-linux-using-grub.html

This post explains how to reset a password using Ubuntu's Recovery Mode. I used it on my Ubuntu 8.10 VM running under Windows.
1. Boot the machine and hit ESC few times to skip hardware boot options, and go into the grub menu
2. Select a Recovery Mode option.
3. If a Recovery Menu window popped up, select "root Drop to root shell prompt"
4. Type 'passwd ', hit enter and select your password.

To see the list of user names on the machine, look in /home/ directory (ls /home). Also, one can check the passwd file (tail /etc/passwd).

Sunday, November 16, 2008

Installing Ubuntu in VMWare

Ubuntu version: 8.10
VMWare Workstation 6

Download Ubuntu from http://www.ubuntu.com/getubuntu/download/
Burn ISO image (i.e. using free open source InfraRecorder from http://infrarecorder.org/)
Install VMWare and create virtual machine (I allocated maximum of 10 Gb in 2 Gb chunks and allowed expansion on demand since I am not expecting high performance)
Power on the created VM and install Linux as usual
Install VMWare Tools on Windows by selecting it from VM menu
Install the Linux VMWare tool package. Refer to: http://www.howtogeek.com/howto/ubuntu/install-vmware-tools-on-ubuntu-edgy-eft/

Problems with network interface
Symptoms: no connection to internet. Ipconfig command does not exist, eth0 interface does not exist (System->Administration->Network Tools shows only loopback interface)

From Windows:
run ipconfig /all to see VM interfaces. For me one was a direct bridge and another one for NAT.

From Ubuntu:
Run ping www.ubuntu.com. This ping test replied for me, so it's not too bad
System-> Preferences->Network Connections: I tried adding wired connection and editing the IP, mask and gateway for interfaces from "ipconfig /all" run above.
I don't know whether this have helped, but after restart, eth0 interface appeared under wired connections. My VM was connected.

VMWare Player
After the VMWare's trial period ends, I will install the pre-packaged version of Ubuntu (VMWare Ubuntu Appliance), which can be run from the free VMWare player.
Ubuntu 8.10 from Sisoracle: http://www.visoracle.com/vm/ubuntu810/
Ubuntu 8.10 from Tuxdistro: http://www.tuxdistro.com/torrents-details.php?id=1339
VMWare Player: http://www.vmware.com/download/player/

File access between Windows and Linux
With VMWare Desktop and installed VMWare tools, copying text and files is as easy as drag and dropping. When using free VMWare Player, tools like Samba and WinSCP will be required. The following guide explains the whole installation process including tricks with VMWare Player, accessing Ubuntu's command line via Puttu from Windows and zipping the VM onto usb key. http://www.tanguay.info/web/tutorial.php?idCode=installUbuntuOnVmware

Installing CVS under Ubuntu 8.10

My experience installing CVS server on Ubuntu 8.10 Desktop
CVS version: 1.12.13
CVSD version: 1.0.15

Quick reference:

##########################################################################
# Installation
##########################################################################
# Install CVS
sudo apt-get install cvs

# Alternative install (RPM to DEB)
# Go to: ftp://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-linux/RPMS/i386/
# Download the latest RPM, save to ~/Desktop/
# Convert to DEB and install
# Summary of instructions from: http://ubuntu.wordpress.com/2005/09/23/installing-using-an-rpm-file/
#sudo apt-get update
#sudo apt-get install alien
#sudo alien -k name-of-rpm-file.rpm
#sudo dpkg -i name-of-deb-file.deb

# To remove CVS
#apt-get remove --purge cvsd

# Install CVS server
sudo apt-get install cvsd

##########################################################################
# Server Setup
##########################################################################
# Create root for repository
sudo cvsd-buildroot /usr/local/cvsroot/

# Create cvs group
groupadd cvs

# Give cvs group the ownership of the repository
sudo chown -R root:cvs /usr/local/cvsroot

# Set permissions so that the files created by the group remain
# in its ownership
# Note: until this command was run I could not execute the init
# due to permission problems
sudo chmod -R g+srw /usr/local/cvsroot/

# Initialize repository (creates empty repository in the root)
# /usr/local/cvsroot/CVSROOT/ admin folder will be created
cvs -d /usr/local/cvsroot init

# Add users to to cvs group.
# Note: to add user using gui, run sudo users-admin or
# access Users and Groups via System->Administration.
# Unclock the changes, modify the group and check desired users
sudo usermod -G cvs lomtik

##########################################################################
# Initial check in, check out, commit and release
# Eg project: ~/work/sample_project/ has file hello.c
##########################################################################
# Add CVSROOT environment variable
# In sh/bash, add the following lines to .profile/.bashrc:
CVSROOT=/usr/local/cvsroot
export CVSROOT
# In csh/tcl, add the following lines to .cshrc/.tcshrc:
#setenv CVSROOT /usr/local/cvsroot

# First check in
# Check in files from the current directory to sample_project folder
# with vendor lomtik and initialtag sample_proj_v_1_0
cd ~/work/sample_project/
# Note new directory: /usr/local/cvsroot/sample_project
cvs import -m "initial check in" sample_project lomtik sample_proj_v_1_0

# Move files from current directory to a temporary folderand check out
# their version from the repository
mv ~/work/sample_project/hello.c ~/work/temp/
cvs checkout sample_project

#
# Modify hello.c
#

# Commit/Check in the changes
cvs commit -m "Added changes to the file" hello.c

# Release the module
# After commit, the changes are synched with the vault. However,
# cvs does not lock the local files. Thus, either manually delete
# files or run release command to let cvs to check whether something
# has been changed since the last commit.
# Note: run from above dir
# Note: -d deletes the file
cd..
cvs release -d hello.c

##########################################################################
# Revisions
# http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_4.html#SEC44
##########################################################################

##########################################################################
# Notes
##########################################################################
# Repository directories relative to repository look can be found in:
# /etc/cvsd/cvsd.conf
# i.e. Repos /cvsrepo
# Repos /demo

# Things to look at:
# jCVS - GUI
# VC package for emacs

# CVS Space usage:
# 3 x single repository size or
# num_developers x single repository size

# Ideas:
# Setup VM with repository (can use pre-built images)
# Use free VM Player on any system for portability

# Rereferences:
# CVS Manual: http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_toc.html#SEC_Contents
# Quick Ubuntu, but incomplete: http://www.markcasimer.com/2006/06/12/InstallingCVSOnUbuntu.aspx
# Quick Ubuntu, missing details and group permission setup: http://sanatio.blogspot.com/2005/12/cvs-server-on-ubuntu.html
# Good guide, not for Ubuntu: http://rimuhosting.com/howto/cvs.jsp
# CVS RPMs: ftp://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-linux/RPMS/i386/
# Installing from RPM: http://ubuntu.wordpress.com/2005/09/23/installing-using-an-rpm-file/

Saturday, September 20, 2008

Inexpensive Civilian Space Flights are Around the Corner

With the alignment of recent political and commercial interests, the near orbital space flights will significantly go down in price in the next few decades opening up doors for space tourism.

It's been several years since Space Adventures Inc. with Russia's RSA launched their first commercial customers in space for $20M each. However, the future promises much cheaper flights available to a wider range of civilians within a decade or so. After the breakup of USSR and the end of the Cold War NASA's funding has decreased. At this point most of their effort concentrated under the umbrella of exploration is targeting past-Moon missions, like Mars Exploration Rover, leaving the orbital space and the only Earth's satellite to the commercial sector.

The key to affordable space tourism is spacecrafts built with commercial purpose in mind. One great idea was to motivate a private sector with a large prize. After the launch of X Prize competition with $10M prize to the first company who builds a spacecraft able to take 3 people to near-orbital heights two times in a week, a number of designs made it to the finals with SpaceCraft1 winning the competition in October 2004.

Google announced its Lunar X Prize competition in September 2007 and has already 15 registered teams with deadline set to December 31, 2010 (2014 latest) to send a robot to the Moon, rover it for half a kilometer and transmit visual information back!

Space Adventures Inc., the same company that launched Denis Tito and Mark Shuttleworth to space, announced the plan to deliver up to 3 civilians to the far side of the Moon as early as 2010 for $100M per seat. Now, that's a bit pricey, but it's a first step for non-government sponsored Moon exploration!

I don't know what other superpowers are thinking about this topic, but if the governments would not allow their commercial sector to enter that business, they would miss out a lot of opportunities in innovation, publicity and financial areas. I think opening up part of the orbital space is a great idea that will inspire people of all ages around the world, motivate the creative minds and cruise us through the Space Age with larger benefits for humanity.

Links:
Peter Diamandis' TED talk on X Prize
Holiday in Outer Space
SpaceCraft1
Google Lunar X Prize
Moon tourism
Picture of Martian sunset taken from Gusev's crater (Mars)

Thursday, July 31, 2008

Interfacing FPGA to microcontrollers

An article going over high-level details of interfacing a microcontroller and FPGA: read here
[PLDesignLine]

Sunday, June 08, 2008

Air Cars

Clive Maxfield (PLDesign Line) made a post in April about air-powered cars working on compressed air. Will they be able to compete with the cars of future?

Article
MiniCAT
CityCAT
Other models

Monday, May 19, 2008

2nd Gen iPhone

2nd Gen iPhone as early as this summer? Read the possible set of specs on engadget

Sunday, May 11, 2008

Partitioning tools

Keywords:
restore MBR
grub error 22
partition
tools

Restoring mbr: http://www.neowin.net/forum/lofiversion/index.php/t405091.html
1. Run fixmbr
2. Run fix boot

Free partitioning tools:
CloneZilla GParted LiveCD
Gparted LiveCD
Parted Magic
XP Recovery Console CD image
Partition Logic
Ranish Partition Manager
Cute Partition Manager

Shareware partitioning tools:
Paragon Partition Manager
Paragon Hard Disk Manager
Terabyte BootIt NG
Acronis Disk Director
V-Com (Avanquest) Partition Commander
EASEUS Partition Manager
7Tools Partition Manager
Spotmau Partition Genius

Sunday, April 13, 2008

FPGA-based hardware acceleration of C/C++ apps

link

Free IP licensing services

Creativecommons.com
Share your work with the rest of the world - free IP licensing service

Wednesday, April 02, 2008

Harward's Student Database Hacked

Harward's student database has been hacked and the backup of the whole database structure has been posted online via BitTorrent . The message in the torrent file said: "Maybe you don't like it but this is to demonstrate that persons like tgatton(admin of the server) in they don't know how to secure a website".

Tuesday, April 01, 2008

Virtex 57 FPGAs break the PetaByte Clocking Barrier

In other words, it's April Fool's Day: Reach NEW Heights with Xilinx Virtex 57

Monday, March 31, 2008

Miuro - a multimedia droid

Miuro - a multimedia system equipped with camera and sensors that follows one around the house. Equipped with Wifi, it can play internet radio and mp3s from an iPod. The robot can be easily trained by tapping it with a hand and “showing” the motion path.

http://miuro.com/

Sunday, March 30, 2008

Google's Lost Spectrum Bid and Future Plans, White Spaces

AT&T and Verizon won parts of 700 MHz spectrum bid that ranged around $4.6 billion [Wi-fiplanet.com]. Even though Google was one of the bidders and lost the auction, it keeps pushing towards opening the air for other (than cell phones) mobile devices. The targeted spectrum is the "white space", previously used as a guard band between broadcasting channels. FCC is welcoming the initiative by the White Space Coalition, including Google, Microsoft, Dell, Intel, Samsung Electro-Mechanics, HP, Philips, and Earthlink. Once FCC approves the proposals, the consumers might see a multitude of wireless personal devices on the market that are not based on the conventional cellular networks. Access to internet from anywhere can become massively available to anyone for a fraction of the price that RFs (regular folks in this case) are paying right now for their cellular plans, if not free (Go Google)! As a result, the cell phone monopoly will face the serious competition and will be forced to offer more competitive prices.

We need the similar initiative in Canada! I am sure most of Canadians are sick and tired of expensive mobile plans that they have compared to our Southern neighbor.

[Google's Next Spectrum Battle, Wi-fiplanet.com]
[First White Space devices failed, FCC, reports InternetNews.com]
[White Space Coalition]

VoIP reviews, news, tutorials

I've been browsing Wi-Fi Plant website and came across the following interesting pages related to VoIP.

[List of VoIP articles]
[Skype vs. Other VoIP providers]

Thursday, March 20, 2008

Robotics and DIY Projects

1. Robotics projects from EDN:
Robotics Project (sound sensing, hardware, soft)
Platforms and development tools
CoroBot - fast robot prototyping (runs Windows) - fast but expensive too!

2. Dogoid - a diesel powered four legged robot that is made to carry load over a heavy terrain. Current application is mostly for military use. The really cool part about it is its very natural movement! The videos on the website show robot recovering from a push, ice slip, walking on snow downhill and other. A must see!
Dogoid on PLDesignline: link
BostonDynamics: link

3. The guys at Gostai.com (France) are working on a Universal Software Platform to allow the reuse of code from one robotic system to another. They've created a language (URBI) that brings together parallelism, and event-based programming, works on Windows, Linux and MacOS and is interfaced with C++, Python, Java, C#, others. There is a number of commercial robots that are now supported and can be easily programmed using the existing URBI code created by the URBI community, including Sony's Aibo doc, Create, Mindstorm, Bioloid, KHR2, etc.
Key innovations: link
URBI's innovations video, small tutorial showing how easily a robot like Aibo can be programmed: link
List of currently supported robots: link

Monday, March 17, 2008

A few DIY project ideas

An idea, DIY rool-up keyboard: http://www.gizmowatch.com/entry/diy-project-create-your-own-roll-up-keyboard/

Installing a small camera into sunglasses: http://www.gizmowatch.com/entry/prepare-spying-sunglasses-for-secret-recordings/

Sunday, March 16, 2008

Windows Memory Optimization

The following two articles explain how to optimize Page File in Windows and how to use Task Manager to detect Page File usage.

links:
Page file Optimization
Memory Usage Tracking using Task Manager
Windows Process Utilities
Windows Utilities (from Sysinternals, technet.microsoft.com)

Thursday, March 13, 2008

Bug Labs: "Legos meets Web services & APIs"

"Startup Bug Labs, which aims to turn the task of constructing smart devices into a non-technical, lego-like affair, will begin accepting orders for its Linux-powered electronic building blocks later this month for shipment starting Mar. 17."

"Open source-based platform for programmers to build not only the applications they want but the hardware to run it on"

[DeviceGuru's article]
[wiki]
[forum]

Thursday, February 21, 2008

99-cent FPGAs from Actel

Actel announced two new low-density FGPAs: IGLOO and ProASIC3 starting at only 99-cents! The target markets are communicatinos, consumer, medical and industrial applications (including smart phones, system controllers, portable medical devices, wireless sensors). With the example spec of 128 macrocells, 15k gates, 5 uW, and 1 Kb nonvolatile Flash ROM, it promises to beat the power consumption by 10x compared to the leading PLDs!

PLDesign Article

Sunday, February 03, 2008

UWB News

- August 13, 2007: UK is the first EU state to deregulate indoor use of UWB technology [vnunet]
- US and Japan (deregulated at the end of 2006, beginning of 2007) [vnunet]
- Canada (March 2004, Rogers Wireless Inc. acquired the first UWB license for experimental testing) [Canadian Amateur Radio Society]

Friday, February 01, 2008

The Aging Brain: How to age successfully

Here are a few advices that I've heard at one of UBC's open lectures "The Aging Brain: How to age successfully." Here is the podcast of the full speech and here is the link to UBC podcasts blog.

Good indicators of long life, as suggested by the speaker. Some of them are rather funny.
- Be happy, avoid chronic stress that depresses immune system (stress hormone secreted by the adrenaline eventually comes back to the brain and kills neuron cells)
- Acute stress is not bad
- Choose your carrots (parents, genes are important)
- Good for men to be married (even though sometimes it decreases life) . Here, I'd like to add that my teacher of Aikido says that "even though married man live longer, at the end, they are more willing to die".
- For women by statistics usually unmarried women live longer
- Get higher salary (the more money you make and save, the more you'll have when you retire, hence, prolonging your life)
- Get higher position (the higher you are, the more stress you can pass to subordinates)
- Eating less prolongs life (think of it as if you start eating 30% of food now, you gain 30% more life)
- many more others...

Wednesday, January 30, 2008

Using FPGAs for HDTV design

Tam Do's article from Altera on EDN. Read here.

Monday, January 21, 2008

Adding a Mic jack to iTouch phone - use with VoIP!

I just got a 16Gig iTouch as a gift and almost immediately went to search for hardware hacks for it. To my pleasant surprise, iTouch has a microphone circuitry inside allowing one to activate it! The guys at www.touchmods.net created an iTouch USB to mic converter and a software that can be installed on the jailbroken gadget to allow the happy owners to make VoIP calls.

VoIP call demo from touchmods
Freeappleipodtouch.com's tutorial link

There's another cool hack that allows using Motorola bluetooth headset with iTouch: link

These are the great hacks! I needed the voice recording capability and it looks as it's possible without the need for the second device!

Good job, the Touchmods team!

Thursday, January 17, 2008

Entrepreneurship Articles, News

Startup from PhD thesis (Farid Mobasser, Ottawa U., 2006 winner (one of two) of Atherton Entrepreneurship Award)

Places to get funding: Sponsoring innovations (Ottawa, Canada)

ArsDigita: From Start-Up to Bust-Up (Philip Greenspun tells ArsDigita's story), thanks to Nick for the link.

Sunday, January 13, 2008

Reconfigurable ECAs - new platform for SDR?

Article by Chen Zhang, Virginia Tech. Chen implemented a simple ZigBee using an ECA (Element CXI's Elemental Computing Array). ECAs provide "higher computational density, lower power consumption and higher structural robustness" [1] compared to GPPs, FPGAs and DSPs. It looks like a great new platform for Software Defined Radio (SDR) projects!

[1] Dynamically-reconfigurable ECAs - Part 4 (Student Project #2), Programmable Logic, Jan 2, 2008

Related:
ECA Architecture
ECA Programming Model
ECA Project (FIR Filter)
ECA Project (Image Processing Algorithm, ECA vs FPGA)