Ubuntu release upgrade says ‘no new release found’ on IPv6-only server

I’m running some sort of an experimental KVM guest with IPv6 connectivity only. Since it still had Ubuntu Server 13.10 installed I tried to run a do-release-upgrade on it to upgrade it to the latest Ubuntu Server release – which at the time of this writing is 14.10. However, the do-release-upgrade command kept saying that no new release could be found:

root@ipv6lab:~# do-release-upgrade
Checking for a new Ubuntu release
No new release found

I verified the /etc/update-manager/release-upgrades configuration file but it already contained the Prompt=normal line. After doing some digging I found out that the do-release-upgrade tries to connect to http://changelogs.ubuntu.com but there is no AAAA DNS record for this host. Essentially, this means that an Ubuntu server can’t be upgraded to a newer release over IPv6 because it can’t connect to the update info site over IPv6.

root@ipv6lab:~# dig +short changelogs.ubuntu.com A
91.189.95.36
root@ipv6lab:~# dig +short changelogs.ubuntu.com AAAA
root@ipv6lab:~#

Interestingly, the Ubuntu APT repository update site is accessible over IPv6, which is why something like apt-get update runs fine on IPv6-only Ubuntu servers.

I solved the problem by creating an IPv6 to IPv4 HTTP proxy using HAProxy on a IPv4/IPv6 dual stack server. The proxy listens on an IPv6 address and “tunnels” all requests to changelogs.ubuntu.com using the IPv4 address of the changelogs server. I was able to upgrade to a newer Ubuntu release this way on an IPv6-only Ubuntu server. Continue reading

How to comfortably mount Clover’s EFI partition

I’ve been using command-line commands or the Clover Configurator to mount Clover’s EFI partition to edit Clover’s main configuration file.

However, I find it easiest to mount the hidden EFI volume in Disk Utility:

diskutility-efi

The hidden partitions will only be shown if Disk Utility’s debug mode has been enabled. In a shell, type:
defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

Start Disk Utility and enable the option to show all partitions:

diskutility-debug

How to auto-boot an OS X Fusion Drive using Clover

Ever since I fusioned a SSD and a HDD into an OS X Fusion Drive, Clover has been unable to auto-boot the new logical Fusion Drive volume. Clover was just sitting on its startup volume selection screen and was waiting for me to select the volume to boot. I’ve found some hints that using an UUID should make Clover autoboot the Fusion drive but I’ve been unable to make it work with any of the UUIDs of the logical/physical volume.

What finally worked was using the system ID (or whatever this is called) of the volume. Here’s an excerpt from my Clover configuration:

	<key>Boot</key>
	<dict>
		<key>Arguments</key>
		<string>dart=0</string>
		<key>DefaultVolume</key>
		<string>HD(3,GPT,17337FC1-A0F7-4C73-DEA1-363BA11AB811,0x3A346008,0x40000)</string>
		<key>Timeout</key>
		<integer>5</integer>

With this ID, Clover auto-boots my Fusion Drive volume just fine after waiting for 5 seconds for user input.

The full IDs can be found in Clover’s log file in /Library/Logs/CloverEFI/ and look like this:
system.log:0:837 0:000 PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0xFFFF,0x0)\HD(3,GPT,17337FC1-A0F7-4C73-DEA1-363BA11AB811,0x3A346008,0x40000)

You have to strip the PciRoot/Sata part for Clover.

How to rename an OS X Fusion Drive

Since OS X Yosemite, the CoreStorage service allows you to rename the logical volume name of a Fusion Drive if you wish to do so.

sudo diskutil cs rename "Macintosh HD" "Fusion Drive"

The Fusion Drive now shows up as “Fusion Drive” instead of “Macintosh HD” which was the name I’ve chosen initially. The OS X main volume is still named “Macintosh HD”.

diskutil-fusiondrive

Could not load host key: /etc/ssh/ssh_host_ed25519_key

Sep 29 19:19:41 wopr sshd[11801]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key

If you’re getting this error message in the log file, you most likely have the ed25519 HostKey enabled in your sshd_config file but for some reason, no host key was generated for it.

Since openssh-6.4 you can run the ssh-keygen command to generate any missing host keys:

$ ssh-keygen -A
ssh-keygen: generating new host keys: ED25519

Enable KVM guest console access in Ubuntu using the virsh console command

Usually, my first step after setting up a new Ubuntu guest is to enable console access in order gain shell access on the newly created VM.

Step 1 – Activate the serial console in the guest

nano /etc/default/grub

Change the GRUB_CMDLINE_LINUX_DEFAULT to:

GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,38400n8 console=tty0"

Don’t forget to update Grub

update-grub

Step 2 – Create the serial console in the guest

cp /etc/init/tty1.conf /etc/init/ttyS0.conf
nano /etc/init/ttyS0.conf

Edit ttyS0.conf and replace the tty1 with ttyS0 in the last line so it will read something like “exec /sbin/getty -8 38400 ttyS0”.
Reboot the VM.

Step 3 – Log in from the host

virsh console myvm

This is it! You just gained console access to your VM.

Tip: To exit the console, hit CTRL-]. It doesn’t matter where the ] is located on your keyboard, you have to press the key below the <BACKSPACE> key and on the left side of the <ENTER> key.

Show routing table in Mac OS X

Here’s a quick one. The route command won’t show you the full routing table in Mac OS X. You have to use the netstat command:

netstat -rn

This will print the numeric view. If you prefer host names, omit the n parameter:

netstat -r