Grub Shell Startup: Loading Ubuntu from a Hard Drive Next to Win10

Abstract: Resolve GRUB shell errors in dual-boot setups by manually locating partitions and booting Ubuntu from the command line.

Created: 2026-08-29 by

When GRUB drops you into a shell instead of booting Ubuntu, the bootloader cannot find its configuration or kernel files. This usually happens because the EFI System Partition is missing, corrupted, or not mounted correctly in the GRUB environment. You can resolve this by manually locating the correct disk and partition, mounting them, and then either chaining to Windows or booting Linux directly from the command line.

Understanding the GRUB Shell Environment

The grub> prompt indicates that the standard GRUB menu system failed to initialize. Unlike a full operating system, the GRUB shell has limited commands and no access to your installed hard drive unless it is explicitly identified and mounted. The error often stems from a mismatch between where GRUB was installed and where the /boot/grub directory actually resides. In dual-boot setups with Windows 10, this frequently occurs if the UEFI partition was accidentally deleted or if the BIOS/UEFI boot order changed after a hardware update. Before attempting any fixes, identify which disk contains your Ubuntu installation. Use the ls command followed by a space to list available devices. The output will look something like (hd0,gpt1), (hd0,gpt2), etc. Note that these identifiers are relative to the GRUB environment, not necessarily matching /dev/sda in Linux. You must determine which device holds your root filesystem and which holds the EFI System Partition (ESP).

Locating Your Partitions

To find your partitions, use the ls -l command on potential devices. Look for file systems labeled as ext4 for your Ubuntu root partition and FAT32 for the EFI partition. For example:
ls (hd0,gpt1)/
ls (hd0,gpt2)/
If one partition lists directories like boot, etc, and home, that is likely your Ubuntu root. If another shows files like EFI, BOOT, and microsoft, that is your ESP. Write down the correct device identifiers for both. If you cannot identify the partitions easily, you may need to boot from a Live USB to verify the partition layout using fdisk -l or lsblk, then return to the GRUB shell with that knowledge.

Booting Ubuntu Manually from the Shell

Once you have identified the correct partitions, you can attempt to boot Ubuntu directly. Assume (hd0,gpt2) is your root partition and (hd0,gpt1) is your EFI partition. First, set the root device to your Ubuntu partition:
set root=(hd0,gpt2)
Next, load the Linux kernel. You need to specify the path to the vmlinuz file inside the boot directory. The exact filename depends on your installed kernel version. You can discover it by listing the contents of the boot directory:
ls /boot/vmlinuz-*
Suppose the output shows vmlinuz-5.15.0-generic. Load the kernel with the following command, ensuring you include the ro flag for read-only mode and root=/dev/sdXN pointing to your actual root partition device name (e.g., /dev/sda2):
linux /boot/vmlinuz-5.15.0-generic root=/dev/sda2 ro
After loading the kernel, you must load the initial RAM filesystem (initrd). List the initrd files similarly:
ls /boot/initrd.img-*
Load the corresponding initrd image:
initrd /boot/initrd.img-5.15.0-generic
Finally, start the boot process with the boot command. If successful, Ubuntu will load. However, this is a temporary fix. To make it permanent, you must repair the GRUB installation from within a working Linux environment.

Repairing GRUB Permanently

Booting from the shell does not fix the underlying issue. Once you are logged into Ubuntu, open a terminal and reinstall GRUB to ensure it can find the EFI partition and configuration files next time. The method depends on whether your system uses UEFI or Legacy BIOS. Most modern Windows 10 installations use UEFI. For UEFI systems, mount the EFI partition first. Identify the EFI partition device (e.g., /dev/sda1) and mount it to /boot/efi:
sudo mount /dev/sda1 /boot/efi
Then, reinstall GRUB using the correct target architecture. Do not use /dev/sda directly without specifying the EFI target, as this can overwrite critical Windows bootloader files. Use the following command:
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
This command writes the GRUB EFI binary to the correct location on the FAT32 partition. Afterward, update the GRUB configuration file to reflect the current kernel versions:
sudo update-grub
Reboot your computer. If the repair was successful, the GRUB menu should appear normally, allowing you to select Ubuntu or Windows 10. If the system still fails to boot, check your BIOS/UEFI settings to ensure the Ubuntu bootloader entry is prioritized or enabled. Refer to Accidentally Deleted UEFI Partition: Can't Boot Linux Mint if the EFI partition itself is missing and needs reconstruction from a backup or live media.

Chaining to Windows 10

If your primary goal is simply to access Windows 10 when GRUB fails, you can chainload the Windows bootloader from the GRUB shell. Assuming (hd0,gpt1) is your EFI partition containing the Windows bootloader:
set root=(hd0,gpt1)
Navigate to the Microsoft bootloader path:
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
Press Enter to execute. This transfers control to the Windows bootloader, allowing you to boot into Windows 10. This is useful if you cannot immediately repair Linux but need access to your Windows data. However, note that Cant boot dual partition - GRUB issue discusses scenarios where partition UUIDs change, which might require updating the grub.cfg file once you regain access to the OS.

Common Pitfalls and Verification

Ensure that the root variable points to the correct partition before loading kernels. A common mistake is confusing the EFI partition with the root partition. Always verify with ls commands. Additionally, check that the kernel and initrd filenames match exactly, including hyphens and version numbers. Typos here will result in "file not found" errors. If you frequently encounter this issue, consider backing up your /boot/grub/grub.cfg file regularly. For insights into how modules are loaded during this process, see Understanding the Loading of Modules by initramfs in Linux.

Frequently Asked Questions

Why did my GRUB menu disappear completely?

This usually happens when the /boot/grub/grub.cfg file is deleted or the EFI partition is formatted. Without this configuration file, GRUB falls back to the minimal shell interface. Reinstalling GRUB from a Live USB or chroot environment restores the necessary files.

Can I use the GRUB shell to edit my boot options?

No, the GRUB shell is a runtime environment, not a text editor. You can type commands to boot temporarily, but any changes made here are lost on reboot. Permanent edits must be made to /etc/default/grub and /boot/grub/grub.cfg within the Linux OS.

What if I don't know the kernel version?

You can list available kernels by typing ls /boot/vmlinuz-* in the GRUB shell. This will display all compatible kernel images stored in the boot directory of the mounted partition, allowing you to select the correct filename for the linux command.

Is it safe to run grub-install on a dual-boot system?

Yes, provided you specify the correct EFI directory and target. Using --target=x86_64-efi ensures only the Ubuntu bootloader is written to the EFI partition, leaving the Windows bootloader intact. Avoid running it without arguments, as it may detect the wrong disk.

How do I prevent this from happening again?

Regularly update GRUB after kernel upgrades using sudo update-grub. Also, avoid formatting the EFI partition unless you intend to reinstall Linux. Keeping a backup of your grub.cfg file allows for quick restoration if corruption occurs.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More