I am using the same build script to create a Debian Bookworm jail compatibility layer. Everything works fine in 13.2, but in 14.0, I repeatedly encounter the error 'The repository InRelease' is not signed,' even when switching to official sources. I attempted to manually run 'apt --fix-broken install' and installed the GPG signature tool. However, these efforts were ineffective, and I now believe that the issue is being caused by FreeBSD. I found that this is likely a false error, and the actual issue might be caused by the filesystem of FreeBSD 14.0. The content of the script I am using is as follows:
Since many individuals have encountered similar issues in WSL and Docker, I have also checked the system's time, which is accurate.
Does anyone have any solutions?
Since many individuals have encountered similar issues in WSL and Docker, I have also checked the system's time, which is accurate.
Does anyone have any solutions?
Code:
#/bin/sh
rootdir=/compat/debian
baseurl="https://mirrors.ustc.edu.cn/debian/"
codename=bookworm
echo "begin to install Debian 12 AKA bookworm ..."
echo "check modules ..."
# check linux module
if [ "$(sysrc -n linux_enable)" = "NO" ]; then
echo "linux module should be loaded. Continue?(N|y)"
read answer
case $answer in
[Nn][Oo]|[Nn])
echo "linux module not loaded"
exit 1
;;
*)
sysrc linux_enable=YES
;;
esac
fi
echo "start linux"
service linux start
# check dbus
if ! /usr/bin/which -s dbus-daemon;then
echo "dbus-daemon not found. install it [N|y]"
read answer
case $answer in
[Nn][Oo]|[Nn])
echo "dbus not installed"
exit 2
;;
*)
pkg install -y dbus
;;
esac
fi
if [ "$(sysrc -n dbus_enable)" = "NO" ]; then
echo "dbus should be enable. Continue?(N|y)"
read answer
case $answer in
[Nn][Oo]|[Nn])
echo "dbus not running"
exit 2
;;
*)
sysrc dbus_enable=YES
;;
esac
fi
echo "start dbus"
service dbus start
if ! /usr/bin/which -s debootstrap; then
echo "debootstrap not found. install it? (N|y)"
read answer
case $answer in
[Nn][Oo]|[Nn])
echo "debootstap not installed"
exit 3
;;
*)
pkg install -y debootstrap
;;
esac
fi
echo "now we will bootstrap ${codename}.press any key."
read answer
debootstrap ${codename} ${rootdir} ${baseurl}
if [ ! "$(sysrc -f /boot/loader.conf -qn nullfs_load)" = "YES" ]; then
echo "nullfs_load should load. continue? (N|y)"
read answer
case $answer in
[Nn][Oo]|[Nn])
echo "nullfs not load"
exit 4
;;
*)
sysrc -f /boot/loader.conf nullfs_load=yes
;;
esac
fi
if ! kldstat -n nullfs >/dev/null 2>&1;then
echo "load nullfs module"
kldload -v nullfs
fi
echo "mount some fs for linux"
echo "devfs ${rootdir}/dev devfs rw,late 0 0" >> /etc/fstab
echo "tmpfs ${rootdir}/dev/shm tmpfs rw,late,size=1g,mode=1777 0 0" >> /etc/fstab
echo "fdescfs ${rootdir}/dev/fd fdescfs rw,late,linrdlnk 0 0" >> /etc/fstab
echo "linprocfs ${rootdir}/proc linprocfs rw,late 0 0" >> /etc/fstab
echo "linsysfs ${rootdir}/sys linsysfs rw,late 0 0" >> /etc/fstab
echo "/tmp ${rootdir}/tmp nullfs rw,late 0 0" >> /etc/fstab
echo "/home ${rootdir}/home nullfs rw,late 0 0" >> /etc/fstab
mount -al
echo "NOW I will should change 'compat.linux.osrelease'. continue? (Y|n)"
read answer
case $answer in
[Nn][Oo]|[Nn])
echo "close to success"
exit 4
;;
[Yy][Ee][Ss]|[Yy]|"")
echo "compat.linux.osrelease=6.2.10" >> /etc/sysctl.conf
sysctl compat.linux.osrelease=6.2.10
;;
esac
echo "add ustc apt sources"
echo "deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free non-free-firmware" > /compat/debian/etc/apt/sources.list
echo "# deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free non-free-firmware" >> /compat/debian/etc/apt/sources.list
echo "deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free non-free-firmware" >> /compat/debian/etc/apt/sources.list
echo "# deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free non-free-firmware" >> /compat/debian/etc/apt/sources.list
echo "# deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free non-free-firmware" >> /compat/debian/etc/apt/sources.list
echo "# deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free non-free-firmware" >> /compat/debian/etc/apt/sources.list
echo "deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib" >> /compat/debian/etc/apt/sources.list
echo "# deb-src http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib" >> /compat/debian/etc/apt/sources.list
echo "Acquire::http::Pipeline-Depth \"0\";" > /compat/debian/etc/apt/apt.conf.d/99nopipelining
echo 'APT::Cache-Start "100000000";' | tee /compat/debian/etc/apt/apt.conf.d/70debcoebconf
echo "install nano fonts-wqy-microhei fonts-wqy-zenhei and wget"
chroot ${rootdir} /bin/bash -c " apt update && apt --fix-broken install -y && apt upgrade && apt install nano wget fonts-wqy-microhei fonts-wqy-zenhei -y"
echo "Now you can run '#chroot /compat/debian/ /bin/bash' Into debian"
Code:
root@ykla:/# apt update
Get:1 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease [151 kB]
Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease [52.1 kB]
Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease [54.7 kB]
Err:1 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease
At least one invalid signature was encountered.
Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease [48.0 kB]
Err:2 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease
At least one invalid signature was encountered.
Err:3 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease
At least one invalid signature was encountered.
Err:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease
At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease: At least one invalid signature was encountered.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease: At least one invalid signature was encountered.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease: At least one invalid signature was encountered.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease: At least one invalid signature was encountered.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.