When in grub rescue, you only got insmod, ls, set, unset (I think). Thus, you must insmod the required modules in order to be able to do anything substantial.
do:
set root=<whatever>
set prefix=<whatever>/boot/grub
where <whatever> is like (md0) or (hd2,1). the /boot/grub is by default where modules are, so that insmod will work.
If that works, try:
insmod boot //”installs”/”loads” the boot command
insmod linux
(if you get something like ” error: symbol not found: `grub_mm_base'” . find another location that has the .mod other than /boot/grub [the prefix above] and set it to prefix. If you don’t have that, you’re sol I believe.)
For the fun of it (may not be required), try:
insmod mdraid
insmod raid
if you were using raid anything.
also try
insmod lvm
insmod ext2
insmod part_msdos
insmod as much as you can. Heck, you’re in grub rescue, you’re panicking anyways.
then, locate your vmlinuz* and initrd.img (likely at / or at /boot;), and issue the following, adjust your root drive partition accordingly e.g.:
linux /vmlinuz root=/dev/sdi1 ro rootdelay=130 console=ttyS0,9600n8
initrd /initrd.img
boot
the ttyS0 above tells it which serial port to display the console at, so it’s important. Usually it’s either S0 or S1.
Hopefully that works, if not, and if it breaks you into initramfs, see if it’s because it’s missing your software raids or something. If you are using software raids and it’s missing, you can try from the initramfs prompt:
cat /proc/mdstat
to see if the software raids are started. If not,
mdadm –assemble –scan
to start mdadm.
then update your mdadm.conf:
mdadm -Es > /etc/mdadm/mdadm.conf
and type exit to continue booting