Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Assuming you want to install the 64-bit UEFI version of GRUB, you need to add the "--efi-directory" parameter to tell grub-install which directory will be used as the EFI system partition. (For a USB flash drive, it would be the same as the root directory, so use "--efi-directory=/media/YourLabel".)
If you actually want to install the legacy BIOS version of GRUB, add the "--target=i386-pc" parameter to your grub-install command instead.
Octocontrabass wrote:Assuming you want to install the 64-bit UEFI version of GRUB, you need to add the "--efi-directory" parameter to tell grub-install which directory will be used as the EFI system partition. (For a USB flash drive, it would be the same as the root directory, so use "--efi-directory=/media/YourLabel".)
Octocontrabass wrote:Assuming you want to install the 64-bit UEFI version of GRUB, you need to add the "--efi-directory" parameter to tell grub-install which directory will be used as the EFI system partition. (For a USB flash drive, it would be the same as the root directory, so use "--efi-directory=/media/YourLabel".)
If you actually want to install the legacy BIOS version of GRUB, add the "--target=i386-pc" parameter to your grub-install command instead.
I tried to make a legacy and this is what happened:
sudo grub-install --root-directory=/media/YourLabel --target=i386-pc --no-floppy --recheck --force /dev/sdb
Installing for i386-pc platform.
grub-install: warning: Filesystem `fat' doesn't support embedding.
grub-install: error: embedding is not possible, but this is required for cross-disk install.
set timeout=15
set default=0 # Set the default menu entry
menuentry "OS Name" {
multiboot /boot/kernel-file # The multiboot command replaces the kernel command
boot
}
jamesread wrote:Is the tutorial going to be updated?
Are you offering to update it? We could really use the help.
I made the iso image with grub-mkrescue and ran the image in qemu. It drops immediately to a grub command line without showing any kind of menu.
Regarding updating the wiki. Of course, I would love to help once I've got sufficient knowledge and experience to do so. You would think some form of grub-install command would work but alas up to now I haven't managed to find one that does. Have you managed to get anything working?
jamesread wrote:I made the iso image with grub-mkrescue and ran the image in qemu. It drops immediately to a grub command line without showing any kind of menu.
It sounds like you have missed step 4 on the wiki, copying grub.cfg over.
jamesread wrote:You would think some form of grub-install command would work but alas up to now I haven't managed to find one that does. Have you managed to get anything working?
As long as CDROM concerned, here's what I use. As for the USB boot, well, I've found figuring out Grub so much difficult and overcomplicated, that I ended up writing my own loader and image creator instead...
jamesread wrote:I made the iso image with grub-mkrescue and ran the image in qemu. It drops immediately to a grub command line without showing any kind of menu.
It sounds like you have missed step 4 on the wiki, copying grub.cfg over.
Yep. That was it. It works now. Now I just need to figure out how to make a hello world kernel to get me started.