Page 1 of 1

Minimal Bash-like line editing is supported

PostPosted: 2020-08-02 04:48
by arianpranav
While installing Debian along with Windows i usually take below route if i want fresh Debian at any point of time:
Open Windows
Open Disk Management
Delete Linux Partitions (usually two : swap about size of RAM and native as you provided = sum of unallocated space left free where you installed linux)
Reboot With bootable Debian disk and install fresh

Though this works fine most of the time but at times the GRUB installer fails to start with error : Minimal Bash-like line editing is supported stops everything and you are stuck.

For above issue i tried and read couple of methods but below worked fine for me with sure shot :
Login windows
Run Diskpart
Type: list disk
Type: select disk 0 (the disk with boot partition usually first in list , please check)
Type: list partition
Type : select partition 2 (usually second partition around 100 mb as type system)
Type: assign letter=x

Now open cmd as admin
Type: x:
Type: Dir
Type: cd EFI
Type: Dir
Type: rd debian /s (delete any linux folders like Ubuntu,Fedora or Debian)

Please note i also tried BootRec /fixmbr and windows repair and windows re-install etc. which did not fixed above issue so in my case above two sets of instructions solved it easily. Hope this helps someone who is gated due to above problem and looking for quick fix.

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-02 12:24
by p.H
What do you mean by "GRUB installer" ?

To me, grub-installer is the Debian installer component in charge of installing GRUB.
But the above message cannot be displayed by grub-installer. It is displayed at boot time by the GRUB core image when failing to load files required to display the boot menu. The cause is likely to be either :
- the computer booted on the internal drive (now containing an incomplete GRUB) instead of the installation media
- or the installation media was not properly prepared

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-02 22:08
by sunrat
Could a mod move this to off-topic? It is in no way a recommended way to repair grub in Linux. It shows Windows tools only and deleting contents from EFI is like chopping your head off to remove a pimple.

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-03 18:12
by arianpranav
p.H wrote:What do you mean by "GRUB installer" ?

To me, grub-installer is the Debian installer component in charge of installing GRUB.
But the above message cannot be displayed by grub-installer. It is displayed at boot time by the GRUB core image when failing to load files required to display the boot menu. The cause is likely to be either :
- the computer booted on the internal drive (now containing an incomplete GRUB) instead of the installation media
- or the installation media was not properly prepared


Yes the message is displayed when it fails to load the required files if the drive with Linux is removed or it is not properly installed. The message comes when one try to install the Debian or any other Linux Distro on dual boot system.

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-03 18:15
by arianpranav
sunrat wrote:Could a mod move this to off-topic? It is in no way a recommended way to repair grub in Linux. It shows Windows tools only and deleting contents from EFI is like chopping your head off to remove a pimple.


It is not grub repair to be precise, further deleting contents from EFI is only option if you want to install any Linux Distro in that machine in future, please suggest any better approach if you have any.

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-03 18:34
by cuckooflew
I don't use grub and don't use windows, that is the best approach, in my opinion,...But even if I did use Grub, none of this would do me any good, it all requires "MS windows" tools,... so Yes, I do agree , it belongs in off topic, it is not at all a "How to" that supports Linux or Debian,
==== edit ===
IMPORTANT: IF you are new to Linux or Debian, DO NOT follow this guide, it could leave you with more problems the you started with
Ask us on the forum, and give a good description of exactly what problem you have, be it grub repair or other,... DO NOT:
Delete Linux Partitions (usually two : swap about size of RAM and native as you provided = sum of unallocated space left free where you installed linux)

DO NOT, believe this:
Though this works fine most of the time but at times the GRUB installer fails to start with error : Minimal Bash-like line editing is supported stops everything and you are stuck.
You are not "stuck", there is a way solve that error, exactly how will depend on many things.
DO NOT: Delete anything in the EFI directory, with out consulting advice from knowledgeable Linux users, obviously any one silly enough to be using MS windows, will not be qualified to give any instructions for a Linux or Debian system.

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-03 18:39
by Head_on_a_Stick
arianpranav wrote:please suggest any better approach

Use efibootmgr(8) to clear unwanted NVRAM entries (or bcdedit from Windows).

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-03 18:46
by dilberts_left_nut
sunrat wrote:Could a mod move this to off-topic? It is in no way a recommended way to repair grub in Linux. It shows Windows tools only and deleting contents from EFI is like chopping your head off to remove a pimple.

Agreed - done.

Re: Minimal Bash-like line editing is supported

PostPosted: 2020-08-03 18:51
by cuckooflew
Thank you