FlorentRevest / linux-kernel-vscode

Reference setup for Linux kernel development in VSCode
GNU General Public License v2.0
185 stars 15 forks source link

mmdebstrap failed to run #4

Open zouyonghao opened 6 months ago

zouyonghao commented 6 months ago

Hi Florent,

I got an error when run .vscode/task.sh start:

Formatting '/tmp/tmp.zE3LVndNiI.img', fmt=raw size=21474836480
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done
Creating filesystem with 5242880 4k blocks and 1310720 inodes
Filesystem UUID: c216edd3-ccb5-4263-9a81-f2043e345c3b
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

password required to mount the rootfs:
I: automatically chosen mode: root
I: chroot architecture amd64 is equal to the host's architecture
I: automatically chosen format: directory
I: running apt-get update...
done
Get:1 http://deb.debian.org/debian unstable InRelease [198 kB]
Err:1 http://deb.debian.org/debian unstable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
Reading package lists...
W: GPG error: http://deb.debian.org/debian unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
E: The repository 'http://deb.debian.org/debian unstable InRelease' is not signed.
E: apt-get update --error-on=any -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false failed
W: listening on child socket failed:
E: mmdebstrap failed to run

It will work if I change the mmdebstrap command to

sudo mmdebstrap \
          --aptopt='Acquire::AllowInsecureRepositories "true"' --aptopt='APT::Get::AllowUnauthenticated "true"' \
          --include ssh,acpid,acpi-support-base,gdb,systemtap,file,psmisc,strace,vim,bpftool,bpftrace,trace-cmd,linux-perf \
          --arch ${DEBIAN_TARGET_ARCH} unstable ${img_mnt}

But I guess it's not a perfect solution. Any ideas?