I’ve done a number of articles on using Ubuntu 10 as a server recently, but haven’t actually looked at doing the base installation of an Ubuntu 10 host. In this example, I’ll look at using Ubuntu 10.04 Desktop. In many of the previous examples I’ve been looking at Ubuntu 10.10 Server; the reason I’m using 10.04 Desktop here is because I believe there is a smaller learning curve and that inherently Mac OS X Systems Administrators who might be following this thread actually like a GUI. There are a number of aspects of this type of setup that are simply not GUI oriented; however, the base OS can easily be, so here goes.
First up, download the installer of Ubuntu from http://www.ubuntu.com/desktop/get-ubuntu/download
. Then, install Fusion. Once installed you’ll be prompted with the welcome screen.
Next, use Command-N to create a new virtual machine, orclick on the File menu and then select the New menu item (first in the list).
The New Virtual Machine Assistant will then open. Click on the button to Continue without disc.
The Installation Media screen of the New Virtual Machine Assistant will be next. Here, click on the radio button for Use operating system installation disk image file.
You will then be prompted to select an iso. Browse to the file that you downloaded from Ubuntu before you got started and then click on the Choose button in the lower right hand corner of the screen.
The Operating System and version should be filled in by default. Provided they are correct, click on the Continue button to proceed.
You will then be prompted for credentials that the virtual machine will give the guest operating system when it is installed. Here, type the administrative user name and password that you want to use. You can also choose whether or not you want to make the home folder you use in Mac OS X available to the virtual machine as well as what type of access the virtual machine has to that directory. When you’re satisfied with your settings, click on the Continue button.
At the Finish screen of the New Virtual Machine Assistant, you will be able to review the settings that have been provided to the virtual machine. You can change these later if you see fit. For now, let’s click on the Finish button.
Finally, choose where you want to install the virtual machine at. By default, the virtual machine will be placed in the Virtual Machines folder of your home directory. I usually like to move it to a Virtual Machines directory on the root of the volume that houses my Virtual Machines, but you can place yours wherever you like. When you’ve selected the folder that best fits your needs, click on the Save button.
The virtual machine will then install. This process can take some time, so it’s probably a good chance to grab a bite. When it’s done, you’ll be at the login screen for Ubuntu. Enter the username and password that you provided earlier in the process and then click on the Log In button.
Once you have logged in, let’s get the networking straight. In the menu at the top of the screen, click on Settings in the VMware toolbar and then click on Network.
By default, the virtual machine will be sharing the network connection of the Mac. Click on the second radio button (Connect directly to the physical network) and then the indicator light for the interface will go red. Wait for the light to go green, indicating that it’s picked up the correct interface and then close the Settings.
The IP will then need to be set for the guest OS. From Ubuntu, click on the System menu at the top of the screen and then click on Preferences and then Network Connections. Here, click on the Auth eth0 interface and then click on the Edit button.
You should now see the Editing Auth eth0 screen. Here, click on the IPv4 Settings tab and then provide the Address, Subnet mask (Netmask) and Gateway for your environment. You should also take this opportunity to provide a DNS server.
Click on Apply to commit your changes and then reboot the virtual machine so the new network settings are enforced. When Ubuntu comes back online, you should then be able to ping your router or some other device on your network. If you decided to use Ubuntu Server then you will need to go to /etc/network/interfaces and add some lines to bring up the interface using nano or vi, then set the IP to static and then provide your settings. They would appear as follows:
iface lo inet loopback
iface eth0 inet static
Note: Check out ‘man interfaces’ for more information on building out your interfaces file.
You would also need to provide DNS information in your /etc/resolv.conf file:
Note: Check out man resolv.conf for more information on the correct syntax and options if you need more that what we have provided here.
As you can see, doing so in the GUI vs. the command line is almost identical in terms of the amount of time it takes. Next, check the hostname. For this, let’s use the terminal emulator (not as spiffy as the one in Mac OS X, but nice nonetheless). Click on the Applications menu, Accessories and then Terminal. As with Mac OS X Server the forward and reverse names should match. Provided they do, you’re ready to get some services installed; otherwise you will need to set the hostname to be the same as the DNS name. Assuming the DNS name is ubuntu08.krypted.com:
To then make it persistent across a restart, check /etc/hostname and replace the hostname with whatever you see there. Once set, you should see the hostname at the login window. Finally, I ran into an instance a few years back where Debian (not Ubuntu but close enough) wouldn’t change the hostname even after I tweaked the /etc/hosts and /etc/hostname files. Very annoying. The only thing that would work was to do it using sysctl (continuing on with the same example):
Assuming that your Ubuntu box isn’t also acting as your DNS server, you will also need to check the DNS to make sure it’s correctly set. You can use nslookup for this:
krypted November 21st, 2010
Posted In: Mac OS X, Ubuntu, Unix, VMware
/etc/hostname, /etc/hosts, dig, fusion, hostname, Linux, Mac OS X, Mac Servers, MACSERV, nslookup, sysctl, Ubuntu, Ubuntu 10, Ubuntu Server
Jumbo frames can completely suck. But they can also boost network throughput performance. The MTU in networking terminologies is the Maximum Transmission Unit in bytes that protocol data can send over the wire. MTU is configured per interface and needs (er, prefers) the network infrastructure to match about the same MTU sizes. By default, eth0 (en0 in Mac OS X) is set to 1500. But increasing that to 9000 means that you’re sending less error correction and addressing data and more payload (but as usual the payload can get messy if all parties aren’t knowledgeable that they’re taking it).
Before you get started, install ethtool:
apt-get install ethtool
Then run ethtool with the -i operator along with the interface on your box that you plan on shoving jumbo frames into:
ethtool -i eth0
Now Google or browse to the manufacturers site and see what the maximum MTU that the interface can take is. Provided it can take your large payload, to enable a larger MTU on the fly is pretty easy. I’m using 9000 for the purposes of this article, but if you get an error like SIOCSIFMTU or something then your driver doesn’t support that, so go with something smaller (if >1500 is supported at all on said driver). Simply use ifconfig, specify the interface and then mtu followed by the actual MTU size:
ifconfig eth0 mtu 9000
To make the change permanent, add the following line to /etc/network/interfaces
Then restart networking:
And to check that it’s working, use ip to get the route information to a potential target device (output will show the MTU that is being attempted):
ip route get 10.0.0.96
Note: Redhat, Fedora and CentOS will store their config information per adapter (the way it should be IMHO) in files in the /etc/sysconfig/network-script/ directory.
krypted November 15th, 2010
Posted In: Ubuntu, Unix
configure jumbo frames, increase mtu, jumbo packets, Netatalk, Ubuntu Server