From e3692b9df16d64ea89bd5a2d843255a2a02d8280 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 27 Oct 2018 13:08:31 +0000 Subject: [PATCH] Do not use privileged flag for copy kernel/initrd/module --- tools/qemu-debian-img/bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/qemu-debian-img/bootstrap.sh b/tools/qemu-debian-img/bootstrap.sh index d468240..7277671 100755 --- a/tools/qemu-debian-img/bootstrap.sh +++ b/tools/qemu-debian-img/bootstrap.sh @@ -1,7 +1,7 @@ #!/bin/sh -eux docker build -t gen-ubuntu1804-image . -RUN="docker run --privileged -v $(pwd):/shared -t gen-ubuntu1804-image" -$RUN # generate image -$RUN sh -c 'cp /vmlinuz /shared/ubuntu1804.vmlinuz' +docker run --privileged -v $(pwd):/shared -t gen-ubuntu1804-image +RUN="docker run -v $(pwd):/shared -t gen-ubuntu1804-image" +$RUN sh -c 'chmod 644 /vmlinuz && cp /vmlinuz /shared/ubuntu1804.vmlinuz' $RUN sh -c 'cp /initrd.img /shared/ubuntu1804.initrd' $RUN sh -c 'cp $(find /lib/modules -name test_static_key_base.ko) /shared/ubuntu1804.ko'