Install Ubuntu Server using Wubi

Posted on Tue 01 July 2014 in Linux

If you're somebody that has tinkered with linux a while back, you may have come across something called Wubi

Wubi basically allows you to install linux within windows.

You will probably want to install Ubuntu Server with Wubi if you have a Windows system that you feel you still need, but you'd also like to tinker/test-out a server-version of Ubuntu.

This install method is recommended for hobbyists and shouldn't be used for any production-critical matters

With that said, let's install ubuntu-server within windows using Wubi.

Requirements:

  • A PC with Ubuntu/Xubuntu/Lubuntu Desktop installed (preferably 12.04 and nothing above this version)
  • Internet access (a decent speed broadband speed)
  • A router (if you'd like to SSH from another PC into your server - useful for remote installations)

The process of converting the desktop to server is made very simple, using a tool called Tasksel

Open a terminal/console window in your Ubuntu Desktop and type in the following commands:

sudo apt-get install tasksel
sudo tasksel remove ubuntu-desktop # (Note: this may take a few minutes to complete)
sudo tasksel install server
apt-get install linux-server linux-image-server
apt-get –purge remove lightdm

Remember to type in each command (as listed by the each point) separately and wait for it to complete, before typing in the next command.

Also, for this line:

sudo tasksel remove ubuntu-desktop

Make sure you specify the correct desktop you are using (which could be Lubuntu or Kubuntu or Xubuntu).

Once this is done, you will officially have Ubuntu Server installed on your PC using Wubi.

You can test this out by restarting the PC and booting into Ubuntu. Give it some time, depending on your system.

The next part is to fix the bootloader on Windows, so that you can operate your Ubuntu Server without a screen (and just be able to SSH into it).

Modifying the Windows bootloader

I have Win XP installed, so the instructions I found was for this OS. I initially followed these instructions here.

It didn't seem to work though. So I basically just went through the process of first backing up the boot.ini file (very important that you do this).

The process:

  1. Right-click My Computer, and then click Properties. -or- Click Start, click Run, type sysdm.cpl, and then click OK.
  2. On the Advanced tab, click Settings under Startup and Recovery.
  3. Under System Startup, click Edit. This opens the file in Notepad ready for editing.
  4. In Notepad, click File on the Menu bar, and then click Save As.
  5. Right click in an empty area of the Save As dialog box, point to New in the context menu, and then click Folder.
  6. Type a name for the new folder, for example temp, and then press the ENTER key to create the folder named temp.
  7. Double-click the new folder named temp, and then click the Save button to save a backup copy of the Boot.ini file.

You could do this process any way you feel that will ensure that a boot.ini file is saved somewhere accessible.

Now under point 3 above, you will see that you visited the "System Startup" window, which shows the current boot order of your system.

What I did was to simply select the Ubuntu Server option (it may still have a Desktop name to it) as the first boot choice, and it mariculously allowed me to have Ubuntu as the first option when booting (remember that when booting using Wubi, the first boot is the windows boot and when changing the bootloader on Windows, you are changing this bootloader and not the GRUB bootloader normally used on Ubuntu).

Having the first option for booting means that I just need to switch the PC on and wait around 60 seconds (without a screen).

After waiting for 60 seconds, I can SSH into the server successfully (using another PC through my router).

I'm not going to explain how to SSH in this tutorial, as there are plenty of examples out there.

Just remember that you will need:

  • IP address of the Ubuntu Server machine
  • Your old username and password (from when you installed Ubuntu Desktop)

If you have any trouble getting Ubuntu-server installed, feel free to drop me an email and I will try to assist.