Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been given a customized kernel by a customer and asked to build it using the following commands:

sudo su
make modules_install
make install

This has to be done on my host machine, because the target machine is too slow. I chroot'ed into the target's hard drive (external hdd), and the first three commands went well, but the final step "make install" cannot work. I get this message:

grub-probe: error: cannot find a device for / (is /dev mounted?)

I fixed it by going back to the target machine, and completing the last command there. But could someone kindly explain to me what the error message means, and why this can't be done on my desktop machine?

share|improve this question

migrated from stackoverflow.com Nov 1 '12 at 13:47

This question came from our site for professional and enthusiast programmers.

For make install, it tries to update the grub boot loader. For this it must find /boot and /dev. Since you did this in a chroot'ed environment, you have no /boot and /dev in this directory (in the external hdd). Hence the error message and the failed install.

share|improve this answer

Running make install on a Linux Kernel, will cause your bootloader, in this case, Grub, to be updated with the location of the latest kernel image.

Now, because you were in a chroot environment, make was unable to find the required boot files, that reside in /boot and /dev.

For safety, you should mount /dev, /boot and /proc in your chroot environment before running make install

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.