Danny Tsang
image_alt_text

16

Feb/10

WordPress 2.9.2

Filed Under Windows, WordPress at 16th February 2010 20:35 by Danny
Tags:

Minor update to WordPress.

15

Feb/10

GNC 551 Alternate Podcatcher

Filed Under Podcast Shoutout at 15th February 2010 9:08 by Danny
Tags: ,

Yes another email on Geek News Central Podcast around 1 hour 12 minutes.

Episode 551

13

Feb/10

Mount ISO File In Linux

Filed Under Linux at 13th February 2010 1:03 by Danny
Tags: , , , , , ,

A neat trick in Linux is the ability to mount an .iso file as if it was a CDROM.

The command to do this is:
sudo mount -t iso9660 -o loop /home/danny/filename.iso /media/cdrom

where “/home/danny/filename.iso” is the path to the ISO file and the latter “/media/cdrom” is the mount point. In this case it will mount it where the CDROM would normally be mounted on.

Mount ISO as CD-rom not as a folder

12

Feb/10

NFS Server

Filed Under Linux, Windows at 12th February 2010 10:40 by Danny
Tags: , , , , , , , , , ,

Overview

Network File Share (NFS) is a protocol for sharing storage. It is quite common in Network Attached Storage (NAS) devices and is a standard compared to Samba which is Microsoft specific but has been ported to Linux.

Install NFS Server

Install the relevant software:
sudo apt-get install nfs-kernel-server nfs-common portmap

Configure NFS Server

Configuring NFS server is relatively simply. Edit the file /etc/exports file and add all the directories available as a share. The format should be as follows

/media/cdrom 192.168.0.1/24(rw,async)

  • mount point on local system.
  • host
  • permissions
  • Using the above string this would share the CDROM to any computer with the IP range 192.168.0.1-192.168.0.254 that has read and write permissions and requests can be process asynchronously.

    Specific IPs can be given to each share like this:

    /media/cdrom 192.168.0.1(rw,async) 192.168.0.1(ro,async)

    Computer 192.168.0.1 has the permissions described in the above example and the computer with 192.168.0.2 only has asynchronous requests and read only access to files for that share.

    When specifying mount points note where the spaces are and are not because spaces are read by the system so

    /media/cdrom 192.168.0.1 (rw,async)

    is invalid because there is a space between the IP address and the parenthesis.

    Once all the shares have been configured it is necessary to restart NFS to see the changes:
    sudo /etc/init.d/nfs-kernel-server restart

    Mount NFS Share On Linux

    Install the NFS client if the computer does not have a NFS server itself:
    sudo apt-get install portmap nfs-common

    To mount the share manually from the terminal type the following:
    sudo mount 192.168.0.1:/media/cdrom /media/share
    First is super user command sudo then mount command, IP address of NFS server followed by the path to share. The last parameter is the local mount point so in the above example it will mount the CDROM drive from the server onto /media/share directory of the client computer.

    To make the mount more permanent edit the /etc/fstab file and the following line, one for each NFS share.

    192.168.0.1:/media/cdrom /media/share nfs rsize=8192,wsize=8192,timeo=14,intr

    The only part that needs to be changed is the IP address, NFS share point and the mount point. This is highlighted in bold in the example above. The rest should be fine left as is. This change should mount the share when the computer is started.

    Mount NFS Share On Windows 7 Ultimate Edition

    NFS support does not come as standard with Windows so it has to be installed. Also I only found the feature in Windows 7 Ultimate Edition and not the Professional. I believe there is a Business Edition in between but do not know if it has the support for NFS.

    Go to the Control Panel and on the left hand side click on Turn Windows features on or off hyper link. It will load a list of software in a tree / node structure. Find Services for NFS and tick Client for NFS as a minimum.

    On the start menu right click on Network and select Map network drive. If this option is not in the start menu go to Computer and right click on Network from the left hand panel. A wizard will start for mapping a network drive.

    Select the drive letter to be assigned to the NFS share and for the Folder enter the address [server]:[path] for example 192.168.0.1:/media/cdrom
    Tick Reconnect at logon if you want it to connect on start up and click Finish to end the wizard.

    The only problem with mounting the NFS on Windows is every time Computer it takes a longer to scan and load the drives because it scans the NFS to get the size and amount used on the NFS.

    Summary

    NFS between Linux machines is perfect and a good way to share files. Mounting a NFS makes the local share look as if it was it was local drive.

    For Windows I’d stick to using Samba because it doesn’t take a while to scan the shared drive every time the drive is highlighted to get the drive information such as amount of space available. It’s not a nice to administer two services doing the same thing but it works.

    NFS Server and Client Configuration in Ubuntu

    It is possible to spoof the MAC address in Windows without going into the registry.

    The network will go down during this process so it’s best to stop or wait till all downloads or any other network related activity has stopped.

    Right click on Computer and select Manage.

    Go to Device Manager on the left hand side list to display all the hardware usually categorised by type. Drill down into Network adapters and select the Network Interface to be changed.

    Right click on the Network card and select Properties.

    Go to the Advanced tab and look for Network Address in the Property: list. In some cases if this property is not listed it can be added in from the same window. Selecting the Network Address will change the right hand side to what can be changed. By default this is set to Not Present. To enter a custom MAC address select the Value radio button and enter in the MAC address with no spaces or colons in the textbox provided. OK all the windows to accept the changes. To undo this change simply change the selection of the radio buttons from Value to Not Present.

    The optional steps below allows a reserved IP address to be re-assigned to the new MAC address.
    Either restart of go to Start Menu > Run…. type in cmd and press enter. A DOS window should appear. type in ipconfig /release to disconnect all network adapters and ipconfig /renew to get a new IP.

    How to Change or Spoof MAC Address in Windows XP, Vista, Server 2003/2008, Mac OS X, Unix and Linux