How do I list my devices in GRUB?

I am trying to boot my own simple OS kernel using GRUB stage2_eltorito. However, the compiled ISO simply leads to a GRUB prompt. I looked up online, and I saw I need to load my kernel. However, when I try to load my kernel, it says I need to load a hard disk first, using the root command. How do I load my ISO file's partition to load my kernel? Thanks in advance!


There is your howto:

https://www.linux.com/learn/how-rescue-non-booting-grub-2-Linux

or here:

https://askubuntu.com/questions/38082/how-do-i-manually-boot-from-the-grub-prompt-after-do-release-upgrade

In short:

grub> set pager=1
grub> ls
(hd0) (hd0,msdos2) (hd0,msdos1)
grub> ls (hd0,1)/
lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/  lib/
lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/ 
srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old 
initrd.img initrd.img.old

This is just example, you have to modify it to your situation. You have examples in linked howtos.


The grub ls -l command will show all devices and partitions with their UUID-s.

thanks to