Thursday, May 1, 2008

NFS file sharing

Here's how you share files between two Linux machines, using NFS.

  • Go to the Synaptic Package Manager
  • Find nfs-kernel-server and install

Configuration in machine 1 (where the shared folder is)
  • Define the shares you want to provide
$ sudo vi /etc/exports
  • Add your shares to the file
/home/mach1user/Public *(ro,sync)
  • Make your changes be known
$ sudo exportfs -a

Configuration in machine 2 (where the shared folder are going to be accessed)
  • Create a folder, where the share will be mounted
$ mkdir /home/mach2user/HomeNetwork/Public
$ mkdir /home/mach2user/HomeNetwork/Documents
$ mkdir /home/mach2user/HomeNetwork/Share
  • Mount the shares (the IP is from machine 1)
$ sudo mount /home/mach2user/HomeNetwork/Public
$ sudo mount /home/mach2user/HomeNetwork/Documents
$ sudo mount /home/mach2user/HomeNetwork/Share
  • Make the shares available after rebooting
$ sudo vi /etc/fstab
  • Add to the file (the IP is from machine 1) /home/mach2user/HomeNetwork/Public nfs ro,hard,intr 0 0 /home/mach2user/HomeNetwork/Documents nfs ro,hard,intr 0 0 /home/mach2user/HomeNetwork/Share nfs ro,hard,intr 0 0

And that should do it.

Windows under Linux

Ok, some things I may need to do in Windows (for now).

So I will install a virtual Windows machine using VirtualBox.

  • Applications > Add/Remove Applications
  • Show: All available applications
  • Search: virtualbox
  • Check VirtualBox OSE and Apply Changes
  • Run VirtualBox (Applications > System Tools > VirtualBox OSE)

 Creating a new Virtual Machine
  • Click New and follow the instructions (a virtual hard disk is needed, but you'll be easily guided through the installer)
  • Go to Synaptic Package Manager
  • Search for virtualbox
  • Install virtualbox-ose module for your kernel (like linux-image-2.6.24-16-generic)
  • Install virtualbox-ose-guest module for your kernel (like linux-image-2.6.24-16-generic)
  • Go to System > Administration > Users and Groups
  • In Manage Groups find vboxusers, click Properties and add your user to this Group
  • Logout from Ubuntu
  • Back to VirtualBox
  • Go to Settings > CD/DVD-ROM and mount your Windows CD or iso Windows file
  • Start the Virtual Machine and install Windows
  • Tip: Click in the VirtualBox window to get the mouse pointer into Windows and click Alt+Ctrl to get the mouse pointer back to Ubuntu
  • Note: I used Brasero to create a ISO image of Windows XP

Share folders with the Virtual Machine
  • In the VirtualBox window go to Devices > Install Guest Additions
  • This will download an iso image file, mounting it in Windows and install Guest Additions for Windows
  • Shutdown Windows
  • Go to Settings > Shared Folder and add the folders you want to share
  • Start Windows and map a Network Drive to:

VirtualBox running modes
  • Windowed: in this case Windows will be displayed in a window
  • Fullscreen: in this case Windows will be displayed in full screen
  • Seemless mode: in this case Windows will be integrated into Gnome

Ubuntu in my desktop (installation)

Tomorrow (01/05) is an holiday in Portugal and today it was a nice day to start installing Ubuntu in my Desktop :-)

The first reference for my eXPerience is my own post where I address several important points to check before installing and to achieve.

Running the live cd

So, the first thing was downloading Ubuntu 32 bits, checking the downloaded file hash (look for more info here) and burning the cd.

After booting from the cd is important to check the integrity of the cd. Burning cds also fails.