-   Linux - Software (
-   -   grub-probe: error: cannot find a device for /. (in chroot) (

luxianos 11-22-2009 06:25 PM

grub-probe: error: cannot find a device for /. (in chroot)
When I am in a chroot and try to install desktop-base appears the message "grub-probe: error: cannot find a device for /." ┐how can i solve it?

exvor 12-16-2009 08:40 PM

This is because you do not have any device nodes in your chroot environment. You need to fake mount the host system device nodes to the chroot environment. You can do this by using the bind mount option. Lets assume you have your chroot environment mounted at /mnt/new

user@tacos# mount --bind /dev /mnt/new/dev

It is also possible that you may need to mount more then just the /dev to get it to work, but I don't believe so. I am however very surprised to see this in the zero replies since its a simple question.

milad621 04-15-2010 06:38 PM

It was great.thanks.

Blender3D 06-11-2010 11:26 AM

I wish they included that in the Linux From Scratch Book. I was ripping my hair out with this one for days.

exvor 06-13-2010 06:18 PM

Actually they do tell you, just not in the same place as the chrooting. This is actually where I got this information when I posted it.

leader1201 02-21-2013 03:46 AM

i am not able to execute chroot command after mounting
hi all,

i was trying to execute the chroot command on my ubuntu virtual machine commands as follows.

chroot /mnt/ubuntu dpkg -i some_pakcges.deb

It is showing that "dpkg" no such file or directory .

before this command i have to mount the /dev on the /mnt direcotory.

mount -o bind /dev /mnt/ubuntu/dev

It is telling /mnt/ubuntu/dev does not exists.

so i have created /dev directory in the /mnt/ubuntu directory and i have executed above command . now i got succeed in mounting. Is it right way to do that ?

may be because of this only i am not able to perform chroot command.

please help me.

thanks in advance.

All times are GMT -5. The time now is 01:00 PM.