From 3962f4ac239730f1ef711d50ca361b72be1a5a05 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Tue, 24 Nov 2020 18:38:32 +0000 Subject: [PATCH] disk-image-uefi: riscv64 add ubuntu:ubuntu login, without expiry. --- .../hooks.d/base/disk-image-uefi.binary | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index b6886ff8..ff3f1d67 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -122,6 +122,34 @@ install_grub() { dd if=mountpoint/usr/lib/u-boot/sifive_fu540/u-boot-spl.bin of=$loader1 dd if=mountpoint/usr/lib/u-boot/sifive_fu540/u-boot.itb of=$loader2 + + # Provide nocloud datasource + # Allow interactive login on baremetal SiFive board, + # without a cloud datasource. + mkdir -p mountpoint/var/lib/cloud/seed/nocloud + touch mountpoint/var/lib/cloud/seed/nocloud/meta-data + cat <mountpoint/var/lib/cloud/seed/nocloud/user-data +#cloud-config +chpasswd: + expire: false + list: + - ubuntu:ubuntu +EOF + cat <mountpoint/var/lib/cloud/seed/nocloud/network-data +# This is the initial network config. +# It can be overwritten by cloud-init. +network: + version: 2 + ethernets: + zz-all-en: + match: + name: "en*" + dhcp4: true + zz-all-eth: + match: + name: "eth*" + dhcp4: true +EOF ## TODO remove below once we have grub-efi-riscv64 rm mountpoint/tmp/device.map umount mountpoint/boot/efi