Thursday, 10 November 2016

Ubuntu from Scratch

Well, my new lease computer arrived today, so I thought I’d log the steps to get a nice new clean install of Ubuntu. I decided to go with a clean install as I’ve had the same setup backed

Install


First off, begin a new HP with Windows 10 pre-installed, I had to work out how to disable Secure Boot so I could boot from a USB stick. ”Easy”, you might think, “just go into the BIOS and turn it off.” Well that’s what I thought you would do, but it didn’t work—no matter how I tried to change the settings, Secure Boot always reverted to being on.

However, a bit of searching found me this post which instructed me to boot into Windows, and power off while holding down the shift key. Ummm ... OK? Anyway, it worked, I was able to restart the computer having disabled Secure Boot and begin to install Ubuntu 16.04.1 from a USB stick.

While installing, I have a weird and wonderful way of setting up users. One thing I’ve been caught out by before is that the first user always has a UID of 1000. That was never a problem while I was the only user, right? Unfortunately, setting up other laptops for family members highlighted a problem, particularly with external HDDs. Generally I’ve made the main user the ”first” user, but since I’m the one looking after the machine, I always set myself up as a user so I can ssh in. Since I set up external HDDs as ext4 (why? because I can!), the files (and, in fact, the drive) can’t be accessed if I’m logged in as me.

Now, one was around this would be to make me the first user installed every time. However, I've settled on an alternative solution—I create my user after the first install, and I change my UID and GID to 5000.

sudo usermod -u 5000 dave
sudo groupmod -g 5000 dave

Easy! And if I do this before I’ve logged in the first time, I don’t have to worry about any existing files. And my ext4 HDDs work!

Apps

Next up, installing my go-to apps and other services:
  • GDebi—I just prefer this to the Software Installer for downloaded .deb files
  • CompizConfig Settings Manager (mainly because I love wobbly windows!)
    sudo apt-get install compizconfig-settings-manager compiz-plugins-extra
  • Chrome (head to http://chrome.google.com and download the .deb file)
  • Dropbox and InSync (Dropbox from the Software Installer, InSync from https://www.insynchq.com/downloads)
Lastly, install the drivers for our Brother laser printer and scanner using the Driver Install Tool from Brother’s website ... and now I’m in business! Rest of the setup in my next post.