Pither.com / Simon
Development, systems administration, parenting and business

Custom/manual Ubuntu install via IPMI (on OVH hosting)

I recently spent a while working out how to do a completely custom install on a physical machine rented from OVH, making use of the IPMI access they provide. I thought I'd document it for future reference. So here's how to perform a custom/manual Ubuntu install via IPMI on OVH hosted hardware.

Disable OVH monitoring

First up is an OVH specific task that's not strictly speaking essential, but is probably best for everyone if you do remember - use their control panel to disable monitoring on the machine (I forgot this to start with - sorry to the OVH support person who got a pointless automatic ticket to look at).

Java web start

Next up is using their "Remote KVM" via a Java web start app. For me this wasn't entirely straight forward - clicking on the OVH control panel, "Java applet (KVM)" just downloaded a custom made kvm.jnlp file. Taking a look at it, it contains all the appropriate Java app details plus IP and authentication information.

Of course I didn't have anything setup to "run" this file, so you might need to make a quick install first...

sudo apt install icedtea-netx

Once you've got that (the icedtea-netx package provides the javaws binary), you can run the JNLP file with a command like this...

javaws kvm.jnlp

Launching the JNLP file with javaws prompted for a couple of "are you sure, don't run unknown code" type confirmations and then presented me with a console onto my machine.

The console worked really well, providing a handy "ctrl-alt-del" button and generally being very responsive.

ISO Redirection

The best bit though, which really enabled this whole process, was an accidental discovery from looking through the menus. There's a "Devices" menu that includes a "Redirect ISO" option.

With the help of an ISO from Ubuntu's Netboot archive and the ISO redirection I was able to perform a completely custom Ubuntu install.

When the machine rebooted, I could press the appropriate key to enter the "Boot Options" menu and one of the presented choices was a "Virtual CD". The Ubuntu netboot ISO is only about 65MB so the wait for it to be accessed remotely across the internet wasn't too bad. The initial load took a less than a minute and that was all the delay I noticed.

I'm really impressed with how well it worked.

Why?

Why did I want a custom install?

OVH do provide an automated install of Ubuntu 18.04 and they even provide quite flexible disk partitioning options. However the disk setup I wanted (all LVM with just a little bit initially used, ready for later LXC allocation) wasn't something I could convince it to do. Plus their automated install seemed to include just about everything and trying to strip that back to the more minimal amount I actual wanted would have been plenty of work.

Grub fun

No manual install of Linux would be complete without a few boot issues! On this occasion it was a silly mistake on my part - not providing a partition for EFI on the disks and hence Grub refused to install. That allowed me to refresh my knowledge of manually booting from the grub command line. Commands "insmod raid", "insmod lvm" and "ls" were especially handy, along with tab completion. I'm sure the last time I had to drive the grub CLI manually there wasn't such a thing as "set root=(lvm,vg-root)/boot/vmlinuz" ("lvm" instead of "hd0" is the fancy bit I don't recall).

Tags:
Add a comment