13 December, 2009

Home server based on Ubuntu Server 9.10

I have just bougth a new HW to replace my pretty outdated home server and decided to install Ubuntu server on it. The hardware itself is a standard desktop PC, with and Athlon II X2 CPU and 4 Gigabytes of RAM. This amount of RAM is only needed because I plan to run Virtual Machines on the server, which is consuming a lot of memory. I have 3 SATA disks in the machine one with 250G and two each 1T. The 250G disk is ment for the system, while the 2 bigger disks will form the 2T data storage part.

The basic networking funcions like DHCP, DNS are provided by a Ericsson W25 3G router so this server is mainly to provide storage for the Windows and Linux computers at home. As a server running continuosly consumes a lot of power, this server can be remotely shut down and waken up, to run only when it is needed.

So here are the steps of the installation:

  1. Install Base System: Download the Ubuntu Server 9.10 64 bit version and do a standard installation. I have used a 20 G install partition and accepted the 10 G swap partition. When selecting the options, I went fo LAMP server, Open SSH, Samba server. I was thinking about installing the virtual machine host, but finaly decided to go for VMWare Server, which may be easier to use.
  2. Install WEBMin: To have an easy to use administration interface, install Webmin based on this guide: http://www.ubuntugeek.com/ubuntu-serverinstall-gui-and-webmin-in-ubuntu-810-intrepid-ibex-guide.html
  3. Create a Logical Volume for data: Now for the data disks we will use logical volume management (LVM2), later this will make it easier to add or remove hard disks, without having to backup all data. For this we need to add the module lvm2 with the following code:
    sudo apt-get lvm2
    After this on the Webmin interface press "refresh-modules", then goto the Hardware/Logical Volume Management and first create a Volume Group, by adding the first 1T hard disk, the go the the Physical disk part and add the second 1T hard disk. Now you have a Volume Group with 2 T space, now add a logical volume to it, ocupying all space. Before adding the physical disks to the volume group, you may need to create a single partition on the, ocupying all space. I have used the name "disks" to the Volume Group and "data" for the Logical Volume, this way, the created 2T volume can be accessed under /dev/disks/data.
  4. Format the data disk: Unfortunately webmin do not support exfs4 so we have to format the disk by ourselves, with the following command:
    mkfs.ext4 /dev/disks/data
    We do not want the disk checking to run on startup and we don't need to reserve any space on the volume, so we adjust it:
    tune2fs -r 0 -c 0 -i 0 /dev/disks/data
  5. Creating users: In my setup every user has teh same access rights on the data volume, and this is achieved, by putting everyone to the "users" group and adding write access for this group to all files. For this we need to create one account for each family member and add them to the users group, this can be easily done on the Webmin web interface.
  6. Mounting the new disk: First create a directory "/media/data" as root then add the following line to /etc/fstab:
    /dev/disks/data /media/data ext4 defaults 0 2
    Now check if the volume was really mounted.
    sudo mount -a
    If it mounts well, then let's create a subdirectory for storing user data:
    sudo mkdir /media/data/UserData
    sudo chown youraccount:users /media/data/UserData
    chmod 0775 /media/data/UserData
  7. Setting up Samba: Samba is neede to provide access to Windows computers. The default setups is already working after installation, what we need to do is to share the UserData directory and add users to Samba.
    The simplest way of adding users is to use WEBMin and in the Servers/Samba use the Convert unix users menu. The dafult settings are Ok, we just need to run the import.
    With shares we need to add one share for the data volume. There are two spacial aspects, in the access permissions for the share you should enable write access and in the file permission part you should chane both file and directory permission to 0775 to give other family member the possibility to write the files.
We are now done with the first part, what remains is to create a small web interface to check the disk usage and to be able to hibernate the system. I will write about that in a next post.

Ericsson W25 Administration manual and root password available

On their support forum http://fwt.ericsson.net/ Ericcson made available the Administation manual which also includes the passwords needed to get root access to the 3G router.

This gives the possiblility for every owner, to get access to the Linux inside the box, and do some customization like DynDNS, WEB server, speed tests automatic restarts and more.

24 November, 2009

Windows 7 immediatly waking up after sleep

At home I have set up a new Windows 7 computer and the intention is to put it to sleep mode when we don't use it, to achieve ~5 sec start time.

When I set it up, I realized, that as soon as I put it to sleep mode, it waked up. After checking the event viewer, it turned out that it received the wake up signal from the network.

Finaly I figured out that on the configuration menu of the Ethernet adapter on the Power Management tab, I had to check that only allow magic packet to wake up computer.

This solved the problem immediately.

Custom firmware for everything

I like very much custom firmware and altrough I have very little experience with it, I like very much reading about it.

So here is a list of links to different custom firmware sites:

Firmware for MP3 players - RockBox

Firmware for Canon cameras - CHDK

Firmware for Western Digital Media Players - B-RAD

Firmware for Asus O!Play Media Players - MiniModding

Firmware for Samsung TVs - SamyGo

Firmware for Raidsonic NAS-1000/NAS-2000 NAS devices - NAS2000.org

Firmware for routers:



Tomato firmware

Freetz for AVM FritzBox

08 April, 2009

Accessing WAP sites from a desktop computer

Sometimes you may need to access WAP sites from your desktop computer, for example if you want to save a downloaded java game or you want to access some information on WAP which is normally only accessible from a phone.

There are two problems to be solved:
  1. user agent setting for the browser - you may need to change this, in order to make the web site think that you are browsing it from a mobile phone
  2. using the operator's wap network, because some content is only available if you are accessing it from the operators network.
Changing user agent
For the first, theeasiest solution is to use Firefox and then change the 'general.useragent.override' setting of the browser for example to:
to simulate a Nokia 6230.
You can check your browsers user agent on this web page.
For a list of user agent string for different phones go here.
Using the WAP network
The easiest way of connecting your computer to the WAP network is to use a mobile phone over bluetooth and for the connection use the wap apn provided by your operator.