go-debos / debos

Debian OS builder
Apache License 2.0
533 stars 136 forks source link

UML Backend: error starting uml backend: <nil> #298

Open AIIX opened 2 years ago

AIIX commented 2 years ago

I am running on Debian Bullseye and trying to build an arm64 image, KVM is not available on the system and I am trying to run with uml backend, I have tried running "fakemachine --backend uml" directly and it works but is failing everytime when trying to run debos to build an image with the error: "error starting uml backend: " , I have also tried the docker image and it also fails on the same error.

obbardc commented 2 years ago

can you try running like:

docker run \
  --rm \
  -w /recipes \
  -v $(pwd):/recipes \
  -u $(id -u):$(id -g) \
  --security-opt label=disable \
  --cap-add=SYS_PTRACE \
  --tmpfs /scratch:exec \
  -e TMP=/scratch \
  godebos/debos:latest \
  recipe.yaml 
AIIX commented 2 years ago

tried with the following:

docker run --rm --workdir /recipes --mount type=bind,source=/root/recipes,destination=/recipes -u $(id -u):$(id -g) --security-opt label=disable --cap-add=SYS_PTRACE --tmpfs /scratch:exec -e TMP=/scratch godebos/debos:latest recipe.yaml

debos still fails on

2021/11/25 12:41:56 apt | Unpacking linux-firmware (1.187.20) ...
error starting uml backend: <nil>

running fakebackend manually on the system works

~# fakemachine -b uml
Running /bin/bash using uml backend
bash-5.1# uname -a
Linux fakemachine 5.10.46 #1 Wed Aug 4 20:30:21 UTC 2021 x86_64 GNU/Linux
floubaresse commented 2 years ago

@obbardc @AIIX I have a similar issue while trying to perform disk encryption. I have no problem when using the kvm backend, but only when using uml (which is useful as my build server that does not support kvm).

I have narrowed down the command that causes this message: error starting uml backend: <nil> to echo -n $INSTALLKEY | cryptsetup-reencrypt /dev/"$SDISK"2 --new --reduce-device-size 8192S --key-size 512 --hash sha512

I assume that uml somehow does not like the command, but the error message seems to be just uml exiting.

obbardc commented 2 years ago

If you add --show-boot to the debos command, you may get some more information about why uml is failing.

On Thu, 16 Dec 2021 at 09:41, floubaresse @.***> wrote:

@obbardc https://github.com/obbardc @AIIX https://github.com/AIIX I have a similar issue while trying to perform disk encryption. I have no problem when using the kvm backend, but only when using uml (which is useful as my build server that does not support kvm).

I have narrowed down the command that causes this message: error starting uml backend: to echo -n $INSTALLKEY | cryptsetup-reencrypt /dev/"$SDISK"2 --new --reduce-device-size 8192S --key-size 512 --hash sha512

I assume that uml somehow does not like the command, but the error message seems to be just uml exiting.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/go-debos/debos/issues/298#issuecomment-995603084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH3LVTRL7DZNBEQ7GSROB3URGX55ANCNFSM5IYKZR7Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

floubaresse commented 2 years ago

You're my hero! With this option I got a really clear message about space running out on /dev/shm during disk encryption. Thank you!