Here's a slightly different way hitting the same goal,
/boot on an external usb flash:
(1) Prepare your usb flash boot-device under existing Debian installation using package gnome-disk-utility the following way (which is not necessarily the only way but tested and works for me).
(1.1) Format device with
(1.2) Create single
ext2 partition making it occupy all available space.
(1.3) After step 1.2 completes go to "Edit partition" and set the bootable flag.
(2) Install Debian using its standard installer.
(2.1) Boot your installation media, i.e. Debian installation cd/dvd or another usb stick with .iso image written on it.
(2.2) Choose country/language, setup users and passwords, answer all the routine questions (no interest here) till disk partition dialog.
(2.3) Select manual partitioning.
(2.4) Create your raid/lvm/encrypted volumes on your main disk drive. On top of it there will be a file system, probably ext4.
(2.5) Go to properties of this file system and select mount as
/ and "done with this partition".
(2.7) Find the usb stick in the list, it should have ext2 on it.
(2.8) Go to its properties and select mount as
/boot and optionally
noatime in additional flags. There is an option of formatting the partiton, DO NOT do it! "Keep the files".
(2.9) Select "Done with this partition".
(2.10) Select "Finish partitioning" or similar, installation process should continue with some dialogs that are straightforward.
(2.11) After a few other dialog that are straightforward and not of our interest here, there will be a dialog with a question where to install GRUB, which you should agree to install in your
X is your usb boot flash.
After installation finishes, you should be able to boot from your flash selecting appropriate option in the BIOS.
Regarding your question of issuing a
grub-install --root-directory=/mnt /dev/sdb command, prefer
chroot /mnt grub-install /dev/sdb as
--root-directory option is deprecated. Other than that, it would work provided:
(1) main file system (your encrypted HDD/SSD/etc) hierarchy is unencrypted and mounted under
/mnt of a host OS (i.e. Debian livecd), boot partition is mounted under
(2) the new system was previously installed to that partition. That is,
/mnt has something in it (
grub-install you issue
chroot /mnt update-grub;
(4) you edit
Which is much more hassle than installing everything via Debian installer.
Now, I'd like to comment on steps 1, 1.1, 1.2 and 1.3.
I'm using Debian 7.5 installer, which fails on
grub-install step if the partition is created via its own installer. It doesn't mean that there is a bug in the installer, could be me doing it wrong way. Partition created via
gnome-disk-utility works well. Right now I have a dm-crypt/luks volume on top of LVM which is on top of software RAID (an md device), which in turn is on physical drives.