Skip to content
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

No DNS lookup in built image #80

Closed
goranche opened this issue Aug 10, 2014 · 115 comments
Closed

No DNS lookup in built image #80

goranche opened this issue Aug 10, 2014 · 115 comments

Comments

@goranche
Copy link
Contributor

Note: this issue has been "resolved" by a workaround, which will stay in place until a permanent solution is ready and tested. busybox-static (the cause of these problems) will be replaced with busybox, and all our troubles will seem so far away 👍
😉

first off, thanks for this project, love it...
so much so, that I started coding some additional features (starting with locale and timezone from #35), but I'm experiencing some really strange issues when building the install image myself...

first, when running ./build.sh, I'm getting depmod warnings:
depmod: WARNING: could not open /home/goranb/raspbian-ua-netinst/rootfs/lib/modules/3.10-3-rpi/modules.order: No such file or directory
depmod: WARNING: could not open /home/goranb/raspbian-ua-netinst/rootfs/lib/modules/3.10-3-rpi/modules.builtin: No such file or directory

second, when booting from the resulting image, the system doesn't seem to be able to do DNS lookupups.
it get's an IP address, ping works fine, there is a nameserver entry in /etc/resolv.conf (the right one for my network), so ping 74.125.232.16 works, but ping www.google.com doesn't

this doesn't happen when booting the release image, but when I replace installer.cpio (to test my code), the problem starts...

to rule out any problem with my code, I've tried generating an image from the code in the repository (so without my changes), same thing...

any ideas?

the system I'm building on is a 64 bit ubuntu, but I've tried it on raspbian (default from raspberrypi.org) as well...

@goranche
Copy link
Contributor Author

well, that was an interesting afternoon :D
turns out that if I replace the busybox-static debian file in packages, before doing a build.sh, with an older one (busybox-static_1.20.0-7_armhf.deb) all seems to work...

the busybox-static_1.22.0-8_armhf.deb (at http://archive.raspbian.org/raspbian/pool/main/b/busybox/) file has yesterdays timestamp on it, so I'm guessing that's why my image didn't work and the "official" build did...

not sure how to fix this other than by hand (replace .deb file after update.sh)... will try later this week

@diederikdehaas
Copy link
Member

first off, thanks for this project, love it...

Thanks! Much appreciated 👍

first, when running ./build.sh, I'm getting depmod warnings

I get those too, but since I haven't experienced any consequences to that, I thought it was rather harmless. But given the issue I have wrt the new kernel version (which I will report shortly in #79), it may not be so harmless after all.

Thanks for narrowing down the issue to the busybox version 👍
I haven't encountered it yet, but that's because I haven't build a new installer yet. It might happen tonight, but tomorrow is more likely, so I will get back on this.
And this also means that I think it's very likely that the issue is caused by the new busybox version.
I/we need to figure out whether this is an upstream bug (Debian or 'real' upstream) or a Raspbian issue. If it is a Debian issue, it should be reported in the Debian BTS. When there is a fixed version in Debian, it should land in Raspbian as well (with a delay).

I very much doubt that using Ubuntu to build the images has any (negative) effect, since I am building all the images on my Debian Sid (64-bit) host system.
I haven't actually tried building it on the RPi myself.

The proper solution would be to build the installer with suite wheezy instead of jessie, but the absence of f2fs-tools on wheezy prevents that (at least for now).
Another solution could be to use specific versions of the various packages, but that has it's (negative) consequences as well. And would probably take a while to implement.

@goranche
Copy link
Contributor Author

yeah, I tried to come up with a way to use specific versions, but that seems like a pain, if at all possible to do cleanly (given that older versions don't seem to be listed in the Packages file)...
I've already filed a bug report (although reading it again, I see I could have done a better job describing it 😊 )

@diederikdehaas
Copy link
Member

does route give a proper/expected result?
Reading through the Debian changelog there seem to be some changes on that part

@goranche
Copy link
Contributor Author

I didn't notice anything that seemed off, so I'd say yes...
also, pinging hosts both on the internet worked just fine, so at least the default route to my router had to be ok
also, I've tried explicitly setting the network parameters, but it was the same

@diederikdehaas
Copy link
Member

I guess I'm doing too many different things at the same time LOL
The route changes are indeed irrelevant.

@goranche
Copy link
Contributor Author

don't worry about it, I know the feeling... ;)

@diederikdehaas
Copy link
Member

I just noticed that I am now testing with busybox version 1.22.0-6 ... and that one seems to work fine.

@goranche
Copy link
Contributor Author

huh?!? interesting

wait... -6? are you sure?

@diederikdehaas
Copy link
Member

I build the image I'm using atm on 2014-08-07 and then it had (apparently) that version.
Jessie is a moving target, thus getting new versions of packages on a regular basis is natural.
But it's not ideal for a project like this.

@goranche
Copy link
Contributor Author

oh, ok...
that version doesn't exist in the archive anymore... the current one is 1.22.0-8
whew I was just about to build a new image and try over 😀

@diederikdehaas
Copy link
Member

Updated the raspbian bug with my findings.
It does happen with 1.22.0-8, but not with 1.22.0-6

@goranche
Copy link
Contributor Author

great, thanks...
hope someone knows what happened :)

I've already tried to find instructions on how to build raspbian packages, but no luck so far

@diederikdehaas
Copy link
Member

how to build raspbian packages

There is no difference between building a raspbian package and a debian package, other then the hardware it is build on.
There should be plenty of info to find on creating a debian package and when you compile/build it on your RPi you should be good to go.
I'm pretty sure one or more ppl on the #raspbian irc channel (freenode) could help you further if you get stuck. Another option is the raspberrypi forums.

@goranche
Copy link
Contributor Author

yeah, I know that it's just normal debian packages... I meant if there are build scripts and/or configurations for the individual packages...
I'm planning to hit IRC (having problems with my IRC client on the Mac) and the forums in the evening

thanks ;)

@diederikdehaas
Copy link
Member

Debian provides various tools to build packages, but I haven't actually tried/used them.
If you go to the busybox package page for jessie you will find on the right side of that page various links to a .dsc, .orig.tar.bz2 and a .debian.tar.xz file, which may be what you're after.
I'm pretty sure those are the things used to build the raspbian packages.

HTH

@goranche
Copy link
Contributor Author

just done a quick test comparing the two busybox-static packages... not needed, true, but ... so what? 👼
screen shot 2014-08-12 at 10 33 39

@diederikdehaas
Copy link
Member

I filed a Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757941
(and also updated the raspbian bug)

@goranche
Copy link
Contributor Author

saw that, yes... thanks ;)

@ghost
Copy link

ghost commented Sep 5, 2014

Hi Guys, I think the issue goes beyond just DNS lookups; I couldn't get NTP syncing working by IP either - to my own NTP server or one on the web, nor would package installation work from a local Raspbian mirror by IP.

Looking at the bug report, it might be down to the compiler in jessie. For now, I've just taken the busybox package from wheezy, which works fine.

Great project, by-the-way :)

@felixrabe
Copy link
Contributor

Just for the record (does not solve the issue though): I've built on the Raspberry Pi (based on the working 1.0.5 netinst image) with the same result (reboots, #110) except you cannot compress with xz, it runs out of memory (needs more than 1 GB).

@felixrabe
Copy link
Contributor

@goranche
Copy link
Contributor Author

the rebooting happens because of an issue with the buxybox package, which causes networking to fail...

after doing update.sh, replace the busybox-static package file (in the packages directory) with an older one from here, and afterwards, run the build.sh script. this should fix the networking issue and allow the installation to continue

regarding the xz issue, it's a separate one from the issue discussed here, and IMHO not an important one, as I personally don't see the installer as something that one would build on the raspberry itself, but rather use a "full blown" (probably Debian based) machine... once for each version 😉

@goranche
Copy link
Contributor Author

so, to recap... do the following (adjust to your needs accordingly):

git clone https://github.com/debian-pi/raspbian-ua-netinst.git
cd raspbian-ua-netinst
./update.sh
cd packages
rm busybox-static*
wget http://archive.raspbian.org/raspbian/pool/main/b/busybox/busybox-static_1.20.0-7_armhf.deb
cd ..
./build.sh
sudo ./buildroot.sh

hope this makes it a bit clearer 😉

@felixrabe
Copy link
Contributor

Thank you. I was just looking for a way to get the right busybox-static package when I saw the little (1) show up in the tab of this issue :)

@goranche
Copy link
Contributor Author

no problem... I read my comment again and found it ... a bit confusing myself 😊

hope that works for you (I think it will, had the same problem myself, that's why this issue exists)... please "report" 👍

@ghost
Copy link

ghost commented Sep 23, 2014

Quoting Goran Blažič [email protected]

the rebooting happens because of an issue with the buxybox package,
which causes networking to fail...

after doing update.sh, replace the busybox-static package file (in
the packages directory) with an older one from
here,
and afterwards, run the build.sh script. this should fix the
networking issue and allow the installation to continue

regarding the xz issue, it's a separate one from the issue discussed
here, and IMHO not an important one, as I personally don't see the
installer as something that one would build on the raspberry itself,
but rather use a "full blown" (probably Debian based) machine...
once for each version 😉


Reply to this email directly or view it on GitHub:
#80 (comment)
Yeah, the build process probably needs to run on a desktop with adequate
resources.

FYI, I built on Ubuntu and Mint with no issues. Due to the cdebootstrap
package being used, you probably need to use a distro of Debian heritage if
you want it to be easy.

Any busybox package from squeeze will work. The jessie ones were broken
last time I checked.


From: Goran Blažič[1]
Sent: ‎23/‎09/‎2014 09:29
To: [email protected]
Cc: themisanthrope[2]
Subject: Re: [raspbian-ua-netinst] No DNS lookup in built image (#80)

Links:

[1] mailto:[email protected]
[2] mailto:[email protected]

@diederikdehaas
Copy link
Member

Here's another workaround that I'm currently using:

if [ -f ../../busybox-static_1.20.0-7_armhf.deb ] ; then
    echo -n "Copying older, but working, version of busybox as a workaround... "
    cp ../../busybox-static_1.20.0-7_armhf.deb busybox-static_1.22.0-8_armhf.deb
    echo "OK"
fi

This code block should be place right before the last cd .. in build.sh.
For this to work, download the wheezy version of busybox-static and place that in the directory above raspbian-ua-netinst

@diederikdehaas
Copy link
Member

From IRC:
[16:12] A wheezy version of busybox-static will remain in the archive for as long as wheezy does
[16:15] diederik_, that may or may not be 1.20.0-7 specifically depending on if Debian see a reason to update busybox in wheezy

@goranche
Copy link
Contributor Author

sure, and if they build a new version and that one has the same issue?

maybe mirroring the 1.20.0-7 package on github? (not sure who suggested mirroring a few comments ago)

@goranche
Copy link
Contributor Author

not sure who suggested

oh, it was @themisanthrope , sorry about that 😊

@ghost
Copy link

ghost commented Dec 14, 2014

@goranche Heh, no worries ;)

I know it's not ideal, but hopefully the requirement will only be short-term.

@diederikdehaas
Copy link
Member

I think that putting it on github would be the safest solution.

I just found out that the safety net I implemented in my workaround isn't as safe as I thought since the usual change in the package name would be to add ~deb7u1 (or u2/u3/etc), but there are also sometimes other (little) changes. IOW there's no sure way to predict the new name.

@diederikdehaas
Copy link
Member

Implementation: diederikdehaas@e5b4126

@ghost
Copy link

ghost commented Dec 14, 2014

\o/

@goranche
Copy link
Contributor Author

😄 👍

@diederikdehaas
Copy link
Member

Now against the proper branch (v1.0.x)

@Mausy5043
Copy link
Contributor

Hmmm... When running build.sh:

$ ./build.sh
ar: ../packages/busybox-static_1.20.0-7_armhf.deb: File format not recognized
rm: cannot remove ‘data.tar.*’: No such file or directory

No problem when I do:
curl -# -O http://archive.raspbian.org/raspbian/pool/main/b/busybox/busybox-static_1.20.0-7_armhf.deb

@diederikdehaas
Copy link
Member

Do a git pull and try again, it should now work properly.
I've just merged #169 which contains the fix for that and also merged v1.0.x into master.

@Mausy5043
Copy link
Contributor

Yep. Fixed it. 👍
:goed bezig:

@diederikdehaas
Copy link
Member

LOL
Veel plezier ermee 👍

@diederikdehaas
Copy link
Member

@goranche With the workaround in place, do you think this issue has been dealt with?

@goranche
Copy link
Contributor Author

I'm reluctant to say "yes", because it's "just" a workaround...
but still, it works, I guess 😄

@diederikdehaas
Copy link
Member

Haha, I had the same thought 😄

OTOH leaving this issue open may give the impression that it's still not working at all (and this issue is the 10th most popular content on this project). And also the 'real' underlaying problem of libc6 being broken is indeed fixed.
So IMO we can deal with this in 2 ways:

  • Close this issue and create a new one about the broken busybox problem (which should be fixed by replacing busybox-static with busybox)
  • Add a note to the first post that it is currently working, but with a workaround. Given the length of this issue, I doubt many ppl will read the whole thing, but they will read the first post.

I'll leave it up to you what to do :-)

@goranche
Copy link
Contributor Author

yeah, sounds ok... I'll edit the first post and close the issue... 😉

@diederikdehaas
Copy link
Member

I actually meant editing the first post and leave it open LOL

@goranche
Copy link
Contributor Author

or that 👼 (it's been a rough night)

@diederikdehaas diederikdehaas removed this from the v1.0.6 milestone Mar 4, 2015
bbinet added a commit to bbinet/raspbian-ua-netinst that referenced this issue May 20, 2015
bbinet added a commit to bbinet/raspbian-ua-netinst that referenced this issue May 20, 2015
This reverts commit 8aea16fb3437ce48206b370857d798032c8bc3c2.
@diederikdehaas
Copy link
Member

The current version of raspbian jessie busybox-static does not have this problem, thus closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants