Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Any more that have issues with autoinstall on 23.10.1?

  1. #1
    Join Date
    Jul 2006
    Location
    Uppsala, Sweden
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Unhappy Any more that have issues with autoinstall on 23.10.1?

    Hi
    I wonder if more are having issues with 23.10.1 regarding autoinstall. I had a nice working autoinstall setup that worked good with 23.04 and now when trying that same user-data file with 23.10.1 it fails every time. I pinned it down so it must be something with the late-command section cause that's where it fails.

    just have a few of these lines pointing to various scripts

    Code:
    - curtin in-target -- bash /opt/scripts/post-install.sh
    I have command prior to that which copies the scripts over first and if I don't include the lines like the one above, everything works and the scripts and the packages are there. I can even run them by themselves individually.
    Did Canonical change something regarding autoinstall? maybe hired a different team for it with this version?
    Cause it seems very odd
    - Jaxilian -

    ||embrace the inevitable||

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Any more that have issues with autoinstall on 23.10.1?

    I haven't noticed any changes in autoinstall between 23.04 and 23.10. I don't know. I know there's a lot of the new examples in
    Code:
    ubuntu@ubuntu:~/Downloads$ ls /snap/ubuntu-desktop-installer/1[0-9][0-9][0-9]/usr/share/doc/*/examples/
    /snap/ubuntu-desktop-installer/1267/usr/share/doc/cloud-init/examples/:
    cloud-config-add-apt-repos.txt         cloud-config-wireguard.txt
    cloud-config-ansible-controller.txt    cloud-config-write-files.txt
    cloud-config-ansible-managed.txt       cloud-config-yum-repo.txt
    cloud-config-ansible-pull.txt          cloud-config.txt
    cloud-config-apt.txt                   include-once.txt
    cloud-config-archive-launch-index.txt  include.txt
    cloud-config-archive.txt               kernel-cmdline.txt
    cloud-config-boot-cmds.txt             network-config-v1-bonded-pair.yaml
    cloud-config-ca-certs.txt              network-config-v1-bonded-vlan.yaml
    cloud-config-chef-oneiric.txt          network-config-v1-bridge.yaml
    cloud-config-chef.txt                  network-config-v1-multiple-vlan.yaml
    cloud-config-datasources.txt           network-config-v1-nameserver.yaml
    cloud-config-disk-setup.txt            network-config-v1-physical-3-nic.yaml
    cloud-config-gluster.txt               network-config-v1-physical-dhcp.yaml
    cloud-config-install-packages.txt      network-config-v1-route.yaml
    cloud-config-launch-index.txt          network-config-v1-subnet-dhcp.yaml
    cloud-config-lxd.txt                   network-config-v1-subnet-multiple.yaml
    cloud-config-mount-points.txt          network-config-v1-subnet-routes.yaml
    cloud-config-ntp.txt                   network-config-v1-subnet-static.yaml
    cloud-config-reporting.txt             network-config-v1-vlan.yaml
    cloud-config-run-cmds.txt              part-handler-v2.txt
    cloud-config-ssh-keys.txt              part-handler.txt
    cloud-config-update-apt.txt            plain-ignored.txt
    cloud-config-update-packages.txt       seed
    cloud-config-user-groups.txt           user-script.txt
    
    /snap/ubuntu-desktop-installer/1267/usr/share/doc/grub-common/examples/:
    grub.cfg
    
    /snap/ubuntu-desktop-installer/1267/usr/share/doc/python3-aiohttp/examples/:
    __init__.py          lowlevel_srv.py   web_rewrite_headers_middleware.py
    background_tasks.py  server.crt        web_srv.py
    cli_app.py           server.csr        web_srv_route_deco.py
    client_auth.py       server.key        web_srv_route_table.py
    client_json.py       server_simple.py  web_ws.py
    client_ws.py         static_files.py   websocket.html
    curl.py              web_classview.py
    fake_server.py       web_cookies.py
    
    /snap/ubuntu-desktop-installer/1267/usr/share/doc/python3-debian/examples/:
    changelog  copyright  deb822  debfile  debtags
    
    /snap/ubuntu-desktop-installer/1267/usr/share/doc/python3-serial/examples/:
    at_protocol.py     setup-miniterm-py2exe.py        wxSerialConfigDialog.py
    port_publisher.py  setup-rfc2217_server-py2exe.py  wxSerialConfigDialog.wxg
    port_publisher.sh  setup-wxTerminal-py2exe.py      wxTerminal.py
    rfc2217_server.py  tcp_serial_redirect.py          wxTerminal.wxg
    
    /snap/ubuntu-desktop-installer/1267/usr/share/doc/python3-typing-extensions/examples/:
    test_typing_extensions.py
    
    /snap/ubuntu-desktop-installer/1267/usr/share/doc/python3-yaml/examples/:
    pygments-lexer  yaml-highlight
    But I honestly haven't had time to read thorugh those yet, except for the zfs autoinstall.yaml files

    Do any of those help?

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    Jul 2006
    Location
    Uppsala, Sweden
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Any more that have issues with autoinstall on 23.10.1?

    thank you
    I forgot to mention, it's the desktop version of Ubuntu. I tried even with just a very simple bashscript which only does apt update and apt upgrade -y or just install some small package like vlc, but that fails too. Same script works on 23.04. I have no idea what is wrong. I tried finding logs for this, but can't find the right one that shows the autoinstall installation process.

    on the desktop version I don't have the path you showed to the examples (/snap/ubuntu-desktop-installer)
    Last edited by Jaxilian; October 20th, 2023 at 09:55 AM.
    - Jaxilian -

    ||embrace the inevitable||

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Any more that have issues with autoinstall on 23.10.1?

    After booted, it's within the Live Image Environment (LIE), after the Snap ubuntu-desktop-installer is mounted into the filesystem. the center wildcard is the ubuntu-desktop-installer version... Until that mounts. it's only a partial mount tag there. If you update the installer Git version, it add another version path at the part of the directory structure...

    Let me look what is there after an install... Not there. Only there when you boot into the LIE using "Try." Then that snap, 'ubuntu-desktop-installer' is mounted into the system at part of that path.

    Yes, they are not documented. I have some questions filed, both at Launchpad and the GitHub on the 'ubuntu-desktop-installer' asking where they are storing the installer choice information, so that they might be tweaked during an install, for ZFS options and drive size tweaking... We used to be able to toggle over to a console tty. or terminal session to do that pre- 23.XX, but can't find where yet with 23.XX... That and a bug filed on how it creates recovery keys for LUKS in the new TPM backed Encrypted scripts, for potential lockouts.

    Those were what I found when I was helping DEV test Mantic, and searching for my own answers.
    Last edited by MAFoElffen; October 20th, 2023 at 03:36 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  5. #5
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Any more that have issues with autoinstall on 23.10.1?

    I forgot to say, I have the git cloned and the examples are there also... for example one of the ones I mentioned "ai-zfs-guided.yaml:
    Code:
    #cloud-config
    autoinstall:
      version: 1
    
      identity:
        realname: ''
        hostname: ubuntu
        username: ubuntu
        password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
    
      source:
        id: ubuntu-server-minimal
    
      early-commands:
        - apt-get install -y zfsutils-linux
    
      late-commands:
        # Let's avoid recreating LP: #1993318
        - zpool set cachefile= rpool
        - cp /etc/zfs/zpool.cache "/target/etc/zfs/"
        - mkdir -p "/etc/zfs/zfs-list.cache" "/target/etc/zfs/zfs-list.cache"
        - truncate -s 0 /etc/zfs/zfs-list.cache/rpool
        - >-
          env -i
          ZEVENT_POOL=rpool
          ZED_ZEDLET_DIR=/etc/zfs/zed.d
          ZEVENT_SUBCLASS=history_event
          ZFS=zfs
          ZEVENT_HISTORY_INTERNAL_NAME=create
          /etc/zfs/zed.d/history_event-zfs-list-cacher.sh
        - >-
          sh -c
          'sed -E "s|\t/target/?|\t/|g" "/etc/zfs/zfs-list.cache/rpool" > "/target/etc/zfs/zfs-list.cache/rpool"'
        - rm -f "/etc/zfs/zfs-list.cache/rpool"
    
      storage:
        layout:
          name: zfs
    Notice the format of the commands there in early-commands and late-commands?

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  6. #6
    Join Date
    Jul 2006
    Location
    Uppsala, Sweden
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Any more that have issues with autoinstall on 23.10.1?

    Thanks, I found the examples
    I can't figure out why my late commands are not working. It's just simple bash scripts that worked perfectly on 23.04...why not with 23.10? It's like the curtin command isn't there anymore. I am sorta testing on the those versions for the upcoming 24.04 LTS, trying to catch up as much as possible with the new installer.

    I am one of two techs here at my university that is pushing for a Ubuntu platform, the other guy is learning Landscape at the moment. We need to come up with a PoC for the management to be able to get funding for the project (buying licenses and so on). The older debian based installer was easier to get working. Using that at the moment for 22.04.3.
    Last edited by Jaxilian; October 23rd, 2023 at 08:34 AM.
    - Jaxilian -

    ||embrace the inevitable||

  7. #7
    Join Date
    Jul 2006
    Location
    Uppsala, Sweden
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Any more that have issues with autoinstall on 23.10.1?

    even tried a different format, like stated in link: https://www.pugetsystems.com/labs/hp...toinstall-iso/

    Code:
    - curtin in-target --target /target bash /opt/scripts/post-install.sh
    even though it says on https://ubuntu.com/server/docs/insta...tall-reference (won't work either, I tried that too)

    late-commands
    type: command list
    default: no commands
    can be interactive: no

    Shell commands to run after the install has completed successfully and any updates and packages installed, just before the system reboots. They are run in the installer environment with the installed system mounted at /target. You can run curtin in-target -- $shell_command (with the version of subiquity released with 20.04 GA you need to specify this as curtin in-target --target=/target -- $shell_command) to run in the target system (similar to how plain in-target can be used in d-i preseed/late_command).
    - Jaxilian -

    ||embrace the inevitable||

  8. #8
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Any more that have issues with autoinstall on 23.10.1?

    With 23.04, I followed Puget Sound System's instructions also, but I had to tweak the timing of that a little. On some things that I wanted to happen late, they wouldn't work either.

    I moved them to happen after the first reboot. I created a cloud-config.yaml and wrote it to an iso image, which I had there for the machine to see on boot... Those seemed to work there.

    I haven't had to chance to try that yet with 23.10.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  9. #9
    Join Date
    Jul 2006
    Location
    Uppsala, Sweden
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Any more that have issues with autoinstall on 23.10.1?

    Here is what my user-data looks like

    Code:
    #cloud-config
    autoinstall:
      version: 1
      refresh-installer:
              update: yes
      keyboard:
        layout: se
      locale: en_US.UTF-8
      timezone: Europe/Stockholm
      identity:
        hostname: unassigned-hostname
        username: ubuntu
        password: ubuntu (not the real one)
      source:
        search_drivers: true
        id: ubuntu-desktop-minimal
      storage:
        layout:
          name: direct
      updates: all
      late-commands:
        - mkdir /target/opt/packages
        - mkdir /target/opt/scripts 
        - cp -r /cdrom/packages /target/opt
        - cp -r /cdrom/nocloud/scripts /target/opt
        - curtin in-target -- bash /opt/scripts/post-install1.sh
        - curtin in-target -- bash /opt/scripts/post-install2.sh
        - curtin in-target -- bash /opt/scripts/post-install3.sh
    within those postinstall-scripts are just some basic bash code to install some packages from repos and some custom debs. This is the setup that worked on Ubuntu 23.04 desktop.
    Any suggestion that I can try?
    I notice on Ubuntu 23.04 with this setup, the installer says its completed before the late-commands have finished. It works on them in the background, but visually you get tricked to forcefully reboot the computer and it will break the installation. If I just let it sit, it will reboot after a while and everything is well.
    - Jaxilian -

    ||embrace the inevitable||

  10. #10
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Any more that have issues with autoinstall on 23.10.1?

    Quote Originally Posted by Jaxilian View Post
    Here is what my user-data looks like

    Code:
    #cloud-config
    autoinstall:
      version: 1
      refresh-installer:
              update: yes
      keyboard:
        layout: se
      locale: en_US.UTF-8
      timezone: Europe/Stockholm
      identity:
        hostname: unassigned-hostname
        username: ubuntu
        password: ubuntu (not the real one)
      source:
        search_drivers: true
        id: ubuntu-desktop-minimal
      storage:
        layout:
          name: direct
      updates: all
      late-commands:
        - mkdir /target/opt/packages
        - mkdir /target/opt/scripts 
        - cp -r /cdrom/packages /target/opt
        - cp -r /cdrom/nocloud/scripts /target/opt
        - curtin in-target -- bash /opt/scripts/post-install1.sh
        - curtin in-target -- bash /opt/scripts/post-install2.sh
        - curtin in-target -- bash /opt/scripts/post-install3.sh
    Any suggestion that I can try?
    Two ideas;

    First is, I'm not sure of $PATH during the autoinstall, so I add path paths to my commands, if they are not internal commands. Reminiscent of what you have to do for cron. The curtin in-target command does the chroot (and bind mounts things from the host for you so scripts can run and find /proc /run /dev etc. But I'm not sure it can just find 'bash' without the full path to it, so more like this
    Code:
      late-commands:
        - mkdir /target/opt/packages
        - mkdir /target/opt/scripts
        - cp -r /cdrom/packages /target/opt
        - cp -r /cdrom/nocloud/scripts /target/opt
        - curtin in-target -- /usr/bin/bash /opt/scripts/post-install1.sh
        - curtin in-target -- /usr/bin/bash /opt/scripts/post-install2.sh
        - curtin in-target -- /usr/bin/bash /opt/scripts/post-install3.sh
    Couldn't hurt, for the just-in-cases...

    Second: An out of the box idea, I have done this also... I recursively set execute permissions the post install scripts. If you did that on the scripts you copy over the your /opt/scripts/ folder and just called them directly? Something like...
    Code:
      late-commands:
        - mkdir /target/opt/packages
        - mkdir /target/opt/scripts 
        - cp -r /cdrom/packages /target/opt
        - cp -r /cdrom/nocloud/scripts /target/opt
        - chmod -R 700 /opt/scripts
        - curtin in-target -- /opt/scripts/post-install1.sh
        - curtin in-target -- /opt/scripts/post-install2.sh
        - curtin in-target -- /opt/scripts/post-install3.sh
    Ensuring the scripts had the full paths in the shabang's.

    At this point, throwing out ideas that I've tried. The third is what I mentioned above, in the user-data of cloud-init on the first reboot, which looks like this
    Code:
    user-data:
      runcmd:
       - wget ….
       - chmod +x /path/to/script
       - /path/to/script
    ...
    Last edited by MAFoElffen; October 23rd, 2023 at 04:53 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •