SOLVED: ubuntu 18.04 server pxe fully automated install

Asked by Paul M

solved: don't use the live installer disk, use the one from http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04-server-amd64.iso

----

for ubuntu 14.04 and 16.04, it was possible to loopback-mount the ISO on a web server, and set up PXE.

I'd take the kernel and initrd from these locations:
/var/www/html/ubuntu-16.04.4-server-amd64/install/vmlinuz
/var/www/html/ubuntu-16.04.4-server-amd64/install/netboot/ubuntu-installer/amd64/initrd.gz

and then add this to the pxe menu

LABEL US1604x64_INSTALL
 MENU LABEL Ubuntu Server 16.04.4 Automated Full Wipe And Install
 KERNEL /ubuntu/s1604/vmlinuz
 APPEND initrd=/ubuntu/s1604/initrd.gz text ks=http://myrepo/ubuntu-kickstarts/US1604x64.ks -- quiet

I tried to do very much the same thing for 18.04, and it doesn't work at all with the 18.04 live server DVD! There's no install directory and thus no netboot directory beneath that. I tried the kernel and initrd from the casper directory but that didn't work.

I then tried the kernel and initrd from the net install ISO, and the installer got as far as "download installer components", with the description being "the installer failed to download a file from the mirror". I watched the http log and didn't see any 404 errors!

Does anyone have any ideas? I don't want to blame the Ubuntu developers but it seems very odd that they broke an important feature which is easy mass deployment of the server OS!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Paul M
Solved:
Last query:
Last reply:
Revision history for this message
Paul M (speculatrix) said :
#1

here's a couple of screen shots, I couldn't see how to attach them here

https://imgur.com/a/Q5PkXJT

https://i.imgur.com/nWDh809.jpg

https://i.imgur.com/1aRh5h3.jpg

Revision history for this message
Paul M (speculatrix) said :
#2

I've also tried adding this to the kickstart file, much as you had to do with Ubuntu 14.04 for the installer to work, it didn't help

preseed live-installer/net-image string http://myrepo/ubuntu-18.04-live-server-amd64/casper/filesystem.squashfs

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Did you MD5 test the ISO you downloaded?

Revision history for this message
Paul M (speculatrix) said :
#4

I'd like to draw the attention to the error "bad d-i Packages file".

the Packages and Packages.gz aren't empty

-r--r--r--. 1 root root 3355 Apr 26 20:48 dists/bionic/Release
-r--r--r--. 1 root root 819 Apr 26 20:48 dists/bionic/Release.gpg

# more dists/bionic/Release
Origin: Ubuntu
Label: Ubuntu
Suite: bionic
Version: 18.04
Codename: bionic
Date: Thu, 26 Apr 2018 19:28:13 UTC
Architectures: amd64 i386
Components: main restricted
Description: Ubuntu Bionic 18.04
Acquire-By-Hash: yes
MD5Sum:
 4b3b0697086e339fc6e8fbdbc019ee03 101 restricted/binary-i386/Release
 4a4dd3598707603b3f76a2378a4504aa 20 restricted/binary-i386/Packages.gz
 d41d8cd98f00b204e9800998ecf8427e 0 restricted/binary-i386/Packages
 a12709d63502787fdcef753b54fd5507 102 restricted/binary-amd64/Release
 a8697a282912e947bcabe2b169e1885a 812 restricted/binary-amd64/Packages.gz
 0ab255f4370f83261f471c6becab22f2 1966 restricted/binary-amd64/Packages
 685bb70b73cb22ef2c5225637930e073 95 main/binary-i386/Release
 4a4dd3598707603b3f76a2378a4504aa 20 main/binary-i386/Packages.gz
 d41d8cd98f00b204e9800998ecf8427e 0 main/binary-i386/Packages
 706fccb10e613153dc61a1b997685afc 96 main/binary-amd64/Release
 41665f5c9d6c02fcf146d75ea3d26da9 18570 main/binary-amd64/Packages.gz
 5c352afcb40f40180ed064bbb099e125 58260 main/binary-amd64/Packages
SHA1:
 bfc0d0735ac7feb3aea1040054fb31f6e95a0641 101 restricted/binary-i386/Release
 a0fddd5458378c1bf3c10dd2f5c060d1347741ed 20 restricted/binary-i386/Packages.gz
 da39a3ee5e6b4b0d3255bfef95601890afd80709 0 restricted/binary-i386/Packages
 e60b975e41997ee2743d6a770bfef0bfbf07941a 102 restricted/binary-amd64/Release
 9bf55138eaf3ff6093eb26336369c06816c760dc 812 restricted/binary-amd64/Packages.gz
 358a1b93578a01a62da50a7e8f2048f00a5ef563 1966 restricted/binary-amd64/Packages
 84c9cd57b08144335c6ccb3f6b4dcafaf83fcfd8 95 main/binary-i386/Release
 a0fddd5458378c1bf3c10dd2f5c060d1347741ed 20 main/binary-i386/Packages.gz
 da39a3ee5e6b4b0d3255bfef95601890afd80709 0 main/binary-i386/Packages
 6fa21f44002c009abe4c161f3ba69b1ed9fced9c 96 main/binary-amd64/Release
 e765b5afd588cd213b2e31a6e51001ac804a3b39 18570 main/binary-amd64/Packages.gz
 c935befa9804bb29488e17cab83ecd4749e96dd9 58260 main/binary-amd64/Packages
SHA256:
 7cc9b25600a859c8faa784dc728f89812e98efed980e3aced1d479ac608b97cc 101 restricted/binary-i386/Release
 f61f27bd17de546264aa58f40f3aafaac7021e0ef69c17f6b1b4cd7664a037ec 20 restricted/binary-i386/Packages.gz
 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 restricted/binary-i386/Packages
 5b8304e8a5292551f998034835188b506e7594f28a01ee11fefae8c23911f101 102 restricted/binary-amd64/Release
 1d92d0e4491bb628ee20ec17aeab78253e07eafa460e2c437ec756e9a697232c 812 restricted/binary-amd64/Packages.gz
 60ebb58d812960a67b7dc6fe3b10cfac6d9d277b5a309f2bc66cb32b7f26cbf8 1966 restricted/binary-amd64/Packages
 31c11066c797feb03125e25e07e95be77a6a579b21413a711e5335ac409a45d9 95 main/binary-i386/Release
 f61f27bd17de546264aa58f40f3aafaac7021e0ef69c17f6b1b4cd7664a037ec 20 main/binary-i386/Packages.gz
 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 main/binary-i386/Packages
 f7f13d78f7852b850f0a4afcc520128dcb51d4b24f07b33de3019fffc15e0771 96 main/binary-amd64/Release
 f8ab4a79d8f9766abe38a95d0361cedc64c6682f78a725f27b2ea69a44bdbd0f 18570 main/binary-amd64/Packages.gz
 ed3bf9da78069668a6e86f83fbd46aba830ed207b6314178f4d00c928483d701 58260 main/binary-amd64/Packages

Revision history for this message
Paul M (speculatrix) said :
#5

the md5sum is fine

# md5sum ubuntu-18.04-live-server-amd64.iso
e35f45caf1d26ed5b1217d67f6ee86e8 ubuntu-18.04-live-server-amd64.iso

# wget -q -O - http://releases.ubuntu.com/18.04/MD5SUMS
129292a182136a35e1f89c586dbac2e2 *ubuntu-18.04-desktop-amd64.iso
e35f45caf1d26ed5b1217d67f6ee86e8 *ubuntu-18.04-live-server-amd64.iso

Revision history for this message
Manfred Hampl (m-hampl) said :
#6
Revision history for this message
Paul M (speculatrix) said :
#7

@manfred wow, I never saw that, I only stumbled on the netinstall disk. thanks, will give it a go.

Revision history for this message
Paul M (speculatrix) said :
#8

yup, that worked fine, I was able to simply substitute the US18.04 iso, used its install/vmlinux and ...initrd and loopback mount the ISO and voila, a working PXE install.

BTW, I loopback mount the ISO so that I can hash the ISO file and prove our repo/install server has not been tampered with as it matches the one shipped by Canonical.

Revision history for this message
majorin che (majorinche) said :
#9

@Manfred Hampl (m-hampl) , your advice is helpful

at first, i just use ubuntu-18.04-live-server-amd64.iso, which reports error "anna[3931]: WARNING **: bad d-i Packages file" in syslog

thanks

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

@majorin che:
Please do not piggyback on somebody else's question that has already been marked as solved, but create a question document of you own, describing in detail what you are trying to do, what you expect to happen, and what happens instead.