Simple Ubuntu Server: Part 2 – Partitioning and Final Setup

Welcome to Part 2 of the setup of a simple Ubuntu server. If you followed Part 1, we left off on partitioning, which is where we will pick up right now.

Remember that at any time before the actual system is installed you can hit escape to bring up the installation menu in case you need to repeat a section.

Installer menu

Installer menu

Right now, you should see the partition disks window.

Partition disks

Partition disks

There are four options that basically fall into two separate groups which I’ll call “traditional” and LVM. LVM is a very powerful way of utilizing and managing your physical disks by creating Logical Volumes inside Volume Groups, which allows you to do things like move, resize, freeze (take snapshots, merge, split, etc.) your disks on-the-fly while your system is running. All of which makes administration of a server (especially with large RAID arrays containing many filesystems) much easier and more resilient. I plan on doing a how to setting up a LVM later, but for now, will show the “traditional” way. If you want, you can read about how LVM’s work here.

If you select the first option, Guided, the installer will make partitions and sizes as it sees best, usually not as you would end up making them. The second and third options will do the same, but create an encrypted (or not) LVM. By selecting the bottom option, Manual, you will be able to specify exactly what you want to use for each partition (size, mount point, etc.)

Then next step is to select your hard drive and start making partitions. Since I’m using VirtualBox, my hard drive will be labeled a bit differently than yours.

Manual partitioning disk selection

Manual partitioning disk selection

Since my device has never been used before, a partition table needs to be created before partitions themselves can be created and assigned which is prompted.

Create partition table

Create partition table

You can now start laying out your partitions by selecting your device.

Initial partition layout

Initial partition layout

Then hit enter to go to the partition creator. Each time you hit enter with the free space highlighted, you will be prompted with a number of options. The first will ask what you want to do (create, automatically partition or show information), followed by the size, type (primary or logical, it is important to note that only 4 primary partitions can exist on a disk, Windows must use a Primary partition, but as you’ll see, you can use Logical partitions for Linux), and finally the partition location (beginning or end).

creation-options

Create a partition

partition-size

Partition size

partition-type

Partition type

partition-location

Partition location

Once that is all done, you will be presented with the settings for the partition. This is where you specify things like the filesystem, mount point, options and if it is bootable or not.

Partition settings

Partition settings

Common filesystems are shown below as well as mount points.

filesystems

Filesystems

common-mount-points

Mount points

There are about as many partitioning schemes as there are Linux distros (which at the time of writing there are at least 321)

For my partitioning scheme (on a small virtual machine with 512 MB RAM on an 8.6 GB disk), I set:

  • Boot partition : 128 MB     # where the boot files (GRUB and the like reside)
  • Swap : 1024 MB     # swap space
  • / : 4.0 GB     # root partition
  • /home : 3.4 GB     # home partition
Final partition scheme

Final partition scheme

Just as another example, if I had a 240GB disk, I would have probably partition it as shown below, but it is completely up to you.

  • Boot partition : 128 MB     # where the boot files (GRUB and the like reside)
  • Swap : 2048 MB     # swap space
  • / : 20.0 GB     # root partition
  • /home : 218 GB     # home partition

When you have everything set, select “Finish partitioning and write changes to disk” where you will be prompted to verify your partition scheme before any changes are made and the system installation begins.

Verify partitioning

Verify partitioning

The installation will take a little while, and at one point ask if you use a proxy to connect to the internet so it can download files it needs (the vast majority of you will probably just leave this blank and hit enter).

Proxy

Proxy

Next the installer will ask how you want to install updates. I suggest you have security updates installed automatically to keep your system secure, the do the “normal” updates manually every month or two so that you are aware of what is being updated in case a package breaks and something stops working. Landscape (the bottom option) is a paid system through Canonical that allows you to manage and keep multiple machines updated through their interface.

Updates

Updates

A little while later, you will then be prompted regarding what roles you want your server to use. For this server, I am leaving everything blank so I can walk through them one at a time later, but you should select what you need. At minimum you’ll probably want to select OpenSSH server so you can SSH into your machine, but like everything else, if you forget, you can add, change or remove it later.

Server roles

Server roles

After that, the server will select, download (if needed) and install the required software and bootloader. Note that when you get the following screen, if you have other operating systems (non-Windows) on your computer then you should not reinstall Grub2, but rather boot into one of those operating systems and run sudo update-grub. If you have Windows on your computer, you will need to overwrite the MBR with Grub2, then run the same command as before from within your new Ubuntu server to pickup and chainload the Windows bootloader into the Grub2 splash screen so you can select when OS to boot when you start your computer.

Install Grub2 Bootloader

Install Grub2 Bootloader

It’ll then prompt you to reboot, ejecting and remove the cd from the tray.

Reboot

Reboot

Upon reboot, you will be presented with the login screen. Input your username and password, hit enter, and you’ll see you’re up and running!

Login

Login

Up and running!

Up and running!

Tagged , , , , , . Bookmark the permalink.

One Response to Simple Ubuntu Server: Part 2 – Partitioning and Final Setup

  1. Pingback: Simple Ubuntu Server: Part 1 – Initial Installation - Seawolf167

Leave a Reply

Your email address will not be published.

Protected by WP Anti Spam