-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: extend compatibility to Ubuntu server image #3
Comments
@tachang Sadly the structure of |
I'm also looking as well. I just want to speed things up a bit (I guess next thing to look at is hosting the packages locally). It would be really nice though to have them in the iso already. Thanks so much! |
@tachang I adjusted the script. It works fine. See the # clone branch feature/ubuntu-server-image
git clone -b feature/ubuntu-server-image https://github.com/core-process/linux-unattended-installation.git
# build iso based on server image
./linux-unattended-installation/ubuntu/18.04/build-iso-server-image.sh We do not need to apply the patch for the boot menu, because the server image has a boot timeout of 30 seconds by default. Do not be confused by the language selection dialog of the boot manager. The countdown gets triggered anyway. Here you can see the differences between the --- ./linux-unattended-installation/ubuntu/18.04/build-iso.sh
+++ ./linux-unattended-installation/ubuntu/18.04/build-iso-server-image.sh
@@ -3,7 +3,7 @@
# get parameters
SSH_PUBLIC_KEY_FILE=${1:-"$HOME/.ssh/id_rsa.pub"}
-TARGET_ISO=${2:-"`pwd`/ubuntu-18.04-netboot-amd64-unattended.iso"}
+TARGET_ISO=${2:-"`pwd`/ubuntu-18.04-server-amd64-unattended.iso"}
# check if ssh key exists
if [ ! -f "$SSH_PUBLIC_KEY_FILE" ];
@@ -19,15 +19,11 @@
TMP_DISC_DIR="`mktemp -d`"
TMP_INITRD_DIR="`mktemp -d`"
-# download and extract netboot iso
-SOURCE_ISO_URL="http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/mini.iso"
+# download and extract server iso
+SOURCE_ISO_URL="http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04-server-amd64.iso"
cd "$TMP_DOWNLOAD_DIR"
-wget -4 "$SOURCE_ISO_URL" -O "./netboot.iso"
-7z x "./netboot.iso" "-o$TMP_DISC_DIR"
-
-# patch boot menu
-cd "$TMP_DISC_DIR"
-patch -p1 -i "$SCRIPT_DIR/custom/boot-menu.patch"
+wget -4 "$SOURCE_ISO_URL" -O "./server.iso"
+7z x "./server.iso" "-o$TMP_DISC_DIR"
# prepare assets
cd "$TMP_INITRD_DIR"
@@ -38,15 +34,15 @@
# append assets to initrd image
cd "$TMP_INITRD_DIR"
-cat "$TMP_DISC_DIR/initrd.gz" | gzip -d > "./initrd"
+cat "$TMP_DISC_DIR/install/initrd.gz" | gzip -d > "./initrd"
echo "./preseed.cfg" | fakeroot cpio -o -H newc -A -F "./initrd"
find "./custom" | fakeroot cpio -o -H newc -A -F "./initrd"
-cat "./initrd" | gzip -9c > "$TMP_DISC_DIR/initrd.gz"
+cat "./initrd" | gzip -9c > "$TMP_DISC_DIR/install/initrd.gz"
# build iso
cd "$TMP_DISC_DIR"
rm -r '[BOOT]'
-mkisofs -r -V "ubuntu 18.04 netboot unattended" -cache-inodes -J -l -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -input-charset utf-8 -o "$TARGET_ISO" ./
+mkisofs -r -V "ubuntu 18.04 server unattended" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -input-charset utf-8 -o "$TARGET_ISO" ./
# go back to initial directory
cd "$CURRENT_DIR" |
Wow. Trying this out now! |
Is there a way to reduce the 30s? I assume it would be in the preseed? |
@tachang in that case we need to add a slightly modified |
Quick question, is there any particular reason for building the server image? I find the netboot image works fine for creating servers where I install what I want and nothing more. Is it just to have the included deb packages included in the new image? |
The server image saves bandwidth and gets the OS up and running much faster than having to download things. With the netboot one you if you have a bunch of machines you want to bring up at the same time it can really bring the network to it's knees (depending on how good your network is). |
A proxy cache server can help the netboot image if you're doing a bunch at once, it also ensures you get the latest packages everytime the installer is ran. :) |
Moved to HWE iso base image
Consider this approach to lookup the newest server iso images: #11 |
It would be nice to also extend the hybrid iso functionnality to this branch, I didn't find a way to use xorriso within the build-iso-server-image.sh script |
I managed to get xorriso working with the server image I had with those following commands added to the script
Hopefully this will be useful for someone who wants to achieve the same goal |
It works with netboot.iso perfectly thank you!
I tried to replace netboot.iso with ubuntu-18.04-server-amd64.iso but ran into two issues so far.
Not sure what is going on.
The text was updated successfully, but these errors were encountered: