We're trying to do an automated network installation using pxe.

We installed netboot tools (14.04 LTS) and extracted the ubuntu-14.04-desktop-amd64.iso contents into http server. We saw that we have to download missing repository main/debian-installer (about 50MB) which is necessary for netboot installation, but it is not included within the iso distribution file.

Installation process begin, and failed during "Download installer components" phase saying the installer failed to download a file from the mirror. The question is "Is it possible to add main/debian-installer repository to the original ubuntu-14.04-desktop-amd64.iso contents and how ?". We want to do automatic installation without Internet access.


I consider that you should first create a customized live-dvd of Ubuntu-14.04.


a- Download an official Desktop CD from http://releases.ubuntu.com/ (You already did)

b- Move it into an empty directory.

mkdir ~/livecdtmp
mv ubuntu-14.04-desktop-amd64.iso ~/livecdtmp
cd ~/livecdtmp 

c- Mount and extract the Desktop .iso, and extract the SquashFS filesystem

mkdir mnt
mkdir extract-cd
sudo su
mount -o loop ubuntu-10.04-desktop-amd64.iso mnt
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
unsquashfs mnt/casper/filesystem.squashfs
mv squashfs-root edit
cp /etc/resolv.conf edit/etc/
cp /etc/hosts edit/etc/

d- Prepare and chroot

sudo su
mount --bind /dev/ edit/dev
chroot edit
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
dbus-uuidgen > /var/lib/dbus/machine-id
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl

e- Customize, remove any temporary files and delete temporary files using commands:

sudo su
apt-get install package
apt-get remove --purge package
apt-get clean
apt-get autoremove
rm /etc/hosts
rm /var/lib/dbus/machine-id
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl

f- umount special filesystems and exit chroot

sudo su
umount /proc || umount -lf /proc
umount /sys
umount /dev/pts

g- Producing the CD image

sudo su
chmod +w extract-cd/casper/filesystem.manifest
chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop
umount edit/dev
rm extract-cd/casper/filesystem.squashfs
mksquashfs edit extract-cd/casper/filesystem.squashfs -comp xz -e edit/boot
printf $(sudo du -sx --block-size=1 edit | cut -f1) > extract-cd/casper/filesystem.size
nano extract-cd/README.diskdefines
cd extract-cd
rm md5sum.txt
find -type f -print0 | xargs -0 md5sum | grep -v isolinux/boot.cat | tee md5sum.txt
mkisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-14.04-desktop-amad64-custom.iso

Source: https://help.ubuntu.com/community/LiveCDCustomization

| improve this answer | |

if you want to PXE install i.e.


without internet support please read how Serva does it here (I'm related to Serva development): http://vercot.com/~serva/an/NonWindowsPXE3.html

;-Serva v2.1 Non-Windows Asset Information File 
;  Ubuntu LTS 14.04 Server / 12.04 Alternate
;-Tested on:
;  ubuntu-14.04.1-server-amd64.iso
;  ubuntu-14.04.1-server-i386.iso
;  ubuntu-12.04.4-alternate-amd64.iso
;  ubuntu-12.04.4-alternate-i386.iso
;  \NWA_PXE\ offered as as HTTP root
; -
asset    = Ubuntu LTS 14.04.1 Server
platform = amd64
kernel   = NWA_PXE/$HEAD_DIR$/install/netboot/ubuntu-installer/amd64/linux
;kernel   = NWA_PXE/$HEAD_DIR$/install/netboot/ubuntu-installer/i386/linux
append   = initrd=NWA_PXE/$HEAD_DIR$/install/netboot/ubuntu-installer/amd64/initrd.gz vga=788 mirror/country=manual mirror/http/hostname=$IP_BSRV$ mirror/http/directory=/$HEAD_DIR$ mirror/http/proxy="" live-installer/net-image=http://$IP_BSRV$/$HEAD_DIR$/install/filesystem.squashfs
;append   = initrd=NWA_PXE/$HEAD_DIR$/install/netboot/ubuntu-installer/i386/initrd.gz vga=788 mirror/country=manual mirror/http/hostname=$IP_BSRV$ mirror/http/directory=/$HEAD_DIR$ mirror/http/proxy="" live-installer/net-image=http://$IP_BSRV$/$HEAD_DIR$/install/filesystem.squashfs

If you want to do this using some other PXE server different than Serva you might require some editing of the former parameters.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.