Wednesday, January 11, 2012

HP Mini 1000 - Ubuntu Netbook Edition 10.04 Lucid


[Readers note: this post was written back in May 2011 so some of the materials may not be the most up to date (e.g. I think Ubuntu has merged the netbook remix and desktop into one single edition). It is presented purely for reference purposes.  ]

Cutting a long story short, I purchased a HP mini 1000 back in 2009 and it has been basically collecting dust since. (I thought the netbook itself looks great, and I still do).



So, in the interest of making the netbook useful, I went ahead to install Ubuntu Netbook Remix having confirmed my netbook is one of the supported models.

Ubuntu’s netbook edition is available under the “alternative-download” page. (Click “alternative-download” tab on the main download page). The latest netbook edition is still 10.04 (which is used on my netbook). It seems like from then onwards, Ubuntu offers only either server or desktop edition.

As a side note, since the HP netbook has no DVD rom, I used the Universal USB Installer to create the USB install thumb drive for this installation.

The actual installation is rather straight forward so I have skipped the details, whereas tweaking the system is actually the “fun” part, but thankfully there is a wiki Ubuntu page dedicated to this topic. 

For those who couldn't be bothered reading this, there are three fixes for HP mini 1000: 
1). the wireless connection doesn't work unless the wireline is plugged in when system starts up (use GUI System->Administration->Hardware Drivers and install the "restricted driver"), 
2).Ethernet port (amend  the options "acpi_os_name=Linux" to GRUB_CMDLINE_LINUX_DEFAULT line in the /etc/default/grub file and then do an "update-grub"). and 
3).Setting Firefox's browser cache to point to a RAM disk to avoid killing the solid state drive with constant read/write (Open firefox, in the URL type about:config. Promise you'd be careful, and then set the parameter "browser.cache.disk.parent_directory" with the value "/dev/shm/firefox") .

So here with a screen shot of the web browser on Ubuntu running on HP mini 1000... 


P.S. Not shown on the screen is the wireless status actually has an exclamation mark as if it isn't connected, although the internet connection works perfectly fine. 


Ubuntu Server 11.04 Halts when issues “reboot” command


The Node Controller I built in an earlier post consistently experienced this system halt issue. Basically, after I entered a “reboot” command. the system halted with a “shutting down” message showing on the screen (forever).

The hardware is Dell Optiplex 745 and the operating system was Ubuntu 11.04 (server).
root@ubuntu-NodeController:~# uname -a
Linux ubuntu-NodeController 2.6.38-13-generic-pae #53-Ubuntu SMP Mon Nov 28 19:41:58 UTC 2011 i686 i686 i386 GNU/Linux

I did some search online and found the issue was caused by a Ubuntu 11.04 software bug

So I upgraded the Ubuntu software release:
# sudo apt-get install update-manager-core
# sudo do-release-upgrade


Now the system is running on Ubuntu 11.10 server and the issue is resolved.

root@ubuntu-NodeController:~# uname -a
Linux ubuntu-NodeController 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 i686 i386 GNU/Linux





P.S. while searching for the solution, I stumble upon a post suggesting to set the “reboot” option to one of these “bios”, “apci” and “force” (in the kernel). 

# vi /etc/default/grub
GRUB_CMDLINE_LINUX="reboot=x"


# update-grub

While the suggestion was not helpful to my setup, it could be useful for other cases of system restart halt where OS upgrade is not an option. 

Tuesday, August 30, 2011

Motion and a low-cost home surveillance system


I have this Creative Live webcam from years ago. While it works perfectly well, its resolution is no better than my iPhone 3Gs…
So, rather than throwing it away or let it sit around idle, I connected it into the Ubuntu server, installed the “motion”package and turned it into a low-cost web surveillance system…

As you shall see, it is a straight-forward procedure:
1. On the Ubuntu server, to install motion, enter:

# apt-get install motion
2. Configure "motion.conf" file to enable remote access (web browser):
File: /etc/motion/motion.conf
# Restrict webcam connections to localhost only (default: on)
webcam_localhost off
# Restrict control connections to localhost only (default: on)
control_localhost off
3. Lastly, restart “motion” daemon:
/etc/init.d/motion restart
The webcam’s image should be available through the url “http://:8081”

Monday, August 22, 2011

BSD Mail/ SendMail 101

While working on HE's IPv6 certification, I gathered some useful experiences with setting up a basic mail server on FreeBSD so I thought it would be worthwhile to do a quick blog on this...
Overview
Firstly, the Mail User Agent (MUA) is what the user uses to compose emails. BSD Mail is the default MUA which comes with FreeBSD. Its syntax is as follows (for composing emails):
#mail
Subject:
[Mail Content]
. Remember to enter a “.” in a new line to end writing the email
EOT
Secondly, the Mail Transfer Agent (MTA) is what interacts with the rest of the internet i.e. the MTA is responsible for sending and receiving emails. Sendmail is the default FreeBSD's MTA.
I configured the following files (under /etc/mail) to have this setup working:
1. "virtualusertable" - the email address accepted and local user to forward the email to.
2. "access" - like an ACL for emails, it identifies the incoming/ outgoing email addresses permitted/ denied.
3. local-host-names - email domain accepted into local machine.
In /etc/rc.conf, I have also added "sendmail_enable=yes"; along with setting my NAT gateway to accept TCP 25.
For those interested in more details, FreeBSD Handbook has dedicated a page on Sendmail. According to this page, there are certain occasions when either a "make" or process restart is required for the configuration changes to take effect but in the interest of keeping this post simple I will not go into any details here.
That seems to be it, Sendmail was running fine and accepting emails:
home-unix6# /etc/rc.d/sendmail status
sendmail is running as pid 1170.
sendmail_clientmqueue is running as pid 1174.
On DNS
Also worth noting is when you send an email, the local MTA actually perform two DNS queries:
1. MX (Mail Exchange) query against the destination email domain - to resolve the mail server's hostname.
2. A (or AAAA) query against the MX response, to resolve the IP address of the receiving SMTP server.
P.S. As a test, I tried sending an email to my service provider, iiNet email account, using this machine. Interesting enough, I received an error message informing me the email I sent has been rejected due to the "poor reputation" of the MTA...at least I can be sure my setup is working (there is a Whirlpool forum on this from others with similar experiences).

Hurricane Electric IPv6 Certification

Hurricane Electric has a free IPv6 Certification available online.

I used a laptop and a FreeBSD server with the related open-source packages installed, and managed to reach the Sage level.

IPv6 Certification Badge for JonathonL

I recommend this test for anybody who wish to gain further exposure to IPv6 technologies.