dist-upgrade of diskless ubuntu

I am currently PXE booting a bunch a machine, via the diskless function in ubuntu. What is the best practice when upgrading the image from 10.04 LTS to 12.04 LTS?

I've currently made a copy of the image with cp -arpv to ensure that i can switch back to the old image, if something is wrong in the new image.

However do-release-upgrade is not available in the diskeless image.

Any good ideas on what to do?

Best regards.

EDIT: The image is Ubuntu-server btw.


Solution 1:

I have upgraded my diskless PXE booting systems in the past using do-release-upgrade.

Install update-manager-core to obtain do-release-upgrade. When you upgrade, don't forget to ensure that your initrd is built for netbooting in /etc/initramfs-tools/initramfs.conf, I have had this file overwritten on upgrade in the past, the option you need is:

 BOOT=nfs

You will also need to update your kernel and kernel configuration on your tftp server.

Edit the configuration file in your pxelinux.cfg directory to contain the new entry, on my server I have a host specific file:

johnf@carbon:~$ cat /srv/tftp/pxelinux.cfg/01-00-1f-d0-27-d2-17 
LABEL linux
KERNEL /vmlinuz-2.6.38-10-generic
APPEND initrd=/initrd.img-2.6.38-10-generic root=/dev/nfs nfsroot=172.29.1.6:/home/export/argon ip=dhcp rw

You will also need to update the kernel images on the tftp server itself, here's the command I use:

sudo cp --preserve=timestamps /home/export/argon/boot/initrd.img*-generic /home/export/argon/boot/vmlinuz*-generic /srv/tftp