-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2023 Dec 8 Brickstrap successfully built bootable Buster & Bullseye .img, but now fails 2024 March #73
Comments
The first thing I would try is doing what the error message says and set the environment variables to get more details about the error. |
"The /boot/flash/ directory: This directory becomes the boot partition (FAT) of the disk image. Place any boot files here." I am confused about the boot loader & kernel... would be grateful if you would clarify from where brickstrap needs to get the appropriate kernel to build the proper EV3 brickstrap created .img...should a boot loader and a kernel be put in /boot/flash in the docker container? I have been thinking that brickstrap/libguestfs-tools would pull the kernel from the custom brickstrap .tar built from the docker image...because I have assumed that the Ubuntu x64 OS would not have anywhere the appropriate EV3 armel kernel. Do I need to copy the kernel to a specific location? Since all I see in the trace are: supermin: kernel: kernel version of /boot/vmlinuz-5.19.0-1022-oracle = 5.19.0-1022-oracle (from content) As far as I can tell from the debug trace, libguestfs-tools are not looking in the correct place(s) for the armel kernel...or perhaps you see one or more other obvious issues... i.e. where should libguestfs-tools look for the kernel & if it is indeed in the .tar then what should I make sure to have set so that it can actually look there? Also, I just an not clear what could have changed (something internal to Ubuntu, or windows, or docker desktop, or...) since this happens now on all my computers (win 10 & win 11) (even if I restore the WSL2 backup image I took in Dec within a few days of it making the successful EV3 .img files) where as brickstrap was successful on these machines back in Dec...: libguestfs: tracegrowflavor@AloEnergia:~$ libguestfs-test-tool
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
LIBGUESTFS_TRACE=1
LIBGUESTFS_DEBUG=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Microsoft/jdk-11.0.16.101-hotspot/bin:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files/MATLAB/MATLAB Runtime/v912/runtime/win64:/mnt/c/Program Files (x86)/QuickTime/QTSystem/:/mnt/c/Program Files (x86)/Common Files/Acronis/SnapAPI/:/mnt/c/Program Files (x86)/Common Files/Acronis/VirtualFile/:/mnt/c/Program Files (x86)/Common Files/Acronis/VirtualFile64/:/mnt/c/Program Files (x86)/Common Files/Acronis/FileProtector/:/mnt/c/Program Files (x86)/Common Files/Acronis/FileProtector64/:/mnt/c/Program Files (x86)/IVI Foundation/VISA/WinNT/Bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Users/growf/AppData/Local/Microsoft/WindowsApps:/snap/bin
XDG_RUNTIME_DIR=/run/user/1000/
SELinux: sh: 1: getenforce: not found
libguestfs: trace: add_drive_scratch 104857600
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsqkr6xa/scratch1.img" "raw" 104857600
libguestfs: trace: disk_create = 0
libguestfs: trace: add_drive "/tmp/libguestfsqkr6xa/scratch1.img" "format:raw" "cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive_scratch = 0
libguestfs: trace: get_append
libguestfs: trace: get_append = "NULL"
guestfs_get_append: (null)
libguestfs: trace: get_autosync
libguestfs: trace: get_autosync = 1
guestfs_get_autosync: 1
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
guestfs_get_backend: direct
libguestfs: trace: get_backend_settings
libguestfs: trace: get_backend_settings = []
guestfs_get_backend_settings: []
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
guestfs_get_cachedir: /var/tmp
libguestfs: trace: get_hv
libguestfs: trace: get_hv = "/usr/bin/qemu-system-x86_64"
guestfs_get_hv: /usr/bin/qemu-system-x86_64
libguestfs: trace: get_memsize
libguestfs: trace: get_memsize = 1280
guestfs_get_memsize: 1280
libguestfs: trace: get_network
libguestfs: trace: get_network = 0
guestfs_get_network: 0
libguestfs: trace: get_path
libguestfs: trace: get_path = "/usr/lib/x86_64-linux-gnu/guestfs"
guestfs_get_path: /usr/lib/x86_64-linux-gnu/guestfs
libguestfs: trace: get_pgroup
libguestfs: trace: get_pgroup = 0
guestfs_get_pgroup: 0
libguestfs: trace: get_program
libguestfs: trace: get_program = "libguestfs-test-tool"
guestfs_get_program: libguestfs-test-tool
libguestfs: trace: get_recovery_proc
libguestfs: trace: get_recovery_proc = 1
guestfs_get_recovery_proc: 1
libguestfs: trace: get_smp
libguestfs: trace: get_smp = 1
guestfs_get_smp: 1
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/run/user/1000"
guestfs_get_sockdir: /run/user/1000
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
guestfs_get_tmpdir: /tmp
libguestfs: trace: get_trace
libguestfs: trace: get_trace = 1
guestfs_get_trace: 1
libguestfs: trace: get_verbose
libguestfs: trace: get_verbose = 1
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 46, release: 2, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.46.2
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsqkr6xa
libguestfs: launch: umask=0022
libguestfs: launch: euid=1000
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.2.1
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: build: /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-brickstrap type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-hfsplus type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-reiserfs type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-xfs type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 218 packages, including dependencies
supermin: build: 8444 files
supermin: build: 4972 files, after matching excludefiles
supermin: build: 4975 files, after adding hostfiles
supermin: build: 4972 files, after removing unreadable files
supermin: build: 4978 files, after munging
supermin: kernel: looking for kernel using environment variables ...
supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
supermin: kernel: looking for kernels in /boot ...
supermin: kernel: kernel version of /boot/vmlinuz-5.19.0-1022-oracle = 5.19.0-1022-oracle (from content)
supermin: kernel: picked modules path /lib/modules/5.19.0-1022-oracle
supermin: failed to find a suitable kernel (host_cpu=x86_64).
I looked for kernels in /boot and modules in /lib/modules.
If this is a Xen guest, and you only have Xen domU kernels
installed, try installing a fullvirt kernel (only for
supermin use, you shouldn't boot the Xen guest with it).
libguestfs: error: /usr/bin/supermin exited with error status 1, see debug messages above
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x556dfc15c650 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsqkr6xa
growflavor@AloEnergia:~$ Ubuntu 22.04 WSL2 installed package versionsgrowflavor@AloEnergia:~$ apt-cache policy qemu-user-static
qemu-user-static:
Installed: 1:6.2+dfsg-2ubuntu6.17
Candidate: 1:6.2+dfsg-2ubuntu6.17
Version table:
*** 1:6.2+dfsg-2ubuntu6.17 500
500 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
100 /var/lib/dpkg/status
1:6.2+dfsg-2ubuntu6.16 500
500 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
1:6.2+dfsg-2ubuntu6 500
500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
growflavor@AloEnergia:~$ apt-cache policy docker-ce
docker-ce:
Installed: 5:25.0.4-1~ubuntu.22.04~jammy
Candidate: 5:25.0.4-1~ubuntu.22.04~jammy
Version table:
*** 5:25.0.4-1~ubuntu.22.04~jammy 500
500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
100 /var/lib/dpkg/status
5:25.0.3-1~ubuntu.22.04~jammy 500
500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
5:25.0.2-1~ubuntu.22.04~jammy 500
...
growflavor@AloEnergia:~$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
growflavor@AloEnergia:~$ apt-cache policy brickstrap
brickstrap:
Installed: 0.6.8
Candidate: 0.6.8
Version table:
*** 0.6.8 500
500 https://ppa.launchpadcontent.net/ev3dev/tools/ubuntu jammy/main amd64 Packages
100 /var/lib/dpkg/status
growflavor@AloEnergia:~$ Thanks for your further insights! |
The kernel comes from a debian package just like everything else. So for any ev3dev-specific packages like that one, we need to update the package for the newer versions of debian. I also recall that on Ubuntu, the permissions of the host kernel in |
sudo apt-get install -y linux-image-kvm Only set /boot/vmlinu* as readable: sudo chmod +r /boot/vmlinu* "As this kernel would be only used for virtualization, we can use the kernel package specialized for that. On Ubuntu systems kernel images are not readable by non-root users, so explicitly add read permissions with chmod as well." Brickstrap successfully builds an Etcher flash-able .img from .tar with access to this kernel in /boot/: -rw-r--r-- 1 root root 6960424 Feb 8 15:04 vmlinuz-5.15.0-1051-kvm
sudo LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 brickstrap create-image ev3dev11.tar ev3dev11test1.img
|
verified as well on Windows 11 WSL2 Ubuntu 22.04... sudo apt-get install -y linux-image-kvm |
I have been regularly loosing Brickstrap functionality with the LIBGUESTFS error...apparently Ubuntu has an unattended periodic automated apt security update feature. So for my 'dedicated working' Brickstrap WSL2 Ubuntu image I've decided to disable that feature by setting both the following values to 0: sudo nano /etc/apt/apt.conf.d/20auto-upgrades |
Back on Dec 8 2023 I followed the clear & simple brickstrap instructions & quickly built myself bootable .img of the provided Buster beta & Bullseye beta.
I flashed these to 32GB SDcards with Balena Etcher & have been updating them 'onboard' (= the slow way ;-) with several of our EV3.
Click the black arrow to show the key output details of the successful work on Dec 8 2023:
Key Outputs from the successful Dec 8 2023 run -- Built using the apt installed Brickstrap inside a Docker/DockerDesktop integrated Windows 10 WSL2 Ubuntu 22.04:
Dec 8 2023 building of the default repository "Bullseye" beta .img :
Dec 8 2023 building of the default repository "Buster" beta .img :
PuTTY Session output for the first login for the Buster image:
PuTTY Session output for a recent login for the Dec 8 2023 Bullseye image:
However, now in 2024 March, when I run brickstrap in the same setup, libguestfs fails with an error & Etcher reports that the .img has 'no filesystem'...it seems that now for some reason libguestfs can not find a "suitable kernal"
growflavor@AloE6700:~$ sudo brickstrap create-image ./Downloads/ev3dev11march2024Test.tar ./Downloads/ev3dev11march2024Test.img Creating ./Downloads/ev3dev11march2024Test.img from ./Downloads/ev3dev11march2024Test.tar... libguestfs: error: /usr/bin/supermin exited with error status 1. To see full error messages you may need to enable debugging. Do: export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 and run the command again. For further information, read: http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs You can also run 'libguestfs-test-tool' and post the *complete* output into a bug report or message to the libguestfs mailing list. growflavor@AloE6700:~$
@dlech
I would very much greatly appreciate your insights on what to try next or if there is some simple change I need to add to brickstrap.sh, etc...
I provided the above data using 'default' images for troubleshooting since that is what I did back in December. But my current objective is to use brickstrap to turn my own docker container into bootable .img. When I ran brickstrap on my docker image, at first I had thought that my containers had broken something, but found that I get the same libguestfs failure even with the process that was successful back on Dec 8 2023.
Thank you!
The text was updated successfully, but these errors were encountered: