TheSin- / rpi-img-builder

Scripts to create custom images for RaspberryPi
MIT License
107 stars 30 forks source link

Error in GnuTLS initialization: Failed to acquire random data. #21

Open naveen230 opened 6 years ago

naveen230 commented 6 years ago

Hello,

Got this error while cloning the repository

Error in GnuTLS initialization: Failed to acquire random data. fatal: curl_global_init failed

Is it because of the new update?

Naveen

TheSin- commented 6 years ago

if it's during cloning it would be a GitHub error nothing I control.

naveen230 commented 6 years ago

I also tried downloading using zip and run the make command and I get the following error,

image

TheSin- commented 6 years ago

please either paste the entire build log here with the error, or use pastebin.com

Also if this is the same as the other ticket, ubuntu isn't in a good state for RPI currently.

naveen230 commented 6 years ago

Here is the complete error log,

Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. W: Download is performed unsandboxed as root as file '/root/rpi-img-builder/rootfs.base.tmp/var/lib/apt/lists/partial/http.debian.net_debian_dists_testing_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) W: GPG error: http://cdn-fastly.deb.debian.org/debian testing InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010 W: The repository 'http://http.debian.net/debian testing InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. W: Download is performed unsandboxed as root as file '/root/rpi-img-builder/rootfs.base.tmp/var/cache/apt/archives/partial/gcc-7-base_7.2.0-18_armhf.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) Warning: unrecognised value 'no' for Multi-Arch field in apt_1.6~alpha5_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in dash_0.5.8-2.5_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in debconf-i18n_1.5.65_all.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in diffutils_1%3a3.6-1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in gzip_1.6-5+b1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in hostname_3.18+b1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in insserv_1.14.0-5.4+b1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in liblocale-gettext-perl_1.07-3+b3_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in libtext-charwidth-perl_0.04-7.1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in libtext-iconv-perl_1.7-5+b6_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in libtext-wrapi18n-perl_0.06-7.1_all.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in locales_2.25-5_all.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in login_1%3a4.5-1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in perl-base_5.26.1-3_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.)

Will Debian/Raspbian distribution work for Rpi3?

Thanks,

TheSin- commented 6 years ago

yes for Raspbian, I haven't tested Debian recently, at one point rpi3 was unstable only, maybe testing now?

These errors looks like multistrap is too old? Maybe newer and that field is more strict, I'll look into this, thanks.

naveen230 commented 6 years ago

Thanks! Is it possible to build a raspbian image with uboot, like from the other 2 examples(Ubuntu and debian)?

naveen230 commented 6 years ago

And,this is the error log from using sudo make for raspbian,

Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. W: Download is performed unsandboxed as root as file '/root/rpi-img-builder/rootfs.base.tmp/var/lib/apt/lists/partial/archive.raspberrypi.org_debian_dists_stretch_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) W: GPG error: http://mirrordirector.raspbian.org/raspbian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E W: The repository 'http://mirrordirector.raspbian.org/raspbian stretch InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://archive.raspberrypi.org/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E W: The repository 'http://archive.raspberrypi.org/debian stretch InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. Error in GnuTLS initialization: Failed to acquire random data. W: Download is performed unsandboxed as root as file '/root/rpi-img-builder/rootfs.base.tmp/var/cache/apt/archives/partial/gcc-6-base_6.3.0-18+rpi1_armhf.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) Warning: unrecognised value 'no' for Multi-Arch field in apt_1.4.8_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in dash_0.5.8-2.4_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in debconf-i18n_1.5.61_all.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in diffutils_1%3a3.5-3_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in gzip_1.6-5_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in hostname_3.18_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in insserv_1.14.0-5.4_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in liblocale-gettext-perl_1.07-3+b1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in libtext-charwidth-perl_0.04-7+b7_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in libtext-iconv-perl_1.7-5+b8_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in libtext-wrapi18n-perl_0.06-7.1_all.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in locales_2.24-11+deb9u1_all.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in login_1%3a4.4-4.1_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in perl-base_5.24.1-3+deb9u2_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in pinentry-curses_1.0.0-2_armhf.deb. (Expecting 'same', 'foreign' or 'allowed'.) Warning: unrecognised value 'no' for Multi-Arch field in raspbian-archive-keyring_20120528.2_all.deb. (Expecting 'same', 'foreign' or 'allowed'.)

TheSin- commented 6 years ago

what is the base system you are building on, and what is the version of multistrap on it?

Also I don't think you can do boot with raspbian, only ubuntu and Debian.

naveen230 commented 6 years ago

multistrap version 2.2.9

base system - Linux NAVEEN-SOC 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux

TheSin- commented 6 years ago

3.16, oh that like jessie I think or older, I believe multistrap is too old I'm double check it in a bit and add that to the notes.

naveen230 commented 6 years ago

You are right I tested with Debian stretch and its working.I tested Debian image on rpi3 it stops after bootloader loads.Have you tried on rpi3?

TheSin- commented 6 years ago

what was your build line for rpi3?

naveen230 commented 6 years ago

I used the debian image to flash the sd card.It was empty before.

TheSin- commented 6 years ago

sorry you miss understand me, how to you make the image?

make REPO=Debian ARCH=arm64

?

naveen230 commented 6 years ago

sudo make DIST=testing REPO=Debian RPI=3

TheSin- commented 6 years ago

that will build with 32bit arm, I haven't tested it, that being said it could easily be an issue in config.txt.

try adding ARCH=arm64 instead of RPI=3 see if it boots. I haven't tested it in some time, looking at the Debian repo, you could use stretch instead of buster, when I did my testing stretch was testing, but it's now stable.

naveen230 commented 6 years ago

Thanks for your suggestion and using ARCH=arch64 gives following error,

Get:6 http://cdn-fastly.deb.debian.org/debian testing/non-free armhf Packages [59.6 kB] Get:7 http://cdn-fastly.deb.debian.org/debian testing/non-free Translation-en [79.7 kB] Fetched 13.1 MB in 13s (1006 kB/s) Reading package lists... Done W: http: Running in qemu-user, not using seccomp W: http: Running in qemu-user, not using seccomp W: store: Running in qemu-user, not using seccomp Reading package lists... Done Building dependency tree... Done W: --force-yes is deprecated, use one of the options starting with --allow instead. E: Unable to locate package linux-image-arm64 rootfs.mak:112: recipe for target '/root/rpi-img-builder/rootfs' failed make[1]: [/root/rpi-img-builder/rootfs] Error 100 Makefile:21: recipe for target 'build-rootfs' failed make: [build-rootfs] Error 2

I think you are right about the config.txt ,uboot is unable to read the .dtb file and vmlinuz.Is it possible to include device tree of rpi3 (bcm2710-rpi-3-b.dtb)? Will it be a solution?

TheSin- commented 6 years ago

Oops my mistake should have be DIST_ARCH=arm64 not ARCH

naveen230 commented 6 years ago

I changed to DARCH and getting following error, Processing plugins/tmpfs...

Is that DIST_ARCH? And, I changed SUITE=stretch in repos/Debian/multistrap.list.in to download stretch instead of buster .

TheSin- commented 6 years ago

oh I corrected the post, the email doesn't get corrected, it should have been DIST_ARCH not DARCH

naveen230 commented 6 years ago

Thanks, I tried that too and getting the same error!

And, I changed SUITE=stretch in repos/Debian/multistrap.list.in to allow script to download stretch instead of buster.Is that a problem?

TheSin- commented 6 years ago

you could just to DIST=stretch

naveen230 commented 6 years ago

Tried that,got same error.problem is on rootfs.mak file in root directory(line 142).

mkdir -p /bin/bash will work?

TheSin- commented 6 years ago

I think you need to redownload your copy form git, that isn't line 142 at all. line 142 is a chroot command and it's important.

naveen230 commented 6 years ago

I downloaded recently just before 2 days.Were you able to use this command and build image because I can't sudo make DIST=stretch REPO=Debian DIST_ARCH=arm64