boot to an installed GNU/Linux distro on your machine
set root=(hd0,PartionNumberWhere/BootIs) linux /boot/vmlinuz-linux-libre root=/dev/sdaPartionNumberWhereRootIs initrd /boot/initramfs-linux-libre.img boot
For me this looks like:
set root=(hd0,1) linux /boot/vmlinuz-linux-libre root=/dev/sda1 initrd /boot/initramfs-linux-libre.img boot
As soon as you see the grub command line press the “c” key. You’ll be dropped into a grub shell. You’ll know you’re there, because you’ll see
grub >
Now, this is what you type
set root=(
Now press TAB and grub will give you some options. Grub will expand what you wrote into
set root=(hd
Grub will then tell you to either press 1 or 0. hd0 is your hard drive. You don’t want that. So type
set root=(hd1)
Now type
chainloader +1
That will essentially tell the grub that is on your harddisk, to chainload to the usb. This means that the usb stick has grub (or some other similiar software on it). So grub won’t try to find a bootable kernel on the usb stick. Instead, your harddrive’s grub will hand over controll to the usb stick’s grub.
boot
First, check that you’re using GRUB v2 or above.
grub-install –version
Generate a GRUB keyboard layout file. Below is the command for a french keyboard. For other languages, check usr/share/X11/xkb/symbols. Filename choice is not important (you can change bepo).
sudo grub-kbdcomp -o /boot/grub/bepo.gkb fr
Edit /etc/default/grub with root rights to have:
#GRUB_HIDDEN_TIMEOUT=0 GRUB_TERMINAL_INPUT=”at_keyboard”
Edit /etc/grub.d/40_custom with root rights to have:
#!/bin/sh exec tail -n +3 $0
insmod keylayouts keymap /boot/grub/bepo.gkb
Finally:
sudo update-grub
Note: Forget immediately about using the Shift key to display GRUB menu! It may be normal that terminal_input at_keyboard make this key not work anymore. So make sure #GRUB_HIDDEN_TIMEOUT=0 is properly commented.
http://askubuntu.com/questions/751259/how-to-change-grub-command-line-grub-shell-keyboard-layout