2

I'm autoinstall-ing Ubuntu Server 20.04 with no network connection. I install a specific kernel, which I currently do in a postinstall script but it would be better if it was done in the base install.

Here is my /nocloud/user-data, which updates the kernel if online, but doesn't work offline:


autoinstall:
version: 1
identity:
    hostname: dev-pc
    username: dev-user
    password: encryptedpasswordhere
locale: en_GB
keyboard:
    layout: gb
kernel:
    package: 5.15.0-58-generic
packages:
    - linux-modules-extra-5.15.0-58-generic
    - linux-headers-5.15.0-58-generic   
    
late-commands:
    - cp -r /cdrom/install /target/
    - curtin in-target mkdir /etc/systemd/system/getty@tty1.service.d 
    - curtin in-target cp /install/override_dev.conf /etc/systemd/system/getty@tty1.service.d/override.conf
   
user-data: 
    runcmd:
        - mv /install /home/dev-user/
        - chown -R dev-user /home/dev-user/install
        - /bin/sh -c 'echo "bash install/./postinstall_mgr.sh" >> /home/dev-user/.bashrc'
        - touch /etc/cloud/cloud-init.disabled
        - reboot now

So with no network, how do I tell the autoinstaller how to find my pre-downloaded kernel .debs in /cdrom?

I know how to do it for the old Debian-installer preseed system with the /pool/extras setup, but not this newer Subiquity / cloud-init system.

Wezzoid
  • 21
  • 2

0 Answers0