4

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.

1 Answer 1

4

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
10
  • Thanks for the quick reply. Must it be done from the host (ssh to host) or from the image (chroot to diskless image)? My plan is to make one of the machines boot from then new image, to test if it works, and then let the rest boot, when probably tested. Sep 5, 2012 at 10:41
  • Sorry for the delayed response, I would recommend that you do it through an ssh session to the (a?) host. I have seem some unusual issues with chroot vs ssh though I can't remember the specific details. It might have had something to do with the installation of locales.
    – johnf
    Sep 6, 2012 at 0:21
  • 1
    You will also need to copy the kernel image and the initrd into the tftp directory. I use the following command: sudo cp --preserve=timestamps /home/export/argon/boot/initrd.img*-generic /home/export/argon/boot/vmlinuz*-generic /srv/tftp
    – johnf
    Sep 18, 2012 at 9:38
  • 1
    tftpd is often run chrooted, this means that it will only have access to the files under /srv/tftp. It doesn't appear to be the case on my system, it may be the case for you. Can you give me a ls -l of the two symbolic links as well as the two actual files?
    – johnf
    Oct 24, 2012 at 10:02
  • 1
    You can also edit /etc/default/ and edit the option TFTP_OPTIONS="-vvv" , this will put the tftp server in debug mode and will help you to clarify why it isn't working. You should really ask this question as a new question, it's unrelated to your current issue. I'm quite surprised that you apparently unaccepted my answer on how to dist-upgrade because of your issues with getting your image accessible by tftp.
    – johnf
    Oct 24, 2012 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .