Score:0

Autoinstall Ubuntu 22.04 Desktop using Server source?

ir flag

I'm trying to create an auto install iso, and install it in Proxmox. After spent long hours to search how to auto install a Desktop version, I finally abandoned.... (if anybody has an idea I'm waiting for)

I see that it's possible to do this with server version only, so I follow this tutorial in a first time : https://www.pugetsystems.com/labs/hp...toinstall-iso/

This works, and I install automatically with interaction my Ubuntu server,, but now I'm trying to customize my yml file to set Desktop environment, with full language, etc.

Here is my yml file:

#cloud-config
autoinstall:
  version: 1
  storage:
    layout:
      name: lvm
      match:
        size: largest  
  locale: fr_FR.UTF-8
  keyboard:
    layout: fr
  #network:
  #  version: 2

  #  renderer: NetworkManager # I've tried this for network problem, but there is an installation error with these lines.
  identity:
    username: loko
    hostname: ubuntu
    password: ...
  ssh:
    allow-pw: true
    install-server: true
  apt:
    primary:
      - arches: [default]
        uri: http://fr.archive.ubuntu.com/ubuntu/
  packages: 
    - curl
    - net-tools
    - ubuntu-desktop
    - build-essential
    - qemu-guest-agent
    - hunspell-fr-classical
    - language-pack-fr-base
    - libreoffice-help-common
    - language-pack-gnome-fr-base
  package_update: true
  package_upgrade: true
  late-commands:
   # tried this but not work :[COLOR=var(--black-800)][/COLOR]- curtin in-target -- [COLOR=var(--black-800)]apt-get install $(check-language-support)[/COLOR]
    - sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=""/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/' /target/etc/default/grub
    #- /usr/sbin/update-grub
    - /sbin/poweroff
  #late-commands:
    #- curtin in-target -- sed -i '/GRUB_CMDLINE_LINUX_DEFAULT=/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/' /etc/default/grub
    #- curtin in-target -- update-grub
    #- curtin in-target -- wget -qO /root/preseed.sh http://10.0.0.1/proxmox/includes/preseed.sh \
    #- curtin in-target -- chmod a+x /root/preseed.sh \
    #- curtin in-target -- /bin/bash /root/preseed.sh \
    #- curtin in-target -- rm -f /root/preseed.sh

I have these problems :

  • I can't run update-grub to set quiet splash at boot => exit code error can't execute in /cow something like this.

  • My login page isn't in French (we can see "not listed" text).

    enter image description here

  • Which command can I add to autologin Ubuntu at boot?

  • I don't have network manager for fired connection? Nevertheless my DHCP is working and I have an IP.

    enter image description here

  • How can I do an update-grub to add quiet splash?

  • How can I skip/answer questions for the first login without interaction, and close it at the first boot?

    enter image description here

Score:0
ug flag

I stumbled upon the same problem when I tried to add the console kernel parameters to my qemu/kvm VMs. The problem you are facing is that your config runs the sed and update-grub command in the installer environment.

Autoinstall uses the underlying curtain to install the Ubuntu OS. Your initial commented out commands were correct, but you also need to specify the target, which in case of the Ubuntu installer is located at /target to run the commands in the target environment you need to prefix your commands as followed:

  late-commands:
    - curtin in-target --target=/target -- sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=""/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/' /etc/default/grub
    - curtin in-target --target=/target -- sudo update-grub
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.