I got into that bind when I screwed up my graphics driver..... and grub was using the graphics menu. It would not boot past the grub> command line. I had to boot the computer without a grub menu so that I could change the grub menu to "text" so that I could boot the computer to fix the graphics driver.... to get the grub menu to boot the computer. Now, when I install a new Mageia, I set the grub menu to "text" to avoid this strange loop.
Anyway, here is what I did to get the computer to boot.
Find out the names of the partitions using the ls command.
Find out the names of the kernels using the ls (boot partition) command.
Manually set the grub variables, root, linux, and initrd...... choosing a kernel from the boot partition.
Issue the boot command
See the example in the image below.
- Boot command sequence
- BootImage.jpg (212.05 KiB) Viewed 1202 times
That sequence of commands caused a manual boot that failed out of xorg because of the bad graphics driver, but it did boot to a command line. Here is the magic in text.
- Code: Select all
grub> ls
(hd0)(hd0,msdos8)(hd0,msdos7)(hd0,msdos6)(hd0,msdos5)(hd0,msdos1)
grub> ls (hd0,msdos7)/boot
.... shows all of the kernels and initrd images ....
grub> set root=(hd0,msdos7)
grub> linux /boot/vmlinuz-4.19.12-desktop-2.mga7
grub> initrd /boot/initrd-4.19.12-desktop-2.mga7.img
grub> boot
Since I installed Mageia 7 root directory on sda7 (msdos7) that is the one that I booted from. I have two systems installed on that disk, which is why the root directory was not sda1 (msdos1). If I had booted from msdos7 I would have booted Mageia 6.
I had to do a Ctrl-Alt-F5 to get it to show the command line login after booting.
Log in as root. At that point it is possible to edit the boot parameters etc. to try to fix the problem. The editor vim works OK in the console.
Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.