linux - Having problems with booting GRUB for EFI on USB stick
2013-10
Whatever I do, it constantly drops me into the 'bash prompt'. Never displays a menu, nothing. I'm running GRUB on a USB stick formatted as msdos (so, FAT) and when I boot into it, GRUB simply won't load its grub.cfg file, even though I'm sure the right modules are included.
This is what I did:
Compiling GRUB
./configure --with-platform=efi --enable-grub-fstest=no --enable-grub-mkfont=no --disable-nls --enable-efiemu=no
Making Image
../grub-mkimage -d . -O x86_64-efi -p . -o ~/Desktop/bootx64.efi boot linux ext2 normal configfile lspci ls reboot datetime loadenv search lvm help hfsplus hfs echo fat exfat multiboot multiboot2 terminal
And, finally, here's my grub.cfg file:
timeout=10
default=0
set color_normal=yellow/blue
set color_highlight=blue/yellow
menuentry "Fedora 12" {
root=(hd0,2)
linux /vmlinuz-2.6.32.9-70.fc12.x86_64 ro root=/dev/mapper/vg_ultra-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet nolapic
initrd /initramfs-2.6.32.9-70.fc12.x86_64.img
}
menuentry "Boot OS X" {
insmod hfsplus
set root=(hd0,X) #change X to the Mac SL partition
multiboot /boot
}
menuentry "Reboot" {
reboot
}
The grub.cfg file is located in the same folder as grub.efi. Not sure why GRUB won't read its config.
I had Ubuntu installed and I installed XP. I tried to be able to dual boot them by running an Ubuntu live cd and running
~ $ sudo grub
grub> root (hd0,0)
grub> setup (hd0)
But now when I restart I get a black screen that says
'Boot device
Selected Boot Device and press any key
No matter what key I press it shows this error
This is what my system looks like:
/dev/sda1 - Ubuntu - ext3 - 73 GiB
/dev/sda2 - Ubuntu - extended - 3.16 GiB
/dev/sda5 - Ubuntu - linux-swap - 3.16 GiB/dev/sdb1 - Windows XP - ntfs - 76 GiB
/dev/sdc1 - Stuff - ext3 - Code/Documents
/dev/sdd2 - Stuff - ext3 - Movies/Music
You could be running into a couple of issues here. Your system BIOS may be confused about which drive it's supposed to boot from. It might be easiest to disconnect all but your Ubuntu boot drive, then run through the Grub recovery again.
If you want to try again without pulling drives, make sure you're installing to the right drive by using Grub's tab-completion (type this out and press TAB
where indicated):
grub> root (hd<TAB>
Grub will spit out what drives it sees:
grub> root (hd
Possible disks are: hd0 hd1 hd2 hd3
Now we're assuming it's drive 0, so type that in, and hit TAB
again (yours will look different):
grub> root (hd0<TAB>
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 1, Filesystem type is ext2fs, partition type 0x83
Partition num: 2, Filesystem type unknown, partition type 0x82
Partition num: 3, Filesystem type is ext2fs, partition type 0x83
If it only shows one partition, you've got the wrong drive; try again with drives 1,2,3 to make sure you install to the right drive.