4

I'm trying to build a Ubuntu 20.04 server with autoinstall. But it looks like it isn't picking up the setup file.

I'm using packer, however I also tried this manually and got the same result:

Setup:

/home/user/build/http/user-data:

#cloud-config
autoinstall:
  version: 1
  identity:
    hostname: ubuntu-vm
    password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"     
    username: ubuntu
  locale: en_US.UTF-8
  keyboard:
    layout: us

/home/user/build/http/meta-data: (empty)

grub command line:

set gfxpayload=keep<enter>
linux /casper/vmlinuz autoinstall ds=nocloud-net;s=http://192.168.10.10:3003/ ---
initrd /casper/initrd
boot

I can browse to http://192.168.10.10:3003/ and see user-data and meta-data files.

I end up on the "choose your language screen" forever.

I do have a console capture video which I can upload somewhere if anyone like to see the console output.

also tried:

linux /casper/vmlinuz autoinstall debian-installer/locale=en_US console-setup/layoutcode=us ds=nocloud-net;s=http://192.168.10.10:3003/ ---
linux /casper/vmlinuz autoinstall debian-installer/locale=en_US console-setup/layoutcode=us ds=nocloud-net;s=http://192.168.10.10:3003/ --
linux /casper/vmlinuz autoinstall ds=nocloud-net;seedfrom=http://192.168.10.10:3003/

EDIT: Fixed the user-data, pasted the wrong (too short version), this is the latest.

karel
  • 114,770
awm
  • 168
  • 1
  • 7

1 Answers1

3

I found with Grub that you need to escape the ; character. Try

linux /casper/vmlinuz autoinstall ds=nocloud-net\;s=http://192.168.10.10:3003/ ---

or

linux /casper/vmlinuz autoinstall ds='nocloud-net;s=http://192.168.10.10:3003/' ---

To see if this is the problem, open a shell in the installer (either use Alt-F2 or the Help menu). Run the command dmesg | grep 'Command line'. You want the output to include ;s=http://192.168.10.10:3003/

There are many other possible reasons. You can also use the shell to access the logs in /var/log/installer to check for any error messages.

Several users expressed problems with autoinstall and Packer on Ubuntu's Discourse. Their posts might also be helpful to you. These specific post seems to validate my suggestion

  • I had tried the dmesg but it gave me a kernel buffering error. The '...' solution worked for me, packer didn't like trying to escape the semicolon. – awm Apr 06 '21 at 18:55
  • 1
    Thanks for the answer. Interestingly enough your solution works for Ubuntu server 22.04 (I used the simple quotes). In Ubuntu 20.04 I use F6 to enter boot parameters and it works without escaping ; or quoting the autoinstall arguments! – Lethargos Apr 21 '22 at 21:04