0

I compiled GRUB from source, using pretty much default settings in a chroot debian sid environment using default --prefix so it installed in /usr/local.

When I copied the files over to a system with busybox as main core (Not even bash is installed), ash can't detect many grub binaries.

Due to that, I can't use grub-install or others (although I can run grub-mkconfig, but it says that it doesn't find grub-probe)

  • What is the output of `ldd /path/to/grub-install’ on the busybox system? Could be a different libc than on Debian. – Mark Plotnick Feb 12 at 19:21
  • @MarkPlotnick It says 'not a dynamic executable'. I checked the others and the same thing happens. – Juan Ramirez Feb 12 at 19:41
  • Ok, then there could be an architecture mismatch. On the busybox system, what is the output of uname -a and file /path/to/grub-install ? – Mark Plotnick Feb 12 at 19:45
  • On the busybox system, it shows the host information: 'Linux knotbuk 4.20.7-arch1-1-ARCH #1 SMP PREEMPT Wed Feb 6 18:42:40 UTC 2019 x86_64 GNU/Linux'. And the file command says: 'grub-install: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=f1431424ec013366afa3113cabdf9324a982bf39, not stripped' – Juan Ramirez Feb 12 at 19:50
  • Do you have a /lib/ld-linux.so.2 on the busybox system? If not, it may be possible to copy it over from the Debian system. But there may be other missing 80386 libraries. Try ldd again after the ld-linux.so.2 file is in place. – Mark Plotnick Feb 12 at 19:56
0

Ok, the answer was that I forgot to install glibc to the busybox system.

I copied /lib/ld-linux.so.2 from a working system into the busybox environment. But it's preferable to install the whole set of glibc so all programs can run correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.