Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

make
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.

2 Answers 2

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

 
discard

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