Lazy Linux installation

This weekend, aside from various childrens parties, my uncle asked me to take a look at a laptop, and install Linux on it. It is my cousin’s, had previously had Windows 8 installed, but they were unable to reinstall it as the installer was complaining about partitions. I would have been happy to help sort this out, but my uncle reminded my cousin that part of his computing schoolwork was involving python and a few other bits that are much better served by Linux rather than Windows.

I thought a good balance would be Kubuntu – Debian-based, a good range of drivers, and a lovely Out-of-the-box KDE Desktop Environment.

So this evening, I sat down on the sofa and plugged in my portable USB drive with a Xubuntu installation on it.
As they had reported issues with the windows partiotioner, I did a full disk check to start with. Fsck reported the filesystem as OK, so it was time to proceed with the reinstallation. One problem – I was on the sofa, my linux ISOs were on the server, and the blank CDs were in the dining room. Actually getting up and burning a CD seemed like an archaic way of installing a system. Combined with the fact that we’d just had a full weekend of children’s birthday parties, I’m a lazy boy at heart, and it was halfway through a TV programme I was watching with the wife, this seemed like a bit too much effort. I needed a Lazy Linux Installation!

Instead, I remembered a trick I’d tinkered with previously – using a VirtualBox tool to mount the internal hard drive as a .vmdk in “raw disk mode”:

# VBoxManage internalcommands createrawvmdk -filename "/home/user/test.vmdk" -rawdisk /dev/sda

This allows VirtualBox to read and write to the hard disk directly, although performance is a little slower than normal due to the overheads of running it all within a Virtual Machine. This also comes with a couple of caveats:

  • You have to run Virtualbox as root – I used “sudo”, but su would have worked as well
  • I believe (though I did not test to verify) that if the host system is 32-bit, you can’t use the 64-bit ISO, so you’re again limited to installing a 32-bit version. you certainly can’t use a 64-bit guest inside a 32-bit host, so it would stand to reason that this is the case with the Installer too.

Creating a new “test” VM with the raw disk link as the hard disk, I could then mount the Kubuntu 15.04 ISO direct from my server through Samba and proceed with the installation…Linux installation in Virtualbox (Kubuntu 15.04)

Installation proceeded as normal(if a little slow), and at the end I was able to close the VM, shut down the host running from USB, and reboot the laptop.

One short wait later and I had one freshly installed Kubuntu laptop – perfect.

This machine, a Lenovo Ideapad Z500, has Nvidia Optimus graphics. The proprietary driver installed fine, but I still need to have a tinker to see if I can get it running on switchable graphics using bumblebee.

Share This!

Leave a Reply

Your email address will not be published. Required fields are marked *