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

From my Ubuntu, I want to create a bootable Debian USB. I tried to install Debian with debootstrap. A brief list of commands is

mount /dev/sdb1 /mnt
debootstrap sid /mnt http://ftp.debian.org/debian
chroot /mnt
apt-get install linux-headers-3.2.0-4-686-pae linux-image-3.2.0-4-686-pae
apt-get install grub2
grub-install --recheck /dev/sdb

I have edited the /mnt/etc/fstab to include the USB drive with its UUID. But my problem is installing grub from within chroot, I get the following error

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

I do not want to touch the grub of my ubuntu machine, I want to install the grub on my USB to be bootable on other machines.

What step/command I have missed?

share|improve this question
up vote 2 down vote accepted

You can bind mount pseudo filesystems such as /dev/ inside the chroot:

mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc /proc /mnt/proc

Another option is to run grub-install from outside of the chroot, using --root-directory:

grub-install --root-directory=/mnt /dev/sdb
share|improve this answer
concise, informative, and complete! – All Jan 16 '13 at 18:09

Your Answer


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

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