-
Notifications
You must be signed in to change notification settings - Fork 149
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
Support for 22.04 #30
Comments
Just tried it on 22.04 and it fails here:
|
It's far from perfect but I was able to generate a 22.04 Server ISO with the following modifications: diff --git a/ubuntu-autoinstall-generator.sh b/ubuntu-autoinstall-generator.sh
index 5229d83..8b3f1f0 100644
--- a/ubuntu-autoinstall-generator.sh
+++ b/ubuntu-autoinstall-generator.sh
@@ -228,7 +228,9 @@ if [ ${use_hwe_kernel} -eq 1 ]; then
fi
log "🧩 Adding autoinstall parameter to kernel command line..."
-sed -i -e 's/---/ autoinstall ---/g' "$tmpdir/isolinux/txt.cfg"
+if [ -e $tmpdir/isolinux/txt.cfg ]; then
+ sed -i -e 's/---/ autoinstall ---/g' "$tmpdir/isolinux/txt.cfg"
+fi
sed -i -e 's/---/ autoinstall ---/g' "$tmpdir/boot/grub/grub.cfg"
sed -i -e 's/---/ autoinstall ---/g' "$tmpdir/boot/grub/loopback.cfg"
log "👍 Added parameter to UEFI and BIOS kernel command lines."
@@ -242,7 +244,9 @@ if [ ${all_in_one} -eq 1 ]; then
else
touch "$tmpdir/nocloud/meta-data"
fi
- sed -i -e 's,---, ds=nocloud;s=/cdrom/nocloud/ ---,g' "$tmpdir/isolinux/txt.cfg"
+ if [ -e $tmpdir/isolinux/txt.cfg ]; then
+ sed -i -e 's,---, ds=nocloud;s=/cdrom/nocloud/ ---,g' "$tmpdir/isolinux/txt.cfg"
+ fi
sed -i -e 's,---, ds=nocloud\\\;s=/cdrom/nocloud/ ---,g' "$tmpdir/boot/grub/grub.cfg"
sed -i -e 's,---, ds=nocloud\\\;s=/cdrom/nocloud/ ---,g' "$tmpdir/boot/grub/loopback.cfg"
log "👍 Added data and configured kernel command line."
@@ -263,7 +267,7 @@ fi
log "📦 Repackaging extracted files into an ISO image..."
cd "$tmpdir"
-xorriso -as mkisofs -r -V "ubuntu-autoinstall-$today" -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -boot-info-table -input-charset utf-8 -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -o "${destination_iso}" . &>/dev/null
+xorriso -as mkisofs -r -V "ubuntu-autoinstall-$today" -c boot.cat -no-emul-boot -boot-load-size 4 -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -boot-info-table -eltorito-alt-boot -no-emul-boot -isohybrid-gpt-basdat -b '/boot/grub/i386-pc/eltorito.img' -o "${destination_iso}" . &>/dev/null
cd "$OLDPWD"
log "👍 Repackaged into ${destination_iso}" And the following command line:
|
The script completes successfully. However, if I |
I would also really like this for ubuntu 22.04, any help getting it up and working :-) |
Can confirm that the solution that @NetForces posted works. We use Idrac & NFS to mount iso's. Perhaps there are some flags you are missing when making your usb bootable @dcd-arnold. |
Hi @eddie4, I do nothing else than
|
@eddie4 try adding back the
I may have time to try it myself today as having it working on a USB key is also my goal. |
Ok so far no luck in generating a working USB key... |
I've run into the same problem @dcd-arnold is facing — I can get a modified version of the script to run, but the resulting USB key (made using Etcher) won't boot a physical machine. It won't even try to boot. If I install the unmodified 22.04 ISO on a USB key it boots as expected. |
With the patch by @NetForces I can get a working USB stick. Just don't use Etcher, I've had bad experiences with that as well. Rufus (in Windows) does it flawlessly. Haven't tried dd yet. |
@Gertm are you booting to boot a BIOS (or UEFI with legacy support) or an UEFI machine? I try to boot UEFI. |
@dcd-arnold I'm booting a UEFI machine. I have the user-data file on a webserver so I can easily change it without having to remake the ISO all the time. |
@Gertm I copy it onto the iso with the command above. That seems to be the difference. |
@Gertm Your comment about Rufus vs Etcher is interesting. On my side, I have been using |
Ok I confirm that the same generated ISO works when using Rufus to copy it to a USB thumb drive and fails when using So Rufus is doing some kind of changes. I'll compare a USB key made with the 2 methods and see if I can find out what is done. |
So the contect of the Rufus generated USB thumb drive and the dd:
Rufus:
|
Ok partial success or failure.... I found these projects:
I took mix parts of these 2 projects. The resulting dd if=${source_iso} bs=1 count=432 of=$tmpdir/boot/boot_hybrid.img
dd if=${source_iso} bs=512 skip=`fdisk -l ${source_iso} | grep iso2 | cut -f 2 -d ' '` count=8496 of=$tmpdir/boot/efi.img
xorriso -as mkisofs -r \
-V "ubuntu-autoinstall-$today" \
-o ${destination_iso} \
--grub2-mbr boot/boot_hybrid.img \
-partition_offset 16 \
--mbr-force-bootable \
-append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b boot/efi.img \
-appended_part_as_gpt \
-iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7 \
-c '/boot.catalog' \
-b '/boot/grub/i386-pc/eltorito.img' \
-no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \
-eltorito-alt-boot \
-e '--interval:appended_partition_2:::' \
-no-emul-boot \
./ (I don't claim to understand all the options in that command line, I just adapted it to the With the resulting ISO (copied to a USB thumb drive with |
I gave it my best shot and greated the pull request #33 |
Isolinux got deprecated starting 20.10 but looks like a solution has been outlined here: https://askubuntu.com/questions/1289400/remaster-installation-image-for-ubuntu-20-10 I haven't had time to test though EDIT: |
I followed your updated version for 22.04, I booted the iso on a usb using rufus and tried to run the ubuntu but it just gets stuck and boot screen and doesn't go beyond. Did I miss something or is there something in addition to what I have to do? |
To be honest, I can't remember. I switched to using pxeless (see a few comments up) and have not maintained any interest in this project anymore. |
Thank you for your reply and mention of pxeless as this actually helped solve my issue and I was able to generate the iso. |
Hi @majidalikhan8baader, can you tell me how you solved it? Did you achieve it only with the pxeless project? |
@agusserraa98 Since I needed the ISO only, I shifted my concentration to the pxeless project and it was quite easier and properly documented. So, this helped and yes I was able to achieve it only using pxeless project. |
Great, use the Pexels project and it's really good, very well documented. Thank you |
I recommend PXEless as well instead of this project: https://github.com/cloudymax/pxeless/ |
Hi folks! I've been trying, unsucessfully, to modify this script to install beta versions of Jammy Jellyfish. The release candidate should be out today — any chance this will be updated for 22.04 support?
The text was updated successfully, but these errors were encountered: