From f9fcb3c9392dc9285d94fd762cf90e942a8e9773 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Thu, 11 May 2023 18:07:23 -0400 Subject: [PATCH] Testing of https://github.com/u-root/u-root/issues/508#issuecomment-1539392547 works, outside of qemu bug which doesn't refresh qemu on top of qemu here. Would be nice if host's ttys0 was redirected to host calling qemu, but unrelated. Waiting for https://github.com/osresearch/heads/pull/1403 to be tested on kvm and upgrading to debian-12 myself to see if bug resolved inside of qemu. Nice work there! --- initrd/bin/Boot2ContainerPoC | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 initrd/bin/Boot2ContainerPoC diff --git a/initrd/bin/Boot2ContainerPoC b/initrd/bin/Boot2ContainerPoC new file mode 100755 index 000000000..4951cdbf5 --- /dev/null +++ b/initrd/bin/Boot2ContainerPoC @@ -0,0 +1,9 @@ +network-init-recovery +rm -f /bin/wget +echo "Downloading full linux kernel..." +wget https://gitlab.freedesktop.org/mupuf/boot2container/-/releases/v0.9.9/downloads/linux-x86_64-full -O /tmp/linux-x86_64-full +echo "Downloading initramfs..." +wget https://gitlab.freedesktop.org/mupuf/boot2container/-/releases/v0.9.9/downloads/initramfs.linux_amd64.cpio.xz -O /tmp/initramfs.linux_amd64.cpio.xz +echo "Preparing kexec...." +kexec -d -l /tmp/linux-x86_64-full --initrd=/tmp/initramfs.linux_amd64.cpio.xz --append='console=ttyS0 console=tty b2c.run="-ti docker.io/library/alpine:latest"' +kexec -e