Score:1

How to upgrade kernel during offline autoinstall?

br flag

I'm autoinstall-ing Ubuntu Server 20.04 with no network connection. I'm trying to 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/[email protected] 
    - curtin in-target cp /install/override_dev.conf /etc/systemd/system/[email protected]/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 system.

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.