ubuntu.ipxe 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!ipxe
  2. # Ubuntu Operating System
  3. # http://www.ubuntu.org
  4. goto ${menu}
  5. :ubuntu
  6. set os Ubuntu
  7. clear ubuntu_version
  8. set ubuntu_mirror ${mirror}
  9. menu ${os} - ${arch_a} - Image Sig Checks: [${img_sigs_enabled}]
  10. item --gap Latest Releases
  11. item xenial ${space} ${os} 16.04 LTS Xenial Xerus
  12. item wily ${space} ${os} 15.10 Wily Werewolf
  13. item vivid ${space} ${os} 15.04 Vivid Vervet
  14. item trusty ${space} ${os} 14.04 LTS Trusty Tahr
  15. item precise ${space} ${os} 12.04 LTS Precise Pangolin
  16. item --gap Older Releases
  17. item older_release ${space} Set release codename...
  18. choose ubuntu_version || goto ubuntu_exit
  19. iseq ${ubuntu_version} older_release && goto older_release ||
  20. goto mirrorcfg
  21. :older_release
  22. set older_release true
  23. set ubuntu_mirror old-releases.ubuntu.com
  24. echo Setting mirror to ${ubuntu_mirror}
  25. clear ubuntu_version
  26. echo -n Please set enter code name of release: ${} && read ubuntu_version
  27. set dir ubuntu/dists/${ubuntu_version}/main/installer-${arch_a}/current/images/netboot/
  28. goto deb_boot_type
  29. :mirrorcfg
  30. set mirrorcfg mirror/suite=${ubuntu_version} mirror/country=manual mirror/http/hostname=${ubuntu_mirror} mirror/http/directory=/ubuntu
  31. set dir ubuntu/dists/${ubuntu_version}/main/installer-${arch_a}/current/images/netboot/
  32. :deb_boot_type
  33. menu ${os} [${ubuntu_version}] Installer
  34. item --gap Install types
  35. item install ${space} Install
  36. item rescue ${space} Rescue Mode
  37. item expert ${space} Expert Install
  38. item preseed ${space} Specify preseed url...
  39. choose --default ${type} type || goto ubuntu
  40. echo ${cls}
  41. goto deb_${type}
  42. :deb_rescue
  43. set install_params rescue/enable=true
  44. goto deb_boot
  45. :deb_expert
  46. set install_params priority=low
  47. goto deb_boot
  48. :deb_preseed
  49. echo -n Specify preseed URL for ${os} ${ubuntu_version}: && read preseedurl
  50. set install_params auto=true priority=critical preseed/url=${preseedurl}
  51. goto deb_boot
  52. :deb_install
  53. :deb_boot
  54. set dir ${dir}${menu}-installer/${arch_a}
  55. imgfree
  56. kernel http://${ubuntu_mirror}/${dir}/linux ${install_params} ${netcfg} ${mirrorcfg} -- quiet ${params}
  57. initrd http://${ubuntu_mirror}/${dir}/initrd.gz
  58. echo
  59. echo MD5sums:
  60. md5sum linux initrd.gz
  61. iseq ${img_sigs_enabled} true && iseq ${older_release} true && goto skip_sigs ||
  62. iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs
  63. :verify_sigs
  64. echo
  65. echo Checking signatures...
  66. imgverify linux ${sigs}${dir}/linux.sig || goto error
  67. imgverify initrd.gz ${sigs}${dir}/initrd.gz.sig || goto error
  68. echo Signatures verified!
  69. echo
  70. :skip_sigs
  71. boot
  72. :ubuntu_exit
  73. clear menu
  74. exit 0