GNU GRUB (Stands for GNU GRand Unified Bootloader) is a boot loader package. It is a part of the GNU project. It is the reference implementation of the Free Software Foundation’s Multiboot Specification, that provides a user the choice to boot one of multiple operating systems installed on a computer. It also provides the facility to choose a specific kernel configuration available on a specific OS partition. The Minimal BASH Like Line Editing is Supported GRUB Error In Linux looks like as shown below:
Steps to Solve Minimal BASH..GRUB Error
Step 1: Find the partition in which your Linux partition is stored. We can use the ls command to check for available partitions and their filesystem. Linux operating systems usually use ext2/ext3/ext4 filesystems.
grub> ls
This will show us all existing partitions.
Note: If you don’t know which partition has Linux OS then you can check with the ls command as follows:
grub> ls (hdX, Y)
Here, X is disk number and Y is partition name. For Example: grub> ls (hd0, gpt3) or grub> ls (hd1, msdos5)
Step 2: After knowing the partition, 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.
grub> set root=(hdX, Y) grub> set prefix=(hdX, Y)/boot/grub
Step 3: Install normal module and load it:
normal: Linux mod file (linux.mod) used to load kernal. Command used to install mod : insmod
grub> insmod normal
Run this mod file the setup your GRUB:
grub> normal
Step 4: Update GRUB. After entering your Linux OS, reinstall GRUB and update it. Open the terminal and enter following commands:
sudo grub-install /dev/sdXY sudo update-grub
Here, X is disk number and Y is partition number of EFI partition. If you don’t know which partition is an EFI partition, use Disks or GParted to check.
Restart your PC and the Minimal GRUB error will be solved!!
The other day when I installed Elementary OS in dual boot with Windows, I encountered a Grub error at the reboot time. I was presented with command line with error message:
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.
Indeed this is not an error specific to Elementary OS. It is a common Grub error that could occur with any Linux OS be it Ubuntu, Fedora, Linux Mint etc.
In this post we shall see how to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu based Linux systems.
You can read this tutorial to fix similar and more frequent issue, error: no such partition grub rescue in Linux
Prerequisites
To fix this issue, you would need the followings:
- A live USB or disk of (preferably) the same Linux distribution
- A working internet connection in the live session
Once you make sure that you have the prerequisites, let’s see how to fix the black screen of death for Linux (if I can call it that ;)).
Fixing “minimal BASH like line editing is supported” Grub error
The process is simple if you follow the steps carefully (not blindly). You may have to change the partition names as per your system.
Step 1: Boot in to the live Linux USB.
Step 2: You need to find out iif your system uses EFI or BIOS. To do that, open the terminal and use the following command to list your partitions:
sudo fdisk -l
Look closely in its output because it could be a huge output. If you see something like EFI, it’s an indication that your system has EFI. This information is important in later stages.
Device Start End Sectors Size Type
/dev/sda1 2048 976895 974848 476M EFI System
/dev/sda2 976896 40038399 39061504 18.6G Linux filesystem
/dev/sda3 40038400 79099903 39061504 18.6G Linux filesystem
/dev/sda4 79099904 468875263 389775360 185.9G Linux filesystem
You need to note two things here. The partition where EFI is installed (if it is installed) and the partition where root partition is installed.
Step 3 (for UEFI systems only): Now, what you need to do is to reinstall grub.
Mount the root partition first. I am using /dev/sda2 for root but you should change this with what you have on your system:
sudo mount /dev/sda2 /mnt
If you have EFI system, mount that partition as well:
sudo mount /dev/sda1 /mnt/boot/efi
Now, the next step is to finally install grub for UEFI system like this:
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
Restart Ubuntu Linux using this command:
shutdown -r now
You should have the grub back to normal.
Step 3 (only for non-EFI system): Installing grub on non-EFI system is even easier.
Mount the root partition of Linux:
sudo mount /dev/sda1 /mnt
And then install grub:
sudo grub-install /dev/sd1
Reboot and it should be fine.
Alternate method to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu based Linux
I know that you might point out that this Grub error is not exclusive to Ubuntu or Ubuntu based Linux distributions, then why am I putting emphasis on the world Ubuntu? The reason is, here we will take an easy way out and use a tool called Boot Repair to fix our problem. I am not sure if this tool is available for other distributions like Fedora. Without wasting anymore time, let’s see how to solve minimal BASH like line editing is supported Grub error.
Step 1: Boot in lives session
Plug in the live USB and boot in to the live session.
Step 2: Install Boot Repair
Once you are in the lives session, open the terminal and use the following commands to install Boot Repair:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair
Note: Follow this tutorial to fix failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs error, if you encounter it while running the above command.
Step 3: Repair boot with Boot Repair
Once you installed Boot Repair, run it from the command line using the following command:
boot-repair &
Actually things are pretty straight forward from here. You just need to follow the instructions provided by Boot Repair tool. First, click on Recommended repair option in the Boot Repair.
It will take couple of minutes for Boot Repair to analyze the problem with boot and Grub. Afterwards, it will provide you some commands to use in the command line. Copy the commands one by one in terminal. For me it showed me a screen like this:
It will do some processes after you enter these commands:
Once the process finishes, it will provide you a URL which consists of the logs of the boot repair. If your boot issue is not fixed even now, you can go to the forum or mail to the dev team and provide them the URL as a reference. Cool, isn’t it?
After the boot repair finishes successfully, shutdown your computer, remove the USB and boot again. For me it booted successfully but added two additional lines in the Grub screen. Something which was not of importance to me as I was happy to see the system booting normally again.
Did it work for you?
So this is how I fixed minimal BASH like line editing is supported Grub error in Elementary OS Freya. How about you? Did it work for you? Feel free to ask a question or drop a suggestion in the comment box below.
I copied from eli’s answer in Unix forum
Cause: boot process can’t find the root partition
Solution
Please type
ls
This will show all partitions, and then type individual
ls (hd0,1)/
ls (hd0,2)/
… and so on, until you find like
(hd0,1)/boot/grub
or (hd0,1)/grub
In case of EFI,
(hd0,1)/efi/boot/grub
or (hd0,1)/efi/grub
… now set the boot parameters accordingly, just type this with your number
set prefix=(hd0,1)/grub
set root=(hd0,1)
insmod linux
insmod normal
normal
now it would boot and please open the Terminal and put this command line
sudo update-grub
… it should boot correctly in the next time. If not, you have to go through the steps again. In other case, you might have to repair or install grub again, please look at this article.
My SW: Windows 10 and Ubuntu 16.04 dual boot
HW: HP Pavilion 15t
Указать, откуда грузиться. Конкретная команда зависит от твоей разметки, UEFI или BIOS и прочего.
Вообще, если это появилось вместо нормальной загрузки, то что-то не в порядке.
- Показать ответ
- Ссылка
Ответ на:
комментарий
от Vsevolod-linuxoid 30.12.20 14:11:46 MSK
Используй efistub. Нет груба — нет проблем.
anonymous
(30.12.20 14:21:49 MSK)
- Ссылка
Конфиг сгенерируй
puffy ★★
(30.12.20 14:38:48 MSK)
- Ссылка
Ты сначала напиши как ты оказался в этой ситуации.
anonymous
(30.12.20 14:54:08 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от anonymous 30.12.20 14:54:08 MSK
кратко: вечером закрыл крышки ноутбука, утром открыл и ошибка нечто типа что система readonly, такое иногда бывает и лечится fsck, поэтому я перезапустил, и оказался в гробу
- Показать ответы
- Ссылка
Ответ на:
комментарий
от BoyNextDoor 30.12.20 14:58:53 MSK
Я бы загрузился с livecd примонтировал системный раздел, сделал chtoot и посмотрел что там случилось, заодно сгенерировал конфиг груба, в убунте видимо как в дебиан update-grub.
однако если у тебя
такое иногда бывает и лечится fsck
я бы подумал о замене hdd/ssd
anonymous
(30.12.20 15:31:46 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от BoyNextDoor 30.12.20 14:58:53 MSK
Ответ на:
комментарий
от anonymous 30.12.20 15:31:46 MSK
Ответ на:
комментарий
от BoyNextDoor 30.12.20 15:40:14 MSK
micro sd
ну с этого бы и начинал. какие тут гарантии могут быть. а чего, зачем тебе 3 системы? хочешь поэкспериментировать ставь в виртуалку. микросд точно не вариант.долго. ненадежно.
anonymous
(30.12.20 15:59:36 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от anonymous 30.12.20 15:36:52 MSK
это система на поиграться, на микросд. чего ему заморачиваться. только если для общего развития.
anonymous
(30.12.20 16:01:21 MSK)
- Ссылка
Ответ на:
комментарий
от anonymous 30.12.20 15:59:36 MSK
Ответ на:
комментарий
от BoyNextDoor 30.12.20 16:09:43 MSK
Нет. Или у тебя пентиум3? Про заморочки я даже не говорю, но дело твое конечно. Удачи.
anonymous
(30.12.20 16:19:05 MSK)
- Показать ответы
- Ссылка
Ответ на:
комментарий
от anonymous 30.12.20 16:19:05 MSK
у меня на ноутбуке пентиум, но не 3)
- Ссылка
Ответ на:
комментарий
от anonymous 30.12.20 16:19:05 MSK
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
You probably have encountered ‘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.’ error if you have recently updated Windows, which is installed side by side to your Linux installation.
Windows updates have a history of corrupting the boot files or partition of the Linux installations. You can encounter this error in any Linux distribution. But don’t worry, there’s an easy fix for this error.
Prerequisites to Fix This Error
You will need the following things to get started :
- Live USB stick of the same Linux Distribution
- An Internet connection (Ethernet or Wi-Fi)
If you do not have a Live USB stick, you can create one by following the steps mentioned here.
Boot into the live USB stick of your distribution, now follow these steps carefully:
1. Check if your system uses EFI or BIOS
Type the following command in the terminal to check the type of your system :
If anywhere, you spot something like ‘EFI’ then that means your system is of EFI type. Most of you probably have this type of installation.
2. For UEFI based systems
We are now going to mount our root (/) partition, in my case, it is /dev/sda2, but yours can be different. Look closely at your fdisk command output to know your root partition, and then mount it using this command :
sudo mount /dev/sdaX /mnt
Now, we will mount our EFI partition as well. To do that, type :
sudo mount /dev/sdaY /mnt/boot/efi
Again, don’t forget to change X and Y with the correct partition numbers on your disk. Finally, reinstall grub using the following commands :
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
And now finally, restart your system by typing the following commands in the terminal and remove your Live USB stick when prompted.
3. For BIOS systems
We will again mount our root partition using the following commands :
sudo mount /dev/sdaX /mnt
And then we will easily re-install GRUB using the following commands :
sudo grub-install /dev/sdX
Reboot your system now and remove the installation media when prompted. Your system should work fine now.
Solution #2 – Minimal BASH-like line editing is supported error in Ubuntu Linux
If the above method didn’t work for you, then you can try installing a tool called ‘Boot Repair’. This tool is capable of detecting and fixing all the GRUB-related problems for you. You will also need a live USB stick of the distribution for this method.
1. Install Boot Repair tool
Boot into your live USB stick, open a terminal, and add this repository :
sudo add-apt-repository ppa:yannubuntu/boot-repair
Run an update first and then install the boot-repair tool as follows :
sudo apt-get update sudo apt-get install boot-repair
2. Repair your installation
Launch the boot repair tool by typing the following commands in your Terminal :
A window will appear before you, click on the ‘Recommended Repair’ option.
It will take some time, but after that, it will present you with some commands to fix the issue. Copy (or type) the commands one by one in the Terminal.
If while typing the commands a window appears, select yes and remove the old GRUB files. Once the process is finished, You will be greeted with a menu which will tell you to restart your system. You can also check the log files mentioned in the URL. Don’t forget to remove your installation media when prompted.
Summary
Hopefully, one of the two methods mentioned above was able to fix this issue for you.