The process of creating a boot_command

86 views
Skip to first unread message

Edward Cheadle

unread,
Jan 26, 2022, 1:47:10 PM1/26/22
to Packer
Is the process of creating the boot_command for packer and Ubuntu documented anywhere?

I am new to packer and to the Ubuntu Server autoinstall process.  Unfortunately  I have started at a time when Ubuntu is moving to subiquity. What is even more bizarre to me is that the Desktop Ubuntu has yet another autoinstall process. So it feels like I entered a quagmire.

But I am interested in creating vagrant boxes and Ubuntu Server is of great interest.

On the internet everyone pipes up with "this worked for me" but nowhere I have found anything that explains the process of finding what works and troubleshooting the boot_command.   I suspect, at least part of the reason, is my unfamiliarity with Ubuntu.

Below are various boot_commands I have tried for Ubuntu server 21.20. None of them work. The first works for Server 20.04, but none for 21.10.

I watch the installation, cloud-init starts running, but when the installer, on 20.04 would stop and reboot into the next phase, the graphical installer starts up and hangs the process.

Anyway, if anyone can help with the process of creating the boot_command, I would appreciate it.

Before I retired I worked at Regence, a health care company, and we used Redhat and AWS linux, so I have had little experience with Ubuntu server. I do run POP_OS so I am learning more as time goes on.


// Boot commands are put in the from required to use HCL

// Works for Ubuntu Server 20.04
boot_command          = ["<enter><enter><f6><esc><wait> ", "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/", "<wait><enter>"]


boot_command" = [
                "<enter><wait>",
                "<f6><esc>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
                "/install/vmlinuz ",
                "initrd=/install/initrd.gz ",
                "auto-install/enable=true ",
                "debconf/priority=critical ",
                "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/"
                "--- <enter>"]
boot_command = [" <wait><enter><wait>","<f6><esc>",
    "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
   "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
    "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
    "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
    "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
    "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
    "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
    "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
    "<bs><bs><bs>",
    "/casper/vmlinuz ",
    "initrd=/casper/initrd ",
    "auto-install/enable=true ",
    "autoinstall ds=nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/",
    "--- <enter>"]

boot_command = ["<esc><wait><esc><wait><f6><wait><esc><wait>",
    "<bs><bs><bs><bs><bs>",
    "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ",
    "--- <enter>"]



 
Reply all
Reply to author
Forward
0 new messages