Linux Error: 'Minimal BASH-like line editing is supported' — Cause, Fix, and Troubleshooting Guide
How to fix the Linux 'Minimal BASH-like line editing is supported' grub> prompt: boot by hand with set root/linux/initrd, then regenerate grub.cfg.
- #linux
- #troubleshooting
- #grub
- #boot
- #recovery
Stuck on this Linux Admins error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
Overview
Minimal BASH-like line editing is supported. is the banner GRUB prints when it drops to the full grub> prompt instead of showing the boot menu. Unlike grub rescue>, this prompt means GRUB loaded its modules successfully — it just has no menu to display because it could not find or read a valid grub.cfg. The core image is healthy; the configuration is missing, empty, or corrupt.
GNU GRUB version 2.06
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.
grub>
Because the normal module and filesystem drivers are already loaded here, you have a much richer command set than at grub rescue> — including linux and initrd. That means you can boot the system by hand in a few lines, then regenerate the missing config so the menu returns permanently.
Symptoms
- Boot lands at a
grub>prompt showing the “Minimal BASH-like line editing is supported” banner — no OS menu. - Tab-completion works for commands and file paths (a sign modules loaded fine).
linux,initrd,ls,set,search, andconfigfileare all available.- It appeared after
/bootfilled up, a partial upgrade, an accidental deletion of/boot/grub/grub.cfg, or a filesystem hiccup that corrupted the config.
Common Root Causes
Common production causes first:
- Missing
grub.cfg—/boot/grub/grub.cfgwas deleted, truncated, or never regenerated after a kernel change; GRUB has nothing to build a menu from. - Corrupt
grub.cfg— a full/bootduringupdate-grubwrote a partial/empty config, or a filesystem error damaged the file. /bootfilled up — no free space meant the lastupdate-grubcould not finish writing the config.- Wrong prefix after a move — GRUB’s
prefixpoints at a directory that no longer containsgrub.cfg(e.g., after moving/boot). - Manual GRUB surgery gone wrong — an edited or half-installed GRUB left the core image intact but the config absent.
How to diagnose
At the grub> prompt you can inspect disks and confirm the kernel/initrd are present before booting.
# What does GRUB think its prefix/root are?
set
# What disks and partitions exist?
ls
# Find the partition that holds your kernel and grub directory
ls (hd0,gpt2)/
ls (hd0,gpt2)/boot
ls (hd0,gpt2)/boot/grub # is grub.cfg present? often it is missing/empty here
# Confirm the exact kernel and initrd filenames to type later
ls (hd0,gpt2)/boot/vmlinuz-*
ls (hd0,gpt2)/boot/initrd.img-*
If ls (hd0,gpt2)/boot/grub lists modules but no grub.cfg (or a zero-length one), the diagnosis is confirmed: config is the problem, not the bootloader. You can also try configfile (hd0,gpt2)/boot/grub/grub.cfg — if it errors or does nothing, the file is missing or broken.
Fixes
Fix 1 — boot the system by hand from grub>
Set the root partition, load the kernel with the correct root=UUID=, load the matching initrd, and boot. At grub>, the syntax mirrors a menu entry.
grub> set root=(hd0,gpt2)
grub> linux /boot/vmlinuz-6.8.0-40-generic root=UUID=1111-2222 ro
grub> initrd /boot/initrd.img-6.8.0-40-generic
grub> boot
Notes:
- Use Tab-completion after typing
/boot/vmlinuz-and/boot/initrd.img-to fill the exact version — the filenames must match precisely. - If
/bootis a separate partition, drop the/bootprefix:linux /vmlinuz-... root=UUID=1111-2222 roandinitrd /initrd.img-.... - Find the real root UUID from a live USB with
blkid, or usesearch --file --set=root /boot/vmlinuz-6.8.0-40-genericto let GRUB locate the partition for you.
This gets you into the running OS once. It does not fix the missing config — the next boot returns to grub> until you complete Fix 2.
Fix 2 — regenerate grub.cfg permanently
Once booted (or from a live-USB chroot), rebuild the config so GRUB has a menu again.
# First, make sure /boot is not full — a common root cause
df -h /boot
# Debian / Ubuntu
sudo update-grub
# (update-grub is a wrapper around grub-mkconfig -o /boot/grub/grub.cfg)
# RHEL / Rocky (BIOS)
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# RHEL / Rocky (UEFI)
sudo grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
If the config was missing because the GRUB install itself is suspect, reinstall the bootloader too so prefix and modules are consistent:
Warning:
grub-installwrites to a disk’s boot area. On BIOS pass the whole disk (/dev/sda), never a partition. Confirm the target withlsblkfirst; the wrong disk can leave the machine unbootable.
# BIOS — Debian/Ubuntu
sudo grub-install /dev/sda && sudo update-grub
# UEFI — Debian/Ubuntu
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu && sudo update-grub
Fix 3 — chroot from a live USB (if hand-booting fails)
sudo mount /dev/sda2 /mnt # root
sudo mount /dev/sda1 /mnt/boot # separate /boot, if any
sudo mount /dev/sda1 /mnt/boot/efi # EFI partition, if UEFI
for d in dev proc sys; do sudo mount --bind /$d /mnt/$d; done
sudo chroot /mnt
df -h /boot # clear space if full, then:
sudo update-grub # or grub2-mkconfig for RHEL/Rocky
What to watch out for
grub>vsgrub rescue>: atgrub>thenormalmodule is already loaded, so you can runlinux/initrddirectly — do not confuse this with the more limited rescue prompt.- Exact filenames:
linux/initrdfail silently or with “file not found” if the version string is off by a digit. Tab-complete rather than typing from memory. - Separate /boot: the single most common reason hand-boot fails is including (or omitting) the wrong
/bootprefix. Match it to howlsshows the files. - Full
/boot: ifdf -h /bootis at 100%,update-grubcannot write the config — remove old kernels (apt autoremoveordnf removeold kernel packages) first, then regenerate. - Never hand-edit grub.cfg to keep it:
grub.cfgis generated. Always regenerate withupdate-grub/grub-mkconfig; a hand-edited file is overwritten on the next kernel update.
Related
- grub rescue> … no such device
- Kernel panic - not syncing: VFS: Unable to mount root fs
- No space left on device
Want faster Linux incident response? Use DevOps AI Toolkit to turn production errors into clear diagnostics, remediation steps, and reusable runbooks.
Fixed it? Get 500 Linux Admins & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Trending errors this week
The error guides other engineers are actually reading right now.
- 1mount: wrong fs type, bad option, bad superblock
- 2Docker 'failed to set up container networking': Fix the Bridge and IP Pool
- 3Docker 'failed to create shim task': How to Fix the containerd Runtime Error
- 4modprobe: FATAL: Module not found
- 5mount: wrong fs type, bad option, bad superblock
- 6Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.