From 99a70b8561faf863f489420771d0686954350e05 Mon Sep 17 00:00:00 2001 From: Nils Hanke Date: Tue, 17 Jan 2023 11:39:21 +0100 Subject: [PATCH 1/3] image: fix "ignored null byte in input" warning --- .../lib/dracut/modules.d/39constellation-mount/aws-nvme-disk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/aws-nvme-disk.sh b/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/aws-nvme-disk.sh index 9cef6dbb58..25f5d53190 100644 --- a/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/aws-nvme-disk.sh +++ b/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/aws-nvme-disk.sh @@ -12,7 +12,7 @@ AWS_STATE_DISK_SYMLINK="/dev/${AWS_STATE_DISK_DEVICENAME}" # hack: aws nvme udev rules are never executed. Create symlinks for the nvme devices manually. while [[ ! -L ${AWS_STATE_DISK_SYMLINK} ]]; do for nvmedisk in /dev/nvme*n1; do - linkname=$(nvme amzn id-ctrl -b "${nvmedisk}" | tail -c +3072 | tr -d ' ') || true + linkname=$(nvme amzn id-ctrl -b "${nvmedisk}" | tail -c +3073 | head -c 32 | tr -d ' ') || true if [[ -n ${linkname} ]] && [[ ${linkname} == "${AWS_STATE_DISK_DEVICENAME}" ]]; then ln -s "${nvmedisk}" "${AWS_STATE_DISK_SYMLINK}" fi From 2df5b2a0ebd62ffe371e31b2c226d28f2188d6fe Mon Sep 17 00:00:00 2001 From: Nils Hanke Date: Tue, 17 Jan 2023 11:54:50 +0100 Subject: [PATCH 2/3] image: fix shellfmt warning --- image/mkosi.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/mkosi.postinst b/image/mkosi.postinst index f8ed420b00..89054f43cd 100755 --- a/image/mkosi.postinst +++ b/image/mkosi.postinst @@ -23,7 +23,7 @@ rm -f /etc/issue.net # add motd for constellation console access if [[ ${CONSOLE_MOTD:-false} == "true" ]]; then - cat < /usr/lib/motd.d/10-constellation-console-access.motd + cat << EOF > /usr/lib/motd.d/10-constellation-console-access.motd ~ Welcome to Constellation! ~ Usually, on release versions of Constellation running in the cloud, you are not able to login through the serial console. This shell access is specifically granted for debug images and MiniConstellation to allow users to research the environment Constellation runs in. From 55c433d243a2e6071ad5af5947788815abbc5ef8 Mon Sep 17 00:00:00 2001 From: Nils Hanke Date: Tue, 17 Jan 2023 19:29:15 +0100 Subject: [PATCH 3/3] image: install `head` into initramfs for AWS --- .../lib/dracut/modules.d/39constellation-mount/module-setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh b/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh index 3e7acdf344..8773a9b5f5 100644 --- a/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh +++ b/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh @@ -43,7 +43,8 @@ install() { # aws nvme disks inst_multiple \ tail \ - tr + tr \ + head # azure scsi disks inst_multiple \