Looki Looki No Hands, Automatic install of Ubuntu server.

2023-08-07 11:08:02 - 8 Comments

Looki Looki No Hands, Automatic install of Ubuntu server.

Extracting all the files from the original ISO

mkdir source-files
xorriso -osirrox on -indev ubuntu-22.04.2-live-server-amd64.iso --extract_boot_images source-files/bootpart -extract / source-files

Edit the boot menu

menuentry "Autoinstall Ubuntu Server" {
    set gfxpayload=keep
    linux   /casper/vmlinuz quiet autoinstall ds=nocloud\;s=/cdrom/nocloud/  ---
    initrd  /casper/initrd
}

Repack the ISO from the files you've edited.

xorriso -as mkisofs -r -V "ubuntu-autoinstall" -J -boot-load-size 4 -boot-info-table -input-charset utf-8 -eltorito-alt-boot -b bootpart/eltorito_img1_bios.img -no-emul-boot -o ../installer.iso .

8 comments

  • Sam Cofer says:

    Hello!

    Looking to do this soon and I was wondering if you have a github link with your commands available?

  • shiyam says:

    i want do the automation using usb

    • woden says:

      Hi Shiyam.

      That works just fine. The ISO should be possible to flash / write to an USB stick. There is a lot of programs for that out there.

      Best regards
      Daniel

  • Lekshmi says:

    I did all this in my mac, how to add this to vbox ? because for me it shows the UEFI shell.

    • woden says:

      Hi Lekshmi

      Don’t know how the bios in an XBox is configured so it might need different boot files.

      Thank you for watching my videos.

      Best regards
      Daniel

  • Karina says:

    I want to automate the installation of ubuntu-desktop using autoinstall.yaml.
    After making the necessary changes and repacking the ISO, I ran into a problem:

    when flashing the image with balenaEtcher, it shows an error that the partition table is missing;

    if I still write the new image to a USB stick, it doesn’t contain an MBR/GPT partition table and therefore won’t boot on a PC.

    What am I doing wrong? Do I need to manually specify the partition table when repacking the ISO? How to do it?

    Thank you in advance.

    • woden says:

      Hi Karina

      I don’t really know what the problem is but one thing you can try is to use the right firmware interface (eltorito_img1_bios.img) this firmware will work on older machines that support the bios loader. There is another image for UFEI which works on newer machines. So depending on your requirements you choose a firmware. This might be the problem but it could be anything I guess.

      Hope it helps. Thank you for watching my videos.

      Best regards
      Daniel


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.