PJ-Singh-001 / Cubic

The Official Web Site for Cubic (Custom Ubuntu ISO Creator) (https://github.com/PJ-Singh-001/Cubic)
812 stars 47 forks source link

ubuntu 22.04 , autoinstall with user-data not working #266

Open changchichung opened 11 months ago

changchichung commented 11 months ago

Describe the question

I following the instruction in here , add user-data/meta-data , update grub/loopback.cfg and then make a iso file https://github.com/PJ-Singh-001/Cubic/issues/101#issuecomment-1336728758

but boot from the iso does not run the auto install

What you have tried add user-data/meta-data in preseed folder update grub/loopback.cfg

part of my user-data

#cloud-config
autoinstall:
  identity:
    hostname: ubuntu
    realname: Ubuntu user
    username: ubuntu
    password: "$6$1deb934eb89e6d28$Dvr8HQRlBvpX4PVSLB0tOcQqfD38L8glDWIk.tjQQNMh9OvXqhz45hPEC6yoJSMWGTvOdUX8n.f7XZ5EbtJy.1"
  # Let NetworkManager manage all devices on this system
  network:
    version: 2
    renderer: NetworkManager
  refresh-installer:
    update: no
  keyboard:
    layout: us 
    toggle: null
    variant: ''
  locale: zh_TW.UTF-8
  storage:
    grub:
      reorder_uefi: False
    layout:
      name: direct

Expected behavior

auto install from the bootable ISO

A clear and concise description of what you expected to happen.

OS Information (please complete the following information):

Cubic Information (please complete the following information):

PJ-Singh-001 commented 11 months ago

Ubuntu 22.04 still used the Ubiquity installer, not the new Subiquity installer. Therefore cloud-config will not work with Ubuntu 22.04.

The good news is, Cubic works very well with Ubuntu 22.04 and the Ubiquity installer. You will need to modify the ubuntu.seed file on the Options Page, Preseed Tab.

See the Ubiquity Automation Wiki for information on how to specify preseed commands.

Most (but not all) of the Ubuntu preseed commands match the Debian Installer preseed commands. An example of a Debian Installer command that does not work in Ubuntu is the Debian late-commands command; instead you must to use ubiquity ubiquity/success_command with Ubiquity in Ubuntu 22.04.

Here is a random example of Automating the Ubuntu installer that I found, which you may find helpful.

You may also find How do I create a completely unattended install of Ubuntu Desktop 16.04.1 LTS? useful, even though it is for an older version of Ubuntu.

changchichung commented 11 months ago

Ubuntu 22.04 still used the Ubiquity installer

that means I don't need a user-data to do autoinstall ? just use the preseed file ? can u confirm that ?

PJ-Singh-001 commented 11 months ago

that means I don't need a user-data to do autoinstall ? just use the preseed file ?

Yes. The user-data and empty meta-data files are only used with Cloud-init and the Subiquity installer. You do not need these files for the Ubuntu 22.04 Desktop ISO. The preseed file is all you need.

UnstoppableDrew commented 10 months ago

I think part of your problem is you're missing a backslash in front of the semicolon after ds=nocloud. Grub is treating the rest of the line as a comment. This is what I'm using for an autoinstaller of server 22.04 off a thumb drive: Screenshot 2023-12-13 145522

PJ-Singh-001 commented 9 months ago

By the way, in my testing, I found I needed the double quotes around:

"ds=nocloud;s=/cdrom/preseed/"

Otherwise, you could use the backslash, as @UnstoppableDrew suggested.