Monday, October 31, 2011

Duplicate linux box.

Say you want to have several machines to be exactly alike that run Debian or Ubuntu Linux.  You will want to set up the first machine the way you want it.

Now we need to get the list of packages that have been installed (software installed via ppa's may still have to be setup manually.)

$ dpkg -–get-selections > installed-software.log

x11-common                    install
xauth                        install
xfonts-encodings                install
xfonts-utils                    install
xkb-data                    install
xml-core                    install
xz-utils                    install
zlib1g                        install

You could probably edit this file to add any last minute packages to be added or removed.

Now you want to do a minimal install of Debian. You will want to uncheck the graphical environment when tasksel asks you what packages you want installed. That will make the rest of the install go quickly.

After the reboot of the finished install, you will want to be able to have ssh and scp file capabilities so on the destination machine so install the ssh programs. (note: on Debian you will also have to install as root sudo and include your user name in /etc/sudoers).

$ sudo apt-get install ssh openssh-server

Now you want to copy the installed-software.log file from the setup machine to the new destination machine via the network.

$ scp  installed-software.log [destinationmacineipaddress]:~/.

On the destination machine  you need to confirm the repositories are accessible with

$ sudo apt-get update

Now you need to let the destination machine aware of the installed-software.log.

$ dpkg -–set-selections < installed-software.log

And finally you want the system to do the update with the software list.

$ apt-get dselect-upgrade

This will install the duplicate software.

to make sure the machine is update you will want to:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

If there are any issues you can always issue the command:

$ sudo apt-get upgrade -f

That should be it for the software install part. if you tweaked  any configuration files, those will be needed to be duplicated over to the new machine also.


Just wanted to clone drive to drive locally. Install the destination drive as the second drive (/dev/sdb). Boot with a live linux cd/dvd:

$ sudo fdisk -l

To make sure which drive is which.

$ dd if=/dev/sda of=/dev/sdb

To keep and image for later:

dd if=/dev/hdb | gzip -c > /image.img

Then later to restore the image

gunzip -c /image.img.gz | dd of=/dev/hdb

Just want to clone the system over the network and do not have any fancy cloning software. no problem. Just boot with a live or minimal linux distro and type:

$ sudo nc -l -p 9901 | dd of=/dev/sdc

That will start the destination machine listening to receive data. Then boot with a live cd on the destination machine:

$ dd if=/dev/sda | nc ipaddressofhostmachine 9901

i.e. dd if=/dev/sda | nc 9901

Some people might use:

$ sudo nc -p 2222 -l |bzip2 -d | dd of=/dev/sdb

$ sudo bzip2 -c /dev/sda | netcat hostipaddress 2222

i.e. $ sudo bzip2 -c /dev/sda | nc 2222

That is it now for cloning. Update: You can always use clonzilla live cd or clonezilla/drbd server also.

Sunday, October 30, 2011

Recent projects

Completed a few instructables lately that might interest people.

Get gmail via the command line:


Do graphics without a fancy graphics card:

Using a linux computer to do screencasting:

A couple of sequels:

A few of my favorite homemade dinners and deserts:

Linux admin tool:

Texas Geek:

See for all the new instructables.

Underused linux command.

Most every software now a days is mouse or gui (graphical user interface) driven, but the real power comes when you can use the command line or what some people would call a dos environment. They are nothing alike. Even Microsoft, one of the biggest gui advocates is going back to the command line with MSWindows server 8 if what I am told is right.  Well, the Linux, Bsd, Unix, and other like operating systems never lost that advantage. (Note: you will need to be connect to the internet).

One of the more popular variants of Linux uses a command called tasksel which can be invoked with:

$ sudo tasksel

What does that do for you do you ask? it allows you to install various environments with just a few keystrokes. The above command brings up a menu allowing you to choose what environment or package you want to install. This can be everything from choosing a desktop to installing a variety of servers.

Package configuration

    ┌───────────────────────┤ Software selection
    │ You can choose to install one or more of the following predefined
    │ collections of software.
    │ Choose software to install:
    │    [ ] Basic Ubuntu server  
    │    [ ] Cloud computing: Walrus storage service 
    │    [ ] Cloud computing: all-in-one cluster           
    │    [ ] Cloud computing: cluster controller          
    │    [ ] Cloud computing: node controller                
    │    [ ] Cloud computing: storage controller
    │    [ ] Cloud computing: top-level cloud controller
    │    [ ] DNS server                         
    │    [ ] Edubuntu server                 
    │                               <Ok>           

In fact there are quite a few options more than what you see here. For example:

    │    [ ] Basic Ubuntu server        
    │    [ ] Cloud computing: Walrus storage service
    │    [ ] Cloud computing: all-in-one cluster          
    │    [ ] Cloud computing: cluster controller         
    │    [ ] Cloud computing: node controller            
    │    [ ] Cloud computing: storage controller        
    │    [ ] Cloud computing: top-level cloud controller
    │    [ ] DNS server                         
    │    [ ] Edubuntu server                 
    │    [ ] LAMP server                       
    │    [ ] Mail server                          
    │    [*] OpenSSH server                 
    │    [ ] PostgreSQL database          
    │    [ ] Print server                          
    │    [ ] Samba file server                 
    │    [ ] Tomcat Java server            
    │    [ ] Ubuntu Enterprise Cloud (instance)      
    │    [ ] Virtual Machine host                             
    │    [ ] 2D/3D creation and editing suite           
    │    [ ] Audio creation and editing suite        
    │    [ ] Edubuntu KDE desktop                      
    │    [ ] Edubuntu desktop                              
    │    [ ] Kubuntu desktop                                
    │    [ ] Kubuntu netbook                                
    │    [ ] LADSPA and DSSI audio plugins       
    │    [ ] Large selection of font packages       
    │    [ ] Mythbuntu additional roles               
    │    [ ] Mythbuntu frontend                          
    │    [ ] Mythbuntu master backend              
    │    [ ] Mythbuntu slave backend                 
    │    [ ] Ubuntu Netbook                                
    │    [ ] Ubuntu desktop                                 
    │    [ ] Video creation and editing suite       
    │    [ ] Xubuntu desktop                               
    │    [ ] Edubuntu live DVD                           
    │    [ ] Kubuntu Netbook Remix live CD      
    │    [ ] Kubuntu live CD                                
    │    [ ] Kubuntu live DVD                             
    │    [ ] Ubuntu Netbook live environment   
    │    [ ] Ubuntu live CD                                 
    │    [ ] Ubuntu live DVD                              
    │    [ ] Xubuntu live CD                               
    │    [ ] Manual package selection               (detailed choosing)

I will not dwell on each of the details except to say that it is a matter of checking or un-checking what you want setup. You can also set up a specific option without ever going to the menu. Then you can automate installs even easier. One of the most popular local setups is a web server. That way you can server out your own web pages. Sometimes this is known as a "lamp server". Also know as Wamp for MSWindows systems and then Mamp for Mac OSX systems.  The amp part is where A stands for Apache (web server part), Mysql (the database part), and P for PHP (programming part). That is not the only web server available, but one of the most common.

For example if you wanted to just install the web server in one command,  you would use:

$ sudo tasksel install lamp-server

More details at:   it is pretty much that easy except for answering a few questions such as what root password you want for MySql (pronounced MySqueal).  So you can have a basic setup for a web server in minutes. Some systems may not have tasksel installed, you will have to install it with:

$ sudo apt-get install tasksel

If you wanted to, you could set up a computer just test your basic html skills.  You could have an old pentium  II or III to install just the basic system (from an ubuntu server install cd) without a desktop and then do the command line lamp-server install. You would have a cheap training platform that you could use at home or work. Another way to save a computer from a landfill. Just a thought. By the way you could do this in a virtual machine also such as Virtual box or the like.

minimal install
Ubuntu has always been said as the Linux distro for beginners and entry users. It comes with plenty of free software and most of the things will just work after you installed it. However, if you have noticed, the recent build of Ubuntu is getting more and more resource intensive (with more animation and effects) and also come bundled with plenty of software that you probably have no use for. In short, it is getting bloated and doesn’t run well on old laptop anymore (at least in my case). While you can install another distro like Linux Mint, another alternative is to strip off all the software and unnecessary stuff and install Ubuntu from scratch. Here is how you can install a minimal Ubuntu on your (old) PC.

To get started, we can use either the Ubuntu Server edition or the Ubuntu minimal CD as the base install. Both come with the minimum packages to get the distro running and don’t come with any pre-installed software. The Ubuntu Server edition is more focus on server usage though. For this tutorial, we will be using the Ubuntu Minimal CD.
1. Download Ubuntu Minimal (mini.iso) for your PC architecture. The file size is only less than 30MB.
2. You won’t be able to create a USB startup disk with this iso file, so the only way is to burn it into a bootable CD.
3. Make sure your PC/laptop is connected to a LAN network. Insert the CD into your CD-rom and boot up your computer from the ROM. This is what you will see. Select “Install”.
4. Select the language, follow by your location.
5. Let it detect your keyboard. Optionally, you can select “No”, you can select from a list of keyboard layout (the most widely used is English (US)).
6. Next, the installer will proceed to configure some files for networking. When it is done, it will prompt you to enter the hostname. This will be what you will see in the terminal later, so change the hostname to something more personal, like “my-laptop“.
7. Select the mirror for Ubuntu archive that is closest to your location. This allows you to update your system and retrieve packages faster.
8. Unless you are using a proxy to connect to the outside world, leave the HTTP proxy field blank.
9. The installer will now retrieve the necessary packages from the mirror site. Once it is done, it will prompt you to reformat your hard disk. I assume that you are going to use the whole hard disk, so in this case, select “Guided – use entire disk”. If not, you can select “Manual” and configure the partitioning accordingly. I won’t go into the detail here.
When prompted, select “Yes” to confirm the partition setting.
10. Now, sit back and let the installer do its work. Once it’s done, it will prompt you to enter your username, password and whether you want to encrypt your Home directory.
11. Go grab a coffee while the installer do the final installation on your PC.
12. When prompted on how you want the security update to be done, select “Install Security Update Automatically”.
13. The next part is the important part. Here is where you can choose what to install on this machine. Personally, I want to choose what to install on this system, so I am going to select “Manual Package Selection”. You can do otherwise, though.
14. The last thing it will install is the GRUB loader. Select this if this is the only OS running in the machine and the GRUB loader does not interfere with other bootloader.
15. Finally. this is what you will see when the installation is completed. Remove the CD from the CD-rom and select “Continue” to restart the computer.

Saturday, October 29, 2011

How to tell a real computer tech.

Probably going to get lambasted for this article, but it is something to think about when judging a potential employee. Can a potential employee use what they have or do they need thousands of dollars just to do the simplest thing to get going.  Here we will pit a confirmed Microsoft software only advocate versus someone who has at least some familiarity with linux or is willing to try something new and use the systems allotted to them.

In each of two separate rooms on the desk is a Pentium II computer with 128 megs of ram, minimal graphics card, network connection, floppy drive and a 4 gig hard drive. This system will have access to the internet. Also on the desk, are two items. A brand new MSWindows 7 dvd install disk and a gpxe based floppy setup to install linux remotely via the network. The two potential techs are sent to each of the separate rooms to get their computer up and running plus send an email to predefined email address left on a piece of paper also on the desk.

After an hour we hear the  Microsoft software only advocate say he or she thew away the floppy as being worthless. Then they go on to complain they did not have a real computer to complete the job. They felt the project was unfair and demeaning. They also said they wanted no part of this type of company.

At the same time, we go over to the other room and find the other applicant working away sending an email as requested in the test. The floppy was put to full use and the MSWindows dvd was left untouched. That applicant in his or her email thanked the company for giving them such an opportunity to be useful.

Which applicant do you think should be offered the position? Which potential employee would you want? You might be also thinking, how can I use Linux to save money in my company?

Thursday, October 27, 2011

Your first web program.

Wanted a no fee and a bit more basic introduction to web programming, So I deleted the previous article.   Hopefully this one is free all the way through. If you are using linux, you can certainly use, gedit, nano, or vim to create a file for the video. They default to the ascii format automatically. These videos use the old style html programming, but it is still a good start.

The intro video:

Second video:


Monday, October 24, 2011

Market research.

One of the interesting things about market research is what in the past worked well? Should I use that to my advantage.  For instance, I looked at what tutorials have done best.

From that, I deduced that antennas were very hot. Did a few more instructables on antennas. They are also doing well. Then I thought about this blog and wondered what might make it get more peeks. Well to be fair we concentrated on Microsoft last time. It is only fair that we give equal time to Linux or Ubuntu in particular.

Let us know what you would like to hear about.

Saturday, October 22, 2011

Wednesday, October 19, 2011

Free Tv

One of the big things now is to be able to record what is on tv. Most of your cable providers will rent you a DVR (Digital Video Recorder) so you can record the shows you like (with limitations). Of course your computer can me made to do that also. In fact we made our own DVR with open source software. It is know as Mythtv ( I actually have built two of them. One for the one analog (now defunct) tv reception methods and one for the new digital tv reception. Love being able to record a lot of PBS educational media either for later viewing, or just be able to look at again and again.

Cable viewing is getting rather expensive. so we dumped the tv portion of cable. We now use what is know as OTA-TV or Over-the-air tv. It's free!! Your selection is not as great but, since so many people are dropping cable tv, more and more cable stuff is comping to over the air tv.  In fact, cable tv providers are dropping their rates because the of the new competition from OTA-TV. Also we still use analog monitors the media said you did not need anymore. As standalone digital tuners become extinct that will become true that you may not be able to use an analog monitor.  The dtv conversion boxes make this possible. With the price of digital TV's coming down like a rock, we may eventually upgrade.

What are the choices in stations? Well that depends on where you live. We are lucky enough to get over sixty stations. Granted a good portion of those are foreign language stations, but it never hurts to learn a new language with the world as dynamic as it is. You also will probably get a plethora of shows and movies from the past. Considering some of the newer movies, the oldies but goodies are not so bad.  In any case we get enough to provide for our needs.

The over-the-air TV is also called "Antenna TV". Kind of cute. Despite what the advertisements say, there is not really such a thing as a digital tv antenna. That antenna is just a regular antenna.  You do not have to go out and purchase a special antenna. Many people including me have either used the old rabbit ears or made their own antenna. If you research OTA-TV, you will find out that one of the more popular antennas is known as the "Coat hanger antenna" that you can build for almost nothing. To be honest there are quite a few home brew antennas to choose from. Most TV retailers try to downplay the use of the homemade antennas.  You can find some interesting antennas at:

To see what tv stations might be available for you, you can go to:


Here is an example of ota-tv. Not as bad as some people would say...

I took this movie with my camcorder, so there will be a little variation.  Is your cable tv provider still going to be on your payroll?

Monday, October 17, 2011

Rebuilt a new(old) computer.

As a tech, not so long ago when installing MSWindows on users computers at a former job, people were dismayed at the fact of having to use a mouse via a gui (graphical user interface) with wysiwyg (what you see is what you get pronounced wizzywig). They protested they preferred the keyboard only environment. They exclaimed the keyboard environment was more efficient and exacting. In fact, we who were installing the new environment were verbally accosted for the change over. Now if you suggest using a system that does not have a gui, you go through the same negative feedback.

Decided to do a new kind of roughing it by building a system that was technically obsolete using a non-gui environment, but the operating system was up to date. Yep, that means everything has to be done through the keyboard.  Makes me think of the "Star Trek" movie where the Scotty character was using an old Apple Macintosh computer and could not get it to work. He was trying to talk to the mouse. He was told he had to use the keyboard in addition to the mouse to make it work.

What to use? I had a spare Dell Pentium II 333 mhz based computer that has 256 megabytes of ram. cdrom (not dvd) and a twentyfive gig hard drive. Today's computers typically use drives that have thousands of gigs of storage.  I probably used just a four gig drive for even more effect. The operating system would be Debian Linux latest Squeeze version. (Debian will also run on those old G3 Apple new world Macs.) All I needed was an install cd to get going.

Looking for picture that went here.

Installed Debian Linux Squeeze with the most important free as in speech software I needed. i.e. Mail (accessing gmail with alpine) , spreadsheet, light web browsing, database, word processing, music player, text based graphical utilities, gpm to capture screen shots (had to have one mouse based program), and a host of other software such as time and idea management  If that was not  enough, accounting software, a web server, and programming utilities were also included. This all came to a total of under two gigabytes of space including the operating system. That meant I still had ninetyfive percent of the hard drive still free! The latest proprietary operating systems probably would have not only not work on that system, but could not fit on the hard drive I was using. Software cost: $0 Hardware cost: $0 as the hardware was all what someone did not need or want anymore.

People say you have to have all that gui stuff to make life worthwhile. I am not sure that is true. For example with that old system, I can do what is known as web page scraping. You can automate getting what you need off the web. You can translate languages, get your horoscope, weather, sports scores, and a ton of other information without spending so much oohing and aahing over the graphics. For an example of web page scraping see: There are other follow up instructables too.

$ ./ "el toro" es en
the bull

$ ./gw 77331
Weather: Observed at Wolf Creek Air Cond., Coldspring, Texas
Updated: 12:52 AM CDT on June 22, 2011
Temperature: 78.9°F / 26.1°C
Wind: WNW at 0.0 mph / 0.0 km/h
Conditions: Overcast
Humidity: 70%
Dew Point: 68°F / 20°C
Pressure: 29.90 in / 1012.4 hPa (Rising)

Note: using text makes it easier for my computer to recite the weather for me. Which means I can be doing other things while getting the report!!!

 So this next week, I going to try to use only that machine to do all my computing. Again a sort of computer roughing it. Guess, what I am getting to is probably ninety percent of what we does not require a super system.  Now it is time to put my money where my mouth is.  One less computer to the dump and one more computer that extends it's ROI. Later.

Sunday, October 16, 2011

Thank goodness! Up and running again.

Well fortunately, I had a system I was building to replace oesrvr1. Pulled the hard drive from that machine and installed it in oesrvr1. After making a few adjustments, The system was serving the main page and a few other things. Since I needed to replace a lot of software anyway. It was not a big deal all the applications were not installed. The lamp services and phpmyadmin were installed and they was the most important. Began to restore files.  Etc etc etc.

Anyway, the real reason I needed to have to old server back up again was to take advantage of what is known as GPXE. Gpxe is the open source version of the pre-execution environment that allows a computer to boot into a working environment without a storage system in use or enabled. This usually entails having special network card in a computer system that contains enough information to boot into the network. PXE has been around a long time. Normally if you turn on your computer, you will hear a hard disk drive whirl up to speed and eventually the computer boots to your operating system locally. PXE allows you so to speak to have a remote hard drive. No hard drive on the system means less labor and maintenance costs.

 There are several ways to achieve remote booting. The traditional was was to load enough software on the client or desktop machine to use what is called a terminal services client so to speak.  The terminal server that all the client computers talk to does all the heavy lifting and the client computer is virtually a dumb terminal.  No server and you can not use your client computer. As servers and clients have become more powerful. you actually now can have remote hard drives (sometimes this is know as AOE or ISCSI). So no one has to come to your desk to fix your software. All support (updates and corrections) can be done remotely!

For the reason I wanted to use the gpxe is sort of a combination of above. Traditionally you had to have several servers set up for you to serve out what you need at the desktop (i.e. tftp and dhcp). That can be time consuming and cause problems in more complex environments. GPXE allows you to use just a web server (like the one you are connected to now) to get your harddisk so to speak. That means from anywhere on the planet with internet access. you have access to your hard drive. That means you do not have to have a hard drive with you when traveling. A security bonus if some foreign country wants to take your computer. They do not get your hard drive and or data!!!!

One of the things, I have done is  as a tech to install or reinstall computers for clients.  That usually means I have to carry around a lot of software with me. With a web server to dole out the software, nothing virtually has to be taken with me.  On older computers this can be a challenge though, as might at least need a usb stick, floppy, or minimal cd/dvd rom to boot the remote system.

Today I needed to install the operating system on a computer that only had a hard drive. I temporarily hooked up a  floppy drive to get to the gpxe web server.  Made sure the computer was hooked to the internet and had access to the web server that had the gpxe startup software. Booted the floppy in the computer and was instantly hooked up to a network install of the Debian linux operating system. The boot up took under a minute. To say the least clients are amazed when they see you do that.  They usually ask where the boot operating system cd is. I do not need it anymore. One caveat, If where you are booting from has slow network and or slow internet, then you have to do things the old fashioned way.

Example at:

For more info, check out:

Forgot to mention that with proper setup you can have a client or an employee of the client insert the floppy or etc into the machine to be installed or upgraded and then remotely via vnc or the like you can do all the setup. Centos and Redhat linux has allowed you to do that for a long time.

Saturday, October 15, 2011

Alas poor oesrvr1

In memoriam: oesrvr1 passed away yesterday. Even as it went through it's last clicks and thrashes, it managed to stay alive long enough for major files to be backed up. It's 15 gig drive heart of a drive finally gave out. What a trooper! Everyone who saw it's web pages today mourn for it's loss. I know I am thankful for all oesrvr1 has taught me over the years. The hard drive will leave it's parts such as the permanent magnets to science so that all will still enjoy it's life in another. oesrvr1a will take it's place of honor. Goodbye old friend...
Think I originally installed Ubuntu 6.04 on the system and did in place upgrades to ubuntu 10.04.  Never ran any Microsoft windows products on it. For an old Dell GX1 Pentium II, it definitely earned it's keep and the roi (return on investment) can not be measured. Think I bought it used for twenty dollars from a local electronics store. Later, we cloned it with Clonezilla a while back, but always tried to archive the web server files on occasion. Must have done at least ten or more articles at with it. Spent so much sshing into it to learn about web serving, home automation, and programming that it almost seems like losing a family member. Fortunately, I have a backup lamp (Linux, Apache, Mysql, and PHP) server ready to take it's place. Just have to reinstall all the apps and web pages. Time to move on.

Thursday, October 13, 2011

Thinking outside of the box.

One of the ways to gather knowledge is to go through old software source code and or other technical books with source code. Source code is a set of instructions that can be converted into what a computer understands to do a specific job.  This web page uses the HTML language. You can easily view the source code with your web browser view > page source. Recently, I picked up a couple of books for a few bucks that had some code written in the old "Beginner's All Purpose Instruction Code" commonly known as Basic. Unfortunately, some people who were high and mighty programmer types gave me some grief over the purchase. Actually the Basic language is still supported in one form or another even on the latest computers. Even with that, the real reason I purchased the books was for the algorithms that it used via Basic to do some calculations. 

Those same algorithms could easily be converted to a variety of more recent popular languages such as Java, C++, or etc.  Sometimes you just have to get out of the box to get more benefit from what you already have.

A little program I wrote years ago, but it can be the skeleton of something new including moused based point and click features. Sorry Oracle....

We lose another great one.

Dennis Ritchie, Father of C and Co-Developer of Unix, dies.

Sunday, October 9, 2011

More out of what you have (part 2)

Finished my part beginner series on web page scraping with   Sort of baby steps to data mining on the web.

Think I talked about using an old Intel Pentium II computer to be a web server among other things.  People must really be thinking about using more legacy computer equipment from the views I get on some of my instructables. For instance I made an adapter cable that would allow some older "AT" motherboards to be used with the newer "ATX" based power supplies. (More info at: Also see an increase in the views of my two home automation instructables. I did one for linux ( and one for MSWindows XP ( If I had a newer version of MIcrosoft windows, I would certainly have included it also. In any case they are just an introduction to home automation via a web page. They barely scratch the surface, but are good starting points to keep equipment valuable. Also made a break out companion cable to make it easier to interface with the printer (parallel) port of a computer ( and a mini version Also made one for the joystick port, but since the joystick port is anything but standard, I did not do an instructable for it.  If you get a chance take a gander at those. Wish Insteon, X10, or the like would send some of their modules to show off.

So far my screen casts have been silent, but no longer. I have now finally rigged up a mike.

You can find the plans for the changeable boom at:  (


Thursday, October 6, 2011

Some thoughts.

My condolences go to the people and their families that work at Mapple (reference from a Simpsons episode), I mean Apple.  The media interviewed the WOZ aka Steve Wozniak and he was very classy about Mr. Steve Jobs passing.