"Minimal BASH-like line editing is supported" After the replace of the motherboard

I've newly replaced a motherboard to the below one(shown in the link).

And as I boot the computer I get the following messages with the shell environment.

Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.

I've already inserted the CD which came with the motherboard.

As now, BIOS window can be displayed.

The ssd and other components like USB have been recognized by the computer.

What should I do for next?

The below components are mine.

CPU(i5 10th generation)

Memory(4_GB)

motherboard

graphic card

What I tried after I've read the answer shown below.

I located the place where the os has been installed.

But I've been struggling to locate where the GRUB has been installed.

I tried "ls (hdX, Y)/boot/grub"

and got

"error:unknown file system",

"error: /boot/grub not found"

"themes/ x86_64_efi/ locale/ fonts/ unicode.pf2 grubenv grub.cfg"←place where OS exists.


Solution 1:

I found two articles that describe solutions for the problem.

Solution 1 : GRUB

This comes from the article How to Fix Minimal BASH Like Line Editing is Supported GRUB Error In Linux?

  • Boot into Grub where the error is displayed

  • Locate your Linux disk with the command ls which will display your disks and their file-system. Linux will usually use ext2/ext3/ext4

  • When the partition is found, set root and prefix variables:

    • root: Variable which points where the entire Linux OS is installed.
    • prefix: Variable which points where the GRUB is installed.

using the command:

    grub> set root=(hdX, Y)
    grub> set prefix=(hdX, Y)/boot/grub
  • Install the normal module and load it:

      insmod normal
      normal
    
  • Now you should be able to boot into Linux

  • Update GRUB with these commands in the terminal:

      sudo grub-install /dev/sdXY
      sudo update-grub
    

    where X is disk number and Y is partition number of the EFI partition. To find which partition it is, use Disks or GParted to check.

  • Restart and it should work now.

Solution 2 : Live Linux

This comes from the article Fix Minimal BASH like line editing is supported GRUB Error In Linux.

  • Boot in to the live Linux USB

  • Mount the root partition and EFI partitions (use your disks):

      sudo mount /dev/sda2 /mnt
      sudo mount /dev/sda1 /mnt/boot/efi
    
  • install grub for UEFI:

      sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu  --target=x86_64-efi --efi-directory=/mnt/boot/efi  
    
  • Restart Linux:

      shutdown -r now
    
  • Grub should be back to normal.

You will find more details in the links, including the steps for a non-EFI computer.