Ubuntu 20.04 autoinstall with 2G ram

it has taken time but I have autoinstall working. I am converting from CentOS 7 kickstart. I need to install (remotely) 20.04 on machines with 2G Ram. No more ram can be installed as they are remote.
I log into the machine - edit the 40_custom file, download the vmlinuz and initrd files from casper - re-run grub2-mkconfig for CentOS 7 and all - when it reboots its starts installing 20.04. however - it runs out of ram in 2G !

my kernel line is this: ramdisk_size=1500000 root=/dev/ram0 fsck.mode=skip autoinstall splash ‘ds=nocloud-net;s=http://MyIP/autoinstall/’ ip=dhcp ‘url=http://releases.ubuntu.com/focal/latest-live-server-amd64.iso’

This starts to work, boots, downloads the iso, but then gets a out of memory error and goes to the welcome screen.

How can I remotely install 20.04 in 2G ram ?
Thanks,

Jerry

So the problem here is that cloud-init also looks for url= on the kernel command line :confused: Fortunately it looks for cloud-config-url= first, so if can point cloud-config-url= at a URL that just has an empty file at the end of it it should work. I didn’t test an autoinstall but an interactive install completed in a 2G VM and that probably uses more resources than an autoinstall. HTH!

(And we should find some way to not require these gyrations)

You can still use the mini.iso. I saw in your other post that this was not an option because it does not support autoinstall. The mini.iso can be automated with a preseed file.

The more than 2GB requirement is just for PXE installations. You could also use autoinstall in another way. For example, creating a custom ISO with the autoinstall configuration added. That would require being able to boot from the ISO without using PXE though.

mwhudson you rock! This worked at least on 2 machines. So these are my grub values now…

root=/dev/ram0 ramdisk_size=1500000 fsck.mode=skip autoinstall splash ‘ds=nocloud-net;s=http://MyIP/autoinstall/’ ip=dhcp url=http://MyIP/autoinstall/ubuntu-20.04.2-live-server-amd64.iso cloud-config-url=http://MyIP/autoinstall/meta-data

Where meta-data is a 0 size file.

Any reason this would not work on qemu VM ? I gave it a shot and something weird happened got an error - trying again.

Thank you!
Jerry

Glad it helps. We should do something (not sure what) to avoid needing something so obscure. And I was testing this in qemu before posting, so it definitely should work! (I think I was probably testing a 21.04 pre-release rather than 20.04.2 but that shouldn’t really matter)

Hello mwhudson… Wondering if you might have a suggestion. I changed this around a bit. This is my kernel boot:
root=/dev/ram0 ramdisk_size=1500000 fsck.mode=skip autoinstall ip=dhcp url=http://MyIp/ubuntu-20.04.3-live-server-amd64.iso cloud-config-url=http://MyIP/user-data

And everything kicks off - starts downloading the ISO - then about 50% downloaded it says “no space left on device” . The system is still a 2G ram system.

Thoughts?

jerry

Goodness. I found the issue. The command above does work. There was a typo in the actual grub file.
Peace!

Jerry

1 Like