Add Software RAID 5 on your current system

If you have a current system running smooth but is running out of spaces, you might consider to add a new hard drive to it. Or, you can add a software RAID 5 to the current system under Ubuntu is very easy. Here, I will not show you how to do it but Jonny will show you on his blog.

The following is not required for Ubuntu 7.04 as it will generated automatically :

sudo echo “DEVICE partitions” > /etc/mdadm/mdadm.conf
sudo mdadm –detail –scan >> /etc/mdadm/mdadm.conf

Simple, right?

RAID on VirtualBox

I had tried VirtualBox and Vmware player to install Ubuntu 7.04 as RAID 0 and 5 but they were unsuccessful. VirtualBox crashed while installing packages and Vmware player cannot install the GRUB at the end of the installation. However, I had successfully installed RAID 1 on both virtualization softwares. The RAID 1 installation is for the OS itself and data as well as swap partitions.

For creating .vmx for Vmware player, you can go to EasyVmx and choose “easyvmx” icon to create. After creating the vmx file, you can download it and extract on your hard drive and use it directly. Easy?

For creating virtual image for VirtualBox, you have to follow the instructions of the program. After creating a hard drive, you can clone it to a second drive by the following command at the directory of “home/samiux/.VirtualBox/VDI” (where “samiux” is my home directory). After that, you can use the drives for the RAID 1 :

VBoxManage clonevdi vraid-0.vdi vraid-2.vdi

*where vraid-0.vdi is the first drive and vraid-2.vdi is the second drive.

The speed of VirtualBox is slightly faster which is compared with Vmware player.

For OS, I choose Ubuntu 7.04. As the “alternate” version already has mdadm installed, you can create RAID 1 easily. For instructions, please refer to this guide.

After trying the virtualization, I am now full of confidence to create a real RAID 5 on my system later.

Enjoy RAIDing!

Updated on 2007-07-27 :
The RAID 1 on VirtualBox cannot be boot up when one of the hard drive was removed.

FreeNAS

FreeNAS is not a Linux distribution. It is build from FreeBSD. It’s stable version 0.68 is rock and very easy to setup. I have tried the beta version 0.685b but unsuccessfully setting it up. It also supports RAID.

Enjoy!

Dated on 2007-07-21 :
I updated the firmware from 0.68 to 0.685b1 without any problem. Be keep in mind that you should install embedded option of 0.68.

MultiGet for Ubuntu

Multi thread downloader is available for Ubuntu or Debian – MultiGet. It speeds up your download for a large file such as CD/DVD image. It is a great software.

Enjoy downloading!

Rhythmbox for music sharing

I have a Buffalo LinkStation Pro which is a NAS that running Samba. I have some OGG songs in it. I searched the net for the audio streaming from the NAS but in vain. I overlooked the Rhythmbox which comes with Ubuntu 7.04 (or Ubuntu SE). Rhythmbox comes with DAAP music sharing plugin which allows me to listen the songs on the NAS. Setting up for the purpose is very simple, just a few clicks.

Rhythmbox is a very great product!!

Router to router

I have a wired and a wireless routers. I connect them together to make them looking as one router. Then, I can access all the computers within the same intranet.

Router A (connect to the internet)
Step 1 :
I assigned a wired router to be Router A which is connected to the internet via optical fiber. I did nothing on the Router A. The LAN IP is 192.168.0.1.

Router B (connect to the Router A)
Step 2 :
I assigned a wireless router to be Router B and I should change the settings of it.

WAN -
Set the WAN IP to be static 192.168.111.2, subnet mask 255.255.255.0 and gateway 192.168.111.1, no matter your Router B is wired or wireless. For me, Router B is a wireless. (You can change the WAN IP and gateway to meet your requirement, here is only an example)

LAN :
Disabled DHCP and set the LAN IP to 192.168.0.200, subnet mask 255.255.255.0, no matter your Router B is wired or wireless. (You can change the LAN IP to meet your requirement, here is only an example)

Step 3 :
Connect Router A and Router B via a cable on LAN ports only. WAN port will not be used at the Router B. Connect Router A to the internet as normal. Now, you can access Router A by 192.168.0.1 and Router B by 192.168.0.200 via your browser. Any computer or laptop will be assigned an IP of 192.168.0.XXX.

That’s all. Enjoy networking!

Bridge network interface on VirtualBox

When I want to streaming TV by SlingBox on Windows XP by VirtualBox under Ubuntu 7.04, I found the “Host Interface” produced error. That’s mean I could not streaming TV? No, there is a method to solve this problem.

Step 0 :
If you have not install VirtualBox on your Ubuntu 7.04, follow this guide -
How to install VirtualBox on Ubuntu 7.04

Step 1 :
Install the required packages -

sudo apt-get install uml-utilities bridge-utils

Step 2 :
Create TAP interface -

sudo tunctl -t tap1 -u samiux

** where “samiux” is the username of your Ubuntu (here is my name)

Step 3 :
Create a br0 bridge -

sudo brctl addbr br0

Step 4 :
Make your real network interface be promiscuous -

sudo ifconfig eth0 0.0.0.0 promisc

Step 5 :
Link your real network interface to bridge br0 -

sudo brctl addif br0 eth0

Step 6 :
Assign an IP to the br0. If you are using DHCP -

sudo dhclient br0

Or, if you assign an IP yourself -

sudo ifconfig br0 192.168.1.102

* the IP may be different from yours.

Step 7 :
Link TAP to bridge br0 -

sudo brctl addif br0 tap1

Step 8 :
Activate TAP interface -

sudo ifconfig tap1 up

Step 9 :
Change the permission of /dev/net/tun -

sudo chmod 0666 /dev/net/tun

Step 10 :
At the VirtualBox startup panel, choose “Host Interface” and add “tap1″ to “Interface Name”.

Step 11 :
At the guest (after boot up the guest OS), change the IP of the guest OS to the same subnet of your host.

IP 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
DNS #1 208.67.222.222
DNS #2 208.67.220.220

Step 12 :
Now, you can execute the SlingBox player to watch your TV programmes on your guest OS (Windows XP) under Ubuntu 7.04 by VirtualBox.

When you reboot your guest OS, you need to repeat the Step 2 to 9 to play the SlingBox Player. Or, you can create a executable script to make your job easy.

Enjoy!

Updated on 2008-JUL-30 :

I wrote an updated method to bridge VirtualBox 1.6.2 on Ubuntu 8.04.1 at here.

Tidy your Ubuntu up

After install and uninstall some packages or softwares, your system will left some unusable libraries and configure files. You can easily to remove them by the following method :

sudo apt-get autoremove

sudo apt-get clean

sudo apt-get install deborphan gtkorphan

Now, from your “System” — “Management” — “Remove orphaned packages”, select “Options” and then click “Show uninstalled packages with orphaned configuration files”. If there is any, select them all and click “Confirm” to remove them.

Tidy your system up easily!

Logitech Quickcam Messenger on Ubuntu 7.04

I have a Logitech Quickcam Messenger for a long time. It works great in Windows. However, there is no driver for it in the few past years. Now, you have a good news. You can just install the the driver on your Ubuntu box and it is ready to go.

You can use it with Kopete. You can install it to the Gnome environment also.

Enjoy!

Bluetooth networking with Windows Mobile 5 under Ubuntu 7.04

It is quite easy to share the internet connection with Ubuntu 7.04 laptop between Windows Mobile 5 pocket PC for HSDPA.

Step 1
Ubuntu 7.04 side :

Step 1a
Install the following packages :

sudo apt-get install bluez-pin bluez-utils gnome-bluetooth

Step 1b
Turn on the Bluetooth of Pocket PC and find the Pocket PC from the Ubuntu Laptop by issuing :

hcitool scan

Step 1c
Then, you will see the following (the address is different from yours) :

Scanning …
00:0E:07:37:7C:BD Samiux

Step 1d
Set the passwords of the pairing at Ubuntu laptop (where “Samiux” is the identification of Pocket PC) :

bluez-pin in Samiux
bluez-pin out Samiux

I set both password as the same.

Step 1e
Append the following lines to “/etc/network/interfaces” :

sudo nano /etc/network/interfaces

auto bnep0
iface bnep0 inet dhcp

Step 2
Pocket PC side :

Step 2a
Turn on your Pocket PC’s Bluetooth connection and set its visibility to ‘Show to all’ or equivalent.

Step 2b
On your Pocket PC to Start->Programs->Internet Sharing, choose Bluetooth PAN, and your NetworkConnection and choose Connect.

Step 3
Then, connect your Ubuntu 7.04 laptop to your Pocket PC :

sudo modprobe bnep
sudo pand –connect 00:0E:07:37:7C:BD

Enter passwords (you have set them previously) on Pocket PC and laptop.

Step 4
Now, you will get an IP and you can surf the internet with the connection of Bluetooth.

When you want to reconnect to the internet again after disconnection, you just repeat the Step 2 to 3.

Cheers!

Updated on 2007-Nov-12 :
For Ubuntu 7.10, you just ignore the Step 1a and 1d. I use this method to surf the internet on ASUS Eee PC.

Follow

Get every new post delivered to your Inbox.